当我使用 rfkill 解除阻止时,是什么导致我的 Intel 7260 蓝牙设备断开连接?

PaS*_*STE 6 bluetooth intel-wireless asus rfkill 13.10

SOLUTION : 问题似乎是蓝牙模块在 Linux 中与 xHCI 无法正常工作。有一个标有“XHCI PRE-BOOT MODE”的 BIOS 设置,必须将其设置为“禁用”。如果不是,那么 Linux 会将蓝牙模块视为连接到 xHCI 总线而不是 EHCI 总线,从而导致通信错误。 但是,此修复程序将禁用您系统上的 USB 3.0。目前我没有更好的解决方案,但至少这是有效的。

我有一台新的 ASUS UX301LA 笔记本电脑,我正在运行 Ubuntu Gnome 13.10 (Saucy)。内核似乎在启动时知道笔记本电脑的蓝牙设备,但是每当我使用 rfkill 解锁蓝牙时它就会消失。例如:

$ sudo rfkill block bluetooth
$ dmesg | tail -5
[ 2024.876537] usb 2-4: new full-speed USB device number 8 using xhci_hcd
[ 2024.894043] usb 2-4: New USB device found, idVendor=8087, idProduct=07dc
[ 2024.894053] usb 2-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2024.908190] Bluetooth: hci0: read Intel version: 370710018002030d00
[ 2024.908271] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq
[ 2025.057051] Bluetooth: hci0: Intel Bluetooth firmware patch completed and activated

$ sudo rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: asus-bluetooth: Bluetooth
    Soft blocked: yes
    Hard blocked: no
3: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

$ sudo hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
    BD Address: XX:XX:XX:XX:XX:XX  ACL MTU: 1021:5  SCO MTU: 96:5
    DOWN 
    RX bytes:568 acl:0 sco:0 events:29 errors:0
    TX bytes:390 acl:0 sco:0 commands:29 errors:0
    Features: 0xff 0xfe 0x0f 0xfe 0xdb 0xff 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH HOLD SNIFF 
    Link mode: SLAVE ACCEPT 

$ sudo rfkill unblock bluetooth
$ dmesg | tail -1
[ 2391.749122] usb 2-4: USB disconnect, device number 8

$ sudo rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: asus-wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: asus-bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no

$ sudo hciconfig -a
[no output]
Run Code Online (Sandbox Code Playgroud)

编辑:蓝牙设备显示为 Intel 7260 无线 USB 设备,ID 8087:07dc。我发现的唯一可能相关的信息是已发布修复程序的错误,在 Launchpad 上提到:支持英特尔 7260 蓝牙 [8087:07dc]

编辑:我从英特尔的网站(Saucy 随附 22.0.7.0)将固件更新为新的 22.1.7.0 版本,并且发生了同样的问题。

编辑:在日志中进一步挖掘显示,当我运行 unblock 命令时,蓝牙 USB 设备已完全断开连接:

$ lsusb -d 8087:07dc
Bus 001 Device 007: ID 8087:07dc Intel Corp. 
$ rfkill unblock bluetooth
$ lsusb -d 8087:07dc
[no output]
$ dmesg | tail -1
[  438.284647] usb 1-4: USB disconnect, device number 7
Run Code Online (Sandbox Code Playgroud)

编辑:从 3.13 内核将 iwlwifi 驱动程序更新到(更新的)向后移植没有帮助。当前版本的驱动程序:

