BLUETOOTH - Linux:使用 bluetoothctl 更改外观广告失败

BLUETOOTH - Linux: Changing advertisement of appearance with bluetoothctl fails

我喜欢使用 RaspberryPi 作为心率传感器并通过 BLTH 将这些数据传输到其他 Health/Sport-Apps。 最后,python 和 bluez 一切正常,我能够创建一个 BLTH GATT 服务器并通过服务 0x180d 公布 HR-Data。

最后一个问题是我无法在通用访问 (0x1800) 中更改 BLTH 的外观。 Appearance就是在这里找到UUID: 0x2A01.

我尝试通过 bluetoothctl 手动执行此操作: 菜单广告 外观 833(用于心率) 出现在 背部 在

上做广告

这将失败:无法注册广告:org.bluez.Error.Failed

没关系我将外观更改为哪个值(如果该值是众所周知且被接受的)它会导致广告失败。 如果我关闭外观,它将开始播放广告。 任何提示,做什么或我刚刚错过了什么? 我已经将 bluez 从 5.50 更新到 5.54 还在实验模式下使用 bluez

非常感谢您的帮助

这些是我在 Raspberry Pi 上使用的步骤:

pi@raspberrypi:~ $ bluetoothctl 
[bluetooth]# menu advertise 
[bluetooth]# clear
[bluetooth]# uuids 0x180D
[bluetooth]# appearance 833
[bluetooth]# name heart_test
[bluetooth]# discoverable on
[bluetooth]# back
[bluetooth]# advertise on
[CHG] Controller 00:02:5B:03:44:07 SupportedInstances: 0x04
[CHG] Controller 00:02:5B:03:44:07 ActiveInstances: 0x01
Advertising object registered
UUID: Heart Rate(0x180D)
Tx Power: off
LocalName: heart_test
Appearance: Heart Rate Belt (0x0341)
Discoverable: on
[bluetooth]#

当我扫描它时,它在 nRF 应用程序中给了我这个: