documentation for bt_le_filter_accept_list_add unclear

The documentation at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/gap.html#c.bt_le_filter_accept_list_add is unclear. When can I call this function? Do I need to stop scanning and advertising before calling it? An example would be good.

What I want to achieve: I'm running the nRF5340 in central mode, and I pair and bond multiple other BLE devices. I would like to auto connect to these devices, if possible.

I also looked at bt_le_set_auto_conn, but can't use this, since I'm also using our own scan filter callback function, which filters for other criteria as well, for connecting to non-bonded devices.

My current solution is to check the settings in this scan filter callback, if the device is bonded, and then connect. Was just wondering if this is somehow possible automatically.

Related