$ modinfo iwlwifi
filename:       /lib/modules/3.11.0-15-generic/updates/drivers/net/wireless/iwlwifi/iwlwifi.ko
version:        backported from Linux (v3.13-rc8-0-g7e22e91) using backports v3.13-rc8-1-0-gae71bd3
license:        GPL
author:         Copyright(c) 2003-2013 Intel Corporation <ilw@linux.intel.com>
version:        in-tree:d
description:    Intel(R) Wireless WiFi driver for Linux
firmware:       iwlwifi-100-5.ucode
firmware:       iwlwifi-1000-5.ucode
firmware:       iwlwifi-135-6.ucode
firmware:       iwlwifi-105-6.ucode
firmware:       iwlwifi-2030-6.ucode
firmware:       iwlwifi-2000-6.ucode
firmware:       iwlwifi-5150-2.ucode
firmware:       iwlwifi-5000-5.ucode
firmware:       iwlwifi-6000g2b-6.ucode
firmware:       iwlwifi-6000g2a-5.ucode
firmware:       iwlwifi-6050-5.ucode
firmware:       iwlwifi-6000-4.ucode
firmware:       iwlwifi-3160-7.ucode
firmware:       iwlwifi-7260-7.ucode
srcversion:     F6C7F0E202757B474065F3B
alias:          pci:v00008086d0000095Asv*sd00005490bc*sc*i*
[... trimmed several "alias" lines ...]
alias:          pci:v00008086d00004232sv*sd00001201bc*sc*i*
depends:        compat,cfg80211
vermagic:       3.11.0-15-generic SMP mod_unload modversions 
parm:           debug:debug output mask (uint)
parm:           swcrypto:using crypto in software (default 0 [hardware]) (int)
parm:           11n_disable:disable 11n functionality, bitmap: 1: full, 2: agg TX, 4: agg RX (uint)
parm:           amsdu_size_8K:enable 8K amsdu size (default 0) (int)
parm:           fw_restart:restart firmware in case of error (default true) (bool)
parm:           antenna_coupling:specify antenna coupling in dB (defualt: 0 dB) (int)
parm:           wd_disable:Disable stuck queue watchdog timer 0=system default, 1=disable, 2=enable (default: 0) (int)
parm:           nvm_file:NVM file name (charp)
parm:           bt_coex_active:enable wifi/bt co-exist (default: enable) (bool)
parm:           led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0) (int)
parm:           power_save:enable WiFi power management (default: disable) (bool)
parm:           power_level:default power save level (range from 1 - 5, default: 1) (int)
Run Code Online (Sandbox Code Playgroud)

编辑:正如 Bernhard 在回复中所建议的那样,我试图强制适配器使用 command echo "on" > /sys/class/bluetooth/hci0/device/../power/control。虽然通过 rfkill 阻止了蓝牙,但这似乎没有效果,并hciconfig hci0 up回应说设备仍然被阻止。当使用 rfkill 解锁蓝牙时,蓝牙/sys/class/bluetooth/hci0不存在,因此尝试手动打开它失败。我也尝试将其添加到其中/etc/rc.local,与在控制台上以 root 用户身份简单运行命令相比,没有明显区别。

编辑:我给英特尔 wifi 开发人员发了电子邮件,他们发布了这个非常有用的回复:

Hello,

I am afraid you are asking the wrong people. We are WiFi people and not Bluetooth.

Thanks,
(name removed)
Run Code Online (Sandbox Code Playgroud)

我将尝试自己破解蓝牙驱动程序,看看我是否可以从中获得更多调试信息。

有没有人有任何建议可以帮助我?有没有人经历过这种情况?是否有任何拥有华硕 UX301LA 的 Ubuntu 用户可能有任何提示?

让我知道哪些其他信息可能有用,我会发布它。我只是不想用无用的数据使第一篇文章过载。

小智 0

我的联想 T440s 也出现同样的问题。我目前还没有解决方案,但看起来我们受到了内核错误的影响(可以在此处找到有关它的讨论)。

添加

echo "on" > /sys/class/bluetooth/hci0/device/../power/control
Run Code Online (Sandbox Code Playgroud)

/etc/rc.local 似乎有一点帮助,但与我的蓝牙鼠标的连接仍然不稳定。


小智 0

看一下:/usr/share/gnome-bluetooth/pin-code-database.xml

您的鼠标是否存在(使用 OUI 进行搜索,即“OEM 唯一标识符”,即鼠标 MAC 地址的前 3 个八位字节。例如,如果您的鼠标 MAC 地址是 AA:BB:CC:DD:EE :FF,那么 OUI 是“AA:BB:CC”)?

如果它已经存在,请确保它看起来像:

(注意结尾的冒号:“AA:BB:CC* : *” - 不要省略它)。

如果它尚不存在,请添加它。

另外,不确定这是否相关,但 Intel 7260 WiFi 存在一个众所周知的问题(经常偶尔断开连接)。要解决 WiFi 问题,我发现唯一有效的方法是禁用 802.11n:

  1. 打开终端。
  2. sudo vi /etc/modprobe.d/wifi-disable11n.conf
  3. 添加此行: options iwlwifi 11n_disable=1
  4. 保存并重新启动。

我只是在黑暗中做一个标签,但值得一试(恕我直言)。

  • 问题不在于鼠标,也不在于连接到 7260 的任何特定蓝牙设备。我有一个小型 USB 蓝牙适配器,在安装 7260 的同一台计算机上使用,并且该适配器连接到鼠标没有问题。问题在于,7260 的蓝牙组件一旦解锁,就会物理断开连接:它永远没有机会尝试连接到任何东西,因此问题不可能是鼠标上的错误 PIN 码。我对 7260 的 WiFi 组件也没有任何问题:我可以毫无问题地连接到任何 802.11[bgn] AP。 (2认同)