Skip to main content

Build A LoRaWAN Device

Many commercially-produced LoRaWAN devices come pre-provisioned and ready to use out of the box. However, understanding how devices are onboarded, programmed, and connected unlocks the full potential of building custom IoT solutions on the Helium Network.

This guide walks through the process of creating a custom device from scratch using a real-world development device remotely configured through the widgets on this page.

Provisioning a Device

Every LoRaWAN device requires a unique set of cryptographic keys for authentication and encryption. Pre-built devices typically come with these keys already configured, but for custom devices, you must generate and provision them yourself.

Click the button below to generate a new set of device keys:


Behind the scenes, these keys are registered with a LoRaWAN Network Server (LNS). The Join EUI is shared with the Helium Packet Router (HPR), which allows any Hotspot in the world to route messages from this device to the correct LNS. The cryptographic keys ensure end-to-end encryption between the device and the LNS.

Programming the Device

The example below uses a Heltec CubeCell development board with PlatformIO. Copy the keys generated above into the devEui, appEui, and appKey variables:

loading...

Once compiled and uploaded, the device will attempt to join the network and begin transmitting data.

Viewing Device Events

When your device transmits, a Hotspot on the Helium Network receives the radio signal and forwards it through the Packet Router to the LNS. The LNS then delivers the data here, to this page, in real-time.

No events yet.


If uplinks appear in the logger, you're seeing the complete data path in action. Your device transmits, the Helium network routes, and your application receives. This same flow can deliver data to any backend you build: a database, a dashboard, an alerting system, or an API.

Next Steps

Once data reaches the LNS, it can be forwarded to your application using integrations such as HTTP webhooks, MQTT, or cloud platforms like AWS IoT and Azure IoT Hub. See LoRaWAN Network Servers for more information on available LNS options.

Experiments

Try modifying the device behavior to deepen your understanding:

  1. Change the payload: The device sends data in hexadecimal format. How would you transmit "Hello, World!"? Tools like asciitohex.com can help with conversions.
  2. Use different ports: LoRaWAN's FPort field allows you to separate data types. Send sensor readings on one port and status updates (like battery level) on another.
  3. Adjust the transmission interval: The device currently sends data every 30 seconds. Try changing it to 10 seconds. Consider how this affects battery life and network usage.