Topics

#ble Refresh advertising data after disconnect #ble


Johan Hedberg
 

Hi Robert,

On 14 May 2019, at 18.18, robert.konc@... wrote:
In disconnect callback event I was try to update advertising data but function "bt_le_adv_update_data" return with -11 (error code).
As I understand BLE stack start to advwrise after disconnect automaticly. Is there and event or callback function that indicate this.
I can not use disconnect event because this event is fired befor stack start to advertise.

Any suggestion?
You could try using BT_LE_ADV_OPT_ONE_TIME with bt_le_adv_start(). That should ensure that the stack doesn’t automatically restart advertising after a disconnection event.

Johan


robert.konc@...
 

In disconnect callback event I was try to update advertising data but function "bt_le_adv_update_data" return with -11 (error code).
As I understand BLE stack start to advwrise after disconnect automaticly. Is there and event or callback function that indicate this.
I can not use disconnect event because this event is fired befor stack start to advertise.

Any suggestion?

Best regards