I am trying to set up multiple advertisements using NimBLE on ESP32-C3 but I receive error 0x207 (BLE_ERR_MEM_CAPACITY) when I set up the third advertising. I have set the following configuration:
CONFIG_BT_NIMBLE_EXT_ADV=y
CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=4
Using ESP-IDF v5.1.5. The example ble_multi_adv runs fine, but I am using many more resources (GATT server, BLE scanning, wifi, etc..).
Do I need to increase memory somewhere? Any hints?
Multiple advertisements out of memory (BLE_ERR_MEM_CAPACITY)
Re: Multiple advertisements out of memory (BLE_ERR_MEM_CAPACITY)
It seems to have to do with the advertising parameters (ble_gap_ext_adv_params).
Is there a limit to the combinations of connectable, scannable, and legacy_pdu combinations?
Is there a limit to the combinations of connectable, scannable, and legacy_pdu combinations?
Re: Multiple advertisements out of memory (BLE_ERR_MEM_CAPACITY)
Can you share your sample application or console log to narrow down which function is returning this error. Also, can you share your complete sdkconfig ?
-
- Posts: 1698
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Multiple advertisements out of memory (BLE_ERR_MEM_CAPACITY)
You can try and change the "Memory Settings" for NimBLE via menuconfig, e.g. adding more "blocks" to one or more of the memory pools.
Re: Multiple advertisements out of memory (BLE_ERR_MEM_CAPACITY)
The function returning the error is ble_gap_ext_adv_start(). I attached the sdkconfig.
- Attachments
-
- sdkconfig.txt
- (62.4 KiB) Downloaded 87 times
Re: Multiple advertisements out of memory (BLE_ERR_MEM_CAPACITY)
I doubled MSYS_1 Block count from 24 to 48 and MSYS_2 Block count from 32 to 64 without any success
Re: Multiple advertisements out of memory (BLE_ERR_MEM_CAPACITY)
I could solve this by setting CONFIG_BT_CTRL_BLE_MAX_ACT=9
I wonder why 9? I would assume I need 7: 4x adv + 1x scan + 1x central + 1x periph
I wonder why 9? I would assume I need 7: 4x adv + 1x scan + 1x central + 1x periph
Who is online
Users browsing this forum: No registered users and 383 guests