Package-level declarations

Types

Link copied to clipboard
class BleCentralHalHci(gapDeviceName: String = "Multipaz", randomAddress: ByteArray? = null, scanInterval: Duration = 60.milliseconds, scanWindow: Duration = 30.milliseconds, connectTimeout: Duration = 3.seconds, packetIoFactory: suspend () -> HciPacketIo = ::openDefaultHciPacketIo) : BleCentralHal

Direct Bluetooth HCI implementation of BleCentralHal.

Link copied to clipboard
data class BleHciFaultConfig(val initialAdvertisingDelay: Duration = Duration.ZERO, val disconnectMidHandshakeAttempts: Int = 0, val failMtuExchangeAttempts: Int = 0, val failServiceDiscoveryAttempts: Int = 0, val failCharacteristicDiscoveryAttempts: Int = 0, val failCharacteristicReadAttempts: Int = 0, val failCccdWriteAttempts: Int = 0, val failL2capConnectAttempts: Int = 0)

Fault-injection configuration for BlePeripheralHalHci and BtHciMdocTransportFactory to deterministically stress-test BLE Central retry paths over a virtual or physical HCI controller (such as Android's netsimd / Rootcanal).

Link copied to clipboard
class BlePeripheralHalHci(gapDeviceName: String = "Multipaz", randomAddress: ByteArray? = null, faultConfig: BleHciFaultConfig = BleHciFaultConfig(), packetIoFactory: suspend () -> HciPacketIo = ::openDefaultHciPacketIo) : BlePeripheralHal

Direct Bluetooth HCI implementation of BlePeripheralHal.

Link copied to clipboard
class BtHciMdocTransportFactory(gapDeviceName: String = "Multipaz", randomAddress: ByteArray? = null, scanInterval: Duration = 60.milliseconds, scanWindow: Duration = 30.milliseconds, connectTimeout: Duration = 3.seconds, centralConfig: BleCentralConfig = BleCentralConfig( scanRestartTimeout = 3.seconds, requireL2capPeripheralConnectedFirst = true, ), faultConfig: BleHciFaultConfig = BleHciFaultConfig(), fallbackFactory: MdocTransportFactory = MdocTransportFactory.Default, packetIoFactory: suspend () -> HciPacketIo = ::openDefaultHciPacketIo) : MdocTransportFactory

An MdocTransportFactory that creates BLE MdocTransport instances backed by Multipaz's user-space Bluetooth HCI/L2CAP/ATT stack (BleCentralHalHci and BlePeripheralHalHci).

Link copied to clipboard
interface HciPacketIo

Abstraction for reading and writing H4-framed Bluetooth HCI packets (0x01 Command, 0x02 ACL Data, 0x04 Event).

Link copied to clipboard
class LinuxHciSocketPacketIo(hciDeviceIndex: Int = defaultHciDeviceIndex(), preOpenedHciFd: Int? = defaultPreOpenedHciFd()) : HciPacketIo

Linux AF_BLUETOOTH / BTPROTO_HCI / HCI_CHANNEL_USER implementation of HciPacketIo.

Link copied to clipboard

An HciPacketIo implementation that reads and writes H4-framed Bluetooth HCI packets (0x01 Command, 0x02 ACL Data, 0x03 Synchronous Data, 0x04 Event, 0x05 ISO Data) over a TCP Socket, such as Android's netsimd (--hci-port) or Rootcanal virtual Bluetooth controller.