PySerial could not open port COM4: [Error 5] Access is denied - please help

Paul nospam at needed.com
Wed Jun 27 14:04:17 EDT 2012


Adam wrote:

> 
> 
> This is a tough one.

Try

    handle -a > allhand.txt

Then open the allhand.txt with Notepad and look for interesting entries.

*******

I tested right now, and first opened a session in HyperTerminal with one
of my USB to serial adapters. The second serial adapter, is connect to a
UPS, looking for a shutdown message. So the second entry should be present
at all times.

hypertrm.exe pid: 3452
...
   120: File  (---)   \Device\VCP1


ups.exe pid: 1568 NT AUTHORITY\SYSTEM
...
    98: File  (---)   \Device\VCP0

I don't have any "serial" entries on this machine. But one of
my other machines, has a real COM port on the SuperI/O chip,
so the entries for that would involve the word "serial" in some
way. The USB ones, at least the ones I've got, say VCP. Possibly
because one of the driver files sets up virtual COM ports. There
is a control panel for the driver, that maps a virtual COM port,
to a COM port number, like COM3 and COM4 in this case.

   Paul



More information about the Python-list mailing list