mynewt-nimble icon indicating copy to clipboard operation
mynewt-nimble copied to clipboard

Example of starting and stopping ble

Open alberk8 opened this issue 2 years ago • 2 comments

Is there any example of ble server/peripheral where the ble is stated, broadcast for a duration eg 90 seconds, then disposed/shutdown ble. Wait for 5 minutes create start broadcast again in this cycle.

alberk8 avatar Jul 25 '22 11:07 alberk8

Can someone please take a look at this implementation, it looks like the deinit does not release the TaskHandle_t host_task_h nimble_port_freertos_deinit()

Calling the nimble_port_freertos_deinit() again will crash the system.

alberk8 avatar Jul 27 '22 04:07 alberk8

You should set host_task_h to NULL inside the if statement. But Nimble also uses Timers and possibly a 2nd Task to run, so you should stop those as well.

bvdberg avatar Aug 17 '22 14:08 bvdberg