We used the continuous BLE scan with KW41Z and looks like it randomly stops scanning after 1-3 days. Could you please have a look:
kw41z with UART interface
1) Power reset
02 47 1A 08 00 01 00 A0 00 A0 00 00 00 54
GAP-SetScanMode.Request is not set and used default scan settings. We can see the scan results for 2 days continuously in the callback function of FSCI framework. Randomly, after few days, it stops. Then we have to do the power reset to start the scan again. Scan off and on is not helping either, Could you please have a look on this jcpacheco
I checked it with j-link, and I believed there is one hardware issue existed. You can download latest SDK, and search scan fifo related coding. NXP patched it, and this patch should fix scan failure.
We've identified this issue on KW41Z and is under investigation. We'll let you know as soon as there's a conclusion and possible fix.
Can you try sending a controller reset and re-configure your scan parameters once a day and check if that mitigates the issue? Note that this should be just as a temporal workaround until we find a better one.
ycwang tells latest SDK have a fix for this issue. Can NXP confirm it?
* Can NXP tell which specific files need to be merged back in our older projects if we want to fix this issue?
* Does pre-built libraries need to be updated too?
We are using BlueZ behind HCI interface and scan only last few minutes, I think this may be linked to this issue. The only weird workaround I found is to connect to a device, this restore scan for a while.
Replying myself, I can say very latest KSDK (*1) contains code related to this issue in its bluetooth stack 1.2.6:
/* Scan FIFO lockup detection interval in milliseconds. If no advertising frame is reported over this period of time, then the scan FIFO is flushed and the scan is restarted. This value needs to be increased if: - few advertisers or - few frames reported after frame filtering using the white list or - scan window is much smaller than the scan interval */ #ifndef mScanFifoLockupCheckIntervalMilliSeconds_c #define mScanFifoLockupCheckIntervalMilliSeconds_c 2500 #endif
/* Scan FIFO lockup detection interval in milliseconds. */ uint32_t gScanFifoLockupCheckIntervalMilliSeconds = mScanFifoLockupCheckIntervalMilliSeconds_c;
Uses uint32_t gScanFifoLockupCheckIntervalMilliSeconds external symbol
(*1) By very-latest KSDK, I mean KSDK 2.2.0 from September 2018. Release date is very important because I downloaded an older KSDK 2.2.0 last mid-July which actually embeds bluetooth stack 1.2.5 without this fix. it looks like KSDK is getting updated without having it numbering increased.
I tested this workaround on a four-hour BLE scan with Linux BlueZ, without any issue where I previously had issues within an hour.
Sen mentions they have tried resetting the KW41Z but the BLE scan issue is more frequent now. Sometimes they see it in an hour. Please advise on the status of a workaround.