LoRaWan from 0 to 100 – Heltec WiFi LoRa 32 (v2) as a gateway to TheThingsNetwork

LoRaWan from 0 to 100 – Heltec WiFi LoRa 32 (v2) as a gateway to TheThingsNetwork

LoRaWan from 0 to 100. – A 5-part tutorial with off-the-shelf hardware and software to make a LoRa node send data via a LoRa router/gateway to www.thethingsnetwork.org.

You will probably spend some days or maybe even one or two weeks to get it running, depending on how much you really learn doing it. Mostly because there are a lot of terms to learn and manage.

If you succeed this, you could expand the tutorial with knowledge about antennas and their optimal parameters. After that, sensors and applications.

My tip is to drop the sensors in the first round in this tutorial and just send fixed dummy data. You can later on return to integrating the sensors measuring real data.


– Look in the description for links to software etc.

In the tutorial, you need to know the following three things:

1.) Regards TTN – you will not see anything about NwkSKey, alias network session key in the TTN GUI unless you select Activation Method “ABP”.

2.) Regards sender – using the same hardware (a Heltec version before version 2) – if you want to use 868 MHz it helped me to comment out “LMIC_selectSubBand(0);” (like “//LMIC_selectSubBand(0);” ).

3.) Regards receiver – in my TTN account, I could not get the “Status” of my GATEWAY to show anything else than “not connected” right away. The GATEWAY did also not list any traffic in my TTN account, even if the display on the receiver device showed traffic. Despite the status “not connected” of the GATEWAY, did the receiver relay the data from the sender to the DEVICE in my TTN account, where I could see the data be listed as they where send.

I had the Heltec v2 (Heltec.cn) running as a gateway on a 3.7V, 2600mA lithium-ion battery pack for 23.5 hours. The consumption during that time was 93 mA/hour.

I did receive a little less than 20 messages. I pulled it for the system web page maybe 50 times. And it probably sent several standard “I’m-alive” messages to the TTN servers also. The battery pack was the model “1S1P-SAM”, Samsung Li-Ion-Akku ICR18650 (Conrad.de). The data was measured inside in shadow with a room temperatures of between 10 and 20 degrees of Celsius.

#lora #lorawan #tutorial #iot #internetofthings