Closed denizdanaei closed 3 years ago
Sorry for getting back to you only now, this issue missed my inbox.
Few things i notice:
You are overwriting your buffer size by the size of the output. You are using JSON while CBOR is much more efficient for LoRa. Please zero init your memory to prevent any problems from occuring using: char buff[BUFF_SIZE] ={0};
The first item might cause problems in your case, let me know if you need any more help. Closing for now.
Hi there. I have a suggestion to make. Since it is specifically about this library, I didn't want to put it in the KPN forum. First, I will explain my project setup and then the problem I am facing.
my project details
I am working with Sodaq One / To send and receive data using Lora communication, I am using Sodaq_RN2483 library as suggested in learn.sodaq. I can send and receive raw payloads, hex format via these functions:
using thingML
Next, I tried using the thingsML library and send instructions using this format. I started with a simple example based on getting started and check the result on serialUSB.
Which results in:
The problem
Next, I try to send this data using the function
Sodaq_RN2483::sendReqAck
. The changes I made in the code above is as follow:Finally, using
sendReqAck(1,(uint8_t*)buff, BUFF_SIZE,3)
will send completely different data than thebuff
value. Since it is a stream, the data within the buff is not HEX format. Instead of sending5B7B
(the first two bytes), it would send35423742
.The question/suggestion
So I thought changing the format would be more helpful. That is if the KPN decoder does not take care of it.
P.S.
For the sake of clarity and being brief, I left out the other parts of my code. I will share them if it's necessary.