This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Adding Multiple Presentation Format Descriptors

The Bluetooth specification states:

If more than one Characteristic Presentation Format declarations exist, in a characteristic definition, then a Characteristic Aggregate Format declaration shall exist as part of the characteristic definition

However, there doesn't seem to be any way to add the Presentation Format descriptor except using sd_ble_gatts_characteristic_add(), which only seems to allow a single PF descriptor to be specified.

Calling sd_ble_gatts_descriptor_add() to attempt to manually add PF descriptors fails with the error code NRF_ERROR_FORBIDDEN.

Is there any way to add multiple Characteristic Presentation Format descriptors to a single characteristic?

edit: This is for a characteristic value that is comprised of 4 discrete quantities:

byte  | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
value |  1st  |      2nd      |      3rd      |        4th        |

The 1st value is 16-bit signed integer, the 2nd-4th values are 32-bit signed integers.

Related