4.4.3 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.
- 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
- In the Server Authentication Keys section of the utility, select OTAA (over-the-air activation).
- Select "Use Entered (DevEUI):" and copy the Device EUI from the TTN Console.
- Copy the App Key and Application EUI from the TTN console to the appropriate boxes in the LoRa Development Utility software.
- After each value is entered, press the “Enter” button on the PC keyboard to ensure that information gets sent to the RN module.
- Click on “Save” option.
- Click on “Join” option.
- 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.
- 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
- In the Server Authentication Keys section of the utility, select ABP (activation by personalization).
- Select "Device Address (DevAddr)" and copy the Device Address from the TTN console.
- Copy the NetworkSessionKey and ApplicationSessionKey from the TTN console to the appropriate boxes in the LoRa Development Utility software.
- Follow the steps from 5 to 8 as mentioned above.
- 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
- In the Server Authentication Keys section of the utility, select OTAA (over-the-air activation).
- Select "Use Entered (DevEUI):" and copy the Device EUI from the TTN console.
- Copy the App Key and Application EUI from the TTN console to the appropriate boxes in the LoRa Development Utility software.
- Follow the steps from 5 to 8 as mentioned above.