BLE CCCD limit and need to erase?

jsam589
Posts: 67
Joined: Sat Aug 17, 2019 9:31 pm

BLE CCCD limit and need to erase?

Postby jsam589 » Mon May 11, 2020 6:44 pm

I adapted the bleprph example into my application. After several rounds of testing, it seems to hit a limit related to NVS and CCCD storage. If I try to pair (same phone always) after it reports having 8 CCCD already, the BLE task seems to hang and I eventually get a Task WDT reset.

After this problem occurs, I can erase nvs partition and then I can successfully test for about 8 more times. I am sure other useful info is in this partition since I also use Wi-Fi so a brute-force erase is not a smart solution. Is there a better way to work around this limit of 8 CCCD?

What is the correct way to clear or re-use these 8 slots on the fly?

Code: Select all

BLE Init func
2020-05-11T21:02:37+03:00, D, 12584, "BTDM_INIT", "Release DRAM [0x3ffb2730] - [0x3ffb6388]"
2020-05-11T21:02:37+03:00, I, 12586, "BTDM_INIT", "BT controller compile version [79dd6f1]"
2020-05-11T21:02:37+03:00, D, 12594, "BTDM_INIT", ".data initialise [0x3ffae6e0] <== [0x4000d890]"
2020-05-11T21:02:37+03:00, D, 12603, "BTDM_INIT", ".bss initialise [0x3ffb0000] - [0x3ffb09a8]"
2020-05-11T21:02:37+03:00, D, 12612, "BTDM_INIT", ".bss initialise [0x3ffb09a8] - [0x3ffb1ddc]"
2020-05-11T21:02:37+03:00, D, 12621, "BTDM_INIT", ".bss initialise [0x3ffb1ddc] - [0x3ffb2730]"
2020-05-11T21:02:37+03:00, D, 12629, "BTDM_INIT", ".bss initialise [0x3ffb8000] - [0x3ffb9a20]"
2020-05-11T21:02:37+03:00, D, 12638, "BTDM_INIT", ".bss initialise [0x3ffbdb28] - [0x3ffbdb5c]"
2020-05-11T21:02:37+03:00, I, 12648, "system_api", "Base MAC address is not set, read default base MAC address from BLK0 of EFUSE"
2020-05-11T21:02:38+03:00, D, 12990, "NIMBLE_NVS", "ble_store_config_our_secs restored 0 bonds"
2020-05-11T21:02:38+03:00, D, 12992, "NIMBLE_NVS", "ble_store_config_peer_secs restored 0 bonds"
2020-05-11T21:02:38+03:00, D, 12999, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 1"
2020-05-11T21:02:38+03:00, D, 13009, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 2"
2020-05-11T21:02:38+03:00, D, 13017, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 3"
2020-05-11T21:02:38+03:00, D, 13026, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 4"
2020-05-11T21:02:38+03:00, D, 13035, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 5"
2020-05-11T21:02:38+03:00, D, 13044, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 6"
2020-05-11T21:02:38+03:00, D, 13052, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 7"
2020-05-11T21:02:38+03:00, D, 13062, "NIMBLE_NVS", "CCCD in RAM is filled up from NVS index = 8"
2020-05-11T21:02:38+03:00, D, 13069, "NIMBLE_NVS", "ble_store_config_cccds restored 8 bonds"
2020-05-11T21:02:38+03:00, I, 13078, "NimBLE_PRPH", "BLE Host Task Started"
Back from ble init

Who is online

Users browsing this forum: Bing [Bot] and 17 guests