documentation
HOME » DOCUMENTATION » TECHNICAL DOCUMENTS » Semtech Network Server User Guide » Register and Activate Your End Device

Register and Activate Your End Device

This section explains how to register and activate your end device so that it can communicate with the network. These steps should be repeated for all the end devices you wish to connect to the Semtech Network Server.

Create a Device-Profile

A device profile defines the device capabilities. It is a reusable profile. To complete this section, you will need to consult the documentation for your end device, or check the keys set in your code if you have built your own end device.

  1. Log into the Semtech Network Server.
  1. Click Device-profiles in the menu on the left.

Semtech Network Server Device-profiles Menu Item

Figure 25: Semtech Network Server Device-profiles Menu Item

  1. Click + CREATE.

Device-profiles +CREATE Button

Figure 26: Device-profiles +CREATE Button

  1. Complete the form as follows:
  • Device-profile name: Enter a profile name, e.g., LR1110-DevKit-Profile. Spaces are allowed.
  • LoRaWAN MAC Version: Set this to the version of the LoRaWAN specification implemented by your end device.
  • LoRaWAN Regional Parameters revision: LoRaWAN has regional specifications which govern channel plans, default data rates, and other physical layer parameters for each individual LoRaWAN region. These specifications are listed in the LoRaWAN Regional Parameters document; the latest revision can be found on the LoRa Alliance® LoRaWAN for Developers page.

There are multiple revisions of the Regional Parameters document, which were initially tied to a specific LoRaWAN version, and are now published separately as a single document that covers all LoRaWAN versions.

To operate correctly for your device, the network server needs to know which Regional Parameters document revision was implemented by the device manufacturer. You will need to ask the device manufacturer which document revision they used.

When adding a device to the Semtech Network Server, two types of regional parameter options are available to choose from, letters A and B, which relate to the revisions that were tied to specific LoRaWAN versions, and full document revision names, e.g., RP002-1.0.1, which map to the document revisions that are independent of LoRaWAN versions.

  • If your end-device uses LoRaWAN MAC version 1.0.1 and implements the regional parameters document integrated into the LoRaWAN v1.0.1 spec, choose A.
  • If your end-device uses LoRaWAN MAC version 1.0.2 and implements LoRaWAN Regional Parameters v1.0.2rB, choose B.
  • If your end-device uses LoRaWAN MAC version 1.0.3 and implements LoRaWAN Regional Parameters v1.0.3rA, choose A.
  • If your end-device uses LoRaWAN MAC version 1.1 and implements LoRaWAN Regional Parameters v1.1rA, choose A.
  • In all other cases, choose the relevant document revision.

If you are unable to discover which document was used, choose A, and see if the end-device joins successfully and sends data. If it does not, work your way through the options until you see a successful join.

  • Max EIRP: This is currently unused by the network server but may be used in future. Set this, in dBm, to the maximum EIRP (Effective Isotropic Radiated Power) the end device can transmit. You can find the default maximum EIRP for your region in the LoRaWAN Regional Parameters document supported by your end-device. If you are not sure what to put here, set it to 0.
  • Uplink interval (seconds): This setting is used so that the network server can decide whether a device is active or inactive on the dashboard. The device will still work if this setting does not match the actual uplink interval. Set this to the number of seconds between each regular message the device sends, this can be found in the documentation for a device from the manufacturer or in the firmware code for a device you built yourself.

Uplink Interval on the Device-profile Form

Figure 27: Uplink Interval on the Device-profile Form

  1. Open the JOIN (OTAA/ABP) tab.
  2.  
  3. If your device supports OTAA (Over-the-Air Activation), check the box next to Device supports OTAA.

If your device supports ABP (Activation-by-Personalization), make sure the box next to Device supports OTAA is unchecked, and complete the form as follows:

  • RX1 delay: Enter the delay between the end of the uplink transmission and the opening of the first receive window (RX1). This is referred to as RXDelay1 in the LoRaWAN Backend interfaces document.
  • RX1 data-rate offset: Enter the offset used to calculate the data rate for the first receive window (RX1). This is referred to as RXDROffset1 in the LoRaWAN Backend interfaces document.

Note: If you are unsure of the above, contact the manufacturer and ask them. You can also try leaving all fields set to their defaults to get started. If you do this, you should be able to receive data from the device, but you may find you are unable to send downlinks to the device.

  1. Click CREATE DEVICE-PROFILE. The device profile appears in the Device-profiles list.

Semtech Network Server Device-profiles List

Figure 28: Semtech Network Server Device-profiles List

You have now created a device profile. The device profile must exist for you to add your device in the Semtech Network Server in the next section.

