4
votes

I'd like to know how many centrals a peripheral can simultaneously be connected to. My question is specific to iOS but I'd appreciate answers from everyone.

A couple things:

  • I'm aware that centrals, not peripherals, are designed to handle multiple connections. However I'd like to experiment with the opposite setup for various reasons. From the Bluetooth Core spec V4 -

"The Peripheral role is optimized for devices that support a single connection and are less complex than central devices. Devices supporting the peripheral role only require Controllers that support the Controller’s slave role. The Central role supports multiple connections and is the initiator for all connections with devices in the peripheral role. Devices supporting the central role require a Controller that support the Controller’s master role and generally supports more complex functions compared to the other LE GAP roles."

  • I've been successful in connecting 3 centrals to a peripheral with read/write transactions and each of the centrals subscribing to a notification for a characteristic. Unfortunately I don't have more devices to test this further. All devices used were various BLE-capable iOS devices running iOS 7.1.

  • The spec doesn't specify a theoretical limit to the number of peripherals that can connect to a central, but in practice people are reporting the limit to somewhere between 8 and 20. Does such a distinction exist for the opposite scenario?

Thank you in advance everyone.

2

2 Answers

3
votes

This isn't going to be the answer you were exactly looking for but I believe it might help.

Instead of trying to handle many connections, implement Core Bluetooth in a way that gives the illusion that you are connected to 20+ devices at the same time. Here's one way to do this:

When you discover a new peripheral, hold onto its identifier as a NSUUID. When you have data to send to a specific peripheral retrieve the peripheral using the NSUUID, connect to it, send the data, and cancel the connection as quickly as possible.

3
votes

According to article in AdaFruit

a BLE peripheral can only be connected to one central device (a mobile phone, etc.) at a time