RadioInterfaceService
Interface for the low-level radio interface that handles raw byte communication.
This is the transport layer — it manages the raw hardware connection (BLE, TCP, Serial, USB) to a Meshtastic radio. Its connectionState reflects whether the physical link is up or down, before any handshake or config-loading logic is applied.
Important: UI and feature modules should never observe connectionState directly. Instead, they should use ServiceRepository.connectionState, which is the canonical app-level connection state that accounts for handshake progress, light-sleep policy, and other higher-level concerns. The only legitimate consumer of this transport-level flow is MeshConnectionManager, which bridges transport state changes into the app-level ServiceRepository.connectionState.
See also
Properties
Flow of user-facing connection error messages (e.g. permission failures).
Transport-level connection state of the radio hardware.
Flow of the current device address.
Flow of radio activity events.
Flow of raw data received from the radio.
The scope in which interface-related coroutines should run.
The device types supported by this platform's radio interface.
Functions
Explicitly tears down the active transport, sending a polite ToRadio(disconnect = true) goodbye frame first when a transport is live. Safe to call when nothing is connected — implementations must no-op in that case. Suspends until the teardown completes.
Returns the current device address.
Called when the transport has received raw data from the radio.
Whether we are currently using a mock transport.
Called when the transport has disconnected.
Drains any bytes currently buffered in receivedData without emitting them to collectors.
Sends a raw byte array to the radio.
Sets the device address to connect to.
Constructs a full radio address for the specific interface type.