Add Your Device

Each device in the network server represents a real-world end device that will connect and communicate over the LoRaWAN network. Here, we show you how to create (add) a device to represent your real-world device. The device is registered to the application you created in the previous step, Create an Application. Make sure the device you add is the same device you used to complete the Create a Device-Profile section.

Add Your Device to the Application

  1. Log into the Semtech Network Server if you haven’t already done so.
  1. Click Applications in the menu on the left.
  1. Click the link to the application you just created.

Your Application on the Applications Page

Figure 29: Your Application on the Applications Page

  1. Click + CREATE.

+CREATE Button on the Applications Page

Figure 30: +CREATE Button on the Applications Page

Complete the Device Form

  1. Complete the form as follows:
  • Device name: enter a name with only letters, numbers, and dashes, e.g., test-lr1110.
  • Device description: enter a description, e.g., Test LR1110 Device.

Note: The UI defaults to accept the DevEUI in the order MSB (most significant byte) first. In some cases, the DevEUI is written LSB (least significant byte) first. For example, the Arduino LMIC library requires the DevEUI be input in LSB format, so if copying from code using the Arduino LMIC library os_getDevEui method, you should use LSB. To use LSB, click the button next to the MSB option to change to LSB.

  • Device-profile: select the profile you created earlier.
  • Disable frame-counter validation: Do not check this box, unless you need to disable the frame counter validation.

If you have an ABP device that has already been used on a network and you are unable to obtain or reset the frame counters then check this box to disable the frame-counter validation.

Note: Disabling frame counter validation reduces the security of your device as it allows people to perform replay-attacks.

  • Device is disabled: Do not check this box.

If you have a device that you wish to ignore, but do not want to remove from the application, check this box so that device messages and join requests are ignored.

Figure 31: Create Device Form

  1. Click CREATE DEVICE.

If your device profile for this device designates support for OTAA, the KEYS (OTAA) screen displays. If your device profile designates that this device supports ABP, the ACTIVATION screen displays. The fields to be completed on this screen will differ depending on the LoRaWAN protocol version and activation method defined in the device profile. Read on to find the settings for your configuration.

Add Your OTAA or ABP Keys

Complete KEYS (OTAA) form for LoRaWAN Protocol 1.0.x

  1. If your end device implements OTAA activation and LoRaWAN protocol version 1.0.1, 1.0.2 or 1.0.3, you need to enter values for the following fields:

Note: If you are copying the key from somewhere that uses LSB, click the button next to the MSB option and change the order to LSB. If you are using the Arduino LMIC, the os_getDevKey method uses MSB, unlike the method for DevEUI. If you are unsure, keep the MSB option set, and revisit this area if the device does not join.

  • Gen Application Key: This is an advanced setting for devices supporting multicast or firmware updates over the air. If you are unsure if your devices support these features, leave this empty to get set up quickly.
  1. Press SET DEVICE-KEYS to save the keys.

Complete KEYS (OTAA) form for LoRaWAN Protocol 1.1.x

  1. If your end device implements OTAA activation and LoRaWAN protocol version 1.1.x, you need to enter the following fields:

Note: If you are copying the NwkKey or AppKey from somewhere that uses LSB, click the button next to the MSB option and change the order to LSB.

  1. Click SET DEVICE-KEYS to save the keys.

Complete ACTIVATION Form for LoRaWAN Protocol 1.0.x

  1. If your end device has already been used on a network server you need to either reset the frame counters (FCnt and FCntDown) or find out what they are.

To reset the frame counters, follow the instructions or ask the device manufacturer. A factory reset should result in the resetting of the frame counters.

To find out what the frame counters are, inspect the frames on the network server your device is currently connected to. The FCnt will be visible when viewing messages sent from the device, the FCntDown will be visible when viewing messages sent from the network server to the device.

If you cannot find the frame counters, try leaving Uplink frame-counter and Downlink frame-counter set to 0 in the next step. If you then see errors in the DEVICE DATA tab, you can disable frame counter validation in the device form, as shown in the section: Complete the Device form.

  1. If your device profile uses LoRaWAN protocol version 1.0.1, 1.0.2 or 1.0.3 and ABP activation, you need to enter values for the following fields:

Note: If you are copying the DevAddr, NwkSKey or AppSKey from somewhere that uses LSB, click the button next to the MSB option and change the order to LSB.

  • Uplink frame-counter: Leave this set to 0, unless your device has already been used on a network server and  is using an FCnt higher than 0. If your device is using an FCnt higher than 0, set this to be one higher than your device’s FCnt. For example, if your FCnt is 2, set this to 3.
  • Downlink frame-counter (network): Leave this set to 0, unless your device has already been used on a network server and  is using an FCntDown higher than 0. If your device is using an FCntDown higher than 0, set this to be one higher than your device’s FCntDown. For example, if your FCnt is 2, set this to 3.
  1. Click (RE)ACTIVATE DEVICE to save the keys.

