LoRaWAN StopJoin - what is this?
The LoRaWAN middleware End-node (lora-app.c) includes a "Join Switch" mechanism set up around the StopJoinTimer, the OnStopJointTimeEvent function, and the StopJoin() task function.
The StopJoin function appears to be used to toggle between ABP and OTAA Activation modes. I'm not sure why you might want to do that but Ok - it may have to do with other uses cases such as the AT command firmware.
As it stands within the End Node generated code, it appears to be dormant code as nothing ever seems to start the StopJoinTimer.
But, if it were started by the application, it looks like it may go into a bit of a loop. The StopJoin() function restarts the StopJoinTimer at the end of the function, which means it will called back after JOIN_TIME (2000ms) to swap activation mode again. As a Join usually requires about 5 seconds before the Rx window opens, I am thinking this might actually end up stopping any OTAA Join before it has a chance to succeed.
Possibly I have completely misunderstood what is going on here but so far I have not found any documentation that explains what is going on here, how to use it, or why it exists.
