esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

Add Bluetooth Common Data Types definitions (IDFGH-16960)

Open acouvreur opened this issue 4 months ago • 8 comments

Is your feature request related to a problem?

All BLE examples that are defining raw advertisement data are using the Data Type Specification in raw hexadecimal form:

https://github.com/espressif/esp-idf/blob/fcae32885b0296b32044cb99ecbdc50d98dddb83/examples/bluetooth/bluedroid/ble_50/ble50_throughput/throughput_server/main/example_ble_server_throughput.c#L100-L107

The data specification let you send data in the following format:

The list of available flags is available in the bluetooth specification at 2.3 Common Data Types: https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Assigned_Numbers/out/en/Assigned_Numbers.pdf

Image

Describe the solution you'd like.

The bluetooth common header file should include a definition of each of those flags. Then, each example should switch to using this definition for better clarity.

Describe alternatives you've considered.

Create my own header file, but I think it has a lot of value and would benefit the community.

Additional context.

I can create a pull request for this.

acouvreur avatar Dec 14 '25 20:12 acouvreur