gingerdatum
gingerdatum

Reputation: 41

Can multiple ios apps on the same device connect to the same peripheral?

As of Bluetooth 4.2, one peripheral can connect to multiple centrals. So is it possible that multiple ios apps on the same device (acting as centrals) can connect to the same peripheral?

Upvotes: 2

Views: 1190

Answers (1)

Emil
Emil

Reputation: 18452

You don't need the new Bluetooth 4.2 for this. CoreBluetooth in iOS uses one single reference-counted connection to a BLE peripheral. The physical connection will be established when the first app connects to it. When the second app connects the peripheral won't even notice that another app has connected. Both can issue GATT commands and the peripheral can't decide which app that sent it. Notifications sent from the peripheral will be delivered to both apps (if you have registered notifications in both). When both apps has disconnected the peripheral, the physical connection will terminate.

Upvotes: 4

Related Questions