RadioController

Central interface for controlling the radio and mesh network.

This component provides an abstraction over the underlying communication transport (e.g., BLE, Serial, TCP) and the low-level mesh protocols. It allows feature modules to interact with the mesh without needing to know about platform-specific service details or AIDL interfaces.

Properties

Link copied to clipboard
abstract val clientNotification: ERROR CLASS: Symbol not found for StateFlow<ERROR CLASS: Symbol not found for ClientNotification?>

Flow of notifications from the radio client.

Link copied to clipboard
abstract val connectionState: ERROR CLASS: Symbol not found for StateFlow<org/meshtastic/core/model/ConnectionState>

Reactive connection state of the radio.

Functions

Link copied to clipboard
abstract suspend fun beginEditSettings(destNum: Int)

Signals the start of a batch configuration session.

Link copied to clipboard

Clears the current clientNotification.

Link copied to clipboard
abstract suspend fun commitEditSettings(destNum: Int)

Commits all pending configuration changes in a batch session.

Link copied to clipboard
abstract suspend fun factoryReset(destNum: Int, packetId: Int)

Performs a factory reset on a node.

Link copied to clipboard
abstract suspend fun favoriteNode(nodeNum: Int)

Toggles the favorite status of a node on the radio.

Link copied to clipboard
abstract suspend fun getCannedMessages(destNum: Int, packetId: Int)

Requests the current canned messages from a remote node.

Link copied to clipboard
abstract suspend fun getChannel(destNum: Int, index: Int, packetId: Int)

Requests a specific channel configuration from a remote node.

Link copied to clipboard
abstract suspend fun getConfig(destNum: Int, configType: Int, packetId: Int)

Requests a specific configuration section from a remote node.

Link copied to clipboard
abstract suspend fun getDeviceConnectionStatus(destNum: Int, packetId: Int)

Requests the hardware connection status from a remote node.

Link copied to clipboard
abstract suspend fun getModuleConfig(destNum: Int, moduleConfigType: Int, packetId: Int)

Requests a module configuration section from a remote node.

Link copied to clipboard
abstract suspend fun getOwner(destNum: Int, packetId: Int)

Requests the current owner (user info) from a remote node.

Link copied to clipboard
abstract fun getPacketId(): Int

Generates a unique packet ID for a new request.

Link copied to clipboard
abstract suspend fun getRingtone(destNum: Int, packetId: Int)

Requests the current ringtone from a remote node.

Link copied to clipboard
abstract suspend fun nodedbReset(destNum: Int, packetId: Int, preserveFavorites: Boolean)

Resets the NodeDB on a node.

Link copied to clipboard
abstract suspend fun reboot(destNum: Int, packetId: Int)

Commands a node to reboot.

Link copied to clipboard
abstract suspend fun rebootToDfu(nodeNum: Int)

Commands a node to reboot into DFU (Device Firmware Update) mode.

Link copied to clipboard
abstract suspend fun removeByNodenum(packetId: Int, nodeNum: Int)

Removes a node from the mesh by its node number.

Link copied to clipboard
abstract suspend fun requestNeighborInfo(requestId: Int, destNum: Int)

Requests neighbor information (detected nodes) from a remote node.

Link copied to clipboard
abstract suspend fun requestPosition(destNum: Int, currentPosition: Position)

Requests the current GPS position from a remote node.

Link copied to clipboard
abstract suspend fun requestRebootOta(requestId: Int, destNum: Int, mode: Int, hash: ByteArray?)

Initiates an Over-The-Air (OTA) reboot request.

Link copied to clipboard
abstract suspend fun requestTelemetry(requestId: Int, destNum: Int, typeValue: Int)

Requests telemetry data from a remote node.

Link copied to clipboard
abstract suspend fun requestTraceroute(requestId: Int, destNum: Int)

Initiates a traceroute request to a remote node.

Link copied to clipboard
abstract suspend fun requestUserInfo(destNum: Int)

Requests detailed user info from a remote node.

Link copied to clipboard
abstract suspend fun sendMessage(packet: DataPacket)

Sends a data packet to the mesh.

Link copied to clipboard
abstract suspend fun sendSharedContact(nodeNum: Int)

Sends our shared contact information (identity and public key) to a remote node.

Link copied to clipboard
abstract suspend fun setCannedMessages(destNum: Int, messages: String)

Updates the canned messages configuration on a remote node.

Link copied to clipboard
abstract suspend fun setConfig(destNum: Int, config: ERROR CLASS: Symbol not found for org.meshtastic.proto.Config, packetId: Int)

Updates the general configuration on a remote node.

Link copied to clipboard
abstract fun setDeviceAddress(address: String)

Changes the device address (e.g., BLE MAC, IP address) we are communicating with.

Link copied to clipboard
abstract suspend fun setFixedPosition(destNum: Int, position: Position)

Sets a fixed position on a remote node.

Link copied to clipboard
abstract suspend fun setLocalChannel(channel: ERROR CLASS: Symbol not found for org.meshtastic.proto.Channel)

Updates a local radio channel.

Link copied to clipboard
abstract suspend fun setLocalConfig(config: ERROR CLASS: Symbol not found for org.meshtastic.proto.Config)

Updates the local radio configuration.

Link copied to clipboard
abstract suspend fun setModuleConfig(destNum: Int, config: ERROR CLASS: Symbol not found for org.meshtastic.proto.ModuleConfig, packetId: Int)

Updates a module configuration on a remote node.

Link copied to clipboard
abstract suspend fun setOwner(destNum: Int, user: ERROR CLASS: Symbol not found for org.meshtastic.proto.User, packetId: Int)

Updates the owner (user info) on a remote node.

Link copied to clipboard
abstract suspend fun setRemoteChannel(destNum: Int, channel: ERROR CLASS: Symbol not found for org.meshtastic.proto.Channel, packetId: Int)

Updates a channel configuration on a remote node.

Link copied to clipboard
abstract suspend fun setRingtone(destNum: Int, ringtone: String)

Updates the notification ringtone on a remote node.

Link copied to clipboard
abstract suspend fun shutdown(destNum: Int, packetId: Int)

Commands a node to shut down.

Link copied to clipboard
abstract fun startProvideLocation()

Starts providing the phone's location to the mesh.

Link copied to clipboard
abstract fun stopProvideLocation()

Stops providing the phone's location to the mesh.