Skip to main content

LoRaWAN Modem over J-Link

This article will describe how to flash the LoRaWAN modem firmware in CHESTER using SEGGER J-Link.

Requirements

You will need the following hardware and software tools:

  • One of these operating systems:

    • Ubuntu 20.04 and Ubuntu 22.04
    • macOS 11 and macOS 12
    • Windows 10 and Windows 11
  • HARDWARIO CHESTER device (you will need to open the enclosure top cover with six screws)

  • USB debugger/programmer SEGGER J-Link (including a 10-pin SWD adapter + flat cable)

    tip

    HARDWARIO provides SEGGER J-Link + all the required accessories on demand.

  • Micro-USB cable with appropriate plug type to your computer

    danger

    Some Micro-USB cables provide only power and no data signals. If the connection between SEGGER J-Link, and your system does not work, check the cable type in the first place.

Installation

You can install SEGGER J-Link Software and Documentation Pack with these steps:

  1. Download the 64-bit DEB package from this link.

  2. Open the Terminal application.

  3. Go to the folder with the downloaded package, for example:

    cd Downloads
  4. Install the package using this command:

    sudo dpkg -i JLink_Linux_<VERSION>_x86_64.deb
    caution

    Don't forget to replace the <VERSION> placeholder with the real version in the file name.

Flashing Procedure

Follow these steps to flash the LoRaWAN modem firmware in the CHESTER device:

  1. Open the CHESTER enclosure (6 screws from the bottom side).

  2. Connect the 10-pin flat cable to the connector labeled LRW.

    caution

    One of the wires on the flat cable between J-Link and CHESTER has red color. This red color denotes signal number 1. This red-colored signal has to be oriented toward the black dot located next to the SWD connector on the CHESTER mainboard. The same rule with the cable applies at the side of SEGGER J-Link.

  3. Connect the other side of the 10-pin flat cable to the SEGGER J-Link adapter board (and plug the adapter board into the SEGGER J-Link device).

  4. Connect the Micro-USB cable to SEGGER J-Link and your computer.

  5. Connect the Micro-USB cable to your computer and SEGGER J-Link.

  6. Download the LoRaWAN Modem firmware package v1.4.1.

  7. Unzip the downloaded package.

  8. Open the Terminal application and switch to the directory with the unzipped package.

  9. Start the flash procedure:

    ./flash.sh
  10. You should get a message about the successful operation.

  11. Disconnect SEGGER J-Link from the SWD connector.

  12. Power-cycle the CHESTER device.

    danger

    Skipping the power-cycling step may result in an undefined LoRaWAN modem operation.