Cannot open COM1 resolution

 

Recently I came upon a problem where I could not connect to a device attached to the serial port using ttermpro: the application would fail with the “Cannot open COM1” message and show a “Disconnected” state. Trying other applications such as putty or hyperterminal would end up with similar errors, so it was clear that the port was the cause.

Now there are two reasons why an application cannot speak to the COM-port: either it is physically not correctly initialized (e.g. disabled in BIOS, set to a weird IRQ that conflicts with another port, etc.) OR some other application has already claimed this.

You could decide to restart the server and check BIOS settings but first make some healthy checks: if devmgmt.msc lists COM1 and the device is shown in healthy state, furthermore if msinfo32 doesn’t expose some IRQ conflicts then most probably an application has reserved the resource for itself. Simply start Process Explorer from Sysinternals and search for “serial” expression. On real hardware (not virtual machine) the resource is called \Device\Serial0, as explained here. You can see on the figure below that in my case this is the ups.exe, or UPS Service, but it can be any other application, like exemplified in this thread.

OK, now, to disable the UPS Service from listening on COM1 you will have to change the power settings. In my case it was an obsolete remnant, and you can see this on the “Communication between UPS and UPS Service is lost” message. Sorry, this was a German system.

To disable this, click Select. On the screenshot you see American Power Conversion and COM1 active.

Simply select from the dropdown <none>; then the COM1 port is grayed out and you are OK.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s