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

iBeacon format Major/Minor or UUID can not be dynamically updated?

=======

SDK: 15.3

Product all base: ble_app_template

Problem: cannot update iBeacon content dynamically during system run-time.

=======

we try to use ADV with ibeacon after beacon start-up,
and then dynamically change ibeacon's Major/Minor version to iphone/android by using
    //stop advertising
    err_code = sd_ble_gap_adv_stop(m_advertising.adv_handle);
    APP_ERROR_CHECK(err_code);
    
   // enable configure
    err_code = sd_ble_gap_adv_set_configure(&m_advertising.adv_handle, &m_adv_data, &m_advertising.adv_params);
    APP_ERROR_CHECK(err_code);
    //start advertising
    err_code = sd_ble_gap_adv_start(m_advertising.adv_handle, APP_BLE_CONN_CFG_TAG);
    APP_ERROR_CHECK(err_code);
where changed adv is like
static ble_gap_adv_data_t m_adv_data = // this one is fail at  sd_ble_gap_adv_set_configure  with error 4
{
    .adv_data =
    {
        .p_data = m_beacon_info, // this is a new change run-time.
        .len    = APP_BEACON_INFO_LENGTH;  // 21B)
    .scan_rsp_data =
    {
        .p_data = NULL,
        .len    = 0

    }
};
but it seems to fail at run-time dynamically change ibeacon format.
Can u help confirm by ble_app_ibeacon example.
But it this adv pattern change to 
static ble_gap_adv_data_t m_adv_data  =  // this one can be workable and ADV changeable.
{
    .adv_data =
    {
        .p_data = enc_adv_data_buffer,  // customer infomation
        .len    = BLE_GAP_ADV_SET_DATA_SIZE_MAX ;  // 31B which is BLE default ADV pattern 
    },
    .scan_rsp_data =
    {
        .p_data = NULL,
        .len    = 0

    }
};
to sum up, it seems we can not change ibeacon format content dynamically but we can 
change ADV content if we use default BLE beacon (31B format); is that true?
Leo
Parents Reply Children
No Data
Related