Send an indication to the remote device.
Synopsis:
#include <btapi/btgattsrv.h>
int bt_gatt_srv_send_indication(int instance, const char *addr, uint8_t type, uint16_t handle, const uint8_t *val, uint16_t len)
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.
Library:
libbtapi (For the qcc command, use the -l btapi
option to link against this library)
Description:
If you are using a software version before BlackBerry
10.3.0, you must call bt_gatt_srv_set_keepalive() prior to calling this function.
Returns:
EOK on a successful indication to the remote
device, otherwise
-1 with the
errno set otherwise. The
error codes that can be returned are as follows:
- EBUSY: The stack was busy performing another operation. You can try
again later.
- EDEADLK: A potential deadlock has been avoided.
- 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.
- ENOTCONN: The keep-alive is required prior to calling this function.
See bt_gatt_srv_set_keepalive().
- ESRVRFAULT: An internal error has occurred.