How to connect the XRange LoRa module to The Things network (TTN)

    This article describes how to connect the XRange LoRa module (sx1272) to The Things network LoRa Server.

    Our LoRa ClassA-USB demo application provides a CLI (command line interface) through a Virtual Serial Port. The CLI helps to configure and save the LoRa parameters without recompile the application.


    You need to be in radio range of LoRa Gateway (concentrator) connected to TTN  

    1. Build the ClassA-usb app
    2. Install the USB drivers according the instructions from

    In the PuTTY terminal press Enter you should see “Bad command!” response from CLI inteface

    To see help type h or ? and press Enter

    Make registration in The Thing Network

    Next go to TTN’s Console.

    Add new application.

    Next register your device.

    In the terminal type sh command and press Enter to display settings of the XRange device.

    Copy device EUI from terminal to the TTN web page (mark the hex in the terminal and press the right mouse button to copy it to the clipboard, paste the clipboard in the TTN form).

    Press the Register button.

    Copy Application EUI from TTN page with the red marked button.

    In the terminal type set appeui , next press the right mouse button to paste Application EUI in the terminal, press Enter.

    Do the same for App Key, type set appkey <paste App Key from TTN page>, press Enter.

    Restart the application.

    The XRange demo application sends dummy data periodically, the data will be visible in TTN console.