Hi everyone,
I am seeking clarification regarding the communication capabilities between an ESP32 microcontroller and Apple's latest devices, specifically the iPhone 16 Pro Max and iPad Pro, both equipped with USB-C ports.
Background:
MFi Certification: Historically, establishing communication between external devices and iOS devices required MFi (Made for iPhone/iPad) certification. But I remember this being necessary in the Lightning Cable to USB era.
With the introduction of USB-C ports in recent iPhone and iPad models, there is an indication that MFi certification may no longer be necessary for certain peripherals. Perhaps I'm not confident on the terminology here: https://mfi.apple.com/en/who-should-join
Project Requirements: I am working on a sensor research project that necessitates the collection of low-latency time-series data from an ESP32 microcontroller, which features a USB-C port. The data needs to be transmitted to an iPhone 16 Pro Max or iPad Pro. Bluetooth communication has proven insufficient due to its limited data transfer rates (~1.2 Mbps with L2CAP). While NEHotspot could be an alternative, it restricts the iPad's internet connectivity. Therefore, establishing a direct USB-C connection between the ESP32 and the iOS device appears to be the most viable solution.
Questions:
MFi Certification Necessity: Is MFi certification still required for an ESP32 microcontroller to communicate with iPhone 16 Pro Max or iPad Pro via USB-C?
USB-C Communication Support: Do the iPhone 16 Pro Max and iPad Pro natively support serial communication over USB-C with microcontrollers like the ESP32? If not, are there recommended protocols or interfaces to facilitate this communication?
App Development Considerations: Would developing a custom iOS application be necessary to handle data transmission from the ESP32 over USB-C? If so, are there specific APIs or frameworks provided by Apple to support this functionality?
Data Transfer Rates: Considering the need for high-speed data transfer, are there any limitations or considerations regarding the data transfer rates achievable through a USB-C connection between the ESP32 and iOS devices?
Thank you!
Is MFi certification still required for an ESP32 microcontroller to communicate with iPhone 16 Pro Max or iPad Pro via USB-C?
This is one of those places where iOS and iPadOS differ.
-
On iPadOS you can use DriverKit to communicate with a custom USB device. That’s not an option on iOS.
-
Both iOS and iPadOS support MFi, so you could build it that way.
Do the iPhone 16 Pro Max and iPad Pro natively support serial communication over USB-C with microcontrollers like the ESP32?
Not in the way you’re looking for.
Both iOS and iPadOS have built-in support for a wide range of USB classes, and device in that class appear are accessible via higher-level APIs: a PIV device is visible to the system via CryptoTokenKit, an audio device via our extensive audio API, and so on. However, the list of supported classes doesn’t include serial [1].
Would developing a custom iOS application be necessary to handle data transmission from the ESP32 over USB-C?
Probably. It might be feasible to implement a USB class and then bend the built-in class driver to do what you want, but even that’s going to need an app to gather the results.
If so, are there specific APIs or frameworks provided by Apple to support this functionality?
On iPadOS, you have DriverKit.
On iOS and iPadOS, you can talk to MFi accessories using External Accessory.
Considering the need for high-speed data transfer, are there any limitations or considerations regarding the data transfer rates achievable through a USB-C connection between the ESP32 and iOS devices?
I don’t have enough experience at that level to respond to that. I’m gonna to ask one of my colleagues to chime in.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Although it does on macOS.