本机Android BLE实现本质上是同步的吗?
作者:互联网
我记得在“Guide and Hint”-doc中读到Samsung BLE API (archived page):
One of the most important concepts of the Samsung F/W and stack is
its synchronous nature. That is, if we call for example,
writeCharacteristic
for a particular characteristic, if it returns
true
, the next call to anyBluetoothGatt
orBluetoothGattServer
method
should be done after theonCharacteristicRead
callback is received.
This is because the stack is designed to support and process only one
GATT call at a time, and if, for example, you call
writeCharacteristic
orreadCharacteristic
on any characteristic soon
after the first one, it is ignored.
>这是否也适用于引入的BLE的本机实现
在Android 4.3?
> Samsung API一次只支持一个连接的GATT设备.
这在原生API中有变化吗?
解决方法:
三星最近在我在我的问题中链接的同一页面上发布了一个“迁移”文档.他们在将新的原生BLE API与Samsung BLE API进行比较时完全回答了我的问题:
The synchronous nature of the stack and F/W hasn’t been affected.
That is, if we call for example,writeCharacteristic
for a particular
characteristic, if it returns true, the next call to anyBluetoothGatt
orBluetoothGattServer
method should be done after theonCharacteristicRead
callback is received. This is because the stack is designed
to support and process only one GATT call at a time, and if, for
example, you callwriteCharacteristic
orreadCharacteristic
of anycharacteristic
soon after the first one, it is ignored.
标签:android,android-4-3-jelly-bean,bluetooth-lowenergy,gatt 来源: https://codeday.me/bug/20190923/1815407.html