Package-level declarations

Types

Link copied to clipboard
interface AdminApi

Device configuration and control RPCs.

Link copied to clipboard

Receiver type for AdminApi.batch — combines AdminEdit setters with getter helpers.

Link copied to clipboard
interface AdminEdit

Receiver type for AdminApi.editSettings — exposes the subset of admin writes that may be batched inside a begin_edit_settings / commit_edit_settings envelope.

Link copied to clipboard
sealed interface AdminResult<out T>

Result of an admin (configuration) RPC operation.

Link copied to clipboard

Exception hierarchy thrown by getOrThrow.

Link copied to clipboard
data class AutoReconnectConfig(val enabled: Boolean = true, val initialBackoff: Duration = 1.seconds, val maxBackoff: Duration = 60.seconds, val maxAttempts: Int? = null, val backoffMultiplier: Double = 2.0, val jitter: Double = 0.2)

Configuration for the engine's built-in auto-reconnect supervisor.

Link copied to clipboard
data class BatteryStatus(val percent: Int?, val voltageVolts: Float?, val pluggedIn: Boolean)

Curated battery health and state information reported by the device.

Link copied to clipboard

Channel validation and helper utilities.

Link copied to clipboard
value class ChannelIndex(val raw: Int)

Type-safe wrapper for channel indices.

Link copied to clipboard
object ChannelUrl

