【错误记录】Android 应用连接 BLE 设备无法读取数据 ( 可以写出数据 | 无法读取数据 )---
Android 应用连接 BLE 硬件设备后 , 出现如下情况 :
发送数据成功 : Android 应用 向 BLE 硬件设备发送数据 , 成功 ;
接收数据失败 : Android 应用 无法接收到 代码文件地址 : BluetoothLeService.java
上述代码是在遍历完 BluetoothGattService 与 BluetoothGattCharacteristic 之后 , 选择读取指定特性 集合中的所有元素设置 BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE 值 , 然后写出该 BluetoothGattDescriptor , 此时设置读取该 BluetoothGattCharacteristic 特性值才能生效 , 否则无法读取其中的数据 ;
BluetoothGattCharacteristic 中维护了下面的变量 , BluetoothGattDescriptor BluetoothGattDescriptor 的 setValue 方法 , 为其设置 BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE 值 , 并写出该值 , 即可将读取该特性的设置发送给