bt_gatt_init()

Initialize resources required for Generic Attribute (GATT)

Synopsis:

#include <btapi/btgatt.h>
 
int bt_gatt_init(bt_gatt_callbacks_t *cb)

Arguments:

cb

The list of callbacks to be used for GATT Connection Manager callbacks.

Library:

libbtapi

Description:

The function also starts a new thread. Most callbacks invoked in the new thread are thread safe unless otherwise specified. You must call this function before calling any other functions in this file.

Returns:

EOK when the initialization is successful, -1 with the errno set otherwise. The error codes that can be returned are as follows:
  • EACCESS: Insufficient permissions to initialize functionality.
  • ENODEV: Unable to find the service connection defined by the instance argument.
  • ENOMEM: Insufficient memory was available to perform the request.
  • ENOTSUP: The current library version is not supported.
  • ESRVRFAULT: An internal error has occurred.

Last modified: 2013-12-21

comments powered by Disqus