CoreBluetooth: Reduced MTU when updating from iOS15 to iOS16

We are seeing a strange behaviour where the maximum MTU size sent from the phone to our peripheral has decreased from 185 (iOS 15) to 77 (iOS 16 and 16.0.2). We are seeing the exact same behaviour on iPhone 11, iPhone 13 Pro Max and iPhone 14. The source code for the iOS app has not changed at all, yet for some reason the MTU seems to significantally decrease after upgrading to iOS 16.

Below is a sniffer log showing how on iOS 15.7 (19H12) running on an iPhone 7, the iPhone's requested MTU is 185 bytes:-

And the sniffer log below shows how on iOS 16.0.2 running on iPhone 13 Pro Max, the iPhone's requested MTU is only 77 bytes:-

The sudden decrease in the iOS's MTU size is forcing the app to resort to long writes instead of normal writes (when attempting to write to a characteristic larger than 77 bytes), which is causing the interaction to break.

Any idea if this is a known bug on iOS 16? And is there a fix/workaround on the app side that can revert the behaviour so that the phone requests 185 bytes?

Thanks

Post not yet marked as solved Up vote post of Youssif_Saeed Down vote post of Youssif_Saeed
2.3k views
  • I tested with iOS 16.1 RC, and it seems to fix the issue.

Add a Comment

Replies

I want to +1 this as a new issue after the release of iOS 16. Not sure on iOS 16.0.0, but we have seen this issue for sure on iOS 16.0.1 and 16.0.2.

The MTU size seems to degrade over time (hours, at most 24). We start out getting a full MTU size of 517 - then later it's smaller to 247 - and it degrades further... the smallest MTU we are seeing is 23. Rebooting the iPhone appears to reset this and temporarily restore MTU to expected size, but it repeats the process. As the OP notes an MTU of 23 is prohibitively slow.