Have been playing with the example code LoRaWAN_OTAA
, and everything works fine but sometimes, without any obvious reason, the api.lorawan.send
API started to return false
, indicating the message is not queued for TX, and it will continue to return false. The callback function is not triggered which means no messages are being sent. Any idea on that? The only way is to restart the device. This issue appears randomly, sometimes I can have 2000+ successful uplinks before having the issue, and sometimes it appears shortly after OTAA. The current solution is to reboot the device, but I don’t think that is an acceptable solution. Has anyone experienced a similar issue or maybe staff from RAK can give us some idea?
We have checked the gateway and confirm no message is sent from the device, and the gateway is fully functional as another node with SX1276 is working normally, for months now. We can confirm the issue is within the RAK3172 itself.
Also, is there any way to enable more detailed debug output? We previously worked with MCCI-LMIC and the amount of debug message available is very helpful for debugging issues and knowing what’s going on.
We are planning to replace old-school AVR+SX1276 combo with RAK3172, so we have to solve the issue.
Attached are small pieces of code around api.lorawan.send
that we use
while(1){
//Read sensor, put data to buffer, etc...
if (api.lorawan.send(txbuffer_size, txbuffer, 8, false, 0)) {
txstat.uplink_counter++;
} else {
//Sometimes without reason "api.lorawan.send"
//start to return false and do not recover
txstat.fail++;
}
api.system.sleep.cpu(10000); //Wait for TX complete
printStatistic(); //Show statistic
api.system.sleep.cpu(30000); //Wait for next interval
}