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

Unable to Receive Directed Advertisements

For some reason I'm not able to receive directed advertisements on the nRF51 development kit. I verified my nRF51 peripheral is sending the direct advertisement packets using the Sniffer tool, but the I don't see any BLE_GAP_EVT_ADV_REPORTS being generated on the central while its scanning.

The central does however see the advertisements if I configure them on the peripheral as connectable undirected.

I'm using SDK 10.0.0 for the peripheral and Windows BLE Driver 0.5.0 for the Central.

Thanks

  • Seems to be working fine here. Are you sure the device address and address type included in the advertising packet matches with the central you are sending to? The SoftDevice will only forward directed advertising events to the application with matching device address and address type.

  • Yes, I verified the Initiator address and the RxAdd bit using the sniffer tool and WireShark.

    Did you use a Win32 console application to control the Central? I'm wandering if my problem has something to do with that.

  • Yes. I used the Windows BLE Driver 0.5.0. Could you explain a bit more on how are you testing this?

  • Hi Petter, My peripheral is an nRF51 PCA10028 development board. My peripheral application code is based on your ble peripheral hrs example provided in SDK 10.0.0. But I'm not using the ble_advertising module which was used by the original hrs code. My application is interfacing directly to sd_ble_gap_adv_data_set and sd_ble_gap_adv_start.

    My Central is an nRF51 PCA10000 dongle connected to a Windows 10 notebook computer. The application code is based on the heart rate collector example code that came with the Win 0.5.0 BLE driver. The scan window is 50ms and the scan interval is set to 100ms. My application requires the Central to also broadcast beacons every 50ms, so I'm running a thread that alternates between sd_ble_gap_adv_start and sd_ble_gap_adv_stop every 25ms. However I don't believe this is related to my problem with the direct advertisements because I still cannot connect if I disable the beacons.

    If I switch the peripheral advertisements to connectable undirected with 20ms adv interval, my central receives the advertisements and my application is able to connect using sd_ble_gap_connect. So it appears my central scanning is working.

    By the way, when scanning for direct advertisements, is it up to the application to examine the peer_adr in the adv report and determine if the advertisement is targeted for him, or does SoftDevice do this automatically?

  • It is not up to the application, the SoftDevice will only forward directed advertising events with matching device address. If you are absolutely sure that you are using the correct device address? Could you explain to me how you extract it from the central, and how you add it to the peripheral?

Related