三星的Andr​​oid BLE多个读/写 [英] Samsung Android BLE multiple read/write

查看:232
本文介绍了三星的Andr​​oid BLE多个读/写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在三星4.2到4.3 BLE应用程序迁移指南( http://developer.samsung.com/ble),它说:


  

堆栈和F / W的同步性并没有受到影响。那
  是,如果我们调用,例如 writeCharacteristic 特定
  特点,如果返回true,则下一次调用任何
  BluetoothGatt或BluetoothGattServer方法应后进行
   onCharacteristicRead 回调被接收。这是因为栈的设计支持和处理在只有一个电话关贸总协定
  时间,如果,例如,你叫writeCharacteristic或
  任何特征的readCharacteristic第一个后不久,就
  被忽略。


是否有过失的这一段?当我需要多次写入我为什么要读该特性前/后各写?我想应该是这样的:


  

..也就是说,如果我们调用,例如 writeCharacteristic 作为一个
  具体特性,如果返回true,则下一次调用任何
  BluetoothGatt或BluetoothGattServer方法应后进行
   onCharacteristicWrite 回调被接收。 ...



解决方案

是的,这是当然的onCharacteristicWrite回调。最有可能的一个复制粘贴错误

In Samsung 4.2 to 4.3 BLE App Migration Guide (http://developer.samsung.com/ble) it says:

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 any BluetoothGatt or BluetoothGattServer method should be done after the onCharacteristicRead 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 or readCharacteristic of any characteristic soon after the first one, it is ignored.

Is there mistake in this paragraph? When I need multiple writes why should I need to read that characteristics before/after each write? I think it should be like this:

.. That is, if we call for example, writeCharacteristic for a particular characteristic, if it returns true, the next call to any BluetoothGatt or BluetoothGattServer method should be done after the onCharacteristicWrite callback is received. ...

解决方案

Yes it is of course the onCharacteristicWrite callback. Most likely a copy paste error

这篇关于三星的Andr​​oid BLE多个读/写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