彻底解决COM端口被占用(在使用中)问题的办法

本文提供了解决COM端口被占用的方法,包括通过注册表编辑器清除已占用的端口,以及检查调制解调器设置。适用于USB转串口设备及蓝牙设备等场景。

今天就遇到这个问题了串口调试的时候发现usb转串口使用的是COM8而串口调试助手里面只有COM1到4,我想去该COM口发现COM1到7都在使用中,找了好多办法都不行,后面在网上找到这篇解决办法的文章,就转载过来了,没有标明转载的地址有点不好啊,嘿嘿。

彻底解决COM端口被占用(在使用中)问题的办法

1. 如何释放被占用的COM口?
由于反复试装不同版本的蓝牙驱动,造成COM5~COM15都处在被占用状态,最后成功安装驱动后只能使用COM16了,同步软件还不认,哪位高手能解释一下?谢谢啦!


2. 在使用USB转串口的设备,因为以前的设备有问题,换了新的设备之后发现,以前使用过的COM口现在都显示使用中,设备新分配的COM口数是从以前开始往下数的,例如:以前试到了COM7,在换了新设备后出来的就直接是COM8了,COM2-COM7都显示使用中(COM1是机器保留的)

3. 如何删除电脑中使用过的COM端口?
我的电脑经常使用蓝牙、手机数据线之类的东西,每次装一个新的设备,windows就自动分配一个新的虚拟com口,现在插上新的设备都用到COM25了,查看设备管理器-端口-com25属性-端口设置-高级-com端口号,发现从3~24全是“使用中”,怎么能把前面的这些删除掉?


以上问题的彻底解决办法:

打开注册表HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/COM Name Arbiter
把ComDB删除后重新尝试即可!(注:这样会重建所有COM口)。如果还不行,重启电脑!

亂注:以上方法解決了我的問題……

另外还可以看看集成的Modem是否占用了你的这个串口。

打开“控件面板”中的“电话/调制解调器选项”, 
   在“调制解调器”选项卡中是否有一个连接占用着这个串口(如COM1) 


解决方法: 

如果有连接占用这个串口,直接删除这个连接,重新启动电脑,问题解决。

或者看看详细原因:

   1、用安全模式启动,用系统自带的通讯中的“超级终端”测试串口(COM1), 
       这时同样报错,不过错误信息更详细了,如下: 

   ******错误信息******** 

   Windows 汇报了一个TAPI错误(80000048)。 
   请用“控件面板”中的“电话/调制解调器选项” 
   图标来确认调制解调器安装得是否正确。 

   ********************** 

   2、然后把电脑正常启动了。 
       打开“控件面板”中的“电话/调制解调器选项”, 
       发现在“调制解调器”选项卡中有一个连接占用着这个串口(COM1), 
       于是马上删除这个连接。 
       再用“超级终端”测试串口(COM1),不报错了, 
       表示与串口(COM1)通讯正常。 

   3、把串口设备连接到串口(COM1)上,用相关软件与设备通讯,正常,问题解决。

关于使用蓝牙设备时COM口被占用问题

  由於windows莫名其妙的registry原因,很多用户发现,在安装蓝牙管理软件之後,对应的蓝牙虚拟端口居然变成COM9,甚至是COM13或更高,导致与许多应用程序,如手机同步软件,PDA同步软件无法使用 ,多次重新安装蓝牙管理软件只会让状况更恶化.. 

解决方案如下(执行下列步骤之前,请务必卸载蓝牙管理程序,并重新开机) 

1.在Windows系统,按开始>执行>输入cmd,按回车 
2.出现命令字符视窗之後,输入 
set DEVMGR_SHOW_NONPRESENT_DEVICES=1 
按回车 
devmgmt.msc 
按回车 
3.然后在设备管理器点击>查看>显示隐藏的设备 
您现在能能删除多余的端口了,删除完毕之後,请务必重新开机 

4.重新安装蓝牙管理软件 

5.如果您想永久性投入这个环境变量到XP, 到我的电脑>点选之後,按鼠标右键>属性>高级>环境变量
在系统变量里面,按"新建",在"变量名"里面填入" DEVMGR_SHOW_NONPRESENT_DEVICES" ,变量值填入"1"

仅以此贴献给在使用蓝牙的路上不懈奋斗的兄弟们(关于COM口的终极解决方

The Advanced Configuration and Power Interface (ACPI) specification was developed to establish industry common interfaces enabling robust operating system (OS)-directed motherboard device configuration and power management of both devices and entire systems. ACPI is the key element in Operating System-directed configuration and Power Management (OSPM). ACPI evolved the existing pre-ACPI collection of power management BIOS code, Advanced Power Management (APM) application programming interfaces (APIs, PNPBIOS APIs, Multiprocessor Specification (MPS) tables and so on into a well-defined power management and configuration interface specification. ACPI provides the means for an orderly transition from existing (legacy) hardware to ACPI hardware, and it allows for both ACPI and legacy mechanisms to exist in a single machine and to be used as needed. Further, system architectures being built at the time of the original ACPI specification’s inception, stretched the limits of historical “Plug and Play” interfaces. ACPI evolved existing motherboard configuration interfaces to support advanced architectures in a more robust, and potentially more efficient manner. The interfaces and OSPM concepts defined within this specification are suitable to all classes of computers including (but not limited to) desktop, mobile, workstation, and server machines. From a power management perspective, OSPM/ACPI promotes the concept that systems should conserve energy by transitioning unused devices into lower power states including placing the entire system in a low-power state (sleeping state) when possible. This document describes ACPI hardware interfaces, ACPI software interfaces and ACPI data structures that, when implemented, enable support for robust OS-directed configuration and power management (OSPM)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值