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

Fully customize advertising data on SDKv15

Hello everyone,

I want to fully customize the advertising and scan response data of my application because the current SDKv15 does not support all of the Advertising Data Types defined by SIG (https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/)

So basically I want to do the same thing as this thread:

https://devzone.nordicsemi.com/f/nordic-q-a/8854/fully-custom-advertisement-data

but with the SDKv15 in which the function "sd_ble_gap_adv_data_set() has been removed from the SoftDevice API" (infocenter.nordicsemi.com/index.jsp

Has anybody achieved something similar?

Best Regards,

  • Hi,

    answering your questions:

    1. I was getting error 0x07 (NRF_ERROR_INVALID_PARAM)

    2. I'm migrating an old project to a nordic chip. And I need to replicate exactly the behaviour of the old product. Unfortunately the struct ble_advdata_t doesn't include the AD Types that I need.

    3. I'm using fast advertising

    But I have good news I got the advertising working as follows:

    //create the handle with macro
    BLE_ADVERTISING_DEF(m_advertising);
    
    //initialize advertising
    ble_advertising_init(&m_advertising, &init);
    ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
    
    //Update advertising data & start advertiser
    sd_ble_gap_adv_set_configure(&m_advertising.adv_handle, &m_adv_data, &m_advertising.adv_params);
    sd_ble_gap_adv_stop(m_advertising.adv_handle);
    sd_ble_gap_adv_start(m_advertising.adv_handle, APP_BLE_CONN_CFG_TAG);
    
    

    For me it looks like the function "ble_advertising_start" from "ble_advertising.c" cannot be used to start the advertiser if the function sd_ble_gap_adv_set_configure() is also used

    Thanks a lot for the great support!

Related