USBSerial COM-port "access denied"

19 Dec 2017

Hey Guys,

first of all i'm new to this topic so please be patient with me. :)

I got a python script (Spyder of Python 3.5) (and Windows 7) and want to communicate over a virtual COM-Port (USB-cable) with my mbed MC. I got it as that far, that it works.

But my problem is that i doesn't work constantly. Nearly every second time (statistically) an error occurs where python says:


The major fault is in the last lines. "Zugriff verweigert" means "access denied" in english. When i try to start the script a few times after this the error is gone and ist working normally until it occures the next time randomly.

I thought that i maybe forgot to install an extra driver to configure my port with "" but this didn't help.

I already tried to reinstall the Serial driver (.inf-File) from "" too, but that didn't help either. My device shows up as "CDC-device" in the device manager, when it got no driver installed. With driver it's something like "mbed ..."

An other idea has been, that i gave too little time to close/open the port when i communicate but even with a time.sleep of two seconds the error occurs.

Does anyone got the same issue or an idea how to solve this?

Thanks in advance,


19 Dec 2017


Not sure whats going on here, but my intuition says that in windows only 1 program may open any COM Port at a time. So if this is working, then when it doesnt work with means that either a different device has the COM Port open or you are trying to connect when the device is not connected (like if you reprogram the device, it will disappear and then reappear).

That would be my suggestion as to what to look into.


Please log in to post a reply.