Noodles
Noodles

Reputation: 197

Is it possible to establish multiple BLE connections to one GATT-Server?

Is it possible to have multiple GATT-clients connecting to one GATT-server?

For example, a sensor can be the GATT-server. And I want to have multiple smartphones connecting at the same time, in order to access different services stored on the sensor.

I checked the Core Specification for Bluetooth but can't find any helpful info.

Thanks in advance!

Upvotes: 7

Views: 4974

Answers (1)

Nipo
Nipo

Reputation: 2917

GATT is symmetrical. There is a GATT DB on central, and a GATT DB in peripheral.

As a GATT db also exists on central (master), i.e. your phone. It should respond to multiple clients at the same time (peripherals connected to it). Most of the time, peripherals dont interact with their central's GATT db, though.

Now for a peripheral accepting connections from multiple centrals.

At LE Link-layer level, see Core 4.2, 6.B.1.1.1:

The Link Layer may optionally support multiple state machines. If it does support multiple state machines, then:

  • [...]
  • The Link Layer in the Connection State operating in the Slave Role may have multiple connections.
  • [...]
  • All other combinations of states and roles may also be supported.

So you may implement a slave handling multiple concurrent connections at the same time from different masters. It does not say whether those different connections connect to an unique GATT DB or if they operate on disjoint DBs.

Nothing refrains from supporting multiple client connections to the same GATT DB from a protocol perspective. It all depends on your BLE Stack vendor's implementation.

Upvotes: 7

Related Questions