RadioInterfaceService
The selected radio and its SDK client: device selection, session admission and the per-session SDK clients.
The SDK client owns connecting and reconnecting. This service builds one client per selected device, starts and stops it, nudges it when the environment recovers, and derives ServiceRepository.connectionState from the client's org.meshtastic.sdk.ConnectionState and the installed snapshot, which is what UI and features observe.
Properties
The radio session that still owns lifecycle completion, or null once teardown has joined its scope's work. The session collector's inline handlers can still be finishing then; they are joined when the link closes.
Flow of user-facing connection error messages (e.g. a radio that gave its slot to another client).
Flow of the current device address.
Whether this build carries the packet capture the replay transport needs. False means selecting a replay address would fall back to the plain mock, so callers offering a replay device must hide it.
Flow of radio activity events.
Whether the virtual demo transports may be offered and bound right now.
Monotonically increasing generation bumped on every app session, one per SDK session, a reconnect included. Consumers use this to discard state retained from a previous session. Stub implementations expose a constant zero flow.
The device types supported by this platform's radio interface.
Functions
Captures the SDK admin API for a single active radio session.
Observes per-node admin status across radio session changes.
Captures the SDK client for a single active radio session, or null once session no longer owns admission.
Hands a broker message to the active session's MQTT client proxy; false when no session can take it.
Revokes app session admission and disconnects the selected radio's client after its session work drains. Safe to call with nothing connected. Suspends until teardown completes.
Returns the current device address.
Whether session still owns admission; false once teardown starts, while activeSession still holds it.
Reports one frame received from the radio on meshActivity.
Reports one packet the app queued for the radio on meshActivity.
Requests that the next Bluetooth connection refreshes Android's GATT service cache before service discovery, after a firmware update that may have changed the radio's service table on the same address. Cleared by disconnect and by selecting a different radio.
Queues a nodes-only refresh for the admitted SDK session.
Submits a mesh packet only while session owns transport admission.
The scope session's work runs in while it owns admission, else null. Teardown cancels this scope and joins its children before activeSession clears or a replacement session is admitted; a child that needs to finish (a persistence unit) runs its body under NonCancellable.
Sets the device address to connect to.
Constructs a full radio address for the specific interface type.
Queues authentication only while session owns the link.