LoRa
dev.wireless.lo_ra - wire path w\l - generated from fwMenuLoRa.
configure
Configure. LoRa modem params: freqHz: carrier Hz, US 902-928M (def 906875000) sf: spreading factor 6-12 (def 11) bwEnc: 0=125 1=250 2=500 kHz (def 1) cr: coding rate 5-8 = 4/5..4/8 (def 5) power: TX dBm, -9..22 (def 22) only power is range-checked; sync/preamble fixed
https://meshtastic.org/docs/configuration/radio/lora/
Wire command: w\l\c
| Arg | Wire type |
|---|---|
| freq_hz | decS32 |
| sf | dec |
| bw_enc | dec |
| cr | dec |
| power | decS32 |
Returns: none (Ok/Err only)
dev.wireless.lo_ra.configure(freq_hz: int, sf: int, bw_enc: int, cr: int, power: int) -> Result
ow_status ow_wireless_lo_ra_configure(ow_device* dev, int32_t freq_hz, int32_t sf, int32_t bw_enc, int32_t cr, int32_t power);
dev.wireless().lo_ra().configure(freq_hz: i32, sf: i32, bw_enc: i32, cr: i32, power: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.wireless.lo_ra.configure(freq_hz, sf, bw_enc, cr, power) # check dev.ok
send_payload
Send. Transmits a LoRa packet
Wire command: w\l\s
| Arg | Wire type |
|---|---|
| data | hexbytes |
Returns: none (Ok/Err only)
dev.wireless.lo_ra.send_payload(data: bytes | bytearray) -> Result
ow_status ow_wireless_lo_ra_send_payload(ow_device* dev, const uint8_t* data, size_t data_len);
dev.wireless().lo_ra().send_payload(data: &[u8]) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.wireless.lo_ra.send_payload(data) # check dev.ok
rx_enable
RX Enable. RX control: 0 = standby (radio idle, no RX, low power) 1 = receive (RX armed; packets print as 'lora' events) default 1 (RX on); not persisted across reboot
Wire command: w\l\r
| Arg | Wire type |
|---|---|
| mode | dec |
Returns: none (Ok/Err only)
dev.wireless.lo_ra.rx_enable(mode: int) -> Result
ow_status ow_wireless_lo_ra_rx_enable(ow_device* dev, int32_t mode);
dev.wireless().lo_ra().rx_enable(mode: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.wireless.lo_ra.rx_enable(mode) # check dev.ok
status
Status. WIO-E5 bridge status (a 'lora' STATUS event): state: IDLE/RX/TX/SLEEP chip: raw SX126x status byte rssi: live channel, dBm rxPkts/polls/rxBytes/cmds: counters rxBytes+cmds rising = DISPLAY<->WIO link alive
Wire command: w\l\t
Returns: none (Ok/Err only)
dev.wireless.lo_ra.status() -> Result
ow_status ow_wireless_lo_ra_status(ow_device* dev);
dev.wireless().lo_ra().status() -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.wireless.lo_ra.status() # check dev.ok
raw_frame
Raw Frame. Sends a raw framed command to the bridge (advanced)
Wire command: w\l\f
| Arg | Wire type |
|---|---|
| cmd | hex8 |
| payload | hexbytes |
Returns: none (Ok/Err only)
dev.wireless.lo_ra.raw_frame(cmd: int, payload: bytes | bytearray) -> Result
ow_status ow_wireless_lo_ra_raw_frame(ow_device* dev, uint8_t cmd_, const uint8_t* payload, size_t payload_len);
dev.wireless().lo_ra().raw_frame(cmd_: u8, payload: &[u8]) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.wireless.lo_ra.raw_frame(cmd, payload) # check dev.ok