NiimbotPrinter

class NiimbotPrinter(scanner: BleScanner, connectionFactory: BleConnectionFactory, scope: CoroutineScope)(source)

A Niimbot D110 label printer over Bluetooth LE, on a connection of its own: nothing here reads or changes the radio's connection.

Constructors

Link copied to clipboard
constructor(scanner: BleScanner, connectionFactory: BleConnectionFactory, scope: CoroutineScope)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun connect(device: BleDevice)

Connects and opens the print channel, or throws the NiimbotException that says why not.

Link copied to clipboard
suspend fun disconnect()
Link copied to clipboard
suspend fun print(bitmap: LabelBitmap)
Link copied to clipboard
fun scan(timeout: Duration = SCAN_TIMEOUT): Flow<BleDevice>

Printers advertising nearby. Ends after timeout.