TransportSpec

sealed interface TransportSpec(source)

Specification of which radio to connect to and how.

The SDK supports multiple transports (BLE, TCP, HTTP, serial) depending on the target platform. Each transport implementation provides its own constructor; consumers pick the matching TransportSpec for their platform and pass it to RadioClient.Builder.transport.

Since

0.1.0

Inheritors

Types

Link copied to clipboard
data class Ble(val address: String) : TransportSpec

Bluetooth Low Energy.

Link copied to clipboard
data class Http(val baseUrl: String) : TransportSpec

HTTP transport (PhoneAPI over HTTP; see protocol.md §4).

Link copied to clipboard
data class SerialAndroid(val deviceName: String) : TransportSpec

Android USB serial (via usb-serial-for-android).

Link copied to clipboard
data class SerialJvm(val portName: String) : TransportSpec

JVM serial (via jSerialComm).

Link copied to clipboard
data class Tcp(val host: String, val port: Int = 4403) : TransportSpec

TCP socket to a Meshtastic device or router running PhoneAPI on a network.

Properties

Link copied to clipboard

Deterministic identity for storage keying.