ofSerial setup bug

I have a device plugged into my pc, it shows in device manager as COM10, when you enumerateDevices it lists the port. However when you start the port it returns failed.

If I unplug into another usb port, it becomes COM8 and it works.

Is there some problem with double figure Com port numbers?

Its an ftdi chip, don’t know if that helps.


hmm… interesting - it sounds like something you’ve had trouble with before on the forums. I will take a look and see if I can get high com port #s to test.

there are two ways to setup the device (via name and via number), did you try both? do they both fail?

also, can you try this code, which has more advanced enumeration?



googling brought me this:


I guess com10 + are called differently… can you see if this info helps?


Yes, the \.\COM11 syntax works for me. I changed it directly in the xml file from which i read the COM port, and i did not have to use double \ as in “\\.\COM11”. Single \ worked well…


Adding this code just before the call to CreateFileA lets me use normal COM addresses. It’s not 100% safe, but it works if you forgot to specify the \.\

	if(portName.at(0) != '\\')  
        portName = "\\\\.\\" + portName;  

It’s included in this file: http://carljohanrosen.com/files/ofSerial.cpp: