diff --git a/src/blecsan.cpp b/src/blecsan.cpp index 51b6a563..41678a2f 100644 --- a/src/blecsan.cpp +++ b/src/blecsan.cpp @@ -235,7 +235,7 @@ void bt_loop(void * pvParameters) // Initialize BT controller to allocate task and other resource. ESP_LOGI(TAG, "Enabling Bluetooth Controller"); esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); - bt_cfg.controller_task_stack_size = 8192; // double BT stack size + bt_cfg.controller_task_stack_size = BLESTACKSIZE; // set BT stack size to value configured in paxcounter.conf if (esp_bt_controller_init(&bt_cfg) != ESP_OK) { diff --git a/src/paxcounter.conf b/src/paxcounter.conf index cc953b6b..8ab4da35 100644 --- a/src/paxcounter.conf +++ b/src/paxcounter.conf @@ -10,6 +10,7 @@ #define BLECOUNTER 1 // comment out if you don't want BLE count // BLE scan parameters +#define BLESTACKSIZE 8192 // stack size for esp_bt_controller #define BLESCANTIME 11 // [seconds] scan duration, see note below #define BLESCANWINDOW 10 // [milliseconds] scan window, see below, 3 .. 10240, default 10 #define BLESCANINTERVAL 10 // [milliseconds] how long to wait between scans, 3 .. 10240, default 10