Question

is there any method like gatt_exchange_mtu (BlueZ stack) for iOS? Or any other method how to change ATT_MTU in iOS?

Was it helpful?

Solution

The MTU seems to be hard wired within the operating system.

I made some tests with iOS 7 and I get a MTU of 132 bytes.

Until iOS 7.0, one could not even query the MTU. In iOS 7.0, it is in the maximumUpdateValueLength property of CBCentral.

Attempting to update characteristic values with my application running on iOS 6.1, I noticed that a 30 byte update on the peripheral would be read as the first 20 bytes by the central. This triggered me to: 1. look deeper into the documentation, 2. Update all my devices to iOS 7.04 3. Run some tests and query the value of CBCentral.maximumUpdateValueLength My results, based on a iPhone 4S, a iPodTouch and a iPad mini: 132 bytes seems to be constantly reported.

I no longer observe the "clipping" of my 30 bytes update down to 20 bytes.

I think this due to some middle-layer of code dealing with the Bluetooth stack, not accessible to the developer, controlled by Apple.

iOS CoreBluetooth API is a high level API and it does not allow the application writer to "mess" with the lower level bluetooth

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top