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

Update data of extended advertisement (BLE5)

Hello

I would like to use the extended advertisement feature of BLE 5 and sometimes update the data.

My code works but there is one of your functions which returns me an error code which disturbs a little.
When I call the "ble_advertising_advdata_update(...)" function, there is function "sd_ble_gap_adv_set_configure(...)" which returns error 9 (NRF_ERROR_INVALID_LENGTH).

I notice that if adv_data is smaller than 32 bytes, I have no error but if it is larger then I have error 9 ...

However I use the "extended" functionality so I should be able to exceed 31 bytes of adv_data right?



Parents
  • Hi

    sd_ble_gap_adv_set_configure() only returns error 9 (NRF_ERROR_INVALID_LENGTH) if the advertising data length is invalid, so in your case, I assume the extended advertising parameter isn't "activated" upon recalling this function. I think you might have to uninitialize and reinitialize the advertising module altogether when going from BLE4 to BLE5 advertisements in order to ensure that extended advertising is initialized correctly.

    Best regards,

    Simon

Reply
  • Hi

    sd_ble_gap_adv_set_configure() only returns error 9 (NRF_ERROR_INVALID_LENGTH) if the advertising data length is invalid, so in your case, I assume the extended advertising parameter isn't "activated" upon recalling this function. I think you might have to uninitialize and reinitialize the advertising module altogether when going from BLE4 to BLE5 advertisements in order to ensure that extended advertising is initialized correctly.

    Best regards,

    Simon

Children
Related