2

我有一些在 Android 4.3(非三星)上运行良好的简单代码。当翻译到三星的 BLE SDK for < 4.3 时,我发现我可以阅读并收到通知,但我无法写入我的特征

BluetoothGattCharacteristic characteristic = mBluetoothGatt.getService(device_, UUID_SERVICE).getCharacteristic(UUID_CHARACTERISTIC);
characteristic.setValue(new byte[]{0x01});
mBluetoothGatt.writeCharacteristic(characteristic);

知道有什么问题吗?我没有收到任何错误/异常。onCharacteristicWrite 也没有被调用,当检查 4.3 设备时,我看到特性没有改变。

4

1 回答 1

1

出了什么问题:我不得不增加读写空间(200 ms 似乎有效)

于 2014-11-21T20:13:27.910 回答