bt_gatt_srv_update_connection()

Request an update to the low-energy connection parameters.

Synopsis:

#include <btapi/btgattsrv.h>
 
int bt_gatt_srv_update_connection(int instance, const char *addr, uint8_t type, bt_gatt_srv_update_parm_t *parms)

Since:

BlackBerry 10.2.0

Arguments:

instance

The instance number representing the local GATT service.

addr

The address of the remote device to which the connection update request is to be sent.

type

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

parms

The desired connection parameters for the low-energy link.

Library:

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

Description:

The bt_gatt_srv_updated_cb() callback is invoked if the connection parameters change.

This function should be used with care. Modifying the link connection parameters will affect all GATT servers and clients using the low-energy link. Use this function only to obtain a faster response time, or only when you know that changing the connection interval will not impact another application.

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.
  • ENOTSUP: The request is being made on a BR/EDR connection, which is not supported.
  • 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.