How can I make a custom USB device show up in Windows as a COM Port? How can I make a custom USB device show up in Windows as a COM Port? windows windows

How can I make a custom USB device show up in Windows as a COM Port?


There is a USB-to-serial driver built in to Windows that will do what you want. It is called usbser.sys:

http://support.microsoft.com/kb/837637

You will have to write an INF file and distribute that to your users, but that will not be too hard because it is only a few kilobytes of text and you can find examples online.

I'm not aware of any great documentation for this driver by Microsoft, so my advice would be to find some other device that uses it, such as Pololu Wixel, and copy what they did.

Here are the device descriptors we used and the special control tranfers we had to implement:https://github.com/pololu/wixel-sdk/blob/master/libraries/src/usb_cdc_acm/usb_cdc_acm.c

You can see our INF file, wixel_serial.inf, by downloading the software and looking in the drivers folder:http://www.pololu.com/docs/0J46/3.a(There are other files in there that are not necessary for you.)

You can also look at the Arduino Uno because they use the same driver.

Whatever you do, please don't use our USB Vendor ID in your product! You need to get your own.

Update: In Windows 10, you don't need an INF file anymore because of the new usbser.inf driver that comes with Windows.


If you are using a UART you can easily interface it to a FTDI USB chip like http://www.ftdichip.com/Products/ICs/FT232R.htm or a Prolific like http://www.prolific.com.tw/eng/products.asp?id=59

For development, prototype and testing I have half dozen of these laying around http://www.pololu.com/catalog/product/391

I connect it directly to the UART pins on AVR and 8051 micros.