bt_le_init()

Initialize the low energy functionality and allocate the required resources for the library.

Synopsis:

#include <btapi/btle.h>
 
int bt_le_init(bt_le_callbacks_t *cb)

Since:

BlackBerry 10.0.0

Arguments:

cb

The list of callbacks to be used for low energy connection manager callbacks.

Library:

libbtapi (For the qcc command, use the -l btapi option to link against this library)

Description:

This function also starts a new thread for low energy functionality. The callback is invoked in the new thread and is thread safe. If an error is returned from this function call, the errno is set to indicate reason of failure.

Returns:

EOK on successful initialization, -1 with the errno value set otherwise. The error codes that can be returned are as follows:
  • EACCES: Insufficient permissions to initialize the low energy functionality.
  • ENODEV: Bluetooth stack is unavailable.
  • ENOMEM: Sufficient memory is not available to perform the request.
  • ENOTSUP: The currently library version is not supported.
  • ESRVRFAULT: An internal error has occurred.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus