BLE Connection

I am trying to use BLE in Flutter. I have the following three questions regarding BLE connections:

  1. At what point in iOS is the ATT MTU negotiation considered complete after a BLE connection is established?

  2. Is there an official callback or state that indicates the completion of the negotiation?

  3. Is the value used by iOS during ATT MTU negotiation fixed? If it is fixed, please tell me that value; if it varies, please tell me the conditions under which it varies.

If anyone knows the answer, please let me know.

MTU negotiation happens between the device your app is running on and the accessory being connected to, at the controller level. You app has no control or visibility to this process as to when the negotiation is completed or what the negotiated value is. The final MTU value will depend on various factors like device version, OS version, connection type and parameters, BLE version either end of the connection is using, and so on.

If and only if your app is using L2CAP, then that's another matter. To control the Maximum Transmission Unit (MTU) for an L2CAP channel, you can use the requestRemoteMTU(_:) function. This function initiates the process to reconfigure the L2CAP channel with a new outgoing MTU.

The requestRemoteMTU(_:) function takes a BluetoothL2CAPMTU parameter, which is the desired outgoing MTU. It returns kIOReturnSuccess if the channel reconfiguration process was successfully initiated. Still, this API does not provide an indication that the reconfiguration process has completed.

Thank you for your reply.

I have the following additional questions:

  • Assuming the same device and OS version, is it safe to assume that the MTU value presented by iOS during initial negotiation for BLE connection will not change?

  • Is it possible that only the MTU value presented by iOS during initial negotiation could change without an OS version upgrade?

  • Is it possible that a minor OS version upgrade could cause the MTU value presented by iOS during initial negotiation to change?

BLE Connection
 
 
Q