bt_rdev_get_le_device()

Retrieve a structure representing a remote Bluetooth enabled low energy device.

Synopsis:

#include <btapi/btdevice.h>
 
bt_remote_device_t* bt_rdev_get_le_device(const char *bt_addr)

Since:

BlackBerry 10.2.0

Arguments:

bt_addr

The Bluetooth MAC address of the remote low energy device, including the terminating NULL character. For example, 00:00:00:00:00:00\0.

Library:

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

Description:

This function allocates a bt_remote_device_t structure and fills the address field with the MAC address provided by the bt_addr. All other fields in the structure are filled with values if the specified device is either paired or cached on the system. NOTE: See bt_rdev_get_type() to determine whether the other fields in the structure are filled with valid, discovered data.

Returns:

An allocated device structure is returned upon success, NULL with the errno set otherwise. Any errno value other than the following indicates that a system error has occurred:
  • EINVAL: An invalid value was passed in for bt_addr.
  • ENOMEM: There was insufficient memory to allocate required structures.
  • ENOENT: A required data entry was not found (internal error).
  • EPERM: There was an error accessing required system data (internal error).

Last modified: 2014-05-14



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

comments powered by Disqus