Re-join after gateway's power outage

I am having an issue getting the LoRa CubeCell devices to reconnect after the gateway/app server is reset or if there has been a power outage. All the devices are running on OTAA and are in class A.

The setup is prety simple, The M02 has the devices registered and you can then start them up and they connect perfectly reporting the sensor data.

But if for some reason the M02 looses power then comes back up the devices do not rejoin, The M02 after starting back up seems to change the Device Address of the device and the device continues to send data using the Device Address that it had previously.

in the Packet Logger I can see that data is still comming in but its not being sent to the application.

I have not yet tested this but it could be a result of using LoRaWAN.ifskipjoin();

Does anyone have a way around this? or does anyone have any sugestions om how to detect if the sensor is not actually conected and then force a rejoin?

Thanks in advance for any help.

1 Like

Hi,
Did you find any solution ? I am also facing this reJoin issue for the case the device is moved away from the GW. It still tries to communicate in SF8 for exemple but the GW does not receive anything.

I would need to: try to increase to SF12, then automatically do a Join procedure again. I could then eventually change from one network to another (go to TTN for example).
But as the LoRaWAN protocole explains, I don’t want to confirm all messages but juste a few each day to be sure the GW still receives the messages. Is there a way we can integrate this functionnality ?

Kind regards,
Nicolas

I am also facing the same issue. I have based my code on the LoRaWan example. In the file LoRaWan_APP.cpp, the function OnTxNextPacketTimerEvent seems to be design to handle a rejoin attempt. However, the variable that identifies if the device is connected to the network always stays true even when the gateway is not available.

Thanks,

Léandre

Maybe you need add a detection mechanism for the downlink on your node’s code. If your node don’t receive the downlink for the gateway(or servers) for a Long time(Or you set the number of times),the node will rejoin the servers.

Hi Jason,

It sounds like the right thing to do

Thank you,

Léandre

I ended up slowing the reconnects way down, also put the new firmware on the M02 and the problem seemed to go away.