LoRa Chat

Decentralised LoRa based Chat firmware for ESP32 boards by Heltec (and clones)

Similar projects worth following
A decentralised PoC chat program for the Heltec ESP32 based LoRa capable boards.

Each board can become a node and join in chatting to other boards! It is an ad-hoc setup, and will work so long as you have radio line of sight to the other interlocutors!

These little boards are great! They have a fast ESP32 uC with a built in OLED and LoRa chipset for comms.

*) Add a limited re-transmission option - so nodes will retransmit messages to others, to increase the range of the potential 'mesh-net' :P
*) Add optional encryption layer
*) Maybe add some level of message trust/integrity
*) Check code doesn't have any low-hanging fruit vulns (BOF could be likely - I'm not that familiar with how secure String types are in Arduino libs)
*) Make general/cosmetic improvements
*) Support a capacitive touch keyboard or other input device...
*) Add a cool logo to start up screen (desirable)

We're making the most of the board's capabilities - we're using hte LoRa.h file by Sandeep Mistry, as well as the SSD1306.h driver for the ESP8266 (it's compatible here). This gives us an SPI interface to the LoRa chip, as well as an interface for the OLED screen. 

NB - the setup() code and header choices were taken from here:

Most of the code is actually making stuff look ok... The only processing is to check first if the LoRa stack has a packet for us, and then process it. Then we read chars from the serial port in, and assemble them with the user's Nickname.

We send the nickname with the message in the LoRa packet, so no node has to keep track of users at all - they just process data. This keeps it nicely decentralised - you wanna change your nick? Just reset the board... :P

At the moment - it's a requirement for the boards to be connected to a laptop or some other interface for sending serial data. You could easily use this code to write a wrapper for XMPP (just dump data to serial and back again, though you'd need to figure out channels) and you could integrate data from other sources over WiFi without any issues. With a bigger screen and some sort of input device, you could build IM-Me style devices, no problem - it's really easy!

LoRa is very long range, if a little slow on the data rate. In theory you could have these dotted around the place - fair warning, they don't do too well with walls or stuff getting in the way, so line-of-sight is important.


First Version - mirrored from the GitHub (check the git link for latest)

x-arduino - 3.66 kB - 10/21/2017 at 12:01


  • 1
    Install Dependencies for Board

    Arduino IDE has support for ESP32 boards, so add this using the Board Manager.

  • 2
    Install Libraries

    You will need the following libraries:

    • LoRa Library by Sandeep Mistry
    • ESP8266 oled driver for SSD1306 by Daniel Eichorn and Fabrice Weinberg
  • 3
    Compile and Upload

    It's a simple as Ctrl + U (or Ctrl + R to check first...)

View all 3 instructions

Enjoy this project?



Agroecology lab wrote 10/11/2018 at 13:32 point

I think that this similar project is hoping to work with these devices too: you may have insights you could share with them?

  Are you sure? yes | no

jeroen wrote 10/04/2018 at 10:30 point


Great project!

I worked on a similar project based on the 'rocketscream mini ultra pro', an ARM M0 board. It has no screen but interfaces using a VT100 compatible terminal, think BBS style.

I've put much effort in setting up the 'platform' with low power in mind and running FreeRTOS/C++ with customized drivers for the SX127x and USB. It can be powered and controlled by a OTG cable on your phone running an terminal emulator.

The video can be confusing and need to be redone but you see my phone talking to my laptop in a simple Lora Shoutbox. Lora settings can be changed on the CLI.

I have no longer much time to 'invest' in this project but I think, together with this project, a great off grid communicator can be made; a LoRa BBS in everyone's pocket!


  Are you sure? yes | no

prosto wrote 06/20/2018 at 17:58 point


add ax25 (and retransmision) and meybe TNC on 433Mhz.

  Are you sure? yes | no

Krys wrote 02/14/2018 at 01:43 point

Hey if any one can help it'd be fantastic, how would I go about adapting this for an adafruit feather m0 without a display, just displaying into a serial monitor/terminal?

  Are you sure? yes | no wrote 02/07/2018 at 22:01 point

Hello everyone.

I would like to use this module wifi_lora_32 with micropython. Has everyone do this. I would like to use the lopy library form pycom.

  Are you sure? yes | no

Malik Enes Şafak wrote 12/30/2017 at 13:17 point

I made board for this project. 100mm x 61mm pcb with 30 6x6 tact switch and 18650 battery holder. Here is a link

Ordering this board from oshpark really expensive. I made this board for seeedstudio fusion service. Its really cheaper especially if board size max 10cm x10cm. If anyone interested i can share kicad project and gerber files.

Please keep in mind. This board not tested yet.

Edit: PCBs and parts arrived today. Both me and my father very excited about making some progress. I will solder buttons and test ASAP.

Edit 2: Board not working. Some pins on Heltec board (or esp32 itself) are input/output only (not remember which one). Please keep in mind if that

  Are you sure? yes | no

Tommi wrote 11/26/2017 at 11:42 point

Thanks Mark for this Project.
I am looking for a Project like yours, but only Receive like a Pocsag-Pager.
I am HamRadio and we use this Pocsag-Pager. But with LoRa we can do it too, but with less Power. We only Need 80 Characters to receive.
Perhaps i can use your Project to receive?

Wishes Tommi

  Are you sure? yes | no

ia wrote 10/23/2017 at 17:55 point

1) what You thing about sound modem for baofeng and increase range?

2) can You add solar panel for offgrig machine?

  Are you sure? yes | no

Mark C. wrote 10/24/2017 at 07:16 point

Re: 2) absolutely! adding a solar panel charging circuit, small LiPo batt and solar panel would make it effectively hugely portable! That's a really good idea - I'll look into it, and let me know if you give it a go!

RE: 1)  I had wondered if it would integrate into a known radio, but the protocol is quite specific for LoRa (and even more so for the LoRaWAN stack). I guess if you could get data out of the baofeng (over an SPI interface), you could use it to control the SX1278 chip?
Cheers! M.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates