I have written a master-slave program based on NCS 2.2.0 and use nRF52840 board.
Firstly, I turned on two broadcast frames and set the scan timeout to 0. This successfully enabled scanning. Here is my configuration.
CONFIG_BT=y CONFIG_BT_CENTRAL=y CONFIG_LOG=y CONFIG_LOG_PRINTK=y CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=5122 CONFIG_BT_EXT_ADV=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_LL_SW_SPLIT=y CONFIG_BT_EXT_ADV_MAX_ADV_SET=2 CONFIG_BT_MAX_CONN=2
But when I set the scan timeout to 2s, the scan fails to start.

At this point if I set CONFIG_BT_EXT_ADV_MAX_ADV_SET to 3, I can successfully start the scan.
What I can't understand is what scanning has to do with CONFIG_BT_EXT_ADV_MAX_ADV_SET? Or there is some other reason why the scan failed to start?
Attached is my test sample

