Perform a Generic Attribute (GATT) call to retrieve a list of included services of the given primary service.


#include <btapi/btgatt.h>
int bt_gatt_included_services(int instance, bt_gatt_included_service_t *services, uint16_t size)


BlackBerry 10.0.0



The identifier used to reference the connected primary service.


An array of services that is populated when the function completes successfully. The string representation for GATT services is 0x1435.


The size of the array that is passed to the function. The size indicates the number of structures in the array and not the memory size required for the structures.


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



The number of included services that were retrieved when the function is successfully completed, -1 with the errno set otherwise. The error codes that can be returned are as follows:
  • EACCESS: Insufficient authentication or authorization.
  • EBUSY: The stack was busy and could not complete the request.
  • EDEADLK: A potential deadlock has been avoided.
  • EINVAL: Invalid stack parameters or connection to the remote Bluetooth-enabled device is not available.
  • ENODEV: The requested Bluetooth-enabled device could not be found.
  • ENOMEM: Sufficient memory is not available to perform the request.
  • ENOSYS: The operation failed at the stack level.
  • EPROTO: The operation failed because the response from remote Bluetooth-enabled device had a protocol error.
  • ESRCH: The service connection was not available.
  • 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