DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
lora.h File Reference

LoRa radio codec + driver (DETWS_ENABLE_LORA) - Semtech SX127x / RFM95-96. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

LoRa radio codec + driver (DETWS_ENABLE_LORA) - Semtech SX127x / RFM95-96.

A per-radio plugin for the gateway (DETWS_ENABLE_GATEWAY): the southbound-radio half of a LoRa-to-web bridge. Two layers:

  • Codec - the RadioHead-compatible 4-byte frame header (to / from / id / flags) that virtually every hobby / sensor LoRa deployment uses on top of the header-less LoRa PHY. lora_frame_parse() splits a received frame into that header and the payload; lora_frame_build() prepends it. Pure, no hardware.
  • Driver - the SX127x register protocol (init / send / receive / enter-RX) over a caller-supplied register-access bus (lora_bus). The SPI transfer and the chip-select / reset GPIOs are the integration's - you implement two callbacks that read and write a chip register - so the register sequence is host-testable with a mock bus and portable across whatever SPI peripheral you wire the module to.

Wiring to the gateway (see example 11.LoRaGateway): poll lora_recv(); on a frame, lora_frame_parse() then det_gw_uplink(port, header.from, payload, len, rssi). A downlink builds a frame with lora_frame_build() and lora_send()s it. The codec + register protocol are verified on the host; the RF link itself needs the module.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file lora.h.