Answer
LoRaWAN supports two ways for a device connect to the network.
- OTAA: Over the air activation
- ABP: Activation by personalization
When using OTAA a join action results in a join request being sent from the RM1xx to the network. The network then checks the Application Identifier (AppEUI) and Application Key (AppKey) provided by the RM1xx. If the APPEUI and APPKey are valid, a join accept message is sent back to the RM1xx which triggers an EVLORAMACJOINED event to be thrown in smart BASIC.
When using ABP there is no handshaking between the RM1xx and the network. As soon as the RM1xx performs a join action it can start sending data. The Application Session Key (AppSKey) and the Network Session Key are set once in both the RM1xx and the network server and must match.
OTAA is the recommended method to join an RM1xx to a LoRaWAN network as it more secure, with the session keys being derived from the APPEUI and APPKey on each connection. Whereas the session keys for ABP remain the same throughout the life of the RM1xx.