Configure a LoRa device based on the Microchip RN2483

The Microchip RN2483 is a LoRa class A module widely available. In a normal, end-user scenario, LoRa endpoints (or devices/sensors) come with preconfigured parameters but before the module can be used, it needs to be configured with those parameters to use it in the LoRa network. What parameters to configure depends on the type of activation. For this post, I’ve been using the RN2483 based PICtail test-board.

When using a LoRa test-device, the parameters need to be set manually before the device can send data. How to set these parameters completely depends on the type of chip that is used in the device. Most of the times this information can be found in the documentation but I found it often difficult to translate the raw info to hands-on usable information so I decided to figure everything out and write a post about it.

After configuring the necessary parameters in the device, they need to match with the device added to the network server in your LoRa network before it will accept data sent by this device. For this post, I will use Actility TPW (ThingPark Wireless) Device Manager

About the Microchip RN2483

The RN2483 is a fully-certified 433/868 MHz module based on wireless LoRa technology. The RN2483 utilizes a unique spread spectrum modulation within the Sub-GHz band to enable long range, low power, and high network capacity. Configuration is done with ASCII command interface over UART. The test board RN2483 PICTail contains a usb port with integrated USB to serial.

Equipment list

Before you are able to configure the RN2483 you need the following:

  • RN2483 PICTail
    rn2483
  • USB cable
  • Terminal emulator to send the commands to the test device
  • LoRa gateway in the range of the RN2483 device
  • Network server (Actility TPW)

Network diagram

Connection to the RN2483

  1. Connect the module to a PC. The device will create a new serial device (COMx on Windows and /dev/ttyACMx on Linux)
  2. Open a terminal session to the serial device/port with the following parameters: bitrate: 57600, 8 bits, no parity, 1 stop bit, no flow control.
    Commands need to be terminated with <CR><LF> and the device does not echo back send commands by default.
    After connecting to the device, you can test the communication by sending “sys get ver” which should return the current FW version of the board.
    For example:
  3. After you have ensured that you can communicate with the device, you can start the configuration.

Configure the device for ABP

  1. Get the hwEUI (physical address) of the module
  2. Set the NwkSKey:
  3. Set the AppSKey
  4. Set the DevAddr:
  5. (optionally) Turn on ADR (Adaptive Data Rate):
  6. (optionally) Set the transmit power:
  7. Save the settings in the device:

Configure the device for OTAA

  1. Get the hwEUI (physical address) of the module
  2. Set the AppKey:
  3. Set the AppEUI:
  4. Save the settings in the device:

Add the device to the network server (Actility TPW Device Manager) for ABP

  1. Log in to the TPW Device Manager
  2. In the “Add Devices” section, click “Create”:
    actadd
  3. Fill in the required information as configured the device above for ABP:
    actabp1
  4. Click “Create”

Add the device to the Actility TPW Device Manager for OTAA

  1. Log in to the TPW Device Manager
  2. In the “Add Devices” section, click “Create”:
    actadd
  3. Fill in the required information as configured the device above for OTAA:
    actotaa1
  4. Click “Create”

Join with ABP

Although there is no real join process when using ABP, you need to tell the device that it is using ABP and not OTAA:

Join with OTAA

For OTAA, there is a real join process and you require the network server to acknowledge your join before you will be able to send data:

Send data

There are two ways to send data with LoRa: confirmed (which will be confirmed by a downlink frame: like TCP) and unconfirmed (no confirmation: like UDP).

The format of sending data for RN2483 is as follows:
mac tx <type> <FPort> <payload>

For example:

Troubleshoot

Check if the base station receives the LoRa data over radio from the RN2483.

This information should be available in the TRACE.log from the Actility LRR running on a base station which is in the range of the RN2483.

Example of received uplink and downlink data:

Once you see that the gateway received the packet and forwarded it to the LRC, we can further troubleshoot using the Wireless logger:

Data seen in the wLogger for the unconfirmed uplink data:wlogger1

Data seen in the wLogger for the confirmed uplink data:wlogger2

Data seen for the confirmation downlink frame:wlogger3

Documentation

For more information and background on the RN2483:

Leave a Reply

Your email address will not be published. Required fields are marked *