Skip to content

How to connect your LoRaWAN device to The Things Network Platform

Introduction

LoRaWAN

LoRaWAN (Long Range Wide Area Network) is a low-power, wide-area networking protocol designed for IoT (Internet of Things) devices. It enables long-range communication (up to 15 km in rural areas) while consuming minimal power, making it ideal for applications such as smart cities, agriculture, and industrial monitoring.

Key features of LoRaWAN include:

  • Long Range: Capable of transmitting data over several kilometers, which is significantly greater than traditional short-range protocols like Wi-Fi or Bluetooth.
  • Low Power Consumption: Devices can operate for years on small batteries, making it suitable for applications where frequent charging or battery replacement is impractical.
  • Scalability: Supports numerous devices within a single network, allowing for extensive deployment in various environments.
  • Security: Utilizes encryption for data security, ensuring that communications are safe from unauthorized access.
  • Star Network Topology: Devices communicate directly with a central gateway, which then connects to the internet or cloud services.

LoRaWAN is commonly used in smart metering, environmental monitoring, asset tracking, and other applications that require infrequent data transmission over long distances.

The Things Network

The Things Network (TTN) is a global open-source initiative that aims to provide a decentralized network for Internet of Things (IoT) devices. It utilizes LoRaWAN (Long Range Wide Area Network) technology to enable long-range communication with low power consumption. TTN allows individuals and organizations to connect their IoT devices to the internet, facilitating data sharing and enabling various applications such as smart cities, agriculture, and environmental monitoring. The network is community-driven, encouraging collaboration and innovation in IoT deployments worldwide.

Prerequisites

  • TapNLink NFC (BLE) LoRa: this TapNLink allows IoT designers to evaluate all the advantages of IoTize TapNLink products for building a LoRaWAN EndNode. You can purchase a TapNLink NFC (BLE) LoRa from the IoTize commercial website.

OR

  • Tapioca with LoRa extension board: this TapNLink allows IoT designers to evaluate all the advantages of IoTize Tapioca products for building an industrial LoRaWAN EndNode. You can purchase a Tapioca with LoRa extension board from the IoTize commercial website.

AND

  • IoTize Studio: the PC-based configuration software that configures the TapNLink Primer to communicate with IBM Watson IoT Platform. You can download and install the software from IoTize website.

Step1: Setup your The Things Network account and application

Step2: Get your device EUI

The device EUi is the 64 bit end-device identifier, EUI-64 (unique). It is possible to get this EUI from the device.

More information about adressing are available in the learn section of The Things Network.

Using IoTize Studio

  • Connect to a TapNLink or Tapioca using IoTize Studio.
  • Then "Check Configuration"
Device Provisioning
  • The LoRaWAN Device EUi is the Device UID of the TapNLink or Tapioca.
Device Provisioning

Using Tap Manager

In development, to be completed.

Step3: Set the LoRaWAN keys in your Java code

All the IoTize LoRaWAN examples are using the same key definition: - JoinEUI (can be all zero) is a 64 bits join server identifier. - AppKey is the AES-128 key used to ensure the security.

More information about AppKey are available in the learn section of The Things Network.

    // LoRaWAN OTAA connection keys for The Things Network v3
    final byte[] LORA_JOIN_EUI  = {(byte)0x00,(byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00};
    final byte[] LORA_APP_KEY   = {(byte)0x4C, (byte)0x46, (byte)0xE0, (byte)0xDF, (byte)0x48, (byte)0x31, (byte)0xE9, (byte)0x04, (byte)0x0C, (byte)0x62, (byte)0xB1, (byte)0x7D, (byte)0xC9, (byte)0xD4, (byte)0xA6, (byte)0x2E};
    final byte[] LORA_NWK_KEY   = {(byte)0x4C, (byte)0x46, (byte)0xE0, (byte)0xDF, (byte)0x48, (byte)0x31, (byte)0xE9, (byte)0x04, (byte)0x0C, (byte)0x62, (byte)0xB1, (byte)0x7D, (byte)0xC9, (byte)0xD4, (byte)0xA6, (byte)0x2E};

Step4: Add your first device to your application

IoTize Product Type
  • Then enter your device "Provisioning information" (step 2 & 3):
Device Provisioning
  • You can now click on the button "Register end device" and be redirected to your new device page.

  • The things network is ready to receive the first LoRaWAN payload from this device.

To go further

Back to top