This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What is a client and server in BLE?

When working with BLE, one sees a lot of different names for roles, which is confusing. What is actually the difference between them all, master, slave, central, peripheral, client, server and so on?

Parents
  • No wonder you are confused, but there are two different kind of roles in BLE that it's useful to separate.

    First, there is the concept of Central/Peripheral, which has to do with establishing a link. This is also known as the GAP role. A Peripheral can advertise, to let other devices know that it's there, but it is only a Central that can actually send a connection request to estalish a connection. When a link has been established, the Central is sometimes called a Master, while the Peripheral could be called a Slave.

    In addition to the above roles, the Core Specification also defines the roles of an Observer and a Broadcaster. These are basically just non-connecting variants of the Central and Peripheral, in other words devices that just listens for advertisement packages (and possibly send scan responses) or just sends such packages, without ever entering a connection.

    Then, you have the roles of a GATT Server and a GATT Client. Normally, the Server is the device that contains data, that the Client can read.

    However, there is no connection between these roles. Even though it is most common for a Peripheral to be a Server and a Central to be a Client, it is perfectly possible to have a Peripheral that is only a Client, or a Central that is both a Server and a Client. The S110 can be a Peripheral and not a Central, but can be both a GATT Client and a GATT Server.

  • I would also like to empathize that the Bluetooth specification mandates that all Bluetooth Smart devices shall have one and only one GATT server.

    Meaning that you cannot have no server, or many servers (if you act as a central connected to many peripherals). All GATT clients accessing the GATT Server are able to find the same services and characteristics

    There are one mandatory services GAP that have two mandatory characteristics, Device Name and Appearance

Reply
  • I would also like to empathize that the Bluetooth specification mandates that all Bluetooth Smart devices shall have one and only one GATT server.

    Meaning that you cannot have no server, or many servers (if you act as a central connected to many peripherals). All GATT clients accessing the GATT Server are able to find the same services and characteristics

    There are one mandatory services GAP that have two mandatory characteristics, Device Name and Appearance

Children
No Data
Related