The 0x2902 descriptor is written to by SetNotify, and that is working beautifully.
But there are other descriptors (per https://www.bluetooth.com/specifications/gatt/descriptors ) and I cannot work out how to read descriptor 0x2904 aka "Characteristic Presentation Format". The descriptor shows up in a BLE Analyser app, alongside the 0x2902 notify descriptor for the same characteristic.
The descriptor is of fixed format and length (7 bytes). It describes the value returned by the characteristic, eg: what it is, and the units and scaling ("exponent"). In my case currently, it is a pressure measurement in PSI, ie 0x27a5 per https://www.bluetooth.com/specifications/assigned-numbers/units
Previously I've just hard-coded this information into my apps, but what's happened now is that the sensor manufacturer has updated the device and my readings with the new sensors are a tenth of what they should be. It turns out the scaling of the pressure reading has been changed. I didn't see that coming but, to be fair to the manufacturer, the new devices are indeed compatible with the old devices, provided that the scaling is read from the device. I have temporarily worked around the issue by identifying old/new sensors using their serial number, but I just know that's going to bite me on future device updates.
But there are other descriptors (per https://www.bluetooth.com/specifications/gatt/descriptors ) and I cannot work out how to read descriptor 0x2904 aka "Characteristic Presentation Format". The descriptor shows up in a BLE Analyser app, alongside the 0x2902 notify descriptor for the same characteristic.
The descriptor is of fixed format and length (7 bytes). It describes the value returned by the characteristic, eg: what it is, and the units and scaling ("exponent"). In my case currently, it is a pressure measurement in PSI, ie 0x27a5 per https://www.bluetooth.com/specifications/assigned-numbers/units
Previously I've just hard-coded this information into my apps, but what's happened now is that the sensor manufacturer has updated the device and my readings with the new sensors are a tenth of what they should be. It turns out the scaling of the pressure reading has been changed. I didn't see that coming but, to be fair to the manufacturer, the new devices are indeed compatible with the old devices, provided that the scaling is read from the device. I have temporarily worked around the issue by identifying old/new sensors using their serial number, but I just know that's going to bite me on future device updates.
Last edited: