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

How to filter if a peripheral is a Beacon

Hi,

I am currently trying to implement a beacon scanner and want to filter out all advertisements except beacons. Is there something in the beacon advertising packet that specifically identifies the peripheral as a beacon? Or do I have to implement some form of workaround to pick up any of my beacons? I have noticed nRF Connect for mobile identifies the beacon as a beacon and want to do the same in my application.

I am running 2 nRF52 Thingys - 1 with the example beacon application and 1 with a slightly modified ble_app_blinky_c example. Both are on SDK16.0.0, S132 7.0.1.

Many Thanks,

  • Hi Ben, 
    Which beacon standard are you advertising with ? 
    There isn't a filter that the softdevice offer to filter out only "beacon" advertising packet. 
    The filtering should be done in the application. You need to catch BLE_GAP_EVT_ADV_REPORT event and then process the advertising packet to find the devices you are looking for. 
    If you use our scan module in the SDK, there are some filters offered (still it's in the application level) for example filter using UUID, advertising name, etc. 

    If the beacon has the data in manufacturer data you would need to parse that in your application to detect. 

  • Hi Hung,

    I am advertising using the iBeacon standard.

    Your answer is clear and makes sense. I will add in my own filters on receipt of the BLE_GAP_EVT_ADV_REPORT event.

    Thanks!

Related