Hi devs, Having initiated an undirected scan with ble_gap_disc(), I would like to connect to my peripheral as soon as I spot it in the scan callback. However, calling ble_gap_conn_initiate() at this point fails with BLE_HS_EALREADY, as ble_gap_master is still in discovery mode. I need to stash the discovered peripheral, wait for the scan to finish, and then try to connect, which is unnecessary state management. Additionally, there doesn't seem to be a way to cancel the scan, so this becomes especially problematic if the scan is long-running.
For comparison, while advertising, an incoming connection automatically drops the slave out of advertising mode (which can be resumed immediately if you have enough connection resources). Is this an omission, or by design? Cheers, simon