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

When is BLE_GAP_EVT_ADV_REPORT posted to the application?

I'm using nRF51 SDK 6.0.0 and wanted to know when an "advertisement packet received" event is posted to the application. It looks like within a scan window only one such event is posted irrespective of the actual number of advertisement packets received? Is this true? WIth an external BLE sniffer, many more adv packets were seen on all 3 channels than that reported on the intended receiver.

Additionally, is there a way to perform a certain set of actions for every adv packet seen by the BLE radio on the device?

I don't think I've seen a similar question elsewhere so apologies in advance if I missed something.

  • You get an advertisement packet received every time an advertisement packet is received. Just because a peripheral is sending out advertisements on all 3 channels and a BLE scanner, which is not the same as a central, is logging them, doesn't mean that a central sees any more than one of them, and the one it sees depends on the exact time it has its radio open and on what frequency.

    Once it's seen an advertisement packet it's perfectly reasonable to assume it stops scanning, reports the packet and then scans on the same, or a different, frequency at the same or different interval, in the hope of picking up advertisements from a different device so it can report them as well. A central is there to find all advertising devices, not find all advertising packets from one device.

    It's very possible for a slow advertiser and a slow scanner to advertise and scan for a long time before they happen to randomly meet each other. All that while your BLE scanner will be showing lots of bursts of advertising packets from the advertiser, but the central will only report one when it happens to see one.

Related