For Bluetooth® Low Energy (LE) connection-oriented applications, it’s common that one master device initiates and maintains connections with multiple slaves. As shown in Figure 1, you can see that one master, such as a smartphone, can connect with multiple slaves, such as a lock, light, thermal device, switch, and so on. The number of connections one master can provide depends on that master’s offering.
Figure 1 – The master initiates and maintains multiple slave connections
Recently, I was asked if it’s possible for one slave like a smartwatch to maintain connections with multiple masters, such as smartphones and laptops, and if it’s allowed in the Bluetooth specification.
Figure 2 shows the scenario with one smartwatch working as a slave. It maintains multiple connections with three smartphones and three laptops, even if all those connections are initiated by these masters.
Figure 2 – The slave maintains connections with multiple masters.
Yes, it’s allowed. The screenshot below (Figure 3) is from the Bluetooth Core Specification v5.1, Vol 6, Part B, Section 1.1.1, “Permitted state and role combinations” on page 2684.
Figure 3 – Screenshot from Bluetooth Core Specification v5.1
You can see from the red box in Figure 3, that a slave:
- Keeping a connection can also be in an advertising state
- Can have more than one connection with multiple masters
Figure 4, below, shows there are two masters: Master 1 and Master 2. Both of them connect with a single slave and are in the same time axis.
- Blue means that Master 1 establishes a connection with the slave, the connection interval is assigned from Master 1 to Slave
- M1->S means Master 1 sends packet to Slave and
- S->M1 means Slave responds to Master 1
- Green means that Master 2 establishes a connection with the slave, the connection interval is assigned from Master 2 to Slave
- M2->S means Master 2 sends packet to Slave and
- S->M2 means Slave sends packet to Master 2
The slave just has one transceiver, and this transceiver works as a half duplex. So, at the same time, only certain masters can communicate with the slave. In Figure 4, you can see that Master 1 and Master 2 alternatively communicate with the slave.
Figure 4 – Alternating communication between two masters and one slave
Figure 5 is different. In this instance, Master 2 adjusts the connection interval with the slave so there are two overlapped slots (red parts).
- Overlap 1: The slave is sending a packet to Master 1 while Master 2 is sending a packet to the slave
- Overlap 2: Master 1 and Master 2 are both sending packets to the slave
Figure 5 – Timing overlapped
While timing overlap is possible, there are three countermeasures to handle it. The countermeasures below are not defined in the Bluetooth Core Specification, but they may be useful for you.
Prioritize Connections: When a developer designs firmware for the slave, they should define a connection priority table on it to list the highest to lowest. Some Bluetooth LE SDKs (software development kits) also provide the priority table inline. Developers should check and see if the application requires a single slave to connect with multiple masters simultaneously.
Update Connection Parameters: If connections are prioritized, when there is an overlap, a slave can update connection parameters like Connection Interval, Slave Latency, and Supervision Timeout. Based on connection priority, the slave can adjust these parameters to avoid overlap conflict. For more detail on Connection Parameters Request, refer to Bluetooth Core Specification v5.1, Vol 6, Part D, Section 6.12, “Connection Parameters Request”.
Drop Connection: The updated connection parameter initiated by the slave may not be accepted by the master because the master has the authority to accept or reject. If the master rejects the updated connection parameter, the only thing the slave can do is drop the connection. The connection that is dropped depends on the connections’ priority. Lower priority connections can be dropped first, and higher priority connections can be kept.
Whichever you choose, it’s not about correct or incorrect, just whether it’s suitable or not for your application or system design. I hope it’s useful for all of you!
Enhancing Bluetooth Location Services with Direction Finding
A new Bluetooth direction finding feature allows devices to determine the direction of a Bluetooth signal, thereby enabling the development of Bluetooth proximity solutions that can understand device direction as well as Bluetooth positioning systems that can achieve down to centimeter-level location accuracy.