espsss / reference / quick / ble-limits

BLE limits

The BLE numbers that come up when a characteristic or an advertisement does not fit: MTU, advertising payload, device name and connection count. Values from the ESP-IDF v5.5.5 headers and Kconfig of both host stacks (Bluedroid and NimBLE) and the arduino-esp32 3.3.12 BLE library. Kconfig values are ESP-IDF defaults; a prebuilt framework may set them differently. The arduino-esp32 3.3.12 libraries use NimBLE on every chip except ESP32 (see the Arduino section).

In short

  • Default ATT MTU is 23 bytes in both stacks. The maximum is 517 in Bluedroid and 527 in NimBLE; the MTU actually used is negotiated per connection.1
  • Legacy advertising data and scan response data: 31 bytes each.2
  • Extended advertising (BLE 5) is off by default in NimBLE and on by default in Bluedroid when its BLE 5.0 features are enabled.3
  • Concurrent connections, ESP-IDF host default: 3 with NimBLE, 4 with Bluedroid (2 on ESP32-C2 in both). On ESP32 the controller default is 3, so 3 applies there with either host.3
  • Of the chips in the table below, every one with BLE except the original ESP32 has BLE 5 features; ESP32-S2 and ESP32-P4 have no Bluetooth.4

Sizes

LimitValueNotes
ATT MTU, default and minimum23 bytesESP_GATT_DEF_BLE_MTU_SIZE (Bluedroid), BLE_ATT_MTU_DFLT (NimBLE).51
ATT MTU, maximum (Bluedroid)517 bytesESP_GATT_MAX_MTU_SIZE1
ATT MTU, maximum (NimBLE)527 bytesBLE_ATT_MTU_MAX: room for a 512-byte attribute value in a signed write.5
Preferred MTU (NimBLE Kconfig)256 bytesESP-IDF default of CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU: what the device offers in the MTU exchange.3
Advertising data (legacy)31 bytesESP_BLE_ADV_DATA_LEN_MAX; NimBLE: BLE_HCI_MAX_ADV_DATA_LEN.26
Scan response data (legacy)31 bytesESP_BLE_SCAN_RSP_DATA_LEN_MAX2
Extended advertising data (NimBLE Kconfig)up to 1650 bytesCONFIG_BT_NIMBLE_EXT_ADV_MAX_SIZE, only with CONFIG_BT_NIMBLE_EXT_ADV (default off).3
Device name (Bluedroid Kconfig)default 32, range 32…248CONFIG_BT_MAX_DEVICE_NAME_LEN7
Device name (NimBLE Kconfig)default 31CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN3

Connections (ESP-IDF Kconfig defaults)

The host and the controller each have a limit; the smaller one applies. Values are the ESP-IDF v5.5.5 Kconfig defaults and ranges.

OptionDefaultRange and notes
CONFIG_BT_NIMBLE_MAX_CONNECTIONS (NimBLE host)3 (ESP32-C2: 2)1…9; ESP32-C2 1…2; 1…70 on chips with the ESP NimBLE controller.3
CONFIG_BT_ACL_CONNECTIONS (Bluedroid host)4 (ESP32-C2: 2)1…9 on ESP32, ESP32-C3, ESP32-S3; 1…15 on ESP32-H2; ESP32-C2 1…2; 1…50 on other chips.7
CONFIG_BTDM_CTRL_BLE_MAX_CONN (ESP32 controller)31…9; each connection uses 1 KB of static DRAM.8
CONFIG_BT_CTRL_BLE_MAX_ACT (ESP32-C3 / ESP32-S3 controller)61…10 instances shared by connections, scanning and advertising; 828 bytes each.9

BLE and BLE 5 per chip

ChipBLEBLE 5 features
ESP32Yes10No7
ESP32-S2——
ESP32-S3Yes4Yes4
ESP32-C2Yes11Yes11
ESP32-C3Yes12Yes12
ESP32-C5Yes13Yes13
ESP32-C6Yes14Yes14
ESP32-C61Yes15Yes15
ESP32-H2Yes16Yes16
ESP32-P4——

From SOC_BLE_SUPPORTED and SOC_BLE_50_SUPPORTED in each chip's soc_caps.h (ESP-IDF v5.5.5).

Arduino BLE library (3.3.12)

One library, two hosts

The arduino-esp32 BLE library has code for both hosts and compiles whichever one the framework configuration enables. In plain ESP-IDF the default host is Bluedroid.17

Which host Arduino 3.3.12 uses

