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

Need help to understand the system of API functions

I am a beginner in the study of Bluetooth, and I have difficulty in understanding the purpose of API functions Bluetooth stack. For a better understanding of the system API functions, I would like to have a General understanding about the system functions: what functions do set the connection options, which participate in the initialization of the connection and to exchange data, etc. Can API functions be divided into groups based on their purpose?

  • FormerMember
    0 FormerMember

    The BLE API functions are categorized according to where in the BLE specification that action belongs:

    Generic Access Profile (GAP), Bluetooth Core Specification v. 4.2, Vol. 3, Part C: From the introduction of the GAP part in the specification:

    This profile defines the generic procedures related to discovery of Bluetooth devices (idle mode procedures) and link management aspects of connecting to Bluetooth devices (connecting mode procedures). It also defines procedures related to use of different security levels. In addition, this profile includes common format requirements for parameters accessible on the user interface level.

    The functions related to GAP actions/operations can be found here. The functions include: start advertising, initiate a connection, disconnect, encryption.

    Generic Attribute Profile (GATT), Bluetooth Core Specification v. 4.2, Vol. 3, Part F, from the introduction of that part in the BLE specfication:

    This specification defines the Generic Attribute Profile that describes a service framework using the Attribute Protocol for discovering services, and for reading and writing characteristic values on a peer device.

    It means that GATT operations are related to operations on the attributes:

    • Server (GATTS): Operations related to the server role. Typical operations are updating values to the client using notifications or indications, or updating an attribute value locally.
    • Client (GATTC): Operations related to the client role. Typical operations are reading a value from or writing a value to a server.

    If you are new to BLE, this video tutorial can give you an introduction.

Related