Hello.
I am using KW38 BLE with SDK 2.6.6 on both central and peripheral devices. Currently the central is using continuous scan, that is, is calls the following API:
App_StartScanning(&gScanParams, BleApp_ScanningCallback, gGapDuplicateFilteringDisable_c, gGapScanContinuously_d, gGapScanPeriodicDisabled_d);
with
gapScanningParameters_t gScanParams =
{
.type = gScanTypePassive_c,
.interval = 3200,
.window = 1600,
.ownAddressType = gBleAddrTypePublic_c,
.filterPolicy = gScanAll_c,
.scanningPHYs = gLePhy1MFlag_c
};
That is, scan window is 1 second and interval is 2 second. It works fine.
Now my need is to use finite duration for scanning and have it stopped after one period. Ideally, I would like to stop after the scan window is over. I modified the API call this way:
App_StartScanning(&gScanParams, BleApp_ScanningCallback, gGapDuplicateFilteringDisable_c, 100, gGapScanPeriodicDisabled_d);
but the scan never stops. I tried the following values: 100, 101, 200, 201, 1000, always without success.
Please help to make scan periodic.