-
Notifications
You must be signed in to change notification settings - Fork 16
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
Not an issue, but questions about the decoding and trackers. #2
Comments
Hi kc2uez. I suspect the issue is that I've hacked a little to use the RH_RF95 library. The Radiohead library is designed to use addressed packets. If you look in RH_RF95.cpp in rf95Send you see it sets the start bytes of a packet to _txHeaderTo, _txHeaderFrom, _txHeaderId, _txHeaderFlags. In my tracker code (that I see now I've never put up in Github) I've copied that rf95Send function and commented out the sending of those header bytes, and that is why in the Gateway code when it receives a message its getting the start bytes with (rf95.headerTo() == '$' && rf95.headerFrom() == '$' ). |
Hi torntrousers, thank you for your feedback. I understand now why my code is not working. Trying to figure out why I was getting the HEX values, made me become very familiar with the send function I just never thought about copying and modifying it. I was thinking that I was doing something wrong and it was the reason I decided to try out the second library. |
Just as a follow up, I commented out of rh_rf95.cpp |
Great! I need to hunt around for the tracker code, will try to do that later tonight. |
Hi torntrousers, I have another question. I have generated a payload on habitat, but the esp8266 page shows 500 on the habitat column. Do I need to do something special or as long as my payload matches, it should be showing on their debug console? |
500 is a generic error so not so helpful, does the habitat log show any more? Go here and watch as your message is sent - http://habitat.habhub.org/logtail/ (sorry have been busy so still not put up the tracker code) |
(I think from what I remember even if the payload doesn't match there will still be a log message appearing in the habhub log saying its got an unknown msg) |
Hi torntrousers, I got it to work. There are 2 fixes needed if you care to implement them on the master.
Thank you for your help! |
Thats terrific, well done. Would you share your fixes? |
(Some tracker code here: https://github.com/HarringayMakerSpace/HAB/tree/master/HABTracker) |
I found your code, thank you for making it public. I loaded it to a NodeMCU and connected it to an Adafruit breakout board. I made a little perf breadboard: http://imgur.com/a/H5fBQ It seems to be working fine.
I am having a little issue on the target side of things and I am not sure if it is related to the gateway or not. Maybe you can give me some pointers if you don’t mind.
For the tracker hardware I am using an arduino + adafruit ultimate data logger shield and the dragino Lora shield. I know that I need to move CS on the lora board to other pin to avoid conflicts with the SD card, but I will do that later. I don’t think the problem is related to that, plus there is no SD card inserted at the moment.
At first I started using the RH_RF95 library. With that library I made the code listed here: https://pastebin.com/wtksK3vA$$TEST but for some reason it doesn’t detects the $$ . I saw where this check is done: if (rf95.headerTo() == '$' && rf95.headerFrom() == '$' ) { but it never goes down that if statement. I have tried different things, but nothing seems to correct this.
The problem I am experiencing with this code is that the gateway prints out 2424 5445 5354 2C38… so it does receives
I decided to try a different library and used the lora library from sandeepmistry https://github.com/sandeepmistry/arduino-LoRa
Using that library I made this code:
https://pastebin.com/wkbB4Ugr
With this code I do get correct sentences decoded by the gateway, but for some reason I can only decode if spreading factor is 7, anything else and gateway ignores it. With the code using RH_RF95 I can select all the rates, the gateway sees them, but the sentences are never decoded correctly.
On both codes I am verifying that the configuration registers match. If you have any inputs on what could be causing the decoding issues with my code using the RH_RF95 library, the spreading factor issues with the Sandeepmistry library or better yet sample code for trakers used with this gateway, I would appreciate it.
At the end I will be using feather boards from adafruit, but I am working with the arduino just because it is a bit more flexible.
Thank you for your help and making this code available to others.
The text was updated successfully, but these errors were encountered: