Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 2.54 KB

File metadata and controls

45 lines (29 loc) · 2.54 KB

ESP32 LoRaWAN Startup Guide

The code in this repository and tutorial explains how to run LoRaWAN on an ESP32 device

This is the accompanying repository for my articles "Startup guide for your first LoRaWAN steps with an ESP32 and a LoRa module (OTAA activation)" available here: https://medium.com/@androidcrypto/startup-guide-for-your-first-lorawan-steps-with-an-esp32-and-a-lora-module-otaa-activation-c31cdbe6ef29

and "Startup guide for your first LoRaWAN steps with an ESP32 and a LoRa module (ABP activation)" available here: https://medium.com/@androidcrypto/startup-guide-for-your-first-lorawan-steps-with-an-esp32-and-a-lora-module-abp-activation-a8574d7c4b1f

I'm strongly recommending reading my article "Easy setup of an account, application, and end device on The Things Network ("TTN")" first, as it is essential to make the right settings for your device to avoid any disappointments: https://medium.com/@androidcrypto/easy-setup-of-an-account-application-and-end-device-on-the-things-network-ttn-219816a6caf3

Sketches

ESP32_LoRaWAN_TTN_OTAA_tutorial

ESP32_LoRaWAN_TTN_ABP_tutorial

Note for Heltec Devices

The sketches are using the "AUTO_PIN_MAP" method within the LoRaWAN library, so they work out of the box with these Heltec devices (tested):

  • Heltec WiFi LoRa 32 V2 (out phased)
  • Heltec WiFi LoRa 32 V3
  • Heltec Wireless Stick V3
  • Heltec Wireless Stick Lite V3

If you want to run other devices you need to set up the pin mappings on your own.

The sketches does not use any other features of your LoRa Dev board (e.g., a display or LED); it is important that the board is connected by USB with your Serial Monitor to follow the outputs.

Compile and Upload the sketch

It is important to choose the matching ESP32 board name for your device; please use these names:

  • Heltec WiFi LoRa 32 V2: Heltec WiFi LoRa 32 (V2)
  • Heltec WiFi LoRa 32 V3: Heltec WiFi LoRa 32 (V3)
  • Heltec Wireless Stick V3: Heltec Wireless Stick(V3)
  • Heltec Wireless Stick Lite V3: Heltec Wireless Stick(V3) [NOT THE LITE variant !]

Library used for LoRaWAN

The core of the tutorial is the EzLoRaWAN library by Francois Riotte ("rgot-org"), version 1.0.1, available here https://github.com/rgot-org/EzLoRaWAN. The library is available by the Arduino Library Manager.

Development Environment (Arduino)

Arduino IDE Version 2.3.6 (Windows)
arduino-esp32 boards Version 3.4.4 (https://github.com/espressif/arduino-esp32) that is based on Espressif ESP32 Version 5.5.1