Functions
Functions
BLE » Generic Attribute Profile (GATT) » Generic Attribute Profile (GATT) Common
Collaboration diagram for Functions:

## Functions
uint16_t | ble_gatt_mtu_set (uint16_t mtu)
| Set ATT_MTU size. More...
uint16_t | ble_gatt_mtu_get (uint8_t conn_idx, uint16_t *p_mtu)
| Get the current ATT_MTU size for a given connection. More...

## Detailed Description

## Function Documentation

## ◆ ble_gatt_mtu_get()

uint16_t ble_gatt_mtu_get | ( | uint8_t | conn_idx,
|  | uint16_t * | p_mtu
| ) |  |

Get the current ATT_MTU size for a given connection.

Parameters

  [in] | conn_idx | Current connection index.
  [out] | p_mtu | ATT_MTU size for the given connection.

Return values

  SDK_SUCCESS | Successfully get ATT_MTU.
  SDK_ERR_INVALID_PARAM | Invalid parameter(s) supplied.

## ◆ ble_gatt_mtu_set()

uint16_t ble_gatt_mtu_set | ( | uint16_t | mtu | ) |

Set ATT_MTU size.

Parameters

  [in] | mtu | ATT_MTU size.

Note
  This function should be called before exchange MTU operation. This MTU size is used to all connections. If not set these parameters, the stack will config the default value as (max_mtu = 512).

Return values

  SDK_SUCCESS | Successfully get ATT_MTU.
  SDK_ERR_DISALLOWED | Operation is disallowed.