-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use with Dragino Lora GPS Hat #21
Comments
You need to do some little changes to the board configuration and on the board itself:
|
Hi, Thanks,
|
I suspect you changed the dio_mapping and entered the Raspberry pin number.
(I’m not quite sure what “and the pins 22 to 24 jumper” means – I take it that you use different pins on the Raspberry.)
Background: The SX127x have 6 DIOs that you can assign a function to. DIO0, for example, can output RxDone (0), TxDone (1) or CadDone (2). These 0,1,2 values have nothing to do with Raspberry pin numbers, they just identify SX127x functionality. A value of 4 would be illegal (and actually impossible to set). If you want to know more, look at the datasheet, starting with table 18. on p.46.
Instead, change the pin numbers in board_config.py.
|
Hi, I had the same issue, indeed you need to set DIO0 = 4 but make sure you change SWITCH to something else (I used 21) and change DIO3 (which is NC on the Dragino shield) to something toher than 25 or you will conflict with the SPI CS pin (since you have now soldered board-pins 22 & 24 together (which are BCM pins 25 & 8). Make sure to reboot as well as your GPIO setup will be all weird, but now I have it working. @mayeranalytics what are your thought on making a Dragino subclass with the correct pins that would allow this to work out of the box? If someone also knows to to software re-map GPIO to avoid the soldering step this could also be nice. |
@artificialsheep Thanks for the input. I don't have a Dragino shield, so I can't test anything. But if you have figured it out, and if you have the time, why don't you just make a pull request? |
Raspberry Pi stretch has an overlay for this included. To remap the SPI CE0 pin to work with the Dragino add the following to the /boot/config.txt file |
Hi, I'm also trying to use this library with a Dragino Lora GPS Hat v1.4 board on a RPi3, which has to retrieve some data from a RN2483 on a Waspmote Pro v1.5 and is giving me some problems aswell. I've also soldered the BCM 25 & 8 together and connected the DIO3 to BCM1 since it isn't connected on the board as seen here: PDF At the moment I can recieve data, but only something like once a few minutes if it's sending every 2 second. Only the first 3 bytes have the correct values most of the time while the rest is partly correct, and sometimes it just gets a dump of data. The code I'm using is a remake of the rx_cont.py:
|
I fixed my problem with the partly incorrect data from the RN2483. The Dragino LoRa GPS hat v.1.4's schematics referes to the LoRa module as "RFM92_93W" and I could not find out if it was using RFM92W or RFM93W. The main difference between the 2 is the spreading factor range, which for 92 is 6-12 and the 93 it is 6-9. |
Hi Bakhoj Just wondering if you managed to overcome the issue |
I am trying to get the Dragino board running on a Pi 3 but keep getting the following error:
At this point in the code, self.mode = 0 I have applied the CS remap as suggested by mkshrps and I have modified the LoRa.py file DI0=4 value. Does anyone have any suggestions on how to resolve this issue? |
This type of error usually occurs when SPI communication with the LoRa chip isn't working properly. All the error message is saying is that the LoRa chip isn't in the state it should be in. In this case the best approach is to go back to basics: Establish reliable communication, for example by reading out the RegOpMode register (0x01) and then toggling Sleep, Standby and Receiver mode and check whether the chip does really is in the appropriate state. When you get stuck, establish facts by eliminating error sources: E.g. try the Dragino with an Arduino and establish the board is fine. Then work forward. When SPI communication refuses to work then a Logic analyser can be useful. This whole process can be quite frustrating, but if you proceed logically you can figure it out. Or maybe someone else has already done that particular dance and can contribute the solution. |
I've had issues with a recent upgrade in raspbian where I had to enable
only SPI communication in raspi-config (disable one-wire and I2C). Also
make sure you are in the spi and gpio groups.
…On 19/11/2018 12:26, Mayer Analytics wrote:
This type of error usually occurs when SPI communication with the LoRa
chip isn't working properly. All the error message is saying is that
the LoRa chip isn't in the state it should be in.
In this case the best approach is to go back to basics: Establish
reliable communication, for example by reading out the RegOpMode
register (0x01) and then toggling Sleep, Standby and Receiver mode and
check whether the chip does really is in the appropriate state.
You can use |LoRa.py| in this library as a guide for how to do the
communication in python. There's also plenty of info on the interweb.
I suggest you install ipython on the Rasp and debug SPI/raspberry/LoRa
chip in the REPL.
On the Rasp in can be worthwhile trying to change the SPI frequency.
When you get stuck, establish facts by eliminating error sources: E.g.
try the Dragino with an Arduino and establish the board is fine. Then
work forward. When SPI communication refuses to work then a Logic
analyser can be useful.
This whole process can be quite frustrating, but if you proceed
logically you can figure it out.
Or maybe someone else has already done that particular dance and can
contribute the solution.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ag2pYWR4Fx_Y0OL3jUpLuq4YutggQ70Zks5uwpVlgaJpZM4OWFgU>.
--
Gabriel Dulac-Arnold
blacksheep.ai
|
Ideally you should use an oscilloscope to check what the pins are actually doing in particular the CS pin. If you can write a loop which reads a register you can then check the cs, Mosi,miso and sclk pins are doing something. This would confirm the remapping dtoverlay=spi0-cs,cs0_pin=25 is working . Also make sure the Reset pin is set high. |
For anyone that is interested, I got this working with the following configuration on a fresh install of Raspbian Stretch:
With these changes / additions I was able to get the Dragino Hats talking to each other over the Pi's without having to do any soldering on the Hat. |
HI there, i'm facing with similar problem. I made the modification as MikeRouten suggested and the test_lora.py works as expected. But when i run the rx_cont.py or any other example i get this:
any suggestion? |
The config was adjusted according to [1], to support the Dragino LoRa + GPS Board on the Raspberry Pi 3. [1] mayeranalytics#21
The config was adjusted according to [1], to support the Dragino LoRa + GPS Board on the Raspberry Pi 3. [1] mayeranalytics#21
The config was adjusted according to [1], to support the Dragino LoRa + GPS Board on the Raspberry Pi 3. [1] mayeranalytics#21
Hi there. IntroductionWe spent some time on revamping these libraries to be used within our Terkin Datalogger. While adding some bits from the community and general polishing, the main contribution from our pen was daq-tools/dragino-lorawan@772f552d, in order to be able to configure the Dragino class at runtime to become independent of the ResourcesThe trees we have modified:
UsageThe code is driven by terkin.network.lora.LoRaDriverDragino. You might want to use this as an example blueprint. InstallationThis outlines an ad hoc way of getting the bits and pieces installed together in a coherent manner. Tearing the libraries apart and publishing them to PyPI would have been the better option, but we will postpone this into the future for now.
CreditsThanks a bunch to
Cheers, |
Hi, I am new to using LoRa and the Dragino Hat for Raspberry pi. I am currently working on a project that I would like to have the Heltec LoRa32 talk to the Dragino Hat locally. Is there any suggestions on how to get started or if this is a possibility? I've ran the lora_test.py and I get this error: Thank you! |
The failed test tells you that the LoRa chip is not in the correct mode, or registers don't have the expected values. This usually means that there are communication problems. When I look at your log, I see that the read commands seem to always return |
I end up using Heltec LoRa32 as my gateway since I'm having so much trouble with Dragino LoRa Hat for the RPi. |
Hi again, following up on our last post at #21 (comment), we would like to bring to your attention that @BNNorman picked up the torch and has been working on his fork 1 continuously since May 2021. For further information, see also daq-tools/dragino-lorawan#1 where Brian shared an overview about the improvements and features he has been working on, status November 2021. With kind regards, /cc @Tonkenfo Footnotes |
Thank you so much @amotl ! I will look into it. I really appreciate it |
Did you really mean Gateway? Gateways are supposed to be able to receive on 8 channels simultaneously. Single channel gateways are not supported by TTN (AFAIK). Check your Dragino LoRA/GPS HAT version is V1.4 - it has DIO signals wired that previous versions do not. That may be your real issue with RPi. |
Hi,
I'm trying to use the library with a Dragino Lora GPS Hat v1.4 board on a RPi3, with no luck so far (assertion error in set_freq during calibration). Has anyone successfully used this board? With what settings?
Thanks,
Viktor
The text was updated successfully, but these errors were encountered: