2 posts / 0 new
Last post
RatheeshT
Offline
Last seen:1 year 10 months ago
Joined:2017-01-02 11:08
不同的角色名?

On BLE, lot of different names for roles, which is confusing.
What is actually the difference between master, slave, central, peripheral, client, server?
How many ble device can act as central and peripheral (both may be multiple or which one will be single or which will be multiple)?

Device:
MT_dialog
Offline
Last seen:1 month 2 weeks ago
Staff
Joined:2015-06-08 11:34
Hi RatheeshT,

Hi RatheeshT,

The properties of each role can be found in the BLE specification or in any book that deals with the BLE protocol.

To sum up the official name of the GAP roles is either peripheral or central (there are also additional roles for the GAP protocol - observer, broadcaster - with a bit different behaviours but in the end one is scanning and the other is advertising but there is no connection). Then in the GATT layer each device can be either a client or a server, that means that one has the database which is the server that responds to requests and the other device that reads from the server is the client that sends the requests in order for the server to respond.

The GAP and the GATT roles are most of the times fused, meaning that most of the times a central is a client and a peripheral is a server, and the client reads from a server, but that is not always the case. That means that a device with GAP role central can be a GATT server and a device that acts as a peripheral can be a GATT client.

The Master and the Slave teminology usually aplies to the Link Layer and the master is the device that initiates the connection and Slave is the one that was in advertising state before the initiation of the connection. So at all times a GAP peripheral is a slave in a connection and a GAP central is always the master.

Thanks MT_dialog