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

Parsing scan response with SDK 15.3

Hi everybody,

I am using nRF52832/40 with SDK 15.3 and softdevices S132/S140 v6.1.1.

One of my devices is performing active scanning, therefore sending scan requests, and the other one is replying with scan responses.

I can see clearly that this is happeing correctly using your BLE sniffer for Wireshark (btw, great tool!).

I am able to set the scan request and parse it on the peripheral side.

I am able to set the scan response, but I'm not able to parse it on the central side, and this is what I'd like to do. 

This is a snippet from my code:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
static void on_adv_report(ble_gap_evt_adv_report_t const * p_adv_report)
{
if (p_adv_report->type.scan_response)
{
// Parse scan response packet here
led_blink(2,1,200); //This is just for debugging
}
else
{
// Parse advertising packet here
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

It seems like I'm never entering the first if, where scan response packets should be handled, while I'm always entering the second one (for regular advertising packets).

What am I doing wrong?


Thank you very much!

Parents Reply Children
  • Hi Hung, 

    thanks. I removed the previous answer because I noticed that the modified ble_app_multilink_central was correctly showing scan responses.

    Now I have to understand why I cannot catch them in my project. 

    Thank you for your help! I'll keep you posted.