Replies: 3 comments
-
The number 69 is a rather interesting value - have you noticed that in ASCII, it translates to uint8_t buff; uint8_t* buffPtr = &buff;
You will need to use an actual buffer here. For example, if you know that your data will always be less thank 100 bytes in length, you can just do the following: uint8_t buff[100]; uint8_t* buffPtr = &buff[0]; But I will warn you that you seem to be missing some C/C++ fundamentals which will inevitably come back to haunt you. I would suggest taking a while to learn about arrays and pointers before trying to build m,ore advanced stuff - and LoRaWAN certainly falls into that category. |
Beta Was this translation helpful? Give feedback.
-
This may help as a starting point: https://www.thethingsnetwork.org/docs/devices/bytes/ As I'm working on updating the examples, I'll quickly test the part 2 that shows downlinks and post it here shortly (next 24 hours) - to get you started there is WIP that does a send using a byte array here: https://github.com/HeadBoffin/RadioLib_DevCopy/blob/master/examples/LoRaWAN/Starter/Starter.ino |
Beta Was this translation helpful? Give feedback.
-
Thank you both! Now that you pointed it out I can see what I was doing wrong and now after the changes its no longer behaving incorrectly. |
Beta Was this translation helpful? Give feedback.
-
I'll start by saying I rarely do stuff in C++, I have the heltec wireless tracker and have gotten everything working except the downlinks. Specifically when using the methods that use a pointer for downlink length. The data comes through fine and it works great as long as the data is 4 bytes or less, once its over 4 bytes though the size stored by the length pointer RAPIDLY balloons and it becomes unusable.
I'm really not sure whats going on as if I use the sendRecieve method that uses Strings it works fine with Strings of any length, unfortunately the data will be using LPP so that is not an option for me. Any help in figuring out what the heck is going on would be appreciated
Beta Was this translation helpful? Give feedback.
All reactions