apidocs / com.nimmsta.core.android.uart / UARTBTService / <init>

<init>

UARTBTService(deviceService: DeviceBluetoothService, modemInCharacteristic: BluetoothGattCharacteristic, modemOutCharacteristic: BluetoothGattCharacteristic, readCharacteristic: BluetoothGattCharacteristic, writeCharacteristic: BluetoothGattCharacteristic, debugCharacteristic: BluetoothGattCharacteristic?, terminatorCharacteristic: BluetoothGattCharacteristic?, versionCharacteristic: BluetoothGattCharacteristic?)

The UART BT Service uses the DeviceBluetoothService and defined UART Characteristics to provide an UART-Like Interface to communicate with a device. Basically it needs 4 Characteristics:

Basically one additional job the class is providing is to allow longer packages than maxPackageLength by cutting packages and sending them as chunks. There is no retrying done in this class and there is no configuration by this. It will also block sending for a small amount of time when the other device ran out of buffer space, see ModemOut Characteristic. It will disconnect if the uart is blocked longer than UART_BLOCKED_TIMEOUT.

Author
NIMMSTA Team

Copyright
NIMMSTA GmbH & IBPG 2020

License
NIMMSTA GmbH