Bluetooth master-slave start scan failed

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

3124.central.zip

Parents
  • Hi,

    Just to clarify:

    • Scan timeout = 0
      CONFIG_BT_EXT_ADV_MAX_ADV_SET=2
      CONFIG_BT_MAX_CONN=2
    • Scan timeout = 2
      CONFIG_BT_EXT_ADV_MAX_ADV_SET=2
      CONFIG_BT_MAX_CONN=2

    These configurations does not work?

    • Scan timeout = 2
      CONFIG_BT_EXT_ADV_MAX_ADV_SET=3
      CONFIG_BT_MAX_CONN=2

    This configuration does work?

    It looks like that there could be an implied dependency that increases BT_MAX_CONN to 3 if BT_EXT_ADV_MAX_ADV_SET is set to 3 which might be why the scanning starts with the last configuration.

    Let me know about the clarification question above, and I'll have a closer look

    Kind regards,
    Andreas

Reply
  • Hi,

    Just to clarify:

    • Scan timeout = 0
      CONFIG_BT_EXT_ADV_MAX_ADV_SET=2
      CONFIG_BT_MAX_CONN=2
    • Scan timeout = 2
      CONFIG_BT_EXT_ADV_MAX_ADV_SET=2
      CONFIG_BT_MAX_CONN=2

    These configurations does not work?

    • Scan timeout = 2
      CONFIG_BT_EXT_ADV_MAX_ADV_SET=3
      CONFIG_BT_MAX_CONN=2

    This configuration does work?

    It looks like that there could be an implied dependency that increases BT_MAX_CONN to 3 if BT_EXT_ADV_MAX_ADV_SET is set to 3 which might be why the scanning starts with the last configuration.

    Let me know about the clarification question above, and I'll have a closer look

    Kind regards,
    Andreas

Children
No Data
Related