I like to use a RaspberryPi to act as HeartRate Sensor and transmit these data via BLTH to other Health/Sport-Apps. Finally all is working fine with python and bluez I'm able to create a BLTH GATT Server and advertise HR-Data via Service 0x180d.
The last problem is I'm not able to change the Appearance of the BLTH in Generic Access (0x1800). Apprearance is to find here with UUID: 0x2A01.
I tryed to do this the manual way via bluetoothctl: menu advertise appearance 833 (for HeartRate) appearance on back advertise on
This will fail with: Failed to register advertisement: org.bluez.Error.Failed
nevermind to which value i change the apperance (also if the value is well known and accepted) it fail the advertisement. If i switch appearance off it will start advertisment. Any hint, what do to or what I just missed? I already updated bluez from 5.50 to 5.54 also used bluez in experimental mode
Many thanks for help
These are the steps that I used on my 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]#
And it gave me this on me this in the nRF app when I scanned for it: