I wrote the firmware and software for the LoRa nodes and the embedded web server chat application myself, designed the hardware, assembled the boards, and 3D-printed casings for each node.
Off-grid situations still need trustworthy comms when cellular or the internet is missing, unreliable, or not appropriate: remote sites, crowded events, disaster response, or small teams that want private radio-backed messaging without infrastructure. LoRa is a strong fit for low-power, long-range links, so I built a complete prototype that pairs robust radio behavior with a familiar chat experience in the browser.
Tech stack
C/C++ESP32LoRaSX1262PlatformIOWebSocketsRadioLib
How I built it
Overview
Each node runs modular C++ firmware (PlatformIO) on ESP32-class hardware with an SX1262 LoRa transceiver. The device brings up a WiFi access point, serves a responsive web UI over HTTP, and uses WebSockets for real-time chat and delivery status. Payloads are encrypted before they go over LoRa; an acknowledgment and retry path reports success, failure after retries, or pending state back to the UI. A small OLED shows AP SSID/password, assigned IP, connected WiFi clients, and snippets of recent LoRa TX/RX so you can operate without a phone at a glance. A GPIO button can fire a predefined "alive" ping across the link.
Hardware layout, tested boards, components per node, and LoRa/WebSocket framing (with diagrams) are documented in the Hardware architecture and Communication protocols sections below.
Software architecture
The codebase splits into managers: lora_manager configures the radio via RadioLib, formats packets, handles interrupt-driven reception, maintains an outgoing queue, and drives ACK timeouts/retries; web_manager hosts AsyncWebServer on port 80, serves the chat page, and manages JSON over WebSocket at /ws; display_manager drives U8g2 with states for boot, AP details, IP ready, chat context, and RX alerts; encryption helpers XOR-encrypt message bodies and represent ciphertext as HEX on the wire. ArduinoJson serializes WebSocket messages. WiFi stack and async web work sit on FreeRTOS alongside a lean Arduino loop, with LoRa events surfaced from ISR context safely.
Hardware architecture
Node configuration
The system is designed primarily for ESP32-based boards with integrated LoRa transceivers and OLED displays but will work with any ESP32 board connected with an SX1262 LoRa module over SPI and an OLED display over I2C.