If I understood the Link Layer correctly, it is always exactly in one of the five states "Standby", "Advertising", "Scanning", "Initiating", or "Connected". So how is it possible that I can connect to two devices simultaneously? When I am connected to one device, the Link Layer is in "Connected" state. To connect to another device, it would have to switch to "Initiating" or "Advertising" state (depending on its GAP role), while maintaining the "Connected" state to the already connected device. But then it is in two states simultaneously, which is forbidden.
Where am I wrong?
You are correct in your understanding of the Link Layer states; this is demonstrated in a figure in the Core Specification (1):-
However, the specification also states that the Link Layer may optionally support multiple state machines as follows (2):-
- The Link Layer in the Connection State may operate in the Master Role and Slave Role at the same time.
- The Link Layer in the Connection State operating in the Slave Role may have multiple connections.
- The Link Layer in the Connection State operating in the Master Role may have multiple connections.
- All other combinations of states and roles may also be supported.
- The Link Layer in the Connection State shall have at most one connection to another Link Layer in the Connection State.
The table below lists a couple of possible combinations of Link Layer states (3):-
I hope this helps.
- Bluetooth Specification, Version 5.0, Vol 6, Part B, General Description, Page 2553
- Bluetooth Specification, Version 5.0, Vol 6, Part B, General Description, Page 2554
- Bluetooth Specification, Version 5.0, Vol 6, Part B, General Description, Page 2555