Characteristic Aggregate Format Descriptor (0x2905) support for Peripheral device#1054
Characteristic Aggregate Format Descriptor (0x2905) support for Peripheral device#1054srgg wants to merge 1 commit intoh2zero:masterfrom
Conversation
ccf45e6 to
ec85ea8
Compare
|
This looks really good, only issue I have is the changes to the core files. This would make the api incompatible with the esp-idf version of NimBLE, maybe there's another way. |
|
@h2zero I don’t have much experience with ESP-IDF yet. Could you provide more details about the issue so I can explore alternative ways to address it? Honestly, I was hesitant to modify ble_gatts directly, since changes are introduced there from time to time. At the moment, the approach I took felt like the most straightforward way to fix the problem. |
|
I try to avoid modifying the stack code unless it's to address something that won't break the API with the esp-idf repo. I maintain a separate cpp wrapper for esp-idf: https://github.com/h2zero/esp-nimble-cpp since the NimBLE stack is included already in esp-idf, whereas in this repo it is provided. So in this case the 2905 class would not work with esp-idf as it would not have those core changes that are needed and the API would no longer be the same for both repos. |
…scriptor handle assignment
1ab9dfd to
dc01636
Compare
Summary
This PR adds full support for the Characteristic Aggregate Format Descriptor (UUID
0x2905) when operating as a BLE peripheral. Correct implementation requires reliable handle mapping for multiple Presentation Format descriptors (0x2904), which previously failed due to duplicate handle assignment.This PR also introduces PlatformIO build support for the existing examples and includes a usage demonstration of this new capability in
NimBLE_Server.ino.Problem
Descriptor handle resolution used UUID-only lookup (
ble_gatts_find_dsc()), which meant:0x2905) could not assemble a correct referenced handle listThe BLE specification requires each referenced descriptor to have a unique handle for valid aggregation.
Fix
ble_gatt_dsc_defAdditional Enhancements
They still function as regular Arduino sketches
and can now also be built and flashed using PlatformIO:
NimBLE_Server.inoexample to include a practical usage example of the Aggregate Format descriptor feature:Impact
0x2904)