Connect HT-M02_V2 to a LoRa Server

[简体中文]

Summary

This article aims to describe how to connect HT-M02_V2 Gateway to a LoRa server, such as TTN, ChirpStack, which facilitates secondary development and rapid deployment of LoRa devices.

Before all operation, make sure the HT-M02 is runing well . If not, please refer to this HT-M02_V2 Quick Start document.

 

Connect to TTN/TTS

Register a LoRa gateway in TTN/TTS

Select a cluster in the TTN console page to start adding devices and gateways. Or start adding devices and gateways in TTS console.

Create a new gateway.

Fill in the HT-M02_V2 information as shown below and complete the addition.

  • Gateway EUI – The unique ID of HT-M01S gateway, view from the display screen of the HT-M01S or view through the serial port (the gateway ID will be printed through the serial port when the HT-M01S starts).

  • Gateway ID – Generated by default.

  • Gateway name – Filled in by the user, can be filled in arbitrarily.

  • Frequency Plan – Matches the LoRa band configuration in HT-M01S.

Configure the Gateway

 

Connect to ChirpStack server

ChirpStack is the most popular LoRa server open source project, widely used in many fields, and also the best choise for a private LoRa server.

ChirpStack Gateway Bridge

One thing need attention! the ChirpStack need a special service named Gateway Bridge, which converts LoRa® Packet Forwarder protocols into a ChirpStack Network Server common data-format(JSON and Protobuf).

the Gateway Bridge service can running on the Raspberry Pi or the ChirpStack server.

Install ChirpStack Gateway Bridge: https://www.chirpstack.io/gateway-bridge/install/debian/

Register LoRa Gateway in ChirpStack

Fill in the HT-M02 information as shown below and complete the addition.

  • Gateway ID – The unique ID of the HT-M02 gateway.

Connect to ChirpStack server

In the HT-M02 gateway, only the server address and port need to be configured.

config the server address and port in global_conf.json:

sudo nano lora/packet_forwarder/lora_pkt_fwd/global_conf.json

At the end of this file, make suitable changes:

  "server_address": "router.eu.thethings.network", /*The server IP address or domain*/
  "serv_port_up": 1700,
  "serv_port_down": 1700,

ctrl + O to save and ctrl + X to exit, and restart the service:

sudo systemctl restart lrgateway

Check whether the system running normally:

sudo systemctl status lrgateway

View gateway status, it is runing: