bt_gatt_srv_get_mtu()

Retrieve the Attribute Protocol Maximum Transmit Unit (ATT_MTU) for the given connection.

Synopsis:

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

Since:

BlackBerry 10.3.0

Arguments:

instance

The identifier used to reference the local 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_.

Library:

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

Description:

Returns:

The MTU value for the given instance when the function is completed successfully, -1 with the errno set otherwise. The error codes that can be returned are as follows:
  • 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: Sufficient memory was not available to perform the request.
  • ESRVRFAULT: An internal error has occurred.