, 成功 ;
接收数据失败 : Android 应用 无法接收到 BLE 硬件设备发送给手机的数据 ;
二、问题分析
----
举个栗子 :
这是在 Google 官方的 BLE 蓝牙示例程序 BluetoothLeGatt...中的 BLE 连接配置代码 :
/**
* Enables or disables notification on a give characteristic...但是上述设置 , 仅设置了一半内容 , 还需要为 BluetoothGattCharacteristic 中的 BluetoothGattDescriptor 作进一步设置 ;
在上面的基础上 , 还需要为...值 , 然后写出该 BluetoothGattDescriptor , 此时设置读取该 BluetoothGattCharacteristic 特性值才能生效 , 否则无法读取其中的数据 ;
BluetoothGattCharacteristic...setValue 方法 , 为其设置 BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE 值 , 并写出该值 , 即可将读取该特性的设置发送给 BLE 蓝牙模块