Virtual com port on embedded USB host

We have a PIC32 processor board with no operating system from which we would like to wirelessly send log data to a PC. Unfortunately this board has no serial connector on it (or this would be trivial to do with two Wixel boards). It does have a USB connector that could act in either USB device/slave mode or in USB host mode. If put in host mode, perhaps a virtual com type interface could be implemented? Are there any examples/guidelines of implementing a virtual com interface on an embedded USB host (if I am using that term correctly) instead of on the normal Windows/Linux system?

Hello.

What PIC32 processor board do you have? If it’s a general purpose development board, I would expect it to at least make the PIC32 UART pins accessible to you, and you could use those to connect to the Wixel.

If not, the minimal steps you would need to connect to a device’s virtual COM port from a USB host would be:

[ol]
[li]Send a USB reset signal to the device by driving D+ and D- low for some time.[/li]
[li]Send the Set Address request to assign an address to the device. Address 1 should be fine.[/li]
[li]Send a Set Configuration request to put the device into the right configuration.[/li]
[li]Make IN and OUT transactions on the right endpoints.[/li][/ol]

To connect to a Wixel running our usb_cdc_acm library, the correct configuration is number 1, and you need to use endpoint 4 for both the IN transactions and the OUT transactions.

You don’t need to worry about fetching device descriptors if you know ahead of time you are only plugging the Wixel into that USB port and not any other devices.

The Microchip USB Framework probably contains relevant examples, and a USB protocol analyzer will be very useful.

–David