We are trying to update the BLE Advertisement using ble_advertising_advdata_update, the function seems to always return 0x3200 and ble_gap.h:178 tells me its a BLE_ERROR_GAP_UUID_LIST_MISMATCH.
We are using two static allocated buffers, mentioned in https://devzone.nordicsemi.com/f/nordic-q-a/32824/dynamically-updating-advertising-data-in-sdk-15
We initialized the advertisement with ble_advertising_init and started with ble_advertising_start and the advertisement works perfectly except for updating the advertisement.
void on_update_advertisment(void) { ble_gap_adv_data_t * p_adv_data = NULL; // check which buffer is used if (m_advertising.adv_data.adv_data.p_data == m_beacon) { p_adv_data = &adv_data1; } else { p_adv_data = &adv_data2; } /** change some data in advertisment buffers **/ ret_code_t ret = ble_advertising_advdata_update(&m_advertising, p_adv_data, true); APP_ERROR_CHECK(ret); // 0x3200 }
We are using SDK 15.3.0, Softdevice S340 v6.1.1, Developing with Visual Studio VisualGDB
Hope someone has a suggestion on how to do this properly, for now we will stop/start-ing the advertisement, which works perfectly.