Hi, guys:
I'm configuring a custom board based on nRF52840. I configured it as a beacon and need to broadcast the advertising package with updated Major and Minor values.
Currently, I'm using the SDK with version nRF5_SDK_16.0.0_98a08e2, the original example is this one: ble_app_beacon.
in this document: s140_nrf52 migration document, it says:
sd_ble_gap_adv_data_set() has been removed.
A new API, sd_ble_gap_adv_set_configure(), has been added with the following functionalities:
Configuring and updating the advertising parameters of an advertising set.
Setting, clearing, or updating advertising and scan response data.
In the example firmware, this is basically three steps to broadcast:
1, encode the package, 2, configure the package (with above API), 3, start advertising.
namely:
initiate with:
err_code = ble_advdata_encode(&advdata, m_adv_data.adv_data.p_data, &m_adv_data.adv_data.len); APP_ERROR_CHECK(err_code); err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &m_adv_params); APP_ERROR_CHECK(err_code);
and start with:
advertising_start(void)
I tried calling the new API after the new major and minor value is ready without restarting the advertising, but it advertised package stays the same as before.
Anybody can give some suggestions?