遭遇Device Association Service占用CPU和内存过高异常

1.异常描述

        在蓝牙设备搜索和配对过后,系统界面卡住了,查找了下任务管理器,发现有一个主机服务占用了过多的CPU和内存,且不断的在增长。截图如下:

         百度查了下,Device Association Service是一个Win10系统服务,支持系统与有线或无线设备之间的配对。

Device Association Service - Windows 10 Service - batcmd.com

        Device Association Service - Windows 10 Service

        Enables pairing between the system and wired or wireless devices.

2.解决办法

        参考博文:Device Association Service占用CPU - 解决方案-CSDN博客

        由于Device Association Service服务与蓝牙有关,在解决问题前需要确保蓝牙和无线网卡驱动正常运行,若驱动异常则建议重装或更新驱动。此服务占用大量CPU的异常状态很可能是由于旧蓝牙驱动和旧蓝牙设备的卸载残留导致,只需将旧蓝牙驱动和旧蓝牙设备完全清除即可,操作步骤如下:

方法1.手动卸载蓝牙设备:

        Windows+X打开设备管理器,展开蓝牙选项。 

         发现一大堆的蓝牙设备,蓝牙LE通用属性服务、设备信息服务、通用访问配置文件等等。         

        右键,点击卸载设备。

方法2.批量卸载

        蓝牙命令行工具是一套适用于 Microsoft Windows 的命令行实用程序,可用于配置蓝牙适配器、发现远程蓝牙设备和服务、将文件传输到支持 OBEX 的设备。所有实用程序都可以作为批处理脚本或其他自动后台进程的一部分调用,或者从 Windows 命令提示符手动启动。目前该套件中有七个实用程序:

  • BT信息

        显示有关已安装的蓝牙适配器的信息。输出格式可以定制。(更多信息和btinfo使用示例...)

  • BT配置

        修改本地蓝牙无线电的友好名称和设备类别(台式机、笔记本电脑、服务器)。打开或关闭发现。关闭或禁用传入的蓝牙连接。(更多信息和btconfig使用示例...)

  • BT发现

        发现远程蓝牙设备和服务。(更多信息和btdiscovery用法示例...)

  • BT配对

        与远程蓝牙设备进行配对。(更多信息和btpair使用示例...)

  • BTOBEX

        将文件发送到支持 OBEX 的远程设备(计算机、移动电话等)。(更多信息和btobex使用示例...)

  • BTFTP

        使用 OBEX 文件传输配置文件与远程蓝牙设备交换文件。(更多信息和btftp使用示例...)

  • BTCOM

        启用或禁用远程蓝牙服务,操作蓝牙 COM 端口。(更多信息和btcom使用示例... 

step1.下载安装工具 

         使用工具Bluetooth Command Line Tools命令行工具卸载。工具下载地址:

Bluetooth command line tools - work with bluetooth from the command line

        下载安装包,然后安装好。 

         安装时记得勾选添加到环境变量路径path。"Add Bluetooth Command Line Tools directory to path"选择框选择勾选。

        readme.txt中找到关于btpair命令的使用说明如下:

btpair

  Bluetooth device pairing utility


  usage:

    btpair {-p[PIN] | -u} [-bBluetoothAddress | -nFriendlyName]

       -p  Pair your computer with remote device using specified PIN code.
           If no pin specified, the default ('0000') is used.
       -u  Unpair remote device.
       -b  Bluetooth address of remote device in (XX:XX:XX:XX:XX:XX) format.
       -n  Friendly name of remote device.
       -h  Prints this help screen.

  Note:
    Usually pairing is not enough for the remote bluetooth device to function properly.
    One ore more remote bluetooth services should be enabled using "btcom" utility.

  samples:

    1. Pair your computer and device named "Nokia 6300" using PIN code 1234 :

	    btpair -n"Nokia 6300" -p1234

    2. Unpair all remembered devices: 

            btpair -u

        btcom命令使用说明如下:

 step2.打开命令行输入 btpair -u,回车执行

         需要花费一点时间,中途我打开设备管理器查看,确实少了很多。但是BLE设备还是没有卸载掉,原来我们下载的是经典蓝牙命令行工具。

3. 关于Bluetooth LE(Low Energy) tools for Windows 10)

        Bluetooth LE(Low Energy) tools for Windows 10)没有下载包。Coming soon (February 2017),都2024了,还没有这个工具呢?尴了个尬了呀!

Bluetooth command line tools - work with bluetooth from the command line

 系统要求:windows 10

  • Windows 10 (x86, x64)
  • Microsoft bluetooth stack compatible Bluetooth adapter with Low Energy support (Bluetooth 4.0 or higher)

        

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值