With the latest SDK 2.6.0, I am developing from the existing NRF5340 audio application for a receiver, to allow an ACL connection from a mobile app. Advertising starts fine, connection gets established from the central app without issues.
The problem I am having is that when the app manually disconnects itself from the receiver, advertising tries to start again, but can not with the following issue :
<err> bt_mgmt_adv: Failed to start advertising set. Err: -12
This means not enough core.
I have tried to resolve this by calling bt_le_ext_adv_stop() and even bt_le_ext_adv_delete() in bt_mgmt_adv_start() before bt_le_ext_adv_create() gets called. This didn't solve it.
I have also tried to solve it by calling bt_le_ext_adv_stop() right before bt_le_ext_adv_start() inside advertising_process().
The same -12 error occurs no matter what. Everything else inside advertising_process() executes without an error , and only bt_le_ext_adv_start() fails.
At this stage i'm not sure if it's an issue with the SDK or I am doing something wrong. Thanks in advance for any support.