蓝牙适配器问题

a.l*_*a.l 8 usb bluetooth drivers dongle

就像蓝牙适配器问题。(可能与驱动程序有关)我遇到了蓝牙设备无法正确初始化的相同问题:

$ lsusb | grep Bluetooth
Bus 001 Device 006: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

$ usb-devices | awk '/0a12/' RS=
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  6 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a12 ProdID=0001 Rev=88.91
S:  Product=USB1.1-A
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

$ hciconfig -a hci0
hci0:   Type: Primary  Bus: USB
    BD Address: 00:1A:7D:DA:71:11  ACL MTU: 679:9  SCO MTU: 48:16
    DOWN 
    RX bytes:574 acl:0 sco:0 events:30 errors:0
    TX bytes:368 acl:0 sco:0 commands:30 errors:0
    Features: 0xff 0xff 0xc5 0xfa 0xdb 0xbf 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH HOLD SNIFF PARK 
    Link mode: SLAVE ACCEPT

$ hcidump
...
> HCI Event: Command Complete (0x0e) plen 12
    Read Local Version Information (0x04|0x0001) ncmd 1
    status 0x00
    HCI Version: 4.0 (0x6) HCI Revision: 0x810
    LMP Version: 4.0 (0x6) LMP Subversion: 0x1113
    Manufacturer: Cambridge Silicon Radio (10)
...
> HCI Event: Command Complete (0x0e) plen 6
Delete Stored Link Key (0x03|0x0012) ncmd 1
status 0x11 deleted 0
Error: Unsupported Feature or Parameter Value
Run Code Online (Sandbox Code Playgroud)

Error: Unsupported Feature or Parameter Value只要您没有应用补丁,您就只会看到最后一个 HCI 事件。补丁后,您将不会在hcidump.

它在 Windows 10 中运行良好,但在 Ubuntu 18.04(内核 5.3 也不行)中运行良好。Blueman 无法识别蓝牙设备。

我在插入蓝牙 USB 加密狗时得到这个:

jan 26 21:10:38 some-computer kernel: usb 1-1.3: new full-speed USB device number 6 using ehci-pci
jan 26 21:10:38 some-computer kernel: usb 1-1.3: config 1 interface 1 altsetting 0 endpoint 0x3 has wMaxPacketSize 0, skipping
jan 26 21:10:38 some-computer kernel: usb 1-1.3: config 1 interface 1 altsetting 0 endpoint 0x83 has wMaxPacketSize 0, skipping
jan 26 21:10:38 some-computer kernel: usb 1-1.3: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
jan 26 21:10:38 some-computer kernel: usb 1-1.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
jan 26 21:10:38 some-computer kernel: usb 1-1.3: Product: USB1.1-A
jan 26 21:10:38 some-computer systemd[1]: Starting Load/Save RF Kill Switch Status...
jan 26 21:10:38 some-computer systemd[1]: Started Load/Save RF Kill Switch Status.
jan 26 21:10:38 some-computer systemd[1]: Reached target Bluetooth.
jan 26 21:10:38 some-computer upowerd[9037]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.1
jan 26 21:10:38 some-computer upowerd[9037]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3/1-1.3:1.0
jan 26 21:10:38 some-computer upowerd[9037]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.3
jan 26 21:10:38 some-computer kernel: [UFW BLOCK] IN=eno1 OUT= MAC= SRC=<REMOVED from output by me!> DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=939113 PROTO=UDP SPT=8612 DPT=8612 LEN=24 
Run Code Online (Sandbox Code Playgroud)

我希望有人对该怎么做有提示。

我有一些补充信息。

关于这个:https : //launchstudio.bluetooth.com/listingdetails/75270 可能相关的芯片是:http : //en.barrot.com.cn/a/BR80XX-series/48.htmlhttp://en.barrot.com.cn/a/BR200Xxilie/12.html

注意:@Pilot6 要求我将其创建为一个单独的问题,以避免我之前的评论(在开头提到的问题中添加为答案)将被删除。

在 Internet 上找到的与特定“BQB 75270”LMP Subversions 匹配的图像(由用户标识):

LMP颠覆(al):0x1113

LMP Subversion(BXL - 下图中的产品 3):0x1712

LMP Subversions 目前未知以下产品 12

点击查看大图其他 BQB75270 加密狗

a.l*_*a.l 6

可以制作一个补丁使加密狗在 Linux 中工作,但是在将它引入内核之前我们还有一些工作要做。所以加密狗使用的是之前提到的 Barrot 制造的假 CSR 芯片。我们需要联系 linux 内核维护人员以获得蓝牙支持,但在此之前,我们需要比我更多的人来确认它是否有效。然后我将在这里发布我们的发现:https : //bugzilla.kernel.org/show_bug.cgi? id = 60824#c48 然后最后联系内核维护者(并尝试遵守“补丁提交者提示” https: //www.kernel.org/doc/linux/MAINTAINERS )


