MKRWAN 1300 endPacket return value and empty payload

Hello,

I have some experience with LORA boards including TTN's UNO, which we have a number of working well. I just received the Arduino MKR 1300 today and have been getting familiar with it. I have it working but it does some odd things and I can't find complete documentation to it, so I am throwing these questions to the forum. The questions are:

  1. What are the endPacket return values definitions. I get values of 4, 13 and 16. I would like to know what they mean.

  2. On connection and and transmission of the initial payloads, the payloads received by the network is empty, as in no data was received . If I transmit again the payload will eventually be received by the network. I do not have this situation with the TTN UNO board.

Any thoughts and or suggestions would be appreciated.

Mike

If the return value is positive, it is the number of bytes sent. If a negative value, it is an error.

Errors are:

-1 response timeout
-2 LORA_ERROR
-3 LORA_ERROR_PARAM
-4 LORA_ERROR_BUSY
-5 LORA_ERROR_OVERFLOW
-6 LORA_ERROR_NO_NETWORK
-7 LORA_ERROR_RX
-8 LORA_ERROR_UNKNOWN

I noticed an ambiguity. -1 indicates a timeout or the packet length is greater than the max. In the latter case, the packet is dropped.

There were a few other ambiguities. I fixed them and submitted a PR for this.

See the following PR’s: