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

DEVICE FAILED TO READ SCAN RESPONSE IN SDK 15

Hi All,

I am developing a BLE central peripheral application by using ble_app_hrs_rscs_relay (nRF5_SDK_15.0.0_a53641a & s140 softdevice) on nRF52840 DK board.

My issue is that, I didn't get any scan response from other devices.

I have sniffered the incoming and outgoing packets from device 1 while it is in scanning mode, then I didn't find any SCAN_RESPONSE  to that device. Then I sniffed device 2's incomig and outgoing packets while in advertising mode, then I found that, the device 2 sent SCAN_RESPONSE when it gets SCAN_REQUEST.

Scan parameters are 

/**@brief Parameters used when scanning. */
static ble_gap_scan_params_t const m_scan_params =
{

//Tried extended = 0 also
.extended = 1, 
.active = 1,
.interval = 0x00A0,
.window = 0x0050,
.timeout = 0x0000,

//tried .scan_phys = BLE_GAP_PHY_AUTO
.scan_phys = BLE_GAP_PHY_1MBPS,

//Tried different filter_policy 
.filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
};

You can simply reproduce this issue  by using ble_app_hrs_rscs_relay example.

Step 1: Add scan response data in advertisement 

static ble_advdata_manuf_data_t manSpecDataInScanResp = 
{
.company_identifier = 0xFFFF,
.data.p_data = (uint8_t*)"1234567890",
.data.size = sizeof("1234567890")
};
static int8_t tx_power = 0;

init.srdata.p_tx_power_level = &tx_power;
init.srdata.p_manuf_specific_data = &manSpecDataInScanResp;

Step 2: Check scan response data by print log or use ble sniffer

  case BLE_GAP_EVT_ADV_REPORT:
{
if(p_gap_evt->params.adv_report.type.scan_response == 1)
{
NRF_LOG_INFO("Scan response");
}
else
{
// on_adv_report(&p_gap_evt->params.adv_report);
}
} break; // BLE_GAP_ADV_REPORT

Please give me updates

Related