-
Notifications
You must be signed in to change notification settings - Fork 29
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
Reading Messages #17
Comments
What is happening in
It's a a little weird because the address needs to be raw bytes, not ASCII chars, which can be difficult because arduino wants to make everything strings. But if the destination address is wrong, then the packet will appear to never be received by the receiver, since it's the address in the datagram does not match its local address. This reminds me that I need to write some sender/receiver example code. And don't get too excited about all those neighbors, its a known bug reported here, sudomesh/disaster-radio#81 (comment), I'll take a look at that as soon as I get a chance. |
@paidforby Thanks! I figured it out and am now receiving messages on the receiver. Turns out I had to set the following for it to work.
It would be handy if the Datagram accepted the char array vs. the raw. I see there are a bunch of functions for converting this already. This will definitely hang other folks up, so I'm glad we figured it out. I'll give a swing at writing a simple client (I already did most of it!) |
Added #18 :) |
Great! Glad you figured it out. Yeah, it's a funny mix of chars and bytes. The reason the Datagram struct takes bytes is because it's actually the datagram that is copied into the packet so making it take individual chars for each hex character would waste bytes. I guess, some conversion could be done in the LL2->writeData function. I was actually thinking of changing that writeData function so it doesn't take a datagram, but instead takes the inputs to a datagram, something like, And thanks for that pull request, I'll review and merge it (i looked good to me and is certainly better than nothing). |
@paidforby yeah, I think the change to of |
I also noticed another issue, not sure if it is possible cause of your routing table being filled imprroperly, but you should not use |
I made a number of changes in these two recent commits including,
These changes seem to have fixed the issue with the routing table filling with garbage, though it's difficult to prove the negative, so all I can say is that I haven't observed that problem since making these changes (specifically, updating LL2 seemed to fix most of the routing table weirdness). Sorry that I didn't take a look at this sooner. |
@paidforby excellent thanks! Good catch on the packetsize and init bits. I'll try updating these and see if I still get a mess of random neighbors. Delay/LoopI see your point about using delay(). The example you mentioned makes perfect sense when running in active mode all the time. I'll open a separate issue / example for doing deep sleep which is really where that comes from. I used |
This might be obvious, but I can't seem to parse the messages being sent via
LL2->writeData
. I haven't written c++ since college, but I don't think its my code, but likely I'm using the library? shrugThe setup is simple.
Sender Address: c0d3f00d
Receiver Address: c0d3f00c
Receiver Side
Output as follows
BTW, shocked to see all these other neighbors.
Sender Side
The text was updated successfully, but these errors were encountered: