Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add presentation format descriptor support for nRF5x #5727
Looking through the mbed BTLE sources, I can find the characteristic presentation format descriptor, BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT, as well as a struct to hold the format in GattCharacteristic::PresentationFormat_t. However, when I add this descriptor to a characteristic and test using Nordic's NRF52 DK board, the descriptor does not appear.
Nordic seems to handle this presentation format differently from other descriptors, along with BLE_UUID_DESCRIPTOR_CHAR_USER_DESC. So, here I added a code path to handle the presentation format the similarly. Tested again on the NRF52 DK, everything appears to be working well.
This does not change any APIs or behavior, but should allow a user to pass a characteristic presentation format descriptor, which was not possible before.
No related PRs.
I will create another PR with sample code to use the characteristic presentation format.
Nothing needs to be done to deploy these changes.
Steps to test or reproduce
To test if this PR works, create a descriptor of type BLE_UUID_DESCRIPTOR_CHAR_PRESENTATION_FORMAT - without these changes, the descriptor will not appear on a Nordic NRF52 target. I assume the NRF51 target will have a similar issue, but I had some unrelated probles getting the NRF51 dongle to work so can't currently test changes to NRF51.
Build number : 863
Build number : 534