Get the address of a remote device.
Synopsis:
#include <btapi/btspp.h>
int bt_spp_get_address(int fd, char *addr)
Arguments:
- fd
-
The mount point file descriptor returned through one of the following functions:
- addr
-
The 18-byte buffer allocated by a user in which the address is returned.
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)
Description:
This function returns the address of a remote device for the connection identified by the file descriptor.
Returns:
0 if the address is returned,
-1 otherwise, with
errno set to one of the following values:
- EINVAL: addr is NULL.
- EPERM: The bt_spp_init() has not been called or has failed.
- EBADF: The file descriptor is invalid.