关于蓝牙ble的readCharacteristic这个方法

adgvcxz 2013-10-14 04:01:02
为什么这些执行这个方法后在onCharacteristicRead回调中的状态有时候是0有时候是133呢?

我在readCharacteristic的时候,好像characteristicRead的Properties只有是10的时候才会走到onCharacteristicRead这个回调中。
10应该是读和写的操作。
2应该是只读吧,为什么2不走onCharacteristicRead。

还有一点就是PROPERTY_BROADCAST,PROPERTY_NOTIFY,PROPERTY_INDICATE这些属性是什么意思呢?

才接触BLE,很多都不知道,问题有点多,谢谢大家了。
...全文
9113 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaotian1106 2015-12-04
  • 打赏
  • 举报
回复
lz,问题解决方法能否告诉一下,qq879062428!谢谢了!
缘中人 2015-09-06
  • 打赏
  • 举报
回复
是不是bug,现在xe8/RAD 10 应该好了吧
unisuny 2015-08-11
  • 打赏
  • 举报
回复
这个会调用:onCharacteristicChanged
unisuny 2015-08-11
  • 打赏
  • 举报
回复
public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled,String sUUID) { if (mBluetoothAdapter == null || mBluetoothGatt == null) { Log.w(TAG, "BluetoothAdapter not initialized"); return; } mBluetoothGatt.setCharacteristicNotification(characteristic, enabled); List<BluetoothGattDescriptor> descriptors=characteristic.getDescriptors(); for(BluetoothGattDescriptor dp:descriptors){ dp.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE); mBluetoothGatt.writeDescriptor(dp); } }
xqq12345 2015-08-03
  • 打赏
  • 举报
回复
onCharacteristicRead不回调是怎么回事呢
安静的Sunny 2015-05-25
  • 打赏
  • 举报
回复
前辈,晚辈现在也遇到了这个问题,纠结很长一段时间了。直到看到您发的问题,让我喜出望外,像是抓到了救命稻草。 请问,您最后是怎么解决的?谢谢。
woshishen979 2014-04-04
  • 打赏
  • 举报
回复
引用 3 楼 sumi304 的回复:
同问啊。。我现在在做一个读血压的app。。貌似不允许读啊。。indicate是干嘛的 我readCharacteristic返回的是false
哥们,你那个false怎么解决的,碰到同样的问题了
KX_yanyf 2013-12-09
  • 打赏
  • 举报
回复
同问啊。。我现在在做一个读血压的app。。貌似不允许读啊。。indicate是干嘛的 我readCharacteristic返回的是false
adgvcxz 2013-10-15
  • 打赏
  • 举报
回复
顶,谁来回答一下啊。。。
adgvcxz 2013-10-14
  • 打赏
  • 举报
回复
有人知道吗?

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