Solved

How do I free a locked com port?

Posted on 2010-09-15
7
1,590 Views
Last Modified: 2012-05-10
I’ve come across an annoying issue that I’d like to know if there’s a good solution for.

If there is data being transmitted to one of my PCs com ports when Windows XP starts up, XP decides the com port is in use and locks it from use. The only way I know of to “free” it is to shut down the PC, disconnect the device that was talking on the COM port, and reboot and then reconnect the device again. This is a huge hassle.

1) Is there a way to prevent Windows from “locking” the port so it’s not an issue anymore?
2) Is there a way to force Windows XP to allow the port to be used instead of requiring a hard shutdown and reboot?
0
Comment
Question by:enggarmin
  • 4
  • 2
7 Comments
 
LVL 66

Assisted Solution

by:johnb6767
johnb6767 earned 334 total points
ID: 33688538
1. Dont think so.... A good app would release the port once communication is done.....

2. You can forcibly close the port using the below.....

closecom.zip
http://www.filelibrary.com/Contents/OS2/64/16.html

Yes, it does state Windows 3.1 on it, but it works fine under XP. Simply launch the app, and it will ask you to forcibly close the port.

(not sure if thats a good link, might need to google it)

0
 
LVL 4

Assisted Solution

by:jlar310
jlar310 earned 166 total points
ID: 33688554
The serial port would be locked only if an application has opened it. You need to find out which application or service at startup is locking the port (possibly the UPS monitoring service?)

PortMon is a tool that should tell you what application is using the port.

http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx

Then it's just a matter of not letting that application or service run at startup.  Or reconfiguring the application in some other way. It will depend on what the app is.
0
 

Author Comment

by:enggarmin
ID: 33693918
I've tried both of these softwares before (closecom and portmon) but didn't have much luck.  I'll try them again and see what I can find.  I 'll get back to you with the results.

The idea that it may be a service locking up the port (unrelated to the device) sounds promising. I'll see if PortMon can confirm that theory.

Thanks!!
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:enggarmin
ID: 33716587
no luck.

Clozecom fails to close the port.  "CloseCom for COM1: failed!"

Portmon fails to monitor the port.  "Portmon could not attach to Serial0 - the device may be in use"

Any more tips or suggestions?  I'm open to anything.
0
 
LVL 66

Assisted Solution

by:johnb6767
johnb6767 earned 334 total points
ID: 33718820
Do you know what device /service/app is locking it to begin with?

If not, the Process of Elimination would be a good place to start......

How to configure Windows XP to start in a "clean boot" state
http://support.microsoft.com/kb/310353

Start  by disabling all the startups, and check it out, and if that fails to get you access via Portmon, kill the non ms services, then retry....Still need to dig deeper, kill half the MS Services.... and retry, and once you find it is not locked on boot, you can restart enabling services/apps until you find the culprit.... Might very wekll be an unneeded service that still thinks it has something connected....
0
 

Author Comment

by:enggarmin
ID: 33719927
Thanks Johnb6767.  jlar310 suggested it might be a service and that seems like a likely path to investigate.  I should have thought of going though and turning off services as a way of finding which one it was.  I'll try that next and let you know.  
0
 

Accepted Solution

by:
enggarmin earned 0 total points
ID: 33730140
So I have the problem resolved and it really took a different turn so I'm not sure, really, how to best award points.  Thank you all for your help.

What I ultimately found when trying to track down what had it locked was that it was not a service that had it locked but it actually was being locked because Windows thought the device was a serial mouse.  I spent a while doing searches online for how to address it and ultimately found that most approachs don't work (Adding /fastdetect or /NoSerialMouse to the boot.ini, which did nothing).  I eventually was directed to two softwares.  One was from microsoft, http://support.microsoft.com/default.aspx?scid=kb;en-us;819036, that involved installing a com disable tool and disabling the port via a command line prompt.  The 2nd option was a software called NoSerialMouse that I downloaded from this site: http://www.marciowb.net/blog/2008/10/rapidinha-dispositivo-serial-windows (scroll down and click on "NoSerialMouse" in purple to download the software.  The site is not in English so I am not sure what it is doing but I assume something very similar to the first software.  This NoSerialMouse is much simpler to use.  I used it to disable the com port the device was on and after a reboot it no longer was locked by XP as a mouse and both Clozecom and PortMon now functioned properly but were not really needed as the port was free anyway.

I hope this information helps someone else who comes across this problem.  Thanks!!
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VPN Server 5 50
Is Fedora an appropriate distro for the environment. 7 85
Ping general failure windows 7 5 70
ESXi vmnic Stand By Status 3 50
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
An article on effective troubleshooting
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question