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

In BLE role, does Service or characteristic exists on Central?

I'm aware of GATT's Profile, Service and Characteristic. And also, for GATT_Server, GATT_Client it can be Central or Peripheral. (As I manually set it.)

And also, the Bluetooth Communication Sequence goes like this.

  1. Central try for Peripheral Search.
  2. Peripheral Starts Advertising. (sends BLE_ADV) - (And after little bit, Peripheral's Observer turns on -> this observer is for Central's Connection trial)
  3. Central Makes Connection with Peripheral
  4. After Connection, Central Discover's GATT Service, Characteristics.
  5. Central, Peripheral Data Communication!

(At this point, I have some questions.)

Q1. Central Discovers for GATT Service and Characteristics. (From MCP's discover service button) And I infer from this, that GATT's service and characteristics are owned (provided) by Peripheral.

Does This inference is correct?

Or, Is it not the Peripheral that provides GATT Attributes, but the GATT Server Provides GATT Attributes?

I thought that Central can't have GATT Attributes (providing UUID,HANDLER,PERMISSION, ETC). (well Central can have GATT Server or GATT Client Role.)

Does Central can't have or provide any of the GATT Attributes?

  • Hi Daniel,

    You need to keep in mind that BLE GAP (Generic Access Profile) roles (Peripheral/Broadcaster and Central/Scanner) are independent from BLE GATT (Generic Attribute Profile) roles (Server and Client). You can run any combination and one device can play even all roles (on both layers) simultaneously. However in most of the cases you have onle simple configuration of BLE GAP Peripheral + GATT Server and BLE GAP Central + GATT Client. Your sequence applies to this simple situation.

    To your question: yes, ATT/GATT handles are owned by the Server, client only uses GATT methods to operate on them. The analogy with Web (HTTP) server is almost perfect: when you use web browser on your PC you are like GAP Central + GATT Client who connects to Web server over the internet (that plays role of GAP Peripheral + GATT Server). You can read the content, upload data to web form but web page itself is owned by the server.

    Cheers Jan

  • SO, IT means, If BLE GAP Central + GATT Server combination, then Central Can have GATT Characteristics, and also provide it's Characteristic, Char. UUID, Char. Handle, Char. value, Char. description to BLE GAP Peripheral + GATT Client?

  • Yes indeed. E.g. Android 5+ devices can support both GAP and GATT roles simultabeousely, same for Nordic nRF5x FW (if you write it).

  • I guess this BLE GAP Central + GATT Server and BLE GAP Peripheral + GATT Client example is related to iOS Protocol. I think i've read somewhere that iPhone Uses this type of communication.

    Just guess if there are any example for like this kind of connection tutorial. I really like to try Central provides GATT characteristics to Peripheral device.

    Thanks! It helps me a lot. Really!

  • Hi Daniel, just a comment: I believe there is nothing like "iOS Protocol". Yes, iPhone is capable of both GAP roles as well as GATT Client and Server, even all at one simultaneously. However it is generic feature of LE and concept is absolutely independent on any platform (and as I said many modern devices and stacks support it as well). When it comes to examples there are multirole examples in Nordic SDK, if you are experienced in embedded development and C you should be able to use these as starting point.

Related