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

SoftDevice s110 AND s130 have issues with scanResponse in advertisement?

I know that SoftDevice 110 is old but I am stuck with it as it is on a production device with nRF51822. For some reason when I call sd_ble_gap_adv_data_set() with a non NULL value of the parameter uint8_t const * const p_sr_data which is the scan response, no advertisements are sent. In the sd_ble_gap_adv_start(ble_gap_adv_params_t const * const p_adv_params)) I do try with the type set to BLE_GAP_ADV_TYPE_ADV_SCAN_IND. If I set the scan response to NULL and the type to BLE_GAP_ADV_TYPE_ADV_IND then I do get advertisements.

The application is using the bond manager which may have something to do with it. I do not know what version of the SDK is being used, though I have asked and will hopefully get an answer. Is there a known issue with s110 and scan responses?

Now I have moved to s130 and the same issue is present. I have duplicated the flags and local mane in the scan response data and still it does not work. However, if I set the scan response data to NULL and the length to 0 advertisements DO work. The response to a scan request happens, but it is empty. 

I have tried in the start method using both g_adv_params.type = BLE_GAP_ADV_TYPE_ADV_IND;  and g_adv_params.type = BLE_GAP_ADV_TYPE_ADV_SCAN_IND; 

Neither work if the set function  sd_ble_gap_adv_data_set(uint8_t const *p_data, uint8_t dlen, uint8_t const *p_sr_data, uint8_t srdlen)

is

sd_ble_gap_adv_data_set(data_buffer, index, scan_rsp_buffer, scan_index);

Both work if the set function is

sd_ble_gap_adv_data_set(data_buffer, index, NULL, 0);

Parents Reply Children
  • The same text appears in all the 'h' files and SoftDevice API docs that I have read. The funny thing when I use the pc-ble-driver for the nRF52840 dongle I duplicated the flags and local name in the scan response and it worked. Since that was my first experience with Nordic chips I assumed my interpretation of the documentation was correct and I carried that code to this.

    In desperation I started looking at the SDK to try and find out what was wrong and stumbled on that comment. Solved the problem but it seems the 'limitation' no longer applies in s140 v 6. Or at least if one uses the pc-ble-driver.

Related