Connecting Espressif ESP32 to 6 BLE Peripheral Devices Simultaneously

tylerca310
Posts: 2
Joined: Tue Apr 22, 2025 11:14 pm

Connecting Espressif ESP32 to 6 BLE Peripheral Devices Simultaneously

Postby tylerca310 » Tue Apr 22, 2025 11:24 pm

Hi everyone,

I am using the Arduino IDE to program the ESP32.

However, I’ve hit a roadblock: the ESP32 doesn’t seem to connect to more than 3 BLE devices at the same time. The Espressif 32 literature says that it can connect to 1-9 devices.

Here’s what I’ve tried so far:

Exploring Arduino IDE’s BLE library to optimize settings.

Adjusting BLE connection parameters like connection interval and latency.

Testing different firmware versions and updating the ESP32.

From what I've tried so far, my feeling is that this limitation might be related to either hardware constraints or the BLE stack itself.

I’ve searched the following phrases online, with no success, to see what solutions might have been tried by others:

Connecting ESP32 to 6 BLE Devices Simultaneously

ESP32 BLE central connection limit

Arduino IDE BLE library issue

BLE mesh networking alternatives

I’d greatly appreciate any guidance concerning the following:

How to expand the number of connections to 6.

Are there any Arduino commands and/or libraries that will do this?

Alternative solutions, such as BLE mesh networking or maybe even dynamic connection handling.

Relevant resources or examples helpful for implementing advanced BLE features using environments such as ESP-IDF or other frameworks such as those focused for developing a "lightweight, dedicated, BLE cell phone app".

Thank you so much for your insights and advice! I’m eager to hear your thoughts and suggestions.

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: Connecting Espressif ESP32 to 6 BLE Peripheral Devices Simultaneously

Postby lbernstone » Wed Apr 23, 2025 6:34 am

This is a limitation compiled into the sdk included in arduino-esp32 (probably CONFIG_BTDM_CTRL_BLE_MAX_CONN=3). This limitation is placed in order to reduce the memory consumption. If you need to connect to many clients, I'd strongly recommend you use NimBLE, which has much lower memory requirements. If you want to use the built-in client, you will need to recompile the sdk with a modified sdkconfig.

tylerca310
Posts: 2
Joined: Tue Apr 22, 2025 11:14 pm

Re: Connecting Espressif ESP32 to 6 BLE Peripheral Devices Simultaneously

Postby tylerca310 » Fri Apr 25, 2025 11:10 pm

Dear lbernstone,

Thank you for your kindness and thoughtful insights regarding the compiled limitation (CONFIG_BTDM_CTRL_BLE_MAX_CONN=3) and its impact on memory consumption. Your explanation of NimBLE's benefits makes sense, but given my limited experience, I feel hesitant to explore that option for now. Instead, I’m searching for a simpler, technically easier solution.

Could you kindly advise on whether Espressif offers any pre-configured options for modules like the ESP32-C3 or ESP32-S3 that support 6+ BLE connections out of the box without further modification? Alternatively, are there third-party Arduino-compatible products using ESP32 modules already set up for this use case?

Additionally, I’ve tried modifying the SDKCONFIG to adjust CONFIG_BTDM_CTRL_BLE_MAX_CONN, but the Arduino IDE keeps overwriting it with the default configuration. If you have any guidance on resolving this or alternative approaches for success, I would deeply appreciate it.

Thank you again for your time and consideration.
Best wishes,
Scott

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: Connecting Espressif ESP32 to 6 BLE Peripheral Devices Simultaneously

Postby lbernstone » Sun Apr 27, 2025 5:27 pm

No. arduino-esp32 provides tools to modify/build the sdk, but there is only the one size fits all release.

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests