Skip to content

Commit 7a8d10b

Browse files
committed
Set max connections correctly for esp32s3/c3
1 parent ce1b8bc commit 7a8d10b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/NimBLEDevice.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,11 +891,13 @@ bool NimBLEDevice::init(const std::string& deviceName) {
891891

892892
# if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) | !defined(CONFIG_NIMBLE_CPP_IDF)
893893
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
894-
# if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
895-
bt_cfg.bluetooth_mode = ESP_BT_MODE_BLE;
896-
# else
894+
# if defined(CONFIG_IDF_TARGET_ESP32)
897895
bt_cfg.mode = ESP_BT_MODE_BLE;
898896
bt_cfg.ble_max_conn = CONFIG_BT_NIMBLE_MAX_CONNECTIONS;
897+
# elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
898+
bt_cfg.ble_max_act = CONFIG_BT_NIMBLE_MAX_CONNECTIONS;
899+
# else
900+
bt_cfg.nimble_max_connections = CONFIG_BT_NIMBLE_MAX_CONNECTIONS;
899901
# endif
900902

901903
# ifdef CONFIG_BTDM_BLE_SCAN_DUPL

0 commit comments

Comments
 (0)