LoRa Functional Parameters Configuration

Once the gateway is online and the sensor node is joined in the LoRa network, the sensor node transmits the data to the TTN server through the LoRa gateway. The up-link transmission data appears on an application server of the TTN dashboard. The following steps should be followed to successfully configure and link the sensor node to a LoRa network, and also to view sensor data on the application.

Connect a Mini-USB cable from the XMEGA-A3BU Xplained board to the PC running the Microchip LoRa Development Utility software. Hereafter, the LoRa sensor node works in USB CDC mode.

In the LoRa Development Utility software, click on "Find Devices" option. If the gateway board is already connected to the PC through the Micro-USB cable, both the gateway and the "RN module" appears in the device list. Select the RN module in order to configure it.

By default, the sensor node register to the network through OTAA method, by following the instructions mentioned below.

  1. 1.In the TTN console, from the Application or an application’s Devices screen, click on register device option.
    • For Device ID, enter appropriate device ID. For example “loramote1”
    • For Device EUI, enter an 8-byte hexadecimal value or click the generate icon at the left to auto-generate the Device EUI
    • Leave the App Key to be generated automatically
    • For App EUI, select the generated EUI from the list
    • Click Register to finish
    • The control redirects to the newly registered device, where the generated App Key details are needed to activate the device
  2. 2.In the Server Authentication Keys section of the utility, select OTAA (over-the-air activation).
  3. 3.Select "Use Entered (DevEUI):" and copy the Device EUI from the TTN Console.
  4. 4.Copy the App Key and Application EUI from the TTN console to the appropriate boxes in the LoRa Development Utility software.
  5. 5.After each value is entered, press the “Enter” button on the PC keyboard to ensure that information gets sent to the RN module.
  6. 6.Click on “Save” option.
  7. 7.Click on “Join” option.
  8. 8.Then after, "ok" and "accepted" response appears in the RN module console.

After registering the sensor node by the OTAA method, in case of switching over to the ABP joining method, the following changes are necessary.

  1. 1.In the TTN console, go to the device that needs to be personalized.
    • From the top right menu, select the Settings option
    • For Activation method, click on the ABP option
    • To generate the Network Session Key and App Session Key automatically by the console, do not enter any information. To manually enter the customized keys information, click on the customize it option and enter the details
    • Click Save to finish
    • The control redirects back to the device, where the Device Address and session keys information is needed to activate the device
  2. 2.In the Server Authentication Keys section of the utility, select ABP (activation by personalization).
  3. 3.Select "Device Address (DevAddr)" and copy the Device Address from the TTN console.
  4. 4.Copy the NetworkSessionKey and ApplicationSessionKey from the TTN console to the appropriate boxes in the LoRa Development Utility software.
  5. 5.Follow the steps from 5 to 8 as mentioned above.
To switch the mode back to OTAA from ABP, the following changes are necessary.
  1. 1.In the TTN console, go to the device that needs to be personalized.
    • From the top right menu, select the Settings option
    • For Activation method, click on the OTAA option
    • Leave the App Key to be generated automatically
    • Click Save to finish
    • The control redirects back to the device, where the App Key details are needed to activate the device
  2. 2.In the Server Authentication Keys section of the utility, select OTAA (over-the-air activation).
  3. 3.Select "Use Entered (DevEUI):" and copy the Device EUI from the TTN console.
  4. 4.Copy the App Key and Application EUI from the TTN console to the appropriate boxes in the LoRa Development Utility software.
  5. 5.Follow the steps from 5 to 8 as mentioned above.
Note: If the joining method is changed in the TTN server, the device should use the same join procedure each time the device tries to join the network.