Protocol availability inconsistencies related to modern serial layers

I am currently writing a iPadOS application to act as a companion to the desktop version that controls a piece of hardware via a USB CDC serial connection. Due to modern iPads having USB-C ports for the last 2 years and the ability to attach certain USB devices via adaptors since the origin of the 30pin doc connector I would expect protocol availability to be fairly complete. So then why is it that the headers required to use USB CDC serial don't exist and if you make them yourself you need to use illegal symbols so you can't upload it to App Store connect.

Where as USB CDC ethernet has full support along with Bluetooth RFCOMM (rs232 serial over bluetooth) and even USB MIDI given that midi is a superset of serial. So why isn't there a USB CDC serial kit/api/even just allowing a data stream to the TTY/CU port?

If there is a way please tell me what it is and point me to the documentation.
Answered by DTS Engineer in 623704022
iOS has no API for accessing generic USB peripherals. Some USB peripherals are managed by iOS and made accessible to our app via high-level APIs — for example, events from a USB keyboard are routed to apps via the UIKit event system, including low-level events via UIPress — but that’s not the case for USB serial devices.

If you control the hardware then you can update it to support MFi and make it available to your app via the ExternalAccessory framework.

If you don’t control the hardware, your options are much more limited. For prototyping and limited deployment, you may be able to get away with a Redpark cable [1]. If you require widespread deployment, about your only option is to interpose some hardware that is directly accessible from iOS. For example, you could buy or build a serial-to-Core Bluetooth bridge.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

[1] For example, their Lightning Serial Cable (L2-DB9V3) <redpark.com/lightning-serial-cable-l2-db9v/>.
Accepted Answer
iOS has no API for accessing generic USB peripherals. Some USB peripherals are managed by iOS and made accessible to our app via high-level APIs — for example, events from a USB keyboard are routed to apps via the UIKit event system, including low-level events via UIPress — but that’s not the case for USB serial devices.

If you control the hardware then you can update it to support MFi and make it available to your app via the ExternalAccessory framework.

If you don’t control the hardware, your options are much more limited. For prototyping and limited deployment, you may be able to get away with a Redpark cable [1]. If you require widespread deployment, about your only option is to interpose some hardware that is directly accessible from iOS. For example, you could buy or build a serial-to-Core Bluetooth bridge.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

[1] For example, their Lightning Serial Cable (L2-DB9V3) <redpark.com/lightning-serial-cable-l2-db9v/>.
So no plan on adding a high level API? Since adding mfi isn’t feasible due to hardware already being in the field and a Bluetooth bridge being less than ideal due to the device being in a steel box in a rack of other steel boxes. While the redpark cables while interesting give a rs232serial connection, along with the API it provides being unusable for official mass distribution.

So no plan on adding a high level API?

I can’t discuss The Future™. If you’d like to see serial support added in the future, I encourage you to file an enhancement request describing your requirements. Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Already did with the number FB8193915 it seems to be going about as smoothly as I could expect.
I second the OP's call for this, which is even more important with Catalyst. At the moment I don't know how to selectively implement serial communications on the Mac while using Bluetooth under iOS (which is what the app does currently).

Filed feedback FB8385366. I can hear the wheels of industry turning already.

Filed feedback FB8385366.

Thanks for that.

At the moment I don't know how to selectively implement serial communications on the Mac while using Bluetooth under iOS

I’m not sure I understand this. Can you clarify?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

I have a similar problem. We're building hardware to interface with cars and trucks. While this works ok using wireless technologies, having a wired connection would be of tremendous help with regards to stability and speed.

With the iPhone moving to a USB-C, I wonder about the future of the ExternalAccessory framework and the mfi program. What are the chances that Apple includes an FTDI driver in iOS?

With the iPhone moving to a USB-C, I wonder about the future of the ExternalAccessory framework and the mfi program. What are the chances that Apple includes an FTDI driver in iOS?

I can’t discuss future plans but if I were in your shoes I’d advocate for DriverKit’s USB support on iOS. Currently that’s limited to iPadOS )-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How (where) is the best place to push for this functionality?

I know it was always possible with lightning (hardware wise) but the move to USB-C opened up so many easy, low-hanging-fruit possibilities. I can plug in my standard USB-thumb drive into my iPhone and share files; I can plug in my existing USB-C to Ethernet and use Ethernet; I can even plug in my smart monitor. As a developer (hardware and software) it would be awesome to plug and access standard HID and serial (like FTDI) devices. Test jigs, test stations, etc. can suddenly use iPhones instead of PCs.

How (where) is the best place to push for this functionality?

Which functionality specifically? This thread started with a discussion of serial support but has since drifted into a discussion of DriverKit on iPhone.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Here I am late to the party as usual I've just asked a related question before stumbling upon this thread :

https://discussions.apple.com/thread/255363612

I too am looking to use the iPhone 15 Pro's USB C port to talk to devices over serial, for what is an experiment I don't want to spend almost £100 on a Redpark cable. I was hoping to get a cheap USB C to UART/FTDI adapter and plug it in, it's looking like this is less and less likely as a possibility. I know an IP to Serial bridge is an option but I would prefer the flexibility of a direct cable which doesn't need external power and additional dependencies. I did see that Terminus now supports USB Serial using the Redpark cable, and I'm wondering if that is via a generic Apple framework or using the Redpark SDK.

Protocol availability inconsistencies related to modern serial layers
 
 
Q