如何通过gatttool从Huawei Watch GT-DEE读取BMP数据包?

问题描述

当前,我正在做一个项目,该项目需要使用Huawei Watch GT-DEEgatttoolPythonRaspBerry Pi 4读取一些传感器。在这里,服务器和客户端分别是Huawei Watch和RaspBerry Pi。但是,我得到了this article,它非常接近我的目标。我正在寻找更多详细信息,并获得了this articlethis article。无论如何,我正在遵循BLE primary服务:

[aa:bb:cc:dd:ee:ff][LE]> primary
attr handle: 0x0001,end grp handle: 0x0009 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x000a,end grp handle: 0x000d uuid: 00001801-0000-1000-8000-00805f9b34fb
attr handle: 0x0010,end grp handle: 0x0020 uuid: 0000180a-0000-1000-8000-00805f9b34fb
attr handle: 0x002a,end grp handle: 0x0034 uuid: 0000fe86-0000-1000-8000-00805f9b34fb
attr handle: 0x0100,end grp handle: 0x0112 uuid: 00001812-0000-1000-8000-00805f9b34fb
attr handle: 0x0300,end grp handle: 0xffff uuid: 00003802-0000-1000-8000-00805f9b34fb

并具有以下特征:

[aa:bb:cc:dd:ee:ff][LE]> characteristics
handle: 0x0002,char properties: 0x02,char value handle: 0x0003,uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004,char value handle: 0x0005,uuid: 00002a01-0000-1000-8000-00805f9b34fb
handle: 0x0006,char value handle: 0x0007,uuid: 00002aa6-0000-1000-8000-00805f9b34fb
handle: 0x0008,char value handle: 0x0009,uuid: 00002ac9-0000-1000-8000-00805f9b34fb
handle: 0x000b,char properties: 0x20,char value handle: 0x000c,uuid: 00002a05-0000-1000-8000-00805f9b34fb
handle: 0x0011,char value handle: 0x0012,uuid: 00002a29-0000-1000-8000-00805f9b34fb
handle: 0x0013,char value handle: 0x0014,uuid: 00002a23-0000-1000-8000-00805f9b34fb
handle: 0x0015,char value handle: 0x0016,uuid: 00002a24-0000-1000-8000-00805f9b34fb
handle: 0x0017,char value handle: 0x0018,uuid: 00002a25-0000-1000-8000-00805f9b34fb
handle: 0x0019,char value handle: 0x001a,uuid: 00002a26-0000-1000-8000-00805f9b34fb
handle: 0x001b,char value handle: 0x001c,uuid: 00002a27-0000-1000-8000-00805f9b34fb
handle: 0x001d,char value handle: 0x001e,uuid: 00002a28-0000-1000-8000-00805f9b34fb
handle: 0x001f,char value handle: 0x0020,uuid: 00002a2a-0000-1000-8000-00805f9b34fb
handle: 0x002b,char properties: 0x0c,char value handle: 0x002c,uuid: 0000fe01-0000-1000-8000-00805f9b34fb
handle: 0x002d,char properties: 0x10,char value handle: 0x002e,uuid: 0000fe02-0000-1000-8000-00805f9b34fb
handle: 0x0030,char value handle: 0x0031,uuid: 0000fe03-0000-1000-8000-00805f9b34fb
handle: 0x0032,char value handle: 0x0033,uuid: 0000fe04-0000-1000-8000-00805f9b34fb
handle: 0x0101,char value handle: 0x0102,uuid: 00002a4a-0000-1000-8000-00805f9b34fb
handle: 0x0103,char value handle: 0x0104,uuid: 00002a4b-0000-1000-8000-00805f9b34fb
handle: 0x0106,char properties: 0x04,char value handle: 0x0107,uuid: 00002a4c-0000-1000-8000-00805f9b34fb
handle: 0x0108,char properties: 0x12,char value handle: 0x0109,uuid: 00002a22-0000-1000-8000-00805f9b34fb
handle: 0x010b,char properties: 0x0e,char value handle: 0x010c,uuid: 00002a32-0000-1000-8000-00805f9b34fb
handle: 0x010d,char value handle: 0x010e,uuid: 00002a4d-0000-1000-8000-00805f9b34fb
handle: 0x0111,char properties: 0x06,char value handle: 0x0112,uuid: 00002a4e-0000-1000-8000-00805f9b34fb
handle: 0x0301,char properties: 0x1e,char value handle: 0x0302,uuid: 00004a02-0000-1000-8000-00805f9b34fb

根据this article,2a00服务(uuid:0000 2a00 -0000-1000-8000-00805f9b34fb,char值句柄为0x0003)指的是设备名称(主要为1800)我正确地得到如下:

[aa:bb:cc:dd:ee:ff][LE]> char-read-hnd 0x0003
Characteristic value/descriptor: 48 55 41 57 45 49 20 57 41 54 43 48 20 47 54 2d 44 45 45

但是,我正在寻找2a37服务定义的BMP值,而该输出characteristics(或主要的180d)部分中丢失。根据{{​​3}}(请查看“传感器”部分),它具有Optical heart rate sensor。无论如何,我可以在手机的观看屏幕 Health应用中看到心率。

问题:

为什么gatttool在特性中没有显示服务2a37或在主要部分中没有显示180d

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)