Beacon Scanner Events

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Beacon Scanner Events

1,341 Views
tim_adkins
Contributor I

I am working on a beacon scanner for the KW30Z – actually iBeacons. I got it to recognize iBeacons, but it only scans for a short period of time and stops – like maybe one round of all the beacons in the area. In fact when I removed one from the area and then brought it back later, it did not trigger an event for the new beacon. mScanningOn stays set and Gap_StopScanning() doesn’t get called. It requires a Gap_StopScanning() and another App_StartScanning() for it to find the beacons again. It wasn’t doing this at first, but I had other problems and have changed other things which shouldn’t affect this.

Is there a setting that causes it to only trigger one event for a particular scanned device?
If yes, is it keeping a list of them somewhere? How do I access it? Can I set filtering up for what it keeps on the list? Can I set up a timeout for how long they are kept on the list?

I have my own code on this stuff, but if there is something built in, I should probably use it.

Labels (1)
Tags (1)
0 Kudos
1 Reply

829 Views
alexandruandree
NXP Employee
NXP Employee

Hi Tim,

The current implementation does indeed filter duplicate ADV events. This is done inside the controller and is based on the ADV address which is stored during scanning. This option is enabled at scan time and the GAP layer always enables it (check LE Set Scan Enable Command in the Bluetooth spec). For your use case, I recommend using the HCI app, in which you can set this flag. you will also be able to filter any event based on your custom fields. The BLE HCI app will send HCI commands and events on a serial port, but you can modify it to process them before they are sent over UART. Check Hcit_SendPacket and Hcit_RecvPacket.

Hope this helps,

Alex

0 Kudos