Retrieve the service's starting and ending handles in the GATT server.
Synopsis:
#include <btapi/btgattsrv.h>
int bt_gatt_srv_get_service_handles(int instance, uint16_t *startHandle, uint16_t *endHandle)
Arguments:
- instance
-
The instance number representing the local GATT service
- startHandle
-
A pointer to a buffer where the starting handle in the GATT server is to be written.
- endHandle
-
A pointer to a buffer where the ending handle in the GATT server is to be written.
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)
Returns:
EOK when the handles are successfully retrieved, otherwise
-1 with the
errno set otherwise. The error codes that can be returned are as follows:
- EINVAL: An argument passed is invalid or the connection to the remote Bluetooth-enabled device is unavailable.
- ENODEV: Unable to find the service connection defined by the instance argument.
- ENOMEM: Insufficient memory was available to perform the request.
- ESRVRFAULT: An internal error has occurred.