JvmSerialPorts

JVM-side serial port enumeration and transport construction via jSerialComm.

Discovery uses SerialPort.getCommPorts(). On macOS the OS exposes USB serial adapters under both /dev/cu.* (call-out, non-blocking open) and /dev/tty.* (DCD-blocking dial-in) — for outbound radio traffic we always want the cu.* variant; opening tty.* against a USB-CDC radio blocks until DCD asserts and never returns. list therefore filters the tty.* duplicates out on macOS. Linux and Windows are unaffected.

Properties

Link copied to clipboard
const val DEFAULT_BAUD: Int

Functions

Link copied to clipboard

Enumerate all serial ports visible to the host operating system.

Link copied to clipboard
fun open(portName: String, baudRate: Int = DEFAULT_BAUD): RadioTransport

Build a RadioTransport that opens the named serial port at baudRate. Default baud is 115 200 — the rate used by Meshtastic firmware.