Reconnect problem RAK 4631

I use 20 x RAK 4631, with distance sensor. Yesterday I had failure with my ChirpStack LoRaWAN Server, and it was offline 12 hours… Sensors should send payload every 3 hours. After fixing ChirpStack, 90% of sensors don’t send payloads. 2 Sensors was lucky and send their payload till today but it looks like if they don’t loose connection when first
View data form working sensor.

This is view of 10 sensors with that 2 working well.

It’s possible to that sensors will restore connection now? How many tries it take?

Hello @Zatorro

The RAK4631 should continue to send data even if the LNS is down unless you have implemented something in your firmware that checks for failed packets (works only with confirmed packets).

What firmware are you using on the RAK4631? Is it an Arduino based or RUI3 based?
Are you using confirmed or unconfirmed packets?
If using confirmed packets what is the retry number to send confirmed packets if no ACK from the LNS is received?

Hi @Zatorro

I had a look into your code and there is nothing that would stop the node from sending.

Best option to check the status of the nodes would be to connect them to a terminal over USB and check if there are any error messages are in the logs.

It’s not possible ;/ I used non-rechargable batteries.
It,s possible to add to code possibility to reset device every X hours when transmission is not confirmed?
Because I supposed that is confirmed transmision. Could you tell me what commad in code is this?

Now I looked into code for different project and there I have small difference in section:

sensors used in this project connected to gateway instantly when they have to do that after. What is function of parameter DUTYCYCLE? It could be main cause when that part of sensors don’t send payloads to gateway after loosing connection? We have that problem last week when we installed that sensors- only 2 sensors connected in new place without reset, the rest wasn’t.

You are sending unconfirmed messages as this code part (lora_handler.cpp) shows:


Sure, you can initiate a frequent reset either by using a timer or for example a packet counter.

What I have implemented in some of my examples is

  • use confirmed packets
  • implement the TX callbacks for confirmed packets
  • count the number of failed packets and if there are for example 10 failed packets in a row, initiate a module reset.

Is there any example of TX callback use?
What steps I need to do to implement that function?

I have no simple example that uses it, but I am using it in my WisBlock-API-V2. You can have a look into the LoRaWAN handler code.

Callbacks are registered in the code with the lmh_callback_t structure and the lmh_init API call.

Example callbacks are lpwan_unconfirm_tx_finished and lpwan_confirm_tx_finished.