This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using ble_advertising_init in order to update advertising/response data

I'm currently trying to update data periodically in the advertising response packet. After successfully initializing and starting advertising, I configure srdata within a ble_advertising_init_t struct to contain my desired manufacturer data. However, the function "sd_ble_gap_adv_set_configure" within "ble_advertising_init"  yields error 8 which to my understanding indicates "NRF_ERROR_INVALID_STATE". I have tried implementing changes according to ble_gap.h yet the error still persists. Could I get some more clarification on these points from ble_gap.h:

* @retval ::NRF_ERROR_INVALID_STATE                   Invalid state to perform operation.
 *                                                     - It is invalid to provide non-NULL advertising set parameters while advertising.
 *                                                     - It is invalid to provide the same data buffers while advertising. To update
 *                                                       advertising data, provide new advertising buffers.

Also, is there a better way to update the advertising response packet?

Thanks in advance.

Parents Reply Children
No Data
Related