Static helpers for encoding and parsing Meshtastic channel URLs (https://meshtastic.org/e/#...).

Link copied to clipboard
data class ConfigBundle(val myInfo: MyNodeInfo, val metadata: DeviceMetadata, val configs: List<Config>, val moduleConfigs: List<ModuleConfig>, val deviceUIConfig: DeviceUIConfig? = null)

Aggregate of configuration and device metadata received during the handshake.

Link copied to clipboard

Handshake phase for progress reporting.

Link copied to clipboard

Discrete congestion buckets derived from channel-utilization telemetry.

Link copied to clipboard
data class CongestionMetrics(val airUtilTx: Float, val channelUtil: Float)

Represents the current mesh congestion level based on channel utilization metrics.

Link copied to clipboard

How the local node reached a remote node.

Link copied to clipboard
sealed interface ConnectionState

Lifecycle of the SDK's connection to a device.

Link copied to clipboard
data class DeviceCapabilities(val firmwareVersion: String?)

Firmware capability flags derived from a device's reported firmware version.

Link copied to clipboard

Device storage backend.

Link copied to clipboard
data class DeviceVersion(val versionString: String) : Comparable<DeviceVersion>

Parsed firmware version value used for capability comparisons.

Link copied to clipboard

Which flow type dropped messages.

Link copied to clipboard

Describes which category of device configuration was changed externally.

Link copied to clipboard
data class Frame(val bytes: ByteString)

A framed packet ready for transmission or received from the device.

Link copied to clipboard

Key-verification prompt details surfaced via MeshEvent.KeyVerification.

Link copied to clipboard
data class LatLng(val latitude: Double, val longitude: Double, val altitudeMeters: Int? = null)

A geographic coordinate pair with an optional altitude.

Link copied to clipboard

Severity level for log messages.

Link copied to clipboard
fun interface LogSink

Functional interface for consuming log messages.

Link copied to clipboard
sealed interface MeshEvent

Side-channel event from the SDK engine.

Link copied to clipboard
data class MeshNode(val raw: NodeInfo, val isOnline: Boolean, val connectionQuality: ConnectionQuality, val signalQuality: SignalQuality)

High-level, consumer-friendly representation of a mesh node.

Link copied to clipboard
annotation class MeshSendDsl

DSL marker for the SendBuilder outbound-packet builder. Restricts implicit-receiver scoping so that nested DSLs do not accidentally capture builder methods from an outer scope.

Link copied to clipboard

Sealed hierarchy of Meshtastic SDK exceptions.

Link copied to clipboard

Incremental mesh topology graph built from NeighborInfo reports.

Link copied to clipboard

Tracks the lifecycle of a packet enqueued via RadioClient.send.

Link copied to clipboard
value class MessageId(val raw: Int)

Type-safe wrapper for message/packet IDs (uint32).

Link copied to clipboard
data class NeighborInfo(val nodeId: NodeId, val neighbors: List<NeighborInfo.Neighbor>, val lastUpdated: Int = 0)

Parsed neighbor information for a node, representing its directly-reachable peers.

Link copied to clipboard
sealed interface NodeChange

A delta notification of node state changes.

Link copied to clipboard

Fields that may change in a NodeInfo.

Link copied to clipboard
value class NodeId(val raw: Int)

Type-safe wrapper for Meshtastic node identifiers (uint32).

Link copied to clipboard
interface PayloadRedactor

Strategy for redacting sensitive payload data in protocol logs.

Link copied to clipboard

Geographic utility functions for mesh node positions.

Link copied to clipboard

The main entry point to the Meshtastic SDK.

Link copied to clipboard
data class RadioMetrics(val rssiDbm: Int, val snrDb: Float, val hopsAway: Int?, val viaMqtt: Boolean)

Physical layer metrics for a received packet.

Link copied to clipboard
interface RadioTransport

Interface that transports (BLE, TCP, serial, etc.) must implement.

Link copied to clipboard
sealed class RetryPolicy

Defines a retry strategy for failed message sends.

Link copied to clipboard
data class RouteDiscoveryResult(val route: List<NodeId>, val routeBack: List<NodeId>, val snrTowards: List<Float> = emptyList(), val snrBack: List<Float> = emptyList())

Parsed result of a traceroute discovery, representing the full forward and backward routes.

Link copied to clipboard
interface RoutingApi

Mesh route discovery and neighbor enumeration RPCs.

Link copied to clipboard

Builder for an outbound MeshPacket. Created by RadioClient.send (DSL form).

Link copied to clipboard
sealed interface SendFailure

Reason a packet could not be delivered.

Link copied to clipboard
sealed interface SendOutcome

Outcome of awaiting a MessageHandle.

Link copied to clipboard
sealed interface SendState

Lifecycle state of a packet sent via RadioClient.send.

Link copied to clipboard
data class SessionPasskey(val bytes: ByteString, val expiresAtEpochMs: Long)

Persisted session passkey.

Link copied to clipboard
object SfppHash

Computes Store-Forward-Plus-Plus (SFPP) message hashes for deduplication.

Link copied to clipboard

Utilities for encoding and parsing Meshtastic shared contact URLs.

Link copied to clipboard

Signal quality tier derived from SNR thresholds.

Link copied to clipboard
interface StorageProvider

Storage provider factory.

Link copied to clipboard
interface StoreForwardApi

API for interacting with Store-and-Forward (S&F) nodes on the mesh.

Link copied to clipboard
sealed interface StoreForwardEvent

Events specific to Store-and-Forward operations.

Link copied to clipboard
data class StoreForwardStats(val messagesStored: Int = 0, val messagesMax: Int = 0, val uptime: Int = 0, val requests: Int = 0, val requestsFailed: Int = 0, val heartbeat: Boolean = false)

Statistics reported by a Store-and-Forward server node.

Link copied to clipboard
interface TelemetryApi

Telemetry RPCs and observation.

Link copied to clipboard
sealed class TelemetryReading

A type-safe wrapper for the different categories of telemetry data reported by the mesh.

Link copied to clipboard
value class TransportIdentity(val raw: String)

Deterministic identity for a transport configuration.

Link copied to clipboard
sealed interface TransportSpec

Specification of which radio to connect to and how.

Link copied to clipboard
sealed interface TransportState

State of the transport connection.

Link copied to clipboard
object WireCodec

Pure codec for wire framing and protobuf serialization.

Link copied to clipboard

Single source of truth for the Meshtastic STREAM_API wire-framing constants shared by every stream-oriented transport (TCP, USB-CDC serial, BLE).

Properties

Link copied to clipboard

Returns the ConnectionQuality for this node based on hop count and MQTT flag.

Link copied to clipboard
const val DATA_PAYLOAD_LEN: Int = 233

Maximum application-layer payload length (bytes).

Link copied to clipboard

Default threshold for determining whether a node is "online."

Link copied to clipboard

The default Pre-Shared Key (AES-128) used for the Meshtastic primary channel.

Link copied to clipboard
val NodeInfo.displayId: String

Returns the display-friendly hex ID of this node (e.g., "!aabbccdd").

Link copied to clipboard
val HardwareModel.displayName: String

Returns a human-friendly display name for this HardwareModel (e.g., "T-Beam").

Link copied to clipboard

Returns true if this is NodeId.BROADCAST.

Link copied to clipboard

Whether a connection attempt is actively in progress.

Link copied to clipboard

Returns true if this is AdminResult.Success.

Link copied to clipboard

Returns true if this is a specific node address (neither local nor broadcast).

Link copied to clipboard

Whether the connection is fully established and ready for use.

Link copied to clipboard
val NodeInfo.longName: String

Returns the long name of this node (e.g., "James Arich").

Link copied to clipboard

A typed flow of NeighborInfo domain objects, decoded from inbound NEIGHBORINFO_APP packets.

Link copied to clipboard
val RadioClient.neighborInfoMessages: Flow<MeshPacket>

Filters RadioClient.packets to only neighbor-info packets — those with decoded.portnum == [PortNum.NEIGHBORINFO_APP].

Link copied to clipboard
val NodeInfo.shortName: String

Returns the short name of this node (e.g., "ABCD").

Link copied to clipboard

Returns the SignalQuality tier for this node based on SNR.

Link copied to clipboard

Human-readable status description.

Link copied to clipboard
val RadioClient.textMessages: Flow<MeshPacket>

Filters RadioClient.packets to only text-message packets — those with decoded.portnum == [PortNum.TEXT_MESSAGE_APP].

Functions

Link copied to clipboard
fun Routing.Error.actionableMessage(): String

Human-readable, action-hinting message for a wire-level Routing.Error. Suitable for direct surfacing in logs, snackbars, or developer tools without further translation.

Link copied to clipboard
fun MeshPacket.asAdminMessage(): AdminMessage?

Decodes the payload as AdminMessage if MeshPacket.decoded.portnum matches PortNum.ADMIN_APP.

Link copied to clipboard
fun MeshPacket.asNeighborInfo(): NeighborInfo?

Decodes the payload as ProtoNeighborInfo if MeshPacket.decoded.portnum matches PortNum.NEIGHBORINFO_APP.

Link copied to clipboard
fun MeshPacket.asNodeInfo(): NodeInfo?

Decodes the payload as NodeInfo if MeshPacket.decoded.portnum matches PortNum.NODEINFO_APP.

Link copied to clipboard
fun MeshPacket.asNodeInfoUser(): User?

Decodes the payload as User if MeshPacket.decoded.portnum matches PortNum.NODEINFO_APP.

Link copied to clipboard
fun Flow<NodeChange>.asNodeMap(): Flow<Map<NodeId, NodeInfo>>

Fold a NodeChange delta stream into a live node map.

Link copied to clipboard
fun MeshPacket.asPosition(): Position?

Decodes the payload as Position if MeshPacket.decoded.portnum matches PortNum.POSITION_APP.

Link copied to clipboard
fun MeshPacket.asRouting(): Routing?

Decodes the payload as Routing if MeshPacket.decoded.portnum matches PortNum.ROUTING_APP.

Link copied to clipboard
fun MeshPacket.asTelemetry(): Telemetry?

Decodes the payload as Telemetry if MeshPacket.decoded.portnum matches PortNum.TELEMETRY_APP.

Link copied to clipboard
fun MeshPacket.asText(): String?

Decodes the payload as a UTF-8 string if MeshPacket.decoded.portnum matches PortNum.TEXT_MESSAGE_APP.

Link copied to clipboard
fun MeshPacket.asTraceroute(): RouteDiscovery?

Decodes the payload as RouteDiscovery if MeshPacket.decoded.portnum matches PortNum.TRACEROUTE_APP.

Link copied to clipboard
fun MeshPacket.asWaypoint(): Waypoint?

Decodes the payload as Waypoint if MeshPacket.decoded.portnum matches PortNum.WAYPOINT_APP.

Link copied to clipboard
suspend fun RadioClient.awaitInitialNodeDb(): Map<NodeId, NodeInfo>

Suspend until the device finishes streaming its NodeDB during handshake, then return the current node-snapshot map.

Link copied to clipboard

Computes the DJB2 hash of a channel name. Used by some clients for channel identification separate from the on-wire XOR hash.

Link copied to clipboard
suspend fun RadioClient.connectAndAwaitReady(timeout: Duration = 30.seconds): ConfigBundle

Connect and suspend until the handshake settles, returning the resolved ConfigBundle (HLP-34).

Link copied to clipboard
fun <T : Message<T, *>> MeshPacket.decodeAs(adapter: ProtoAdapter<T>): T?

Decode this packet's decoded.payload using the supplied Wire adapter.

Link copied to clipboard
fun Channel.Companion.default(): Channel

Returns a standard PRIMARY Channel configuration (index 0, empty name, default PSK).

Link copied to clipboard

Converts a 32-bit unsigned firmware timestamp (seconds since epoch) to an SDK Instant. Returns null if the timestamp is 0 (the firmware's "never/unset" sentinel).

Link copied to clipboard
inline fun <T, R> AdminResult<T>.fold(onSuccess: (T) -> R, onFailure: (AdminResult<T>) -> R): R

Applies onSuccess or onFailure depending on the result.

Link copied to clipboard

Parses a default ID string ("!aabbccdd") into a NodeId. Delegates to fromHex.

Link copied to clipboard

Parses an 8-character hex string (optionally prefixed with ! or 0x) into a NodeId. Returns null if the string is not a valid 8-character hex value.

Link copied to clipboard
fun <T> AdminResult<T>.getOrElse(default: T): T

Returns the Success value, or default if the result is not a success.

inline fun <T> AdminResult<T>.getOrElse(block: (AdminResult<T>) -> T): T

Returns the Success value, or the result of block if the result is not a success.

Link copied to clipboard

Returns the Success value, or null if the result is not a success.

Link copied to clipboard

Returns the Success value or throws AdminResultException describing the failure.

Link copied to clipboard
fun ChannelSettings.Companion.hash(name: String, psk: ByteArray): Int

Computes the firmware-compatible 8-bit channel hash for name and psk.

Link copied to clipboard

Plain-language message for any SendFailure. Never empty.

Link copied to clipboard
fun NodeId.isLocal(own: NodeId? = null): Boolean

Returns true if this is NodeId.LOCAL or matches the supplied own ID. Useful for filtering packets originating from the host.

Link copied to clipboard
fun NodeInfo.isOnline(nowEpochSeconds: Int, threshold: Duration = DEFAULT_ONLINE_THRESHOLD): Boolean

Returns true if the node was last heard within threshold of nowEpochSeconds.

Link copied to clipboard
inline fun <T, R> AdminResult<T>.map(transform: (T) -> R): AdminResult<R>

Transforms the Success value with transform, propagating failures unchanged.

Link copied to clipboard
fun RadioClient.nodeMap(): Flow<Map<NodeId, NodeInfo>>

The live node map for this client: RadioClient.nodes folded via asNodeMap.

Link copied to clipboard
inline fun <T> AdminResult<T>.onFailure(action: (AdminResult<T>) -> Unit): AdminResult<T>

Performs action if this is not a Success. Returns the original result for chaining.

Link copied to clipboard
inline fun <T> AdminResult<T>.onSuccess(action: (T) -> Unit): AdminResult<T>

Performs action if this is a Success. Returns the original result for chaining.

Link copied to clipboard

Build a RadioClient with Kotlin builder-lambda syntax — sugar over RadioClient.Builder:

Link copied to clipboard
fun Instant.relativeTo(now: Instant = Clock.System.now()): String

Returns a human-friendly relative time string (e.g., "5m ago", "2h ago").

Link copied to clipboard
fun Instant?.relativeToOrNever(now: Instant = Clock.System.now()): String

Returns a relative time string, or "never" if the instant is null.

Link copied to clipboard
fun RadioClient.requestPosition(from: NodeId, channel: ChannelIndex = ChannelIndex(0)): MessageHandle

Request the current Position from node from.

Link copied to clipboard

Re-enqueue the same packet that produced this MessageHandle. The engine assigns a fresh MessageId and returns a new handle, leaving the original handle's terminal state unchanged.

Link copied to clipboard

Awaits the outcome of this MessageHandle, retrying according to policy if the send fails with a retryable failure.

Link copied to clipboard
suspend fun RadioClient.send(block: SendBuilder.() -> Unit): MessageHandle

DSL form of RadioClient.send. Builds a MeshPacket via SendBuilder and enqueues it.

Link copied to clipboard
suspend fun RadioClient.sendDirectMessage(to: NodeId, text: String, channel: ChannelIndex = ChannelIndex(0), wantAck: Boolean = true): MessageHandle

Send a unicast text message to to. Defaults wantAck to true.

Link copied to clipboard

Send a PKI-encrypted unicast text message to to.

Link copied to clipboard
suspend fun RadioClient.sendPosition(latLng: LatLng, to: NodeId = NodeId.BROADCAST, channel: ChannelIndex = ChannelIndex(0), wantAck: Boolean = false): MessageHandle

Send a Position payload to to (defaults to broadcast).

Link copied to clipboard
suspend fun AdminApi.setAmbientLightingConfig(block: ModuleConfig.AmbientLightingConfig.() -> ModuleConfig.AmbientLightingConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.AmbientLightingConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setAudioConfig(block: ModuleConfig.AudioConfig.() -> ModuleConfig.AudioConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.AudioConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setBluetoothConfig(block: Config.BluetoothConfig.() -> Config.BluetoothConfig): AdminResult<Unit>

Convenience: build and send a Config.BluetoothConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setCannedMessageConfig(block: ModuleConfig.CannedMessageConfig.() -> ModuleConfig.CannedMessageConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.CannedMessageConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setDetectionSensorConfig(block: ModuleConfig.DetectionSensorConfig.() -> ModuleConfig.DetectionSensorConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.DetectionSensorConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setDeviceConfig(block: Config.DeviceConfig.() -> Config.DeviceConfig): AdminResult<Unit>

Convenience: build and send a Config.DeviceConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setDisplayConfig(block: Config.DisplayConfig.() -> Config.DisplayConfig): AdminResult<Unit>

Convenience: build and send a Config.DisplayConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setExternalNotificationConfig(block: ModuleConfig.ExternalNotificationConfig.() -> ModuleConfig.ExternalNotificationConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.ExternalNotificationConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setLoraConfig(block: Config.LoRaConfig.() -> Config.LoRaConfig): AdminResult<Unit>

Convenience: build and send a Config.LoRaConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setMqttConfig(block: ModuleConfig.MQTTConfig.() -> ModuleConfig.MQTTConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.MQTTConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setNeighborInfoConfig(block: ModuleConfig.NeighborInfoConfig.() -> ModuleConfig.NeighborInfoConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.NeighborInfoConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setNetworkConfig(block: Config.NetworkConfig.() -> Config.NetworkConfig): AdminResult<Unit>

Convenience: build and send a Config.NetworkConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setPaxcounterConfig(block: ModuleConfig.PaxcounterConfig.() -> ModuleConfig.PaxcounterConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.PaxcounterConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setPositionConfig(block: Config.PositionConfig.() -> Config.PositionConfig): AdminResult<Unit>

Convenience: build and send a Config.PositionConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setPowerConfig(block: Config.PowerConfig.() -> Config.PowerConfig): AdminResult<Unit>

Convenience: build and send a Config.PowerConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setRangeTestConfig(block: ModuleConfig.RangeTestConfig.() -> ModuleConfig.RangeTestConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.RangeTestConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setRemoteHardwareConfig(block: ModuleConfig.RemoteHardwareConfig.() -> ModuleConfig.RemoteHardwareConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.RemoteHardwareConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setSecurityConfig(block: Config.SecurityConfig.() -> Config.SecurityConfig): AdminResult<Unit>

Convenience: build and send a Config.SecurityConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setSerialConfig(block: ModuleConfig.SerialConfig.() -> ModuleConfig.SerialConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.SerialConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setStatusMessageConfig(block: ModuleConfig.StatusMessageConfig.() -> ModuleConfig.StatusMessageConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.StatusMessageConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setStoreForwardConfig(block: ModuleConfig.StoreForwardConfig.() -> ModuleConfig.StoreForwardConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.StoreForwardConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setTelemetryConfig(block: ModuleConfig.TelemetryConfig.() -> ModuleConfig.TelemetryConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.TelemetryConfig in a single call.

Link copied to clipboard
suspend fun AdminApi.setTrafficManagementConfig(block: ModuleConfig.TrafficManagementConfig.() -> ModuleConfig.TrafficManagementConfig): AdminResult<Unit>

Convenience: build and send a ModuleConfig.TrafficManagementConfig in a single call.

Link copied to clipboard
fun MeshPacket.signalQuality(): Int?

Returns a signal quality estimate from 1 (poor) to 5 (excellent) based on SNR.

Link copied to clipboard
fun Routing.Error.suggestedAction(): String?

Tag categorising the recommended remediation for a Routing.Error. Returns null when no error was reported (NONE).

Link copied to clipboard
fun DeviceMetrics.toBatteryStatus(): BatteryStatus?

Converts protobuf DeviceMetrics into a normalized BatteryStatus snapshot.

fun Telemetry.toBatteryStatus(): BatteryStatus?

Converts protobuf Telemetry to BatteryStatus by inspecting its DeviceMetrics.

Link copied to clipboard
fun FromRadio.toByteArray(): ByteArray

Encode this FromRadio envelope to its wire byte representation.

fun MeshPacket.toByteArray(): ByteArray

Encode this MeshPacket to its wire byte representation.

fun ToRadio.toByteArray(): ByteArray

Encode this ToRadio envelope to its wire byte representation.

Link copied to clipboard

Returns the Meshtastic default ID format: "!aabbccdd" (lowercase hex with ! prefix).

Link copied to clipboard

Converts an SDK Instant to a 32-bit unsigned firmware timestamp.

Link copied to clipboard
fun ByteArray.toFromRadio(): FromRadio?

Decode a FromRadio envelope from raw wire bytes. Returns null on parse failure.

Link copied to clipboard

Returns the 8-character hex representation of this NodeId (e.g., "aabbccdd"). Does not include the ! or 0x prefix.

Link copied to clipboard
fun Position.toLatLng(): LatLng?

Converts a protobuf Position to an SDK LatLng.

Link copied to clipboard
fun NodeInfo.toMeshNode(nowEpochSeconds: Int): MeshNode

Creates a MeshNode snapshot from this NodeInfo at the given time.

Link copied to clipboard
fun Iterable<NodeInfo>.toMeshNodes(nowEpochSeconds: Int): List<MeshNode>

Converts a collection of NodeInfo entries to MeshNode snapshots.

Link copied to clipboard
fun ByteArray.toMeshPacket(): MeshPacket?

Decode a MeshPacket from raw wire bytes. Returns null if this is not a valid MeshPacket proto encoding (any decoding Throwable is swallowed).

Link copied to clipboard
fun MeshPacket.toRadioMetrics(): RadioMetrics?

Extracts RadioMetrics from a MeshPacket. Returns null if metrics are missing.

Link copied to clipboard
fun Telemetry.toReading(): TelemetryReading?

Maps a protobuf Telemetry packet to its corresponding type-safe TelemetryReading.

Link copied to clipboard
fun ByteArray.toToRadio(): ToRadio?

Decode a ToRadio envelope from raw wire bytes. Returns null on parse failure.

Link copied to clipboard
fun ChannelSet.toUrl(): String

Converts this ChannelSet into a base64-url-safe Meshtastic share link.

fun SharedContact.toUrl(): String

Encodes this contact into a shareable URL.

Link copied to clipboard
suspend fun <T> RadioClient.withConnection(teardownTimeout: Duration = 10.seconds, block: suspend RadioClient.() -> T): T

Run block against a connected session, guaranteeing teardown.