I have configured USB-CDC as composite device to 5 connections. That is, the device appears as 5 virtual COM ports, each connected to a different UART (single USB to 5 serial interfaces).
This allows me to communicate via 5 UARTs of a Kinetis (such as the K60) via the single USB device cable - it looks like this:
Up to now I have quite limited experience with composite devices (and interface association (IAD) that is needed to allow usbser.sys on Windows PCs to be able to work with multiple interfaces on the single connection) but the enumeration and communication is otherwise fairly straightforward.
There are however three things that are limiting ideal operation and I would like to ask whether there are more experienced people who may like to offer a little advice so that the these may possibly be overcome.?
1. Since the interface shares endpoint 0 for CDC commands, handling the SET LINE CODING when the PC hosts sets the Baud rate is presently only working for all UARTs in parallel. This is because there is no information in the command to know which of the UARTs is actually to be configured.I do wonder whether there is some information in the IAD that is not absolutely correct that could help control this or whether usbser.sys is basically flawed (and that is why no USB-SERIAL manufacturer seems to use it?)
2. Related to 1) is the fact that the RTS control (HW flow control) suffers the same problem (which UART does it belong to??)
3. I suspect that usbser.sys doesn''t support XON/XOFF flow control due to the fact that I have never found any mention of it in the USB-CDC specifications and also because I never found a USB-CDC device (such as the embed or P&E debuggers on Freescale development board with USB-UART function) based on usbser.sys that can do XON/XOFF flow control. Commercial USB-SERIAL cables do support it but they seem to supply their own PC drivers and I see the control taking place as what look like proprietary commands.
So essentially I would like to certainly overcome 1) (and probably 2, if 1 is possible) so that usbser.sys can be used in the majority of cases. It would be great to somehow also solve 3) (seems an issue with single interface USB-CDC generally too (?)).
Any experts or experienced developers who can comment?