Hi Finn,
When initiating a connection, the initiator device must know the address of the advertising address. To get to know which adv device is nearby, we do scan to discover those adv devices.
But when we already know the adv address, e.g. if we just made a connection, and trying to disconnect + reconnect, we can assume the adv device is still there. In this case, we can skip the scan procedure, and directly issue a connect command to the presumed adv device address.
For your case, if you know all the adv device addresses, i.e. if they are hardcoded or somehow they are pre-shared, we can modify the BLE application to skip scan and directly enter initiating state. And it would probably save you lots of time in total.
I don't know how iPad is doing this, but normally in BLE, devices would remember the last connected addresses, and use them to fast-reconnect to existing nearby devices.
>> since at least in our use case there would surely be ample time to go back into scanning in those 3s
Please note that, the scanning device cannot know what is the peer devices adv interval. It can be anything from 3s to 300ms to 30ms. In the future BLE spec there will be a periodic adv feature introduced, but not in the current implementation. So standing at the scanner's point of view, it cannot say: "hey, we just receive a packet, the next one will come in 3s, so now we can do something else."
Unless if you control both ends of the BLE connection, then you can make assumption from system level, in that case some optimization could be assumed. But in general, Bluetooth is a public standard, when NXP is making a chip, we have to consider that it can be connected to any BLE chip made by any BLE vendors. So the "3s" assumption cannot be made.
But you are right it is technically possible to do (active/passive) scanning and initiating a connection simultaneously. In this case, if a packet arrives, the chip has to check on the fly that whether it is to be connected, or whether it is to be scanned. And if both conditions are met, which takes the priority. As you can see it would complicate the design a lot more, not as easy as it looks. To my knowledge it is not supported currently, but maybe a good idea to do in the future.
Kind regards,
Xiang