Rejoin to a new network

Hi all

Have the situation to change the network (i.e. TTN to Helium) in case one of them is not available
The idea is, to delete the device in TTN and recreate it in Helium. That works, but the device never recognize that change, it still sends data to the TTN, but TTN does not ack the data. After a reset, the device joins the right network.

I’m using the LoraWAN_downlinkdatahandle example without any modification.

Question is now: how do I configure the device that it will recognize the network change and starts with a rejoin ? The rejoin has to be triggered from remote, means without physical access to the device.

thanks a lot!

To automatically identify the network, it may be necessary to actively issue.
If you just want to switch the network, you can re-enter the network by setting the number of messages that have not received a reply.

Using LoRaMacState to identify a TX issue and re-init after 5 times of an issue. Will test it how that works over the next weeks.

In case there is an other way, let me know.

It can be added several times appropriately to reduce false triggering due to signal problems.