Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I free a locked com port?

Posted on 2010-09-15
7
Medium Priority
?
1,746 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 66

Assisted Solution

by:johnb6767
johnb6767 earned 1336 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 664 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
Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

 

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 1336 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

715 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