The arduino-esp32 3.3.12 libraries are built with NimBLE (Bluedroid off) on ESP32-S3, C3, C5, C6 and H2, and on ESP32-P4, where the chip has no Bluetooth controller and NimBLE runs over ESP-Hosted. The ESP32 build enables Classic Bluetooth, which requires Bluedroid.18

setMTU() sets the local value only

BLEDevice::setMTU() passes the value to esp_ble_gatt_set_local_mtu() (Bluedroid) or ble_att_set_preferred_mtu() (NimBLE); the comment asks for more than 23 and at most 517. getMTU() returns this stored local value, which starts at 23, not the MTU negotiated on a connection.17

BLEMultiAdvertising needs Bluedroid

The BLE 5 extended advertising class BLEMultiAdvertising is compiled only on chips with BLE 5 and only with the Bluedroid host. In the arduino-esp32 3.3.12 libraries every chip with BLE 5 uses NimBLE and ESP32 has no BLE 5, so the class is not available in a stock Arduino build.19

Pitfalls

A bigger MTU is a request, not a setting

The preferred MTU is only what the device offers in the ATT MTU exchange; until an exchange raises it, the default of 23 bytes applies.3

Long names are cut in the advertisement (Bluedroid)

In Bluedroid, if the advertising data cannot hold the complete device name, only the short name is shown and the rest is truncated.7

Bluedroid: BLE 4.2 or BLE 5.0 features, not both

In Bluedroid the BLE 4.2 and BLE 5.0 feature sets are separate options that cannot be used together; BLE 4.2 is the default on ESP32, BLE 5.0 on chips with SOC_BLE_50_SUPPORTED.7

ESP32-C3/S3: advertising and scanning take connection slots

The ESP32-C3/S3 controller has a pool of instances (CONFIG_BT_CTRL_BLE_MAX_ACT: default 6, at most 10) shared by connections, scanning and advertising. The Bluedroid help text: with 10 instances and both advertising and scanning in use, at most 8 devices can be connected, because used instances are not reclaimed.9

Sources

