zoukankan      html  css  js  c++  java
  • bluetooth记录

    1. 网址

     Client Characteristic Configuration

    https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml

    2.  try to reset the bluetooth cache first via Settings -> Apps -> All -> Bluetooth Share -> Clear Data 

    3. android端的BLE central apk连接BLE peripheral device时,始终失败,显示如下信息

    04-27 02:53:44.069: D/BluetoothGatt(3563): onClientConnectionState() - status=133 clientIf=5 device=00:02:72:00:00:01

    之前的广播包为0x04, 0xff, 0xc0, 0xff, 0x01
    解决方法:android peripheral device 广播包前面添加0x02 0x01 0x06

    如果peripheral广播的是非连接的广播数据,则android端作为central,尝试调用

    mBluetoothGatt = device.connectGatt(this, false, mGattCallback);连接remote peripheral device就会出现onClientConnectionState() - status=133错误。

    4. android似乎将gatt的角色进行了绑定

    android作为peripheral,则它上层应用的角色就是gatt server

    android作为central,则它上层应用的角色就是gatt clent

    因此这种绑定,限制了某些应用场景。

    5. 在自定义服务和特性时,注意SampleGattAttributes.java中uuid的自定义

  • 相关阅读:
    python之常用内置函数
    python基础之文件操作
    简洁版三级菜单
    JS 事件代理
    捕获当前事件作用的对象event.target和event.srcElement
    【javascript 技巧】谈谈setTimeout的作用域以及this的指向问题
    JSON详解
    多线程小例子
    jquery中attr和prop的区别
    django 过滤器
  • 原文地址:https://www.cnblogs.com/wi100sh/p/4459743.html
Copyright © 2011-2022 走看看