Hi,
All the iBeacon sources are close the the KW41Z (ble_fsci_black_box received rssi ~65dBm) and all the sources transmit iBeacons at 100ms transmit interval.
When we have more than 3 iBeacons sources are active, then KW41Z with ble_fsci_black_box binary get all the scan results as expected.
If we enable only one iBeacon source, kw41z returns only one scan result when we enable the ble scan. Then it does not give any scan results for several minutes (1-15 mins).
If we have many beacon sources, then we do see all the scan results as expected.
Is there any filtering mechanism inside the ble_fsci_black_box firmware?
Thanks
Sen
BLE SCAN reported every 30 mins, when only one iBecon source is present
17:58:10.772: iBeacon: rssi=-52 addrType=0 payldLen=30 major=257c minor=6e73
18:26:13.777: iBeacon: rssi=-50 addrType=0 payldLen=30 major=257c minor=6e73
18:48:09.882: iBeacon: rssi=-49 addrType=0 payldLen=30 major=257c minor=6e73
19:20:08.653: iBeacon: rssi=-51 addrType=0 payldLen=30 major=257c minor=6e73
Solved! Go to Solution.
Could be caused by the BLE Scan duplicated filter. Try to disable the filter and test again.
Please check function:
Gap_StartScanning(pScanningParameters, App_ScanningCallback, enableFilterDuplicates);
This function is normally called via App_StartScanning()
Pass the last parameter as "FALSE" for enableFilterDuplicates, like this:
App_StartScanning(&gScanParams, BleApp_ScanningCallback, FALSE);
Could be caused by the BLE Scan duplicated filter. Try to disable the filter and test again.
Please check function:
Gap_StartScanning(pScanningParameters, App_ScanningCallback, enableFilterDuplicates);
This function is normally called via App_StartScanning()
Pass the last parameter as "FALSE" for enableFilterDuplicates, like this:
App_StartScanning(&gScanParams, BleApp_ScanningCallback, FALSE);
Thanks, that was the issue. The FSCI API is not exposing the "duplicate filter".
Do you know, in ble_fsci_black_box, where the call Gap_StartScanning is defined as TRUE?
Hi Sensenthuran,
Can you be more specific on which "FSCI API is not exposing the duplicate filter". Provide more info in 1 go would save time for both of us.
If you are using FSCI, probably on the PC side you are using the Test Tool GUI?
Check this link for more info:
https://community.nxp.com/thread/465030
I did a quick check and in Test Tool you can see the parameter of control duplicate filter.
Yes, test tool has it. I am using
\hsdk-c\inc\cmd_ble_1.2.8.h
typedef struct GAPStartScanningRequest_tag {
bool_t ScanningParametersIncluded; // Boolean value which indicates if scanning parameters are included or not
struct {
GAPStartScanningRequest_ScanningParameters_Type_t Type; // Scanning type - default passive
uint16_t Interval; // Scanning interval - default 10ms
uint16_t Window; // Scanning window - default 10ms
GAPStartScanningRequest_ScanningParameters_OwnAddressType_t OwnAddressType; // Indicates whether the address used in scan requests will be the public address or the random address - default public address
GAPStartScanningRequest_ScanningParameters_FilterPolicy_t FilterPolicy; // Indicates whether the advertising packets are filtered using the White List - default does not use White List
} ScanningParameters; // The scanning parameters
} GAPStartScanningRequest_t
Thanks for pointing this out.
I think the root cause is that your BLE stack version is not to the latest. Currently I can see in the QN908x SDK the BLE version is 1.5.4.
But when I download the latest KW41Z SDK, its BLE version is still 1.2.8.
The ".h" file is generated from a xml file.
And if I do a diff between the xml files, I can see the duplicatefilter parameter has been added in the later version of BLE xml. See picture below.
But why the BLE software component are not kept the same between QN908x and KW41Z, that I have no idea.
Do you already have a workaround for this issue? E.g. you may hardcode the parameter in GAP to force the duplicatefilter to be true or false.
Yes, I got the workaround.
It would be great, if I can change the default value in the ble_fsci_blackbox and build the binary again. Do you know where it is defined?
I am not sure what do you mean by "I got the workaround". So what is the workaround you have already? If it works, just keep it that way.
What I would do is to search for Gap_StartScanning(), and pass a hardcoded FALSE for the input parameter "enableFilterDuplicates", as I pointed out in my 1st post.
+++ b/hsdk-c/src/cmd_ble_1.2.8.c
Added extra byte in GAPStartScanningRequest to disable filter.