-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"NimBLE: error setting advertisement data; rc=8" issue while using spp_server code from esp-idf/examples (IDFGH-12862) #13826
Comments
Hi @BestBot7 , Please disable BT_NIMBLE_EXT_ADV and use. |
Hi @rahult-github, I have tried both enabling and disable and ended up with the same error. |
Hi @BestBot7 , I quickly tried on esp32c3 on 5.2.1 and i see it working ok.
Can you please help share your sdkconfig ? |
Hi @BestBot7
I have assumed you are running the ble_spp/spp_server example from IDF. If not, then can you please try the IDF example to confirm it works ? |
Now try to connect with nrf connect mobile app and disconnect it. You will find the error. Anyway please find the attached sdkconfig. |
Hi @BestBot7 , In sdkconfig shared:
Extended Advertising is enabled.
Please do this. |
The way to disable EXT_ADV is : Component config → Bluetooth → NimBLE Options → Enable BLE 5 feature and ensure Enable extended advertising is not selected |
I have disabled the extended advertisement and here are the error log image and the corresponding sdkconfig file attached. |
Hi @BestBot7 , your original issue was advertising data not being set because ext adv was enabled. As seen in above logs, that issue is resolved. But now a new issue is observed on your side where attempt to enable advertising fails since advertising is already in progress. Update: So in log we see : Advertising is started Is this some extra application code from your side ? This is why the new attempt to start advertising fails, since one advertising is already in progress. |
Hi @rahult-github, this is the template code from idf examples. I have changed nothing in it, except that the number of concurrent connections set to 5. My aim is to verify the multiconnection in esp32c3 bluetooth and hence I configured the number of concurrent connections to 5. After connecting and disconnecting from a single device, the error is logged as I mentioned. So, please help me with what all should I be careful while enabling multiple BLE connections. |
Hi @BestBot7 , I see. The example ble_spp is suited for single connection / legacy adv . If the use case is for multiconnection, then i suggest to look at the example ble_multi_conn . |
Hi @rahult-github, Even after using the example code ble_multi_conn, the issue still persists. I have disabled the ext adv and tried and found no difference. On boot we don't get this error. Only on disconnecting after connection we find this log. Can you suggest some way on how to use this feature properly? |
Answers checklist.
General issue report
I have taken the spp_server template code of nimble stack from esp-idf/examples.
I have build and flashed on esp32c3 to verify BLE advertisement and connection feature.
The number of BLE concurrent connections is set to 5 in the component config under menuconfig BLE feature.
The extended advertising under Enable BLE 5 feature is also enabled with number of instances to 4.
I have tried with esp-idf version 5.2.1, 5.1.1, and 5.1.2 and got the error saying "NimBLE: error setting advertisement data; rc=8". What exactly is this error and how to resolve this?
The text was updated successfully, but these errors were encountered: