SerialPortInfo

data class SerialPortInfo(val name: String, val description: String? = null, val transport: SerialPortTransport = SerialPortTransport.Unknown, val usbVendorId: Int? = null, val usbProductId: Int? = null, val usbManufacturer: String? = null, val usbProduct: String? = null, val usbSerialNumber: String? = null)(source)

Metadata for a single serial port discovered via jSerialComm.

Identifier shape differs between targets:

  • On the JVM, name is a port-name string (e.g. /dev/cu.usbserial-1410, COM3) suitable for SerialPort.getCommPort.

  • On Android, name is the USB device name from UsbDevice.getDeviceName (e.g. /dev/bus/usb/001/004), and the host must additionally hold UsbManager permission for that device to open it.

All non-name fields are best-effort: jSerialComm returns empty strings when it cannot determine a value, and we surface that as null so consumers can distinguish "unknown" from "intentionally empty".

Constructors

Link copied to clipboard
constructor(name: String, description: String? = null, transport: SerialPortTransport = SerialPortTransport.Unknown, usbVendorId: Int? = null, usbProductId: Int? = null, usbManufacturer: String? = null, usbProduct: String? = null, usbSerialNumber: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard