Get the RFCOMM channel number of the established connection or the registered service.
#include <btapi/btspp.h>
int bt_spp_get_service_port(int fd, char *service_uuid, int *service_port)
BlackBerry 10.3.0
The mount point file descriptor returned by bt_spp_open(), or through a callback registered with bt_spp_open_server(), or through an asynchronous call of bt_spp_open_ex(). If you wish to retrieve the RFCOMM channel number for a registered server when a connection is not yet established, pass in -1. The service_uuid parameter is ignored if a valid fd is passed in.
The UUID of the service registered on the server side. When the service is registered but a connection is not established yet, the RFCOMM channel number is already known on the server side and can be retrieved. To use this option, you have to pass in -1 for fd and a valid service_uuid.
The pointer to a user-allocated integer for RFCOMM channel number that the function returns.
This function returns the RFCOMM channel number either of the established connection identified by the file descriptor or of the registered service identified by the service UUID.