Join Server

The LoRa join server handles the registrations of LoRa devices according to LoRaWAN™ standard.

OTAA vs ABP

LoRaWAN™ standard defines two ways of activation for LoRa devices, i.e., Over-The-Air Activation (OTAA) and Activation by Personalization (ABP). All LoRa devices must be activated in either way before access the network.

In OTAA mode, LoRa devices only need to store AppEUI, DevEUI (or JoinEUI in LoRaWAN™ standard 1.1) and AppKey in their hardware. Then, these devices can issue activations by sending join request messages to servers. Some necessary parameters will be generated by server and respond via join accept messages. Some other data (e.g. session keys) are generated by both devices and server. These data are coincident since they use the same arguments and algorithms.

In ABP mode, all the necessary information is loaded in devices in the very beginning. These devices can interact with connector directly. Some previous operations need to be taken before enabling OTAA or adopting ABP to devices, please refer to Section 3.3.2 for more information.

Functions

  • Activation

LoRa join server is only responsible for handling devices with OTAA mode. The ABP based devices can access the network directly. The join requests are parsed by connector first. Then, network server will forward the requests to join server via message queue under topic Join-sub. After receiving the requests, join server will generate some necessary data such as the unique identifier DevAddr for devices. The DevAddr contains the NetID for purpose of roaming. Two session keys, i.e., NwkSKey and AppSKey, are also calculated according to the protocol. Another part of the join procedure is to initialize some physical parameters of devices. The RX1DRoffset defines the offset between uplink data rate and downlink data rate at first reception slot. The Rx2 Data rate sets the data rate for second reception slot. Furthermore, the RxDelay configures the delay between TX and first reception slot. The scope of RxDelay varies from 0s to 15s. The details can be found in RXTimingSetupReq command. All these values are region specific and set to their default values during activation.

Join server also needs to generate join accept messages for responses. These messages are published on topic Join-pub and network server needs to get them generally.

  • Rejoin

UNIMPLEMENTED

Interaction with LoRa Network Server

The LoRa join server subscribes the topic Join-sub to receive join requests from LoRa network server, and publishes join accept on topic Join-pub to LoRa network server.

  • Network Server to Join Server
   { MHDR: { MType: 0, Major: 0 },
     MACPayload: {
       AppEUI: <Buffer 7b 80 60 6c af eb 0f 26>,
       DevEUI: <Buffer 37 b8 90 3b 37 b8 90 3b>,
       DevNonce: <Buffer 81 bf>,
     },
   },
  • Join Server to Network Server
   { MHDR: { MType: 1, Major: 0 },
     MACPayload:
     { AppNonce: <Buffer 32 dc 97>,
       NetID: <Buffer 00 00 00>,
       DevAddr: <Buffer 00 92 e1 96>,
       DLSettings: <Buffer c0>,
       RxDelay: <Buffer 01> },
   },