Complete ACTIVATION form for LoRaWAN Protocol 1.1.x

  1. If your end device has already been used on a network server you need to either reset the frame counters (FCnt, NFCntDown and AFCntDown) or find out what they are.

To reset the frame counters, follow the instructions or ask the device manufacturer. A factory reset should result in the resetting of the frame counters.

To find out what the frame counters are, inspect the frames on the network server your device is currently connected to. The FCnt will be visible when viewing messages sent from the device, the NFCntDown and AFCntDown will be visible when viewing messages sent from the network server to the device.

If you cannot find the frame counters, try leaving Uplink frame-counter, Downlink frame-counter (network) and Downlink frame-counter (application) set to 0 in the next step. If you then see errors in the DEVICE DATA tab, you can disable frame counter validation in the device form, as shown in the section: Complete the Device form.

  1. If your device profile is using LoRaWAN protocol version 1.1.x and ABP activation, you must enter values for the following fields:

Note: If you are copying the DevAddr, NwkSEncKey, SNwkSIntKey, FNwkSIntKey or AppSKey from somewhere that uses LSB, click the button next to the MSB option and change the order to LSB.

  • Uplink frame-counter: Leave this set to 0, unless your device has already been used on a network server and  is using an FCnt higher than 0. If your device is using an FCnt higher than 0, set this to be one higher than your device’s FCnt. For example, if your FCnt is 2, set this to 3.
  • Downlink frame-counter (network): Leave this set to 0, unless your device has already been used on a network server and  is using an NFCntDown higher than 0. If your device is using an NFCntDown higher than 0, set this to be one higher than your device’s NFCntDown. For example, if your FCnt is 2, set this to 3.
  • Downlink frame-counter (application): Leave this set to 0, unless your device has already been used on a network server and  is using an AFCntDown higher than 0. If your device is using an AFCntDown higher than 0, set this to be one higher than your device’s AFCntDown. For example, if your FCnt is 2, set this to 3.

 

  1. Click (RE)ACTIVATE DEVICE to save the keys.

Final Steps

The device you added appears in the Devices list.

New Device Listed on the Devices Page

Figure 32: New Device Listed on the Devices Page

To add another device of the same type, repeat this section for the new device. You can reuse the device profile for each device.

Note: If an updated version of the device is issued with different firmware, check to see if the fields in the device profile still match the settings of the new device. If they do not, e.g., the LoRaWAN protocol version has changed, you must create a new device profile for those devices with the new firmware.

Learn more about the options available when setting up a device.

Join to the Network and View Device Data

  1. Log into the Semtech Network Server.
  1. Click Applications in the menu on the left.

Applications Menu Item

Figure 33: Applications Menu Item

  1. Click the link to your application.

Your Application

Figure 34: Your Application

  1. Click the link to your device.

Your Device

Figure 35: Your Device

  1. Go to the DEVICE DATA tab

Figure 36: DEVICE DATA Tab

  1. A spinning wheel displays. Leave this tab open throughout the rest of this section to view the messages.

Spinning Wheel on DEVICE DATA Page

Figure 37: Spinning Wheel on DEVICE DATA Page

  1. Consult the device documentation and complete the steps needed to get the device to join (for OTAA) or to turn the device on (for ABP).

On the DEVICE DATA tab of the Semtech Network Server dashboard, the messages sent from the device appear as events. If your device uses OTAA, the join event is shown following the first uplink from the device. Once that occurs, the network server knows that the device is activated and the join event appears in the list of events. When the device sends uplinks, the up event appears. When the device sends a status message, the status event appears.

Events Listed on the DEVICE DATA Tab

Figure 38: Events Listed on the DEVICE DATA Tab

Click on each event to view the full details of the message.

Note: If you do not see any events, check the keys, the order of the keys (MSB vs LSB), and verify the device is working. Consult the manufacturer documentation and edit the settings as needed in the CONFIGURATION, KEYS (OTAA) and ACTIVATION tabs.

  1. On the same page, go to the DETAILS tab.

Semtech Network Server DETAILS Tab

Figure 39: Semtech Network Server DETAILS Tab

  1. In the Status section on the right, the Last seen at field shows a recent timestamp, and the State field shows that it is enabled.

Semtech Network Server Status Data

Figure 40: Semtech Network Server Status Data

  1. The device is now on the network and sending messages.