低功耗蓝牙(BLE)之概念理解
来源:互联网 发布:linux ubuntu 服务器版 编辑:程序博客网 时间:2024/05/22 03:44
如上图所示:
Android中进行蓝牙开发需要使用到的类的执行过程是:
- 使用BluetoothAdapter.startLeScan来扫描低功耗蓝牙设备
- 在扫描到设备的回调函数中会得到BluetoothDevice对象,并使用BluetoothAdapter.stopLeScan停止扫描
- 使用BluetoothDevice.connectGatt来获取到BluetoothGatt对象
- 执行BluetoothGatt.discoverServices,这个方法是异步操作,在回调函数onServicesDiscovered中得到status,通过判断status是否等于BluetoothGatt.GATT_SUCCESS来判断查找Service是否成功
- 如果成功了,则通过BluetoothGatt.getService来获取BluetoothGattService
- 接着通过BluetoothGattService.getCharacteristic获取BluetoothGattCharacteristic
- 然后通过BluetoothGattCharacteristic.getDescriptor获取BluetoothGattDescriptor
0 0
- 低功耗蓝牙(BLE)之概念理解
- 低功耗蓝牙(BLE)
- 低功耗蓝牙(BLE)
- 低功耗蓝牙(BLE)
- 低功耗蓝牙(BLE)
- 低功耗蓝牙BLE
- 蓝牙低功耗(BLE)
- 蓝牙低功耗(BLE)
- 低功耗蓝牙(BLE)之开发步骤
- 低功耗蓝牙BLE之广播(转载)
- [BLE]低功耗蓝牙之GAP、GATT
- 低功耗蓝牙BLE之报文
- 低功耗蓝牙BLE之广播
- 低功耗蓝牙BLE之连接建立
- 低功耗蓝牙BLE之报文
- 低功耗蓝牙BLE之广播
- 低功耗蓝牙BLE之广播
- 低功耗蓝牙BLE之广播
- 创建调试信息文件失败
- listen和accept函数解析
- 创建个人网站(二) 网站备案
- OC与JS的交互
- [前端 4] 使用Js实现图片上传预览
- 低功耗蓝牙(BLE)之概念理解
- 20. 静态区块(Static Blocks)
- 编写串口通信的要注意的地方
- 38.IO流
- C++作业3
- IOS 触摸事件
- 194. Transpose File
- 单调递增子序列(二)(nyoj214)
- Intellij Idea 使用笔记