Sending data over LoRa with Heltec ESP32 WifiKit. Having two ESp32 boards, the first test that come in mind is to send some packets!

Remember to connect the antenna to the board, as the producer reccomends, to avoid damage on the SX127x chip.

Make sure that you have set the ESP32 board in Arduino IDE. Look on internet or this article.

Next step, install heltec, LoRa (from Sandeep Mistry) and SSD1306 (from Daniel Eichhorn) display libraries:

The program for testing is sourced from alictronix.

Sender program

Receiver program

Upload the code to each board, and then wait for results:


Happy blinking!


Heltec WiFi 32 board

Recomended tools:

Air quality sensors:

ESP32 lora send/receive packet test
Tagged on:                                 

6 thoughts on “ESP32 lora send/receive packet test

  • January 19, 2020 at 23:05

    Hello. thanks for all the information available. I have a question. is there a function in the library that allows us to confirm that the message has been delivered? Or it is up to us to implement a callback confirming the integrity of the message. Or any other technique that allows the recipient to confirm that every message has been received. So let the sender know that everything is ok. does this have to be implemented by us?

    • September 24, 2020 at 05:29

      this messages are not like in TCP protocol, more likely as UDP: the packet is sent without waiting for a confirmation

  • August 3, 2020 at 20:04

    An excellent article, I read many articles on this topic and tried various sketches, it does not work, I thought that the module was out of order and then I came across your article. Thank!

  • February 16, 2021 at 23:00

    Hello, a question that goes well with the name of your site: How do you get Lora.print() to understand an escaped ” character??
    Let’s say I want to send ‘hello “you”‘, then I’ve tried Lora.print(“hello \”you\””), but on the receive side, it really receives the backslash and the doublequotes, and it will print ‘hello \”you\”‘ instead of ‘hello “you”‘.

  • March 30, 2022 at 08:44

    Hi Dear
    if i want to connect water turbidity sensor to one of the Heltec ESP32 WifiKit (Sender) and sens its reading to the other Heltec ESP32 WifiKit (Receiver), on what Pin should i connect the sensor data pin? and what should i change in the above two code? Please.
    Best Regards

  • March 14, 2023 at 20:41

    I just tried your code on two of the v3 boards. The upload fine by I get nothing on the OLED? Any thoughts.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.