Hello,
I've been having some connectivity issues w/ a multi-role application I'm working on. Essentially, whenever advertising is enabled, I am not able to establish a central connection w/ a peripheral device when I have scanning enabled. If advertising is disabled, I am able to connect every time. I am also able to establish a central connection to a peripheral if an external central (e.g. nRF Connect app) has connected to my application's peripheral role in which we then disable advertising. I can enable both advertising and scanning w/ no issues, but when the scanner sees a peripheral device that matches the scanning filter, the cb_data::filter_match callback fires, but I then see the following bt_hci_core warning bt_hci_core: opcode 0x2005 status 0x0c followed by the cb_data::connecting_error callback being invoked.
I have also been able to reproduce the error sending BT_HCI_OP_LE_SET_RANDOM_ADDRESS w/ the Central and Peripheral HRS sample app by setting CONFIG_BT_EXT_ADV=n in prj.conf and setting CONFIG_BT_EXT_ADV=n and CONFIG_BT_CTLR_ADV_EXT=n in ipc_radio.conf.
I also confirmed that enabling these kconfigs in my application resolves the BT_HCI_OP_LE_SET_RANDOM error as well.
Does this behavior make sense, even though I'm not using any of the extended advertising APIs?
Looks like the error we are receiving is expected looking at the code referenced here and the associated BLE spec: https://github.com/zephyrproject-rtos/zephyr/blob/0d7e0b8969b4d551f83fb13d7e0e80b6fdb89037/subsys/bluetooth/host/id.c#L154
Observed w/ nrf5340dk/nrf5340/cpuapp target, nRF Connect v2.9.0.