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

Updating advertising data between iBeacons and AltBeacons

I am able to switch between two beacon types i.e. iBeacon and a manufacturer's specific beacon when they are both the same length.  I am having trouble switching between an AltBeacon, 27 bytes in length and a 26-byte iBeacon.  It seems to crash the SD.  

I am able to switch once from AltBeacon to iBeacon, but then when I attempt to switch back to the AltBeacon, the payload is truncated, and an AltBeacon is not received/recognized. 

I am using these functions to update the advertising data.

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, NULL);
APP_ERROR_CHECK(err_code);

This is the v16 SDK.

Related