我记得曾经做过类似于你所描述的事情,并且成功连接了。但是,没有列出任何指示/通知的特征,因此我无法从设备获取任何数据,除了非常基本的元数据(设备类型、设备名称等)。
今天我尝试做同样的事情,但是似乎无法建立连接,直到我告诉它使用随机地址类型。
以下是我在之前成功连接时记录的结果:
attr handle = 0x0001, end grp handle = 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle = 0x0008, end grp handle = 0x0008 uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle = 0x0009, end grp handle = 0x000e uuid: adabfb00-6e7d-4601-bda2-bffaa68956ba
attr handle = 0x000f, end grp handle = 0xffff uuid: 0000180a-0000-1000-8000-00805f9b34fb
handle = 0x0002, char properties = 0x02, char value handle = 0x0003, uuid = 00002a00-0000-1000-8000-00805f9b34fb
handle = 0x0004, char properties = 0x02, char value handle = 0x0005, uuid = 00002a01-0000-1000-8000-00805f9b34fb
handle = 0x0006, char properties = 0x02, char value handle = 0x0007, uuid = 00002a04-0000-1000-8000-00805f9b34fb
handle = 0x000a, char properties = 0x12, char value handle = 0x000b, uuid = adabfb01-6e7d-4601-bda2-bffaa68956ba
handle = 0x000d, char properties = 0x06, char value handle = 0x000e, uuid = adabfb02-6e7d-4601-bda2-bffaa68956ba
handle = 0x0010, char properties = 0x02, char value handle = 0x0011, uuid = 00002a29-0000-1000-8000-00805f9b34fb
handle = 0x0013, char properties = 0x02, char value handle = 0x0014, uuid = 0000fb00-0000-1000-8000-00805f9b34fb
您可能需要将设备配对才能获得实际有用的数据...不确定该如何操作。