Ubluepy and wasp os, characteristic uuid
Posted: Mon Jan 17, 2022 3:55 pm
Hi,
Apologies if this is not the place to put this, but I'm not sure where is better suited, however feel free to point me elsewhere if this isn't the place for it.
I'm using wasp os on a PineTime watch, using ubluepy under the hood. I'm trying to advertise a service for the PineTime using ubluepy, the service is advertised correctly with the UUID I specify, however the characteristics added don't appear to be using the UUID specified for them.
Example code here:
The OSD service correctly uses the UUID "a19585e9-0001-39d0-015f-b3e2b9a0c854", however the accelerometer characteristic seems to be using "6e4085e9-b5a3-e0a9-e50e24dcca9e". It seems as though it's ignoring what I'm specifying and generation something based on the UUID of the service. I'm just wondering if anyone knows what I'm likely doing wrong? I've checked the docs for bluepy and can't seem to see anything which suggests this might happen.
Any help appreciated, and sorry if this should be elsewhere.
Apologies if this is not the place to put this, but I'm not sure where is better suited, however feel free to point me elsewhere if this isn't the place for it.
I'm using wasp os on a PineTime watch, using ubluepy under the hood. I'm trying to advertise a service for the PineTime using ubluepy, the service is advertised correctly with the UUID I specify, however the characteristics added don't appear to be using the UUID specified for them.
Example code here:
Code: Select all
# Accelerometer characteristic
_ACCELEROMETER_UUID = UUID("a19585e9-0002-39d0-015f-b3e2b9a0c854")
_ACCELEROMETER_CHAR = Characteristic(
_ACCELEROMETER_UUID,
props=Characteristic.PROP_NOTIFY | Characteristic.PROP_READ,
attrs=Characteristic.ATTR_CCCD,
)
# OSD service
_OSD_SERVICE_UUID = UUID("a19585e9-0001-39d0-015f-b3e2b9a0c854")
_OSD_SERVICE = Service(_OSD_SERVICE_UUID)
_OSD_SERVICE.addCharacteristic(_BATT_CHAR)
_OSD_SERVICE.addCharacteristic(_ACCELEROMETER_CHAR)
Any help appreciated, and sorry if this should be elsewhere.