Rak811 Wisnode and Arduino Uno

Issue: Larger packets return error 101 which Payload size is not valid for the current data rate (DR). However, I am in US915 with DR set to 3. My payload is

MDArMC4wMDI3KzAuMDAyMCswLjAwMTUrMC4wMDE5KzI3LjMwMwA=

This is 52 bytes, or 104 once converted into an character array of hex.

Setup: Using the LorawanOTAAJoin code, I added my sensor data and encoding to a buffer. I then send the buffer. The transceiver will respond with at+recv=0,-25,6,0 since I have confirmed messages turned on. The 2nd message sent will respond with ERROR: 101. It will continue to send one, fail to send the next, send the next one, and so on.

Details: I have verified that my buffer was the same size every time, and that that was not the cause of my overflow. if I restart the module in my Loop, then the transciever will send every time. However, I then need to perform a new join everytime and this is not an elegant solution.

From what I can tell, the Rak811 (Wisnode V1.1) is not clearing its transmit buffer properly and might be tacking on the second message to the first. I tried sending a 6 byte message after the 102 byte message and it was successful.

It so doesn’t work how you think.

The base64 encoded payload is sent as is, each character is a byte that is able to be transmitted, that’s the point of base64, which takes two byte pairs and converts them to character triplets.

If we converted the payload to hex, and then sent the characters 0-9a-f, we’d be trippling the size of the original payload.

Having decoded your payload, I suspect you are actually encoding it before sending it to the RAK811, which then has to convert it to base64, so you go from your 52 bytes to 72 or some other random number because it actually needs it as a bytes as hex characters, not ASCII characters.

And as your payload is in fact a sequence of numbers as characters :face_vomiting: why not create a byte array of the numbers - that will make it substantially smaller right away and then you present that byte array in hex format, as per instructions / documentation, which internally the module turns back in to a byte array.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.