requestMtu

abstract suspend fun requestMtu(mtu: Int): Int

Requests that the current connection's MTU be changed. Suspends until the MTU changes, or failure occurs. The negotiated MTU value is returned, which may not be mtu value requested if the remote peripheral negotiated an alternate MTU.

Throws

if invoked without an established connection.

if Android was unable to fulfill the MTU change request.

if MTU change request failed.