COMMON IO-BLE v1.0.0
Hardware abstraction layer for Bluetooth
 
Loading...
Searching...
No Matches
BT-GATT Server Interface

BT GATT Server provides the interfaces to use Bluetooth GATT server feature.

Before calling any GATT server function, the Generic Access Profile needs to be initialized (see bt_hal_manager.h and bt_hal_manager_adapter*.h). bt_hal_manager.h give the starting point. After GAP has been initialized, the functions need to be called in that order:

  1. pxRegisterServer: Need to be called first to get the server Interface
  2. pxGattServerInit: Provided callbacks
  3. pxAddService: Create memory space for a service
  4. pxAddCharacteristic: Then all calls to pxAddDescriptor will add the descriptor to that characteristic
  5. pxStartService: Complete service create. Another service can be create afterward.

The BT-GATT server interface is represented by BTGattServerInterface_t

The BT-GATT server callbacks can be found here BT-GATT Server Callbacks