DEKI/ENGINE docs
deki-lora 0.19.0
Deki package reference
deki-lora

LoRa radio: an SX1262 driver with a duty-cycle limit, sending and receiving packets

Repository: github.com/dekiengine/deki-lora · Latest release: 0.19.0 · Needs engine 0.19.0+

Install with DekiEditor --packages-add deki-lora <project>, or from the Package Manager. The engine's own components and C++ API are in the Deki docs.

Shown in the editor as LoRa (SX1262).

Components

Component Category Description
SX1262LoRaComponent Radio Sets up a Semtech SX1262 LoRa radio on SPI.

Component reference

SX1262LoRaComponent

Sets up a Semtech SX1262 LoRa radio on SPI.

Inspector name: SX1262 LoRa · Category: Radio · Type: DekiLora::SX1262LoRaComponent

Property Type Default Constraints Description
spiHost int32 1 1 to 2 SPI controller: 1 is SPI2, 2 is SPI3. Use the display's when they share pins.
sckPin int32 40 -1 to 48
mosiPin int32 41 -1 to 48
misoPin int32 38 -1 to 48
csPin int32 9 0 to 48 The radio's chip select (NSS)
busyPin int32 13 0 to 48 The radio's BUSY pin
resetPin int32 17 0 to 48 The radio's NRESET pin
dio1Pin int32 45 -1 to 48 The radio's DIO1 pin, its interrupt line (-1: not wired). With it, the radio is asked over SPI only when it has something to say, rather than every frame.
spiHz int32 8000000 100000 to 1.6e+07 SPI clock. The SX1262 takes up to 16 MHz.
tcxoVoltage float 1.8 0 to 3.3 Volts DIO3 gives the radio's TCXO; 0 when the board has a plain crystal instead. LilyGO boards: 1.8
dio2AsRfSwitch bool true DIO2 switches the antenna between sending and receiving, as on most SX1262 modules
frequencyHz int32 868100000 1.5e+08 to 9.6e+08 Carrier frequency in Hz. It must be one your region allows: 868100000 in Europe, 915000000 in the Americas.
spreadingFactor int32 7 7 to 12 7 is fastest; each step up doubles the time on air and adds range
bandwidthKHz int32 125 7 to 500 Bandwidth in kHz: 125, 250 or 500 (or 62.5 and below, written as 62, 41, 31, 20, 15, 10, 7)
codingRate int32 5 5 to 8 Coding rate 4/5 to 4/8, as 5 to 8: more is sturdier and slower
txPowerDbm int32 14 -9 to 22 Transmit power in dBm. Europe's 868.0-868.6 MHz allows 14.
syncWord int32 18 0 to 255 Sync word: radios only hear others with the same one. 0x12 (18) private, 0x34 (52) LoRaWAN.
dutyCyclePercent float 1 0.1 to 100 Most of the time the radio may be sending, in percent: after a packet it waits until that holds. Europe's 868.0-868.6 MHz allows 1. 100 turns the limit off, where the law allows it.

Changelog

0.19.0

Changed

  • minEngine 0.19.0: built against engine 0.19.0, whose component metadata records the package each class is in. A build of this package from before does not load and is rebuilt.

Added

  • Japanese, Simplified Chinese and Korean: editor/lang/ja.json, zh.json and ko.json translate the names, tooltips and enum values this package's components show in the Inspector.

0.18.2

Added

  • The package: a Semtech SX1262 LoRa driver (SX1262LoRaComponent for the boot scene, DekiLoRa::GetCurrent() for game code). Sends and receives packets with RSSI and SNR, listens whenever it is not sending, and enforces a duty cycle (1% by default, Europe's 868 MHz rule). Joins an SPI bus the display already uses, as on the LilyGO T-Deck. ESP-IDF only.
  • dio1Pin (45, the T-Deck's): with the radio's interrupt line wired, the radio is asked over SPI only when DIO1 is raised, rather than every frame on a bus the display is sending frames on.

Earlier releases: CHANGELOG.md.


Generated from the package's reflection data (engine 0.19.0). Property names are the keys used in scene files. Renames keep an alias (compatibility).