为了访问服务特性值,您需要在 btgatt-server 和 btgatt-client 之间建立连接。一旦连接建立,您就可以在 btgatt-client 中使用 Bluetooth API 来枚举服务并访问特性。
具体来说,您可以使用 BluetoothGatt#discoverServices() 方法来枚举服务,然后使用 BluetoothGattService#getCharacteristics() 方法来获取服务中的特性。接下来,您可以使用 BluetoothGattCharacteristic#getValue() 方法来访问特性的值。
请注意,在访问特性值之前,您需要先调