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

updating advertising packet

hi ..i tried this , by seeing various post related to this.. i am getting error in ble_advdata_set()

static void advertisement_update(void)
{
    uint32_t      err_code;
    ble_advdata_t advdata;

    // Build advertising data struct to pass into @ref ble_advertising_init.
    memset(&advdata, 0, sizeof(advdata));

    advdata.name_type               = BLE_ADVDATA_FULL_NAME;
    advdata.include_appearance      = true;
    advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    advdata.uuids_complete.p_uuids  = m_adv_uuids;

    //New part
    ble_advdata_manuf_data_t manuf_specific_data;
    memset(&manuf_specific_data, 0, sizeof(manuf_specific_data));
    manuf_specific_data.data.p_data = value;
    manuf_specific_data.data.size  = 15;
    advdata.p_manuf_specific_data = &manuf_specific_data;

    err_code = ble_advdata_set(&advdata, NULL);
    APP_ERROR_CHECK(err_code);
}

Related