Python Bluetooth Bluepy未找到所有特征

Python Bluetooth Bluepy未找到所有特征,python,bluetooth,bluetooth-lowenergy,characteristics,Python,Bluetooth,Bluetooth Lowenergy,Characteristics,我正在使用与蓝牙设备通信,但它没有向我显示所有特征 当我使用gatttool运行以下命令时,我得到: [EE:50:F0:F8:3C:FF][LE]> char-desc 0x0019 0xffff handle: 0x0019, uuid: 00002800-0000-1000-8000-00805f9b34fb handle: 0x001a, uuid: 00002803-0000-1000-8000-00805f9b34fb handle: 0x001b, uuid: 0000153

我正在使用与蓝牙设备通信,但它没有向我显示所有特征

当我使用gatttool运行以下命令时,我得到:

[EE:50:F0:F8:3C:FF][LE]> char-desc 0x0019 0xffff
handle: 0x0019, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x001a, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001b, uuid: 00001532-1212-efde-1523-785feabcd123
handle: 0x001c, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x001d, uuid: 00001531-1212-efde-1523-785feabcd123
handle: 0x001e, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x001f, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0020, uuid: 00001534-1212-efde-1523-785feabcd123
但当我使用Bluepy运行以下命令时,我得到:

characteristics = self.peripheral.getCharacteristics(startHnd=0x0019, endHnd=0xFFFF, uuid=None)
for characteristic in characteristics:
    print("{}, hnd={}, supports {}".format(characteristic, hex(characteristic.handle), characteristic.propertiesToString()))

Characteristic <00001532-1212-efde-1523-785feabcd123>, hnd=0x1a, supports WRITE NO RESPONSE 
Characteristic <00001531-1212-efde-1523-785feabcd123>, hnd=0x1c, supports NOTIFY WRITE 
Characteristic <00001534-1212-efde-1523-785feabcd123>, hnd=0x1f, supports READ 
然后将“\x01\x04”写入特征:

handle: 0x001e, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x001d, uuid: 00001531-1212-efde-1523-785feabcd123
handle: 0x001e, uuid: 00002902-0000-1000-8000-00805f9b34fb
但我不能,因为Bluepy没有找到特征:

handle: 0x001e, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x001d, uuid: 00001531-1212-efde-1523-785feabcd123
handle: 0x001e, uuid: 00002902-0000-1000-8000-00805f9b34fb
为什么会这样

当Bluepy找不到特性时,我如何写入它

为什么Bluepy返回的句柄与gatttool返回的句柄不匹配


谢谢

您对这些附加特征的理解是错误的。以
000028xx
开头的UUID是特征“声明”,如图所示:,以
000029xx
开头的UUID是描述符,如图所示:。它们不是特性本身,但描述了其中一个特性的详细信息。

我有一个类似的问题,我可以连接到一个ble设备,并从rpi3中看到它的UUID服务。我可以通过BLE Scanner iphone应用程序连接甚至写入服务特性,但当我运行bluepy python代码从RPi3写入BLE设备时,它返回错误,表示找不到该服务。