(re)-join to a new GW, when the current GW goes down

I have a Loraserver install with two (outdoor MultiTech) gateways collecting data from
a small set of sensor nodes. The gateway-bridge is installed on both GWs.
Only one sensor is class C, while the others are class A.
Two sensors are in APB mode, while the others are in OTAA mode.
All nodes are in the range of both gateway antennas and are all joined to 1st GW.

I tried to switch off the 1st gateway expecting the (OTAA) sensors to switch to the
2nd one by joining it.
The APB nodes are regularly collected by both gateways and when a single GW is left
they are regularly collected by the only alive GW.

Unfortunately, the OTAA nodes do not switch to the other GW. I espect they should
perform a new join to any available GW in an automatic manner. I am right?

Is there a (configurable) timeout to wait for?
What should I do to let nodes to automatically join an in-range GW?

Thanks in advance!

Devices don’t join gateways, they join a network, so this is probably not related to OTAA/ABP.

Indeed, gateways in LoRaWan are essentially transparent.

You might want to see if your OTAA nodes can join via the alternate gateway alone; it may be that there is a configuration problem making it incompatible with their air settings.

It’s interesting that you mention that the “APB nodes are regularly collected by both gateways” - the OTAA nodes should be being heard by both as well, unless they are out of range or the settings are marginally incompatible.

Something like the public vs. private network header would be an example of a “marginally incompatible” setting as packets with the wrong header do get received a substantial fraction of the time, but probably not often enough to make a good network.

You may also want to look at the raw traffic from the nodes and gateways. One unfortunate thing is that there isn’t a good debug view of “not quite acceptable traffic” unless you either watch the log files or do your own monitoring and interpreting of the raw feeds on the gateway/ MQTT topics.