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

central , server master vs peripheral, client, slave

Hi When using BLE events i'm usually confused which event to handle , for example GATTS_WRITE or GATTC_WRITE.. i don't know which is the server and the client ?

Any idea to differenciate between them ? I tested some apps and i read some documents ,, i arrived to this conclusion : MASTER=Server= Central Slave=Client=peripheral Is that True ?

Parents
  • Your Mobile is generally a GAP Central & your device[say smart sensor] is the GAP Peripheral at the time of establishing connection[adversitement].

    Once the connection is established, we denote them by GATT Client & GATT Server respectively.

    Master & Slave is just another way of saying the same.

    The client always asks for info from the server.

    I hope this helps...

  • Hi Punit,

    Ok , i understand that, the central (let's say, Master control) is the one who asks for BLE connection. the peripheral (let's say evaluation Kit ) is the one accepts this connection. Refering to what you said, the MC is the client here. But , i implemented a characteristic, and after connection establishement, if the master control sends "write command " on that cjaracteristic the Evaluation Kit gets it as BLE_GATTS_EVT_WRITE.. That means MC is the server and not the client !!! Any idea ?

Reply
  • Hi Punit,

    Ok , i understand that, the central (let's say, Master control) is the one who asks for BLE connection. the peripheral (let's say evaluation Kit ) is the one accepts this connection. Refering to what you said, the MC is the client here. But , i implemented a characteristic, and after connection establishement, if the master control sends "write command " on that cjaracteristic the Evaluation Kit gets it as BLE_GATTS_EVT_WRITE.. That means MC is the server and not the client !!! Any idea ?

Children
No Data
Related