In Over-the-air-activation OTAA with LMIC, @matthijs suggested for LMiC nodes:
Perhaps your clock is inaccurate, but the error is negligable at the slower SF ratings? To check, add this to your sketch (somewhere during setup):
LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);</pre>
This tells LMIC to make the receive windows bigger, in case your clock is 1% faster or slower.
I know that @salvatore_forte already tried that, but it made me wonder about timing issues.
As rebooting the gateway works for both a Kerlink Wirnet Station and an ic880A/Raspberry Pi 3:
-
Another post from @salvatore_forte shows that TTN actually accepted the Join Request, but the node probably never received the downlink. After accepting the Join, TTN will tell one gateway to send the Join Accept in either downlink slot 1 or 2. (I don’t know if the gateway received it*.) Does a gateway keep track of the downlink timing itself, or does TTN give the gateway an exact timestamp at which the downlink must be sent? For the latter, I can understand that restarting might fix things:
- If the gateway’s clock is off, it might get synced with some time server at boot time.
- If the gateway time and the TTN’s backend time need to be synced, then restarting might fix that too?
-
Could the gateway’s timing become inaccurate after running for some time? If it would, then I don’t understand how a simple reset of the gateway fixes that (like: the gateway won’t cool down in such a short time), but maybe someone can think of a reason.
*) @salvatore_forte, can you check if the gateway receives the downlink from TTN? If you cannot check that, then: if you know that OTAA fails after, say, 3 hours, then what if you restart the gateway, wait for 3 hours and only then do the first OTAA?