BluetoothGattWrapper

A wrapper to access a BluetoothGatt

Inheritors

Functions

Link copied to clipboard
abstract fun close()

Close connection to the Bluetooth Gatt server

Link copied to clipboard
abstract fun connect(): Boolean

Connect to the Bluetooth device

Link copied to clipboard
abstract fun disconnect()

Disconnects the current connection or cancels the current attempt if it is in progress

Link copied to clipboard
abstract fun discoverServices(): Boolean

Discovers services offered by a remote device as well as their characteristics and descriptors.

Link copied to clipboard

Reads the value of the CharacteristicWrapper from the device

Link copied to clipboard
abstract fun readDescriptor(wrapper: DescriptorWrapper): Boolean

Reads the value of the DeviceWrapper from the device

Link copied to clipboard
abstract fun readRemoteRssi(): Boolean

Reads the RSSI value

Link copied to clipboard
abstract fun requestMtu(mtu: MTU): Boolean

Request a MTU size

Link copied to clipboard

Enable or disable notifications for a given CharacteristicWrapper

Link copied to clipboard

Writes a value to the CharacteristicWrapper from the device

Link copied to clipboard
abstract fun writeDescriptor(wrapper: DescriptorWrapper, value: ByteArray): Boolean

Writes a value to the DescriptorWrapper from the device