Working on a project that is built on the SimpleBLECentral example project. Currently stuck trying to get it to return an advertiser whenever it is discovered, regardless of whether the address has already been discovered in the current scan.
I found the GAP parameter "TGAP_FILTER_ADV_REPORTS" that sounds like it does exactly what I'm looking for. From 'gap.h':
#define TGAP_FILTER_ADV_REPORTS 35 //!< Filter duplicate advertising reports. Default TRUE.
So in 'simpleBLECentral.c' in the 'SimpleBLECentral_Init' function I override the default and force TGAP_FILTER_ADV_REPORTS to FALSE using the 'GAP_SetParamValue' function. With breakpoints immediately before and after the scan I checked the value of TGAP_FILTER_ADV_REPORTS using 'GAP_GetParamValue' to ensure it hadn't been overwritten after my assignment, but it appears to remains FALSE.
I also set TGAP_GEN_DISC_SCAN to 3000 to allow for 3s scans, and TGAP_GEN_DISC_SCAN_INT and TGAP_GEN_DISC_SCAN_WIND to 160 (160 * 0.625 = 100ms) to ensure that during those 3s there is a lot of scanning going on. I currently have our advertiser cranked up to advertise every 100ms and with these scan characteristic it can detect multiple advertisers reliably within the first second of the 3s window, so I'm sure the CC2541 is receiving more then one message when in an environment with a single advertiser.
The scan is initialized by 'GAPCentralRole_StartDiscovery( DEVDISC_MODE_ALL, FALSE, FALSE);' and I'm pulling data directly from the 'GAP_DEVICE_INFO_EVENT' case in the 'simpleBLECentralEventCB' function, but I'm only seeing a single detect for each unique advertiser per scan request.
From what I can tell 'GAPCentralRole_StartDiscovery' is my call into the stack, and the 'GAP_DEVICE_INFO_EVENT' is the first output I should get whenever an advertiser is discovered, so I'm at a loss as to what is going on or how to achieve the desired behavior where I will be able to see multiple 'GAP_DEVICE_INFO_EVENT's for an advertiser within the same scan.
Thanks