Device COM5 is not currently available

Hello. I recently did a bare-metal image restore to a machine that runs a run-of-the-mill DOS .cmd file. It loops, sending certain data to my Arduino UNO through a serial connection, currently COM5.

Everything worked fine before the bare-metal image restore. Now, when this command in the .cmd file is executed:

MODE com5:9600,N,8,1

... I get the message "Device COM5 is not currently available.

In device manager COM5 shows as the Arduino UNO. Everything shows as normal.

Nothing that I know of should have this port allocated to it. As a test, in device manager I moved the UNO to COM6, then COM7, then COM10, and tried to do a MODE command each time on those ports. The result was the same: Device COMn is not currently available.

The IDE cannot communicate with the UNO, either, on any com port.

I'm stumped. What am I missing?

Thanks!

All we need to help You. Please read and use this link: How to get the best out of this forum - Development Tools / IDE 1.x - Arduino Forum

What is it you don't understand? The UNO is using port COMx, and you are surprised that a MODE cmd for the same COMx fails with a 'Not available'?

If you run the mode command without any parameters, is your device shown? Or what is shown?

Just encountered the same problem. In my case, I had a terminal program open on the COM port.

To find out what is using the port you can use process explorer (needs to be installed). See posts Exit error status 1 on Arduino uno - #15 by ptillisch and Exit error status 1 on Arduino uno - #18 by sterretje for more details.

Hi Sterretje,

Thank you for your kind and thoughtful reply. Running the MODE command shows the following:

Status for device CON:
<Lines, Columns, Keyboard Rate, Keyboard delay, Code page>

That's it. It does not show any other devices. No COM devices are shown, even though the Arduino is connected and it shows in Device Manager.

This surprising finding led me to experiment with a nearly parallel Windows 11 system, which uses another Arduino in the same way. And, I found the conflict - it is the Cyberpower battery backup grabbing the COM ports in some way. When I disconnected the battery backup's USB cable the Arduino's COM5 port showed up using the MODE command.

I've had issues with the Cyberpower's misuse of COM ports before, but it never presented this way.

Now I know, although I'm going to have to figure out how to get around it. I might just have to uninstall Cyberpower's application.

Thank you so very much!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.