COM Port not available

I want to connect a M5Stack (Esp32) to Azure IoT Hub.
I installed the Driver and the port are available, but if I want to select them, an Error occured.COMError

Does anybody know whats the correct way to do it?

“Zugriff verweigert” means Access denied

“Access denied” means the port is already used by an application.

I have the exact same issue.
I have noticed, that there is a mos.exe process running. But when I kill it (taskkill -f -im mos.exe), it immediately starts again.
Any clue, what might be causing this?
Everything was OK, building/flashing/etc, up until I tried the mos ui utility.
The problem persists even across computer restarts.
Hm, interesting, it seems that the problem went awayt with a few more computer restarts.

Well, I also stumbled upon this behaviour in my “early MOS days” - I simply forgot, that, if I started the “mos ui” which opens a window in a browser, the program won’t stop when closing this browser window. So when I switched to the CLI after closing the brwoser, the “Access denied” message came up when trying to access the device. After I realized that the MOS tool now was running with two instances, it was clear, that the first one with the ui blocked the port. So this is no error at all, but a question of awareness (at least in my situation), that MOS tool is already running.

Well, after all, the problem did not go away.
After restarting the computer, the mos.exe process is gone. But after running any mos command for the first time it starts lurking again.
I solved this by adding the following alias to Git Bash’s ~/.bashrc.

alias mos='taskkill -f -im mos.exe; mos'

Not pretty, but works.

1 Like

Hello folks,
I am facing similar issue on windows 10, just brought cc3200 device to learn and experiment but its been 3 days no sucess in connecting device, I thought it was seemless integration with this new MONGO OS , not looks like its EFFORT, not impressive at all in first glance. Getting access denied on all COM ports, tried almost all changing COM1,2,34,5…not working at all… 10 times restarted systems.
Any help or hint will be highly appreciated. THANK YOU, Ami

Any inputs!! Community Team Member…I am losing confidence on MOS :frowning:

Any inputs?? please help here CC3200 demo will fail

I’ve gotten used to just having to task manager kill multiple mos tasks (usually 2 to 3) every time I need to switch from gui mode to console mode. I assume at some point this bug will be fixed.