bt_gatt_srv_send_indication_async()

Send an indication asynchronously to the remote device.

Synopsis:

#include <btapi/btgattsrv.h>
 
int bt_gatt_srv_send_indication_async(int instance, const char *addr, uint8_t type, uint16_t handle, const uint8_t *val, uint16_t len, bt_gatt_srv_send_indication_cb cb, void *user_data)

Since:

BlackBerry 10.3.0

Arguments:

instance

The instance number representing the local GATT service.

addr

The address of the remote device which the indication is to be sent to.

type

The device type identifier. Refer to constants prefixed with BT_DEVICE_TYPE_.

handle

The handle of the attribute that the indication belongs to.

val

The binary data being sent in the indication.

len

The length of the data to be sent in the indication.

cb

The callback function to be executed when the operation has completed.

user_data

A user specified pointer that is returned during the callback.

Library:

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

Returns:

EOK on a successful indication to the remote device, otherwise, -1 with the errno set. The error codes that can be returned are as follows:
  • EBUSY: The stack was busy performing another operation. You can try again later.
  • EINVAL: An argument 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: Sufficient memory was not available to perform the request.
  • ESRVRFAULT: An internal error has occurred.