I am using the freertos_ble_peripheral_server_bond example. The aim is to be able to maintain one ble connection while advertising three different advertisement data sets. To achive this, I would like to change the advertisement data dynamically, on the fly. I used struct gapm_update_advertise_data_cmd updateAdvCmd and set the new data with GAPM_AddAdvData() , the same way it is done in the example with struct gapm_start_advertise_cmd advertiseCmd and GAPM_AddAdvData() . But the advertisement data is not updated, I am using a BLE sniffer to check the advertisement data.
Do I need to set any flag or call a function to notify the BLE stack that new advertisement data is available?
Is it even possible to change the advertisement data on the fly with this example, if not why?
I am new to FreeRTOS, is it possible to have more than one BLE_thread?
Any helpful comment would be highly appreciated!