Bluetooth LE ATT MTU negotiation on Android and iOS on central / peripheral equipment

On Android we have requestMtu

and onMtuChanged

, which seems to imply that we have to manually reconcile MTU sizes if Android is installed on the central and peripherals (but I could be wrong, and it may happen that this happens automatically after connections without my intervention). The documentation for requestMtu

only talks about working with a write request (write with no response) and does not mention notification, and also says that it is for "connecting" but does not mention if it is from the central or peripheral side. So it is not clear which side of the connection can / should use requestMtu

and how does it affect both the notification size and the record size?

On iOS there seems to be no direct alternative requestMtu

and we only have central.maximumUpdateValueLength

(since iOS 7 I think). Its documentation (unlike Android) says it maximumUpdateValueLength

is for notifications only, which means that it is only useful on the peripheral side as you send notifications from the peripheral to the central one. But what about letters? If I write (again without an answer) a characterization from the center to the periphery, how do I know the batch size to ensure efficient recording?

Considering mixed systems (central / peripheral Android / iOS) things get confusing and it's not clear from which side and when / can / request / respond to MTU size negotiation. Is there any document outlining ATT MTU exchange options that match the actual Android and iOS implementation?

+3


source to share


2 answers


Asper my understanding requestMtu()

should be initiated from the central role-playing device, since it knows how much data it is going to transmit and receive. In general, in any client server model, the client always specifies or negotiates session parameters. So I feel even in the case of BLE, the same rule applies.



+1


source


According to the BLE standard, both sides can exchange MTU. The same MTU applies as when the device acts as a client and server.



0


source







All Articles