Files
firmware/test/fixtures
Claude 346148b667 meshtasticd: use a transparent-mode node as the radio
Lora.Module "transparent" makes meshtasticd drive the LoRa radio of another
node running LoRaConfig.transparent_mode, over that node's client API.
Lora.TransparentDevice is its serial device path, or host[:port] for its
TCP API (port 4403 by default).

TransparentRadio speaks the framed client API (the StreamAPI framing) over
a serial port (termios, 115200 raw) or a non-blocking TCP socket:
- Handshake: want_config with the config-only nonce, then a local admin
  set_config with this node's LoRa settings plus transparent_mode, then a
  get_config read-back that must confirm transparent_mode. Firmware that
  predates the mode is refused. A device already set up is not rewritten.
- channel_num is pinned to the slot this node resolved, since the device
  would otherwise hash its own primary channel name. The device keeps its
  own frequency_offset and front-end settings.
- TX: frames wait out the normal CSMA / SNR-weighted relay delays in this
  node's own queue, so cancel and late-rebroadcast logic keep working, then
  go to the device as encrypted MeshPackets carrying only the radio header
  fields and ciphertext. A full device queue holds frames until it reports
  space. TX/RX airtime is logged here, since the device leaves airtime to
  its client.
- RX: encrypted frames from the device go to the router once the handshake
  is done; the device's own decoded traffic does not.
- Heartbeats, reconnect on link loss, re-handshake when the device reboots,
  and re-push when this node's LoRa config changes.

Also moves SimRadio's time-on-air formula to
RadioInterface::computeTimeOnAirMsec() for both non-RadioLib radios, and
teaches --check the new keys.
2026-11-04 03:47:37 +00:00
..