esp-nimble-cpp
esp-nimble-cpp copied to clipboard
Remove deprecated API in case of ESP-IDF V5.
esp_nimble_hci_and_controller_deinit function has been removed from the API in ESP IDF version 5.0. Add a compile guard to prevent build errors.
Thanks for this! I believe the initialization code will also require a similar change from my interpretation of the esp-nimble updates.
@h2zero I couldn't find any references to esp_nimble_hci_and_controller_init in the code. Though I'm happy to make any additional changes, as required.
Yes, that function is not used, however direct initialization of the controller/host stack is. It's my understanding that this has been reduced to a single call of nimble_port_init as the controller/host are now initialized there.
I'm not sure what effect this has on the existing code, so I'll need to look into it.
@h2zero Sorry about the delay. I finally had some time to check this. Indeed, with the original initialization code, I was getting a E (2391) BLE_INIT: controller init failed error and continuous rebooting.
Wrapping that with the same check has fixed the issue and it works as expected.
Could you check the updated changes?
Thanyou @armandas !! your fix saved my day!! It works!
Sorry for the delay on this, I've been extremely busy and completely forgot about it 👎. Thanks for this!