ESP32 BLE Device Information Service (DIS): What's the maximum length of advertised device name & broadcast data?
When using the espressif/ble_services
package, you configure the Device Information Service (DIS) to advertise the device name and other data like this:
esp_ble_conn_config_t config = {
.device_name = "ABC123",
.broadcast_data = "MyProduct",
};
Here’s the maximum length for those fields:
- Device Name: The maximum length is
MAX_BLE_DEVNAME_LEN
, which is29 bytes
. - Broadcast Data: The maximum length is
MAX_BLE_BROADCAST_DATA_LEN
, which is15 bytes
.
These parameters are defined in esp_ble_conn_mgr.h
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow