Scan window is shorter than expected on nRF52840, NCS v2.7.0

Good morning, I am working with two nRF52840 devices, running on a custom board. One acts as Central and Peripheral, the other as Peripheral only.

I am in the process of upgrading NCS from v2.6.0 to v2.7.0. I use Linux through WSL.

On v2.7.0, I have noticed that when the dual role device is disconnected from the Peripheral, it is taking longer to scan and connect to it compared to NCS v2.6.0 (1+ minute compared to ~20 seconds).

When I print scan results on the dual role device, I can see that it doesn't detect as many advertisement packets. On the other hand I am reliably able to scan for the Peripheral advertisement packets when scanning from another device.

The following are the scan parameters on my dual role device:

/* Scan interval unit multiplier used in Zephyr interface */
#define SCAN_INTERVAL_MULTIPLIER 0.625f

/* Scan interval, in ms */
#define SCAN_INTERVAL 10000

/* Scan window, in ms */
#define SCAN_WINDOW 1050

/* Scan timeout, 180 seconds. Set value to 0 to disable */
#define SCAN_TIMEOUT 180000

When taking a look at the current measurements across the two builds, I can see that the NCS v2.6.0 build scan window is of the correct length, 1050 ms, as shown in the image below:

However, the scan window on the NCS v2.7.0 build is a magnitude shorter, which aligns with the behaviour I'm observing:

The scan interval of 10 seconds can be observed in both builds.

I'd appreciate some help with this issue.  

  • David, can you please compare the .config file in the build folder from both older and newer sdk.

    It might be possible that some of the default config values might have changed? Not sure. 

    I am hoping that this difference in behavior is something that is not coming from the MPSL timeslot usage of the softdevice controller which would be very hard for me to debug and explain. So let us first assume that there is simpler explanation for this that we can try to get from the differences in the .config files from your build folders.

Related