Nimble BLE Server
Nimble BLE Server
I am looking for a way to pause the BLE advertisement. What is the best way to go about doing this? Is it a good practice to do it via ble_gap_adv_stop and ble_gap_adv_start ?
Re: Nimble BLE Server
Hi,
I am still not able to reinitialize for a second time even when all the teardown was done properly. I am getting a system panic when this is called a second time. Can someone confirm this? Thank you.
I am still not able to reinitialize
Code: Select all
nimble_port_freertos_init(ble_host_task)
Re: Nimble BLE Server
Hi,
I am reading the ESP documentation [esp_bt_controller_deinit][https://docs.espressif.com/projects/esp ... ler_deinit] and it says that it can only be called once.
Does that mean that calling [esp_nimble_hci_and_controller_deinit()][https://github.com/espressif/esp-idf/bl ... hci.c#L517] will disallow further calls to esp_nimble_hci_and_controller_init() ?
I am reading the ESP documentation [esp_bt_controller_deinit][https://docs.espressif.com/projects/esp ... ler_deinit] and it says that it can only be called once.
Does that mean that calling [esp_nimble_hci_and_controller_deinit()][https://github.com/espressif/esp-idf/bl ... hci.c#L517] will disallow further calls to esp_nimble_hci_and_controller_init() ?
Re: Nimble BLE Server
Hi @Alberk
Yes. Before starting adv, need to ensure the correct fields are set . So invoking ble_gap_adv_set_fields and ble_gap_adv_rsp_set_fields before ble_gap_adv_start is a good practice.
Please see attached sample application which does init / deinit in a loop. Hope this helps.for a second time even when all the teardown was done properly. I am getting a system panic when this is called a second time. Can someone confirm this? Thank you.
- Attachments
-
- patch_4.4.zip
- (987 Bytes) Downloaded 326 times
Re: Nimble BLE Server
I think the problem is resolved now but more testing needed. The system panic after the second time the `nimble_port_freertos_init(ble_host_task)` is called was caused by double release of a pointer.
Re: Nimble BLE Server
Hi Alberk,Alberk wrote: I think the problem is resolved now but more testing needed. The system panic after the second time the `nimble_port_freertos_init(ble_host_task)` is called was caused by double release of a pointer.
Is this Nimble code which is causing double release of a pointer or FreeRTOS code ?
Re: Nimble BLE Server
The double release of the pointer is in custom code, not in IDF or Nimble.
Who is online
Users browsing this forum: No registered users and 132 guests