index
The module can be configured using WisToolBox for OTAA setup. WisToolBox is a software tool designed to support the RAK end devices. It automatically detects the module once connected to the PC. The following section outlines the available WisToolBox UI options and steps for configuring OTAA:
OTAA Configuration for TTN via WisToolBox UI
The module must have the correct OTAA credentials to connect to TTN. This can be done using WisToolBox UI. Below are the steps on setting up your RAK module using WisToolBox.
- Open the WisToolBox application.
- Click the CONNECT DEVICE button to launch the WisToolBox dashboard.
Figure 1: CONNECT DEVICE- Then select your target port where your devices is connected. Once recognized, click CONNECT.
Figure 1: Setting up your device
Figure 1: Setting up your device- Once done, the device will appear in the dashboard then select it.
Figure 1: Device seen from WisToolBox dashboard- Next, click on PARAMETERS to configure your module.
Figure 1: Setting up your device-
Click on Global settings to set the network mode to LoRaWAN and the join mode to OTAA. Ensure that the active region is set to EU868 for this configuration. If you intend to operate in other regional bands, you can select the appropriate active region based on your location.
-
LoRa network mode: LoRaWAN
-
LoRaWAN join mode: OTAA
-
LoRaWAN region: EU868
-
Figure 1: Global settings
Figure 1: Global settings- Configure the Application EUI (AppEUI), Application key (AppKey) and Device EUI (DevEUI).
Figure 1: Setting up your device- Return to the console where your device was previously created, copy the AppEUI, AppKey, and DevEUI to the corresponding fields in WisToolBox dashboard, then click APPLY COMMAND to apply the configuration.
The AppEUI, DevEUI, and AppKey are hidden in this section as these are unique from a specific device.
Figure 1: Your created OTAA device from your console- For Application EUI (AppEUI)
Figure 1: Copying the AppEUI credential from TTN to WisToolBox
Figure 1: Copying the AppEUI credential from TTN to WisToolBox- For Application key (AppKey)
Figure 1: Copying the AppKey credential from TTN to WisToolBox
Figure 1: Copying the AppKey credential from TTN to WisToolBox- For Device EUI (DevEUI)
Figure 1: Copying the DevEUI credential from TTN to WisToolBox
Figure 1: Copying the DevEUI credential from TTN to WisToolBox- WisToolBox Dashboard
Figure 1: Used credentials from your console in WisToolBox dashboard- Once completed, you will see a summary of the commands that have been applied to your device, then click on CLOSE.
Figure 1: Summary of commands- Then, it will return to the dashboard with updated credentials of your device.
Figure 1: Successfully configured OTAA device via WisToolBox dashboard- After your device's credentials are updated, it can now join the network. To do this, navigate to Data on LoRa network under PARAMETERS. Then, click on JOIN NETWORK under LoRaWAN join settings. After a few seconds, it will notify you that your OTAA device has successfully joined the TTN server. You can also check your TTN console to confirm if your device has successfully joined TTN.
Figure 1: Joining mode of your OTAA device
Figure 1: OTAA device successfully joined the TTN serverOTAA Configuration for TTN via WisToolBox Console
Here's another way of OTAA configuration using WisToolBox Console. Below are the steps on setting up your device using WisToolBox Console.
- Open the WisToolBox application.
- Click the CONNECT DEVICE button to launch the WisToolBox Dashboard.
Figure 1: CONNECT DEVICE- Then select your target port where your device is connected. Once recognized, click CONNECT.
Figure 1: Setting up your device
Figure 1: Setting up your device- Once completed, the device will appear in the dashboard. Select it from the list.
Figure 1: Device seen from WisToolBox dashboard- Then, click ADVANCED.
Figure 1: Setting up your device- Click on OPEN CONSOLE to proceed with the configuration.
Figure 1: OPEN CONSOLE
Figure 1: Opening the Console terminal of WisToolBox
Figure 1: Opening the Console terminal of WisToolBox- To start the configuration, type
ATEto enable command echo for the configuration commands you input, and then press Enter.
It is recommended to start by testing the console and verify that the current configuration is working by sending these two AT commands:
AT
ATE
ATE is useful for tracking the commands and troubleshooting.
You will receive OK after inputting these two commands. Once ATE is set, you will see all the commands you input along with their replies.
If there is no OK or any reply, check if the device is powered correctly. If you are getting power from a USB port, ensure that you have a good USB cable.
Figure 1: Setting up your Console
Figure 1: Typing ATE Command
Figure 1: Receiving Replyb on the Console- Set the LoRaWAN join mode to OTAA. To check the available parameter options, enter
AT+NJM?in the serial terminal and press Enter. To enable OTAA, enterAT+NJM=1and press Enter.
Figure 1: Setting up your Console
Figure 1: Setting up your Console
Figure 1: Setting Join Mode to OTAA- Configure the LoRaWAN region to EU868. To check the available regional band parameters, enter
AT+BAND?in the serial terminal and press Enter.
For EU868, enter AT+BAND=4 and press Enter. If you use a different region, enter the corresponding parameter from the list of supported band parameters below.
-
EU433=0
-
CN470=1
-
RU864=2
-
IN865=3
-
EU868=4
-
US915=5
-
AU915=6
-
KR920=7
-
AS923-1=8
-
AS923-2=9
-
AS923-3=10
-
AS923-4=11
Depending on the Regional Band you selected, you might need to configure the sub-band of your device to match the gateway and LoRaWAN network server. This is especially important for Regional Bands like US915, AU915, and CN470.
Use the AT+MASK command to configure the channel mask. For details, refer to the AT Command Manual.
For example, to configure sub-band 2, enter AT+MASK=0002.
Figure 1: Setting up your Console
Figure 1: Setting up your Console
Figure 1: Setting up your Console- Next, you need to update the OTAA credentials of the module in WisToolBox. For each credential, copy its value from the TTN Console, enter it in the WisToolBox Console, and press Enter.
- For AppEUI
Figure 1: AppEUI in TTN Console
Figure 1: Configuring AppEUI in WisToolBox
Figure 1: Configuring AppEUI in WisToolBox
Figure 1: Configuring AppEUI in WisToolBox
Figure 1: Configuring AppEUI in WisToolBox- For Application key (AppKey)
Figure 1: AppKey in TTN Console
Figure 1: Configuring AppKey in WisToolBox
Figure 1: Setting up your Console
Figure 1: Configuring AppKey in WisToolBox
Figure 1: Configuring AppKey in WisToolBox- For DevEUI
Figure 1: DevEUI in TTN Console
Figure 1: Configuring DevEUI in WisToolBox
Figure 1: Setting up your Console
Figure 1: Configuring DevEUI in WisToolBox- Once done, click Dashboard to check the updated OTAA credentials. Then click PARAMETERS and check Global Settings and LoRaWAN keys, ID, EUI to verify that the settings have been updated.
Figure 1: WisToolBox Dashboard
Figure 1: Updated OTAA credentials
Figure 1: PARAMETERS
Figure 1: Global settings and LoRaWAN keys, ID, EUI details-
Your device is now configured for OTAA. You can proceed to join the LoRaWAN network using the WisToolBox Console.
-
Go back to the WisToolBox console and type
AT+JOIN. Edit it toAT+JOIN=1, then press Enter to join the network.
AT+JOINcommand parameters are optional. You can configure the settings for auto-join, reattempt interval, and the number of join attempts if your application needs it. If not configured, it will use the default parameter values.AT+JOINandAT+JOIN=1also share the common functionality of trying to join the network.
Join command format: AT+JOIN=w:x:y:z
| Parameter | Description |
|---|---|
| w | Join command - 1: joining, 0: stop joining. |
| x | Auto-join config - 1: auto-join on power-up, 0: no auto-join |
| y | Reattempt interval in seconds (7-255) - 8 is the default. |
| z | Number of join attempts (0-255) - 0 is the default. |
After 5 or 6 seconds, if the request is successfully received by a LoRa gateway, you should see a +EVT:JOINED status reply.
If the OTAA device failed to join, you need to check if your device is within reach of a working LoRaWAN gateway that is configured to connect to TTN. It is also important to check that all your OTAA parameters (DEVEUI, APPEUI, and APPKEY) are correct using the AT+DEVEUI=?, AT+APPEUI=?, and AT+APPKEY=? commands. Lastly, ensure that the antenna of your device is properly connected.
After checking all the things above, try to join again.
Figure 1: Joining mode using WisToolBox Console
Figure 1: Joining mode using WisToolBox Console
Figure 1: Joining mode using WisToolBox Console
Figure 1: OTAA device successfully joined the network
Figure 1: OTAA device successfully joined the network- With the end-device properly joined to the TTN, try to send some payload after a successful join. Send command format:
AT+SEND=<port>:<payload>
AT+SEND=2:12345678
Figure 1: OTAA device sending payload to the network
Figure 1: OTAA device sending payload to the network
Figure 1: OTAA device sending payload to the network- You can view the data sent by the device on the TTN console's Live data section. Additionally, the Last seen information should indicate a few seconds or minutes ago.
Figure 1: OTAA Test Sample Data Sent Viewed in TTN