Skip to content

Commit 6ed3f12

Browse files
committed
Fix esp32s3 and c3 max connection config.
Esp32s3/c3 use a max activity configuration which needs to account for scanning and advertising as well as connections.
1 parent 5aaade0 commit 6ed3f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NimBLEDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ bool NimBLEDevice::init(const std::string& deviceName) {
909909
bt_cfg.mode = ESP_BT_MODE_BLE;
910910
bt_cfg.ble_max_conn = CONFIG_BT_NIMBLE_MAX_CONNECTIONS;
911911
# elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
912-
bt_cfg.ble_max_act = CONFIG_BT_NIMBLE_MAX_CONNECTIONS;
912+
bt_cfg.ble_max_act = MYNEWT_VAL(BLE_MAX_CONNECTIONS) + MYNEWT_VAL(BLE_ROLE_BROADCASTER) + MYNEWT_VAL(BLE_ROLE_OBSERVER);
913913
# else
914914
bt_cfg.nimble_max_connections = CONFIG_BT_NIMBLE_MAX_CONNECTIONS;
915915
# endif

0 commit comments

Comments
 (0)