ESP32-S3 stuck at 3 simultaneous connections despite CONFIG_BT_NIMBLE_MAX_CONNECTIONS=4 #1160
Unanswered
HerveGagnon
asked this question in
Q&A
Replies: 1 comment
-
|
If you are using platformio I suggest these values to be set in the build flags,. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @h2zero,
I’m running NimBLE-Arduino on an ESP32-S3 (PlatformIO, Arduino framework) and I’m trying to support 5 simultaneous BLE peripheral connections (4 actuator nodes + 1 level node).
Here is my code, here is what I tried, here is the output.
The problem is that the server consistently stops accepting connections after the 3rd connection.
Runtime output shows:
NimBLE max connections = 3
NIMBLE_MAX_CONNECTIONS=3
When the 3rd client connects:
BLE connected handle=3
Connections=3
E NimBLEAdvertising: Error enabling advertising; rc=6
Restart advertising result=0 Advertising=0
After that, advertising stops and no additional clients can connect.
Things I’ve already tried:
#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 4
#define CONFIG_BT_NIMBLE_MAX_BONDS 3
#define CONFIG_BT_NIMBLE_MAX_CCCDS 9
#define CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU 100
#define MYNEWT_VAL_BLE_MAX_CONNECTIONS 4
#define MYNEWT_VAL_BLE_ATT_PREFERRED_MTU 100
#define MYNEWT_VAL_BLE_MAX_CCCDS 9
#include “nimconfig.h”
#include <NimBLEDevice.h>
Serial.printf(“NIMBLE_MAX_CONNECTIONS=%d\n”, NIMBLE_MAX_CONNECTIONS);
Result is still:
NIMBLE_MAX_CONNECTIONS=3
#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3
The final system requires:
All connect to a single ESP32-S3 NimBLE server.
Question:
What is the correct way to override CONFIG_BT_NIMBLE_MAX_CONNECTIONS when using NimBLE-Arduino under PlatformIO on ESP32-S3?
Should this be done through build_flags, sdkconfig.defaults, a custom nimconfig.h, or by modifying the library’s nimconfig.h directly?
Also, are there any ESP32-S3-specific limits that would prevent 4 or 5 simultaneous peripheral connections?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions