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

Non constant scan response

Is it possible to change data send in scan responses after each Advertising Event? I know that sd_ble_gap_adv_data_set() has constant input arguments, but it seems weird for me that I can't change it. Maybe there is some smooth solution for this problem? I'm useing nrf51822, SDK11, sd130 V2

Parents
  • You can always make subsequent calls to sd_ble_gap_adv_data_set() with another set of data. (The const indicate that the function will not change the array you supply, not that you cannot update it and call sd_ble_gap_adv_data_set() again).

    There is no event in the current SoftDevice that indicate that an advertising event has occurred. However, you can use Radio notification to be notified every time the radio is used, and change the advertising data at that time. If your device does not have any connection, the only radio TX activity will be due to an advertising event.

Reply
  • You can always make subsequent calls to sd_ble_gap_adv_data_set() with another set of data. (The const indicate that the function will not change the array you supply, not that you cannot update it and call sd_ble_gap_adv_data_set() again).

    There is no event in the current SoftDevice that indicate that an advertising event has occurred. However, you can use Radio notification to be notified every time the radio is used, and change the advertising data at that time. If your device does not have any connection, the only radio TX activity will be due to an advertising event.

Children
Related