“ESP32 + LoRa” Preparation & Config Parameters



  1. Install Arduino IDE. How to install please click here.

  2. Install Heltec ESP32 series Arduino development framework. Installation manual please refer to here.

  3. Install Heltec_ESP32 Library.

  4. An ESP32 + LoRa node.

  5. High quality USB cable.

Configure Parameters

  1. Connect the development board to the computer through USB data cable.

  2. Open the Arduino and in the Tools option, select the appropriate Board, Port.

  1. In Tools option, Board, Upload Speed, CPU Frequency, Core Debug Level, PSRAM are ESP32 chip’s normal option, just keep default. Special notice the LoRaWan Region, LoRaWan Debug Level, LoRaWANDEVEUI.

  • LoRaWan Region – LoRaWAN protocol region definition, strictly follow LoRaWAN™ 1.0.2 Regional Parameters rB;

  • LoRaWan Debug Level – Messages printed via serial.

    • None – Default;

    • Freq – Uplink/downlink frequency;

    • Freq && DIO – Uplink/downlink frequency and DIO interrupt information;

    • Freq && DIO && PW – Uplink/downlink frequency, DIO interrupt information and low power status.

  • LORAWAN_DEVEUI – LoRaWAN Device EUI generate method

    • CUSTOM – Defined by the user in the DevEui array of the code, 8 bytes;

    • Generate By ChipID – Generated according to the Chip ID of the chip. Selecting this option will override the setting in the DevEui array in the code.

  1. Follow the path shown below to open the LoraWAN demo code.

  1. Fill in DevEu AppEui AppKey in the following figure in the red box in the example format, which will be used in the website registration.

  • DevEui – Mote device IEEE EUI (big endian), 8 bytes;

  • AppEui – Application IEEE EUI (big endian), 8 bytes;

  • AppKey – AES encryption/decryption cipher application key, 16 bytes;


This example uses the OTAA pattern as an example, and for the differences in the ABP pattern, please refer to this link: ABP mode

  1. Effective load is here.


Print too much messages may cause the system unstable.

  1. Other relevant parameters are in the .ino file, You can come back to it after you know lorawan well.

  2. Click Upload to upload the code.