2020 年 12 月 28 日更新:由于我几个月没有时间为 linux 内核打补丁,请随时在上面提到的错误页面上发布您的发现,然后如果一切顺利,请联系内核维护人员。


请测试

任何想要内核支持的人请测试这个补丁并在评论中写回你的结果。我使用了内核 5.3。您的内核在行号等方面可能有所不同。您可能需要重新检查这些。如何查看 Ubuntu 内核 - 除非您使用来自https://www.kernel.org/ 的内核:

https://wiki.ubuntu.com/KernelTeam/GitKernelBuild如何/在哪里克隆当前的 18.04 内核(5.0.0-37-generic),特别是使用 Githttps://unix.stackexchange.com/questions/46077/ where-to-download-linux-kernel-source-code-of-a-specific-version/46088#46088/sf/ask/596391631/可能性列表/sf/ask/238345551/#3405221(我用过:git checkout Ubuntu-hwe-5.3.0-28.30_18。 04.1):

diff -Nuar btusb.c_OLD btusb.c
--- btusb.c_OLD 2020-01-29 12:32:30.383536820 +0100
+++ btusb.c 2020-01-29 12:33:49.579840488 +0100
@@ -1599,7 +1599,8 @@
 
    /* Detect controllers which aren't real CSR ones. */
    if (le16_to_cpu(rp->manufacturer) != 10 ||
-       le16_to_cpu(rp->lmp_subver) == 0x0c5c) {
+       le16_to_cpu(rp->lmp_subver) == 0x0c5c ||
+            le16_to_cpu(rp->lmp_subver) == 0x1113) {
        /* Clear the reset quirk since this is not an actual
         * early Bluetooth 1.1 device from CSR.
         */
@@ -3851,7 +3852,7 @@
            set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
 
        /* Fake CSR devices with broken commands */
-       if (bcdDevice <= 0x100 || bcdDevice == 0x134)
+       if (bcdDevice <= 0x100 || bcdDevice == 0x134 || bcdDevice == 0x8891)
            hdev->setup = btusb_setup_csr;
 
        set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);
Run Code Online (Sandbox Code Playgroud)

, 文件位于内核源:drivers/bluetooth

如何确定您是否有相同的加密狗

  1. 将 USB 蓝牙加密狗插入计算机的 USB 端口。

  2. 打开两个终端窗口。

  3. 在第一个窗口中,请启动:

     hcidump
    
    Run Code Online (Sandbox Code Playgroud)

Ubuntu:您可以通过“bluez-hcidump”包安装该程序。

  1. 在第二个窗口中,请开始:

     sudo hciconfig hci0 down
    
     sudo hciconfig hci0 up
    
    Run Code Online (Sandbox Code Playgroud)

确保您在蓝牙管理器中启用蓝牙加密狗,否则您将收到一条错误消息,例如:

Can't init device hci0: Operation not supported (95)
Run Code Online (Sandbox Code Playgroud)

(对于那些没有运行补丁(或不正确/不受支持的加密狗)的人

Can't init device hci0: Operation not possible due to RF-kill (132)
Run Code Online (Sandbox Code Playgroud)

(如果您的加密狗受支持/补丁已应用,则可能会显示)

您可以安装 hciconfig 程序,显然需要它来支持蓝牙 Ubuntu: 'bluez' 包。

  1. 现在在第一个终端中找到以下几行:

     \> HCI Event: Command Complete (0x0e) plen 12
         Read Local Version Information (0x04|0x0001) ncmd 1
    
    Run Code Online (Sandbox Code Playgroud)

确保您具有与此事件/命令的问题顶部所述的 hciconfig 相同的输出。

例如,我们需要知道 LMP Subversion 和制造商,以确保它与我所指的加密狗相同。

  1. 确保您具有与此事件/命令的问题顶部所述的 hciconfig 相同的输出:

     \> HCI Event: Command Complete (0x0e) plen 6
     Delete Stored Link Key (0x03|0x0012) ncmd 1
    
    Run Code Online (Sandbox Code Playgroud)

, 关于。状态并返回“错误:不支持的功能或参数值”。如上所述,只要您没有应用补丁,您就只会看到此消息。

  1. 确保您具有相同的 USB-devices 输出。您的 USB 蓝牙加密狗在此命令的问题顶部说明:

     usb-devices | awk '/0a12/' RS=
    
    Run Code Online (Sandbox Code Playgroud)

Ubuntu:您需要安装“usbutils”包来获取程序usb-devices。