pub unsafe extern "C" fn ble_att_set_preferred_mtu(mtu: u16) -> c_int
Expand description

Sets the preferred ATT MTU; the device will indicate this value in all subsequent ATT MTU exchanges. The ATT MTU of a connection is equal to the lower of the two peers’ preferred MTU values. The ATT MTU is what dictates the maximum size of any message sent during a GATT procedure.

The specified MTU must be within the following range: [23, BLE_ATT_MTU_MAX]. 23 is a minimum imposed by the Bluetooth specification; BLE_ATT_MTU_MAX is a NimBLE compile-time setting.

@param mtu The preferred ATT MTU.

@return 0 on success; BLE_HS_EINVAL if the specified value is not within the allowed range.