Setting up the Heltec HT-M01 and using it as a gateway for The Things Network (TTN)
The HT-M01 concentrator board is based on the SX1301 baseband chip and is available in 433MHz, 470~510MHz, 868MHz and 915MHz versions. Combined with a Raspberry Pi Zero it makes a very cost effective Lora Gateway. These are available from the Heltec store on AliExpress here . I would recommend buying one of the packages if you want to make things as easy as possible. These come with a board that connects the Pi Zero and the gateway together so you don’t need to wire them together.
Before you start it is very important to connect an antenna. If you wait until later in the tutorial and forget you could damage the gateway.
There are two parts to this guide. Connecting and setting up with the Raspberry Pi Zero and setting up a gateway account at The Things Network.
If you don’t have the connection board, wire the Pi and HT-M01 as below:
Pi Zero Software Installation
I prefer to access the Pi Zero via SSH. Follow the guide here: https://robotzero.one/headless-install-raspbian-stretch-lite/ If the gateway is later installed somewhere away from a computer this will make it much easier to view the console.
Once you are logged into the Pi, type:
Activate SPI by navigating Interfacing Options > SPI > Yes
You should probably change the password at this point as well. Reboot the Pi with
Now enter the following commands one at a time:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
git clone https://github.com/Lora-net/lora_gateway.git
git clone https://github.com/Lora-net/packet_forwarder.git
git clone https://github.com/HelTecAutomation/lorasdk.git
make clean all
make clean all
chmod +x install.sh
Copy the Gateway ID (In Putty left mouse drag over the ID to copy to the clipboard and paste it into Notepad)
Refer to this webpage https://github.com/HelTecAutomation/lorasdk to see the global_config filenames. Use the correct one below (replace global_conf_EU868)
sudo cp -f /home/pi/lora/lorasdk/global_conf_EU868.json /home/pi/lora/packet_forwarder/lora_pkt_fwd/global_conf.json
The new global_conf file needs a few changes. To edit it type:
At the end of the file make these changes:
“gateway_ID”: “YOUR_GATEWAY_ID”, “server_address”: “router.eu.thethings.network”, “serv_port_up”: 1700, “serv_port_down”: 1700,
The server address may vary depending on your location
To start the gateway:
./lora_pkt_fwd start global_conf.json
Registering the Gateway at The Things Network
Follow these steps:
Click ‘Register Gateway’
Tick the checkbox I’m using the legacy packet forwarder
Paste your Gateway ID (that you were given during the Raspberry Pi install above)
Complete the rest of the details in the form.
Your gateway is now registered on The Things Network! If you are have nodes in range or you set up your own, you should see something like this in the Gateway Traffic section.
The following pages helped me with setting up this device:
Raspberry Pi Pin Diagram – https://pinout.xyz/
Things Network forum post about the HT-M01 – https://www.thethingsnetwork.org/forum/t/heltec-ht-m01-lora-concentrator-board-for-100/13478
Manufacturer’s documents: http://www.heltec.cn/download/HT-M01%20documents%20package.zip
Manufacturer’s product page – http://www.heltec.cn/project/ht-m01-lora-gateway/
Gateway SDK on Github – https://github.com/HelTecAutomation/lorasdk
If you liked this tutorial and want me to create more then please say thanks by buying me a coffee here...