Connect 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
- Connect to ChirpStack Server
- Connect to SnapEmu
Configure Gateway
Configure your gateway and fill in the server address as the server you want to connect to, please refer to the HT-M2802 Quick Start document.
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-M02 gateway, view from the display screen of the HT-M02 or view through the serial port (the gateway ID will be printed through the serial port when the HT-M02 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.
View gateway status, it is runing:

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 Installation guide: https://www.chirpstack.io/overview/
- ChirpStack support forum: https://forum.chirpstack.io/
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.
View gateway status, it is runing:

Register through SnapEmu APP
Search the App Store for SnapEmu, download and install it.

Open the Scan option to scan the Heltec device QR code.
If the device does not have a QR code, click 'Input' for manual registration. For product information you can refer to the corresponding 'Quick Start'.

Fill in the group and add the device.

Registration is completed and the device display is activated.

Manual registration through the SnapEmu IoT Platform webpage
Register and log in to SnapEmu: SnapEmu Web Page link.
Click where shown below.

Click CREATE A NEW DEVICE.

Go to the device registration page.

NameandDescriptioncan be filled in freely, and they will become the name and remark of the device displayed on the platform.Groupdenotes the grouping of the device on SnapEmu.Device typeThis device is a gateway, so choose "LoRaGate".RegionMatch the frequency band of the gateway.GatewayEUIGateway ID, through device configuration page or scan the device QR code to obtain.
After filling in the information, click Submit and refresh the page to see the device.

If the device shows "unactiveted", it means that the device was not successfully connected. Don't worry, it usually takes some time for the server to respond, please wait a minute and refresh the web page again.