Each number links here; open “What it confirms” for the exact quotes. Checked 2026-11-28.

  1. ESP-IDF v5.5.5: components/bt/host/bluedroid/api/include/api/esp_gatt_common_api.h primary
    What it confirms (3)
    • BLE limits: in short “#define ESP_GATT_DEF_BLE_MTU_SIZE 23 … #define ESP_GATT_MAX_MTU_SIZE 517 … #define BLE_ATT_MTU_DFLT 23 … #define BLE_ATT_MTU_MAX 527 … This is the default value of ATT MTU indicated by the device during an ATT MTU exchange.”
    • BLE limits: ATT MTU, default and minimum “#define ESP_GATT_DEF_BLE_MTU_SIZE 23”
    • BLE limits: ATT MTU, maximum (Bluedroid) “#define ESP_GATT_MAX_MTU_SIZE 517”
  2. ESP-IDF v5.5.5: components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h primary
    What it confirms (3)
    • BLE limits: in short “#define ESP_BLE_ADV_DATA_LEN_MAX 31 … #define ESP_BLE_SCAN_RSP_DATA_LEN_MAX 31”
    • BLE limits: Advertising data (legacy) “#define ESP_BLE_ADV_DATA_LEN_MAX 31”
    • BLE limits: Scan response data (legacy) “#define ESP_BLE_SCAN_RSP_DATA_LEN_MAX 31”
  3. ESP-IDF v5.5.5: components/bt/host/nimble/Kconfig.in primary
    What it confirms (7)
    • BLE limits: in short “bool "Enable extended advertising" depends on BT_NIMBLE_50_FEATURE_SUPPORT default n … config BT_BLE_50_EXTEND_ADV_EN bool "Enable BLE extend advertising" depends on BT_BLE_50_FEATURES_SUPPORTED default y”
    • BLE limits: in short “range 1 9 default 2 if IDF_TARGET_ESP32C2 default 3 depends on BT_NIMBLE_ENABLED … range 1 50 default 2 if IDF_TARGET_ESP32C2 default 4 … config BTDM_CTRL_BLE_MAX_CONN int "BLE Max Connections" depends on BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM default 3 range 1 9”
    • BLE limits: Preferred MTU (NimBLE Kconfig) “config BT_NIMBLE_ATT_PREFERRED_MTU int "Preferred MTU size in octets" depends on BT_NIMBLE_GATT_CLIENT || BT_NIMBLE_GATT_SERVER default 256 … This is the default value of ATT MTU indicated by the device during an ATT MTU exchange.”
    • BLE limits: Extended advertising data (NimBLE Kconfig) “config BT_NIMBLE_EXT_ADV_MAX_SIZE int "Maximum length of the advertising data." range 0 1650 default 1650 if BT_NIMBLE_EXT_ADV default 0 depends on BT_NIMBLE_EXT_ADV … bool "Enable extended advertising" depends on BT_NIMBLE_50_FEATURE_SUPPORT default n”
    • BLE limits: Device name (NimBLE Kconfig) “config BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN int "Maximum length of BLE device name in octets" depends on BT_NIMBLE_ENABLED default 31”
    • BLE limits: CONFIG_BT_NIMBLE_MAX_CONNECTIONS (NimBLE host) “config BT_NIMBLE_MAX_CONNECTIONS int "Maximum number of concurrent connections" depends on BT_NIMBLE_ROLE_CENTRAL || BT_NIMBLE_ROLE_PERIPHERAL range 1 2 if IDF_TARGET_ESP32C2 range 1 70 if SOC_ESP_NIMBLE_CONTROLLER range 1 9 default 2 if IDF_TARGET_ESP32C2 default 3”
    • BLE limits: pitfall: A bigger MTU is a request, not a setting “This is the default value of ATT MTU indicated by the device during an ATT MTU exchange. … Default ATT MTU. Also the minimum.”
  4. ESP-IDF v5.5.5: components/soc/esp32s3/include/soc/soc_caps.h primary
    What it confirms (3)
    • BLE limits: in short “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ … This option is universally supported in chips that support BLE, except for ESP32.”
    • BLE limits: ESP32-S3 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
    • BLE limits: ESP32-S3 / BLE 5 features “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */”
  5. esp-nimble (ESP-IDF v5.5.5 submodule, 685675c0): nimble/host/include/host/ble_att.h primary
    What it confirms (2)
    • BLE limits: ATT MTU, default and minimum “Default ATT MTU. Also the minimum. … #define BLE_ATT_MTU_DFLT 23”
    • BLE limits: ATT MTU, maximum (NimBLE) “#define BLE_ATT_MTU_MAX 527 … An ATT MTU of 527 allows the largest ATT command (signed write) to contain a … 512-byte attribute value.”
  6. esp-nimble (ESP-IDF v5.5.5 submodule, 685675c0): nimble/include/nimble/hci_common.h primary
    What it confirms (1)
    • BLE limits: Advertising data (legacy) “#define BLE_HCI_MAX_ADV_DATA_LEN (31)”
  7. ESP-IDF v5.5.5: components/bt/host/bluedroid/Kconfig.in primary
    What it confirms (5)
    • BLE limits: Device name (Bluedroid Kconfig) “config BT_MAX_DEVICE_NAME_LEN int "length of bluetooth device name" depends on BT_BLUEDROID_ENABLED range 32 248 default 32”
    • BLE limits: CONFIG_BT_ACL_CONNECTIONS (Bluedroid host) “config BT_ACL_CONNECTIONS int "BT/BLE MAX ACL CONNECTIONS" depends on BT_BLUEDROID_ENABLED range 1 2 if IDF_TARGET_ESP32C2 range 1 9 if IDF_TARGET_ESP32 || IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3 range 1 15 if IDF_TARGET_ESP32H2 range 1 50 default 2 if IDF_TARGET_ESP32C2 default 4”
    • BLE limits: ESP32 / BLE 5 features “This option is universally supported in chips that support BLE, except for ESP32.”
    • BLE limits: pitfall: Long names are cut in the advertisement (Bluedroid) “If the broadcast data cannot contain the complete device name, then only the shortname will be displayed, the rest parts that can't fit in”
    • BLE limits: pitfall: Bluedroid: BLE 4.2 or BLE 5.0 features, not both “BLE 4.2 and BLE 5.0 cannot be used simultaneously. … menuconfig BT_BLE_42_FEATURES_SUPPORTED bool "Enable BLE 4.2 features(please disable BLE 5.0 if enable BLE 4.2)" depends on BT_BLE_ENABLED default y if IDF_TARGET_ESP32 default n … menuconfig BT_BLE_50_FEATURES_SUPPORTED bool "Enable BLE 5.0 and above features(please disable BLE 4.2 if enable BLE 5.0)" depends on (BT_BLE_ENABLED && ((BT_CONTROLLER_ENABLED && SOC_BLE_50_SUPPORTED) || BT_CONTROLLER_DISABLED)) default y”
  8. ESP-IDF v5.5.5: components/bt/controller/esp32/Kconfig.in primary
    What it confirms (1)
    • BLE limits: CONFIG_BTDM_CTRL_BLE_MAX_CONN (ESP32 controller) “config BTDM_CTRL_BLE_MAX_CONN int "BLE Max Connections" depends on BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM default 3 range 1 9 … Each connection uses 1KB static DRAM whenever the BT controller is enabled.”
  9. ESP-IDF v5.5.5: components/bt/controller/esp32c3/Kconfig.in primary
    What it confirms (2)
    • BLE limits: CONFIG_BT_CTRL_BLE_MAX_ACT (ESP32-C3 / ESP32-S3 controller) “config BT_CTRL_BLE_MAX_ACT int "BLE Max Instances" default 6 range 1 10 … BLE maximum activities of bluetooth controller,both of connections, … consume 828 bytes … source "$IDF_PATH/components/bt/controller/esp32c3/Kconfig.in"”
    • BLE limits: pitfall: ESP32-C3/S3: advertising and scanning take connection slots “config BT_CTRL_BLE_MAX_ACT int "BLE Max Instances" default 6 range 1 10 … BLE maximum activities of bluetooth controller,both of connections, … The ESP32-C3/S3 chip supports a maximum of 10 instances, … If ADV and SCAN are both used, The ESP32-C3/S3 chip is connected … to a maximum of 8 devices. … Because Bluetooth cannot reclaim used instances once ADV or SCAN”
  10. ESP-IDF v5.5.5: components/soc/esp32/include/soc/soc_caps.h primary
    What it confirms (1)
    • BLE limits: ESP32 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
  11. ESP-IDF v5.5.5: components/soc/esp32c2/include/soc/soc_caps.h primary
    What it confirms (2)
    • BLE limits: ESP32-C2 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
    • BLE limits: ESP32-C2 / BLE 5 features “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */”
  12. ESP-IDF v5.5.5: components/soc/esp32c3/include/soc/soc_caps.h primary
    What it confirms (2)
    • BLE limits: ESP32-C3 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
    • BLE limits: ESP32-C3 / BLE 5 features “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */”
  13. ESP-IDF v5.5.5: components/soc/esp32c5/include/soc/soc_caps.h primary
    What it confirms (2)
    • BLE limits: ESP32-C5 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
    • BLE limits: ESP32-C5 / BLE 5 features “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */”
  14. ESP-IDF v5.5.5: components/soc/esp32c6/include/soc/soc_caps.h primary
    What it confirms (2)
    • BLE limits: ESP32-C6 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
    • BLE limits: ESP32-C6 / BLE 5 features “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */”
  15. ESP-IDF v5.5.5: components/soc/esp32c61/include/soc/soc_caps.h primary
    What it confirms (2)
    • BLE limits: ESP32-C61 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
    • BLE limits: ESP32-C61 / BLE 5 features “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */”
  16. ESP-IDF v5.5.5: components/soc/esp32h2/include/soc/soc_caps.h primary
    What it confirms (2)
    • BLE limits: ESP32-H2 / BLE “#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */”
    • BLE limits: ESP32-H2 / BLE 5 features “#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */”
  17. arduino-esp32 3.3.12: libraries/BLE/src/BLEDevice.cpp primary
    What it confirms (2)
    • BLE limits: One library, two hosts “#if defined(CONFIG_BLUEDROID_ENABLED) || defined(CONFIG_NIMBLE_ENABLED) … default BT_BLUEDROID_ENABLED”
    • BLE limits: setMTU() sets the local value only “should be larger than 23 and lower or equal to 517 … esp_err_t err = esp_ble_gatt_set_local_mtu(mtu); … int err = ble_att_set_preferred_mtu(mtu); … uint16_t BLEDevice::m_localMTU = 23; … return m_localMTU;”
  18. esp32-arduino-lib-builder 6671d0b (the commit listed in versions.txt of the arduino-esp32 3.3.12 libs): configs/defconfig.esp32s3 primary
    What it confirms (1)
    • BLE limits: Which host Arduino 3.3.12 uses “CONFIG_BT_BLUEDROID_ENABLED=n … CONFIG_BT_NIMBLE_ENABLED=y … CONFIG_BT_CONTROLLER_DISABLED=y … CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE=y … CONFIG_BT_CLASSIC_ENABLED=y … config BT_CLASSIC_ENABLED bool "Classic Bluetooth" depends on BT_BLUEDROID_ENABLED”
  19. arduino-esp32 3.3.12: libraries/BLE/src/BLEAdvertising.h primary
    What it confirms (1)
    • BLE limits: BLEMultiAdvertising needs Bluedroid “#if defined(SOC_BLE_50_SUPPORTED) && defined(CONFIG_BLUEDROID_ENABLED) … class BLEMultiAdvertising { … CONFIG_BT_BLUEDROID_ENABLED=n … This option is universally supported in chips that support BLE, except for ESP32.”