无线USB适配器 - 蓝牙USB适配器 - 迷你5.0 - 版本5.48 - 0a12:0001
最近我买了一个蓝牙USB适配器 - 型号:MLT-5.0-MiNi
我正在使用Ubuntu 20.04.1 LTS。
1. 在我将适配器连接到USB端口后,我在终端中输入命令“lsusb”来检查端口,结果如下:
2.
3.
所以看起来我的电脑没有安装驱动程序。
4. bluetoothctl --version:
5. rfkill:
6. 最后是
我找到了这个YouTube视频来解决问题。 1. 首先,我需要安装应用程序“Ubuntu Mainline Kernel Installer”以更新到最新的内核版本,所以我输入了:
2. 然后,在更新到最新的内核版本之前,我需要检查当前运行的内核版本是什么:
User@PC:~$ uname -r
毕竟,我打开了Ubuntu Mainline Kernel Installer应用程序,并单击最后一个稳定的内核版本,例如:5.8.13。最后单击“安装”按钮。 4. 安装和重启后,我再次检查:
2.
3.
我看到一切都没问题。 4. btmon:
5.
还有一个问题:
6. 另一次,我在终端上输入了命令,然后进入蓝牙设置尝试配对和连接扬声器,结果在终端上显示如下:
【多行与人机交互事件相关的内容】
Soundcore Flare+ 是这个音箱的型号。我看到还有另一个问题:
最近我买了一个蓝牙USB适配器 - 型号:MLT-5.0-MiNi
我正在使用Ubuntu 20.04.1 LTS。
1. 在我将适配器连接到USB端口后,我在终端中输入命令“lsusb”来检查端口,结果如下:
Bus 002 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
2.
hciconfig -a
给出了以下结果: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 0x87 0xfa 0xdb 0xbf 0x7b 0x83
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
3.
hcitool dev
:Devices:
所以看起来我的电脑没有安装驱动程序。
4. bluetoothctl --version:
bluetoothctl: 5.53
5. rfkill:
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 unblocked unblocked
6. 最后是
btmon
:Bluetooth monitor ver 5.53
Failed to bind channel: Operation not permitted
我找到了这个YouTube视频来解决问题。 1. 首先,我需要安装应用程序“Ubuntu Mainline Kernel Installer”以更新到最新的内核版本,所以我输入了:
sudo add-apt-repository ppa:cappelikan/ppa
sudo apt-get update
sudo apt-get install mainline
2. 然后,在更新到最新的内核版本之前,我需要检查当前运行的内核版本是什么:
User@PC:~$ uname -r
5.4.0-48-generic
User@PC:~$ uname -sr
Linux 5.4.0-48-generic
3. 后来我访问了 KERNEL的网站并检查了最新的稳定内核版本,例如:5.8.13。毕竟,我打开了Ubuntu Mainline Kernel Installer应用程序,并单击最后一个稳定的内核版本,例如:5.8.13。最后单击“安装”按钮。 4. 安装和重启后,我再次检查:
User@PC:~$ uname -r
5.8.13-050813-generic
用户@PC:~$ uname -sr
Linux 5.8.13-050813-generic
我看到它成功了,蓝牙USB DONGLE 5.0正在工作。
但是有一个连接问题在配对后:在将Ubuntu与我的扬声器5.0配对后,它无法连接,然后在将Ubuntu与我的智能手机LG配对后,我无法从Ubuntu向智能手机发送任何图片,反之亦然。
1. 我输入了systemctl status bluetooth
并进入。
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-10-03 19:02:12 -05; 10min ago
Docs: man:bluetoothd(8)
Main PID: 2173 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4649)
Memory: 2.2M
CGroup: /system.slice/bluetooth.service
└─2173 /usr/lib/bluetooth/bluetoothd
oct 03 19:02:11 PC systemd[1]: Starting Bluetooth service...
oct 03 19:02:12 PC bluetoothd[2173]: Bluetooth daemon 5.53
oct 03 19:02:12 PC systemd[1]: Started Bluetooth service.
oct 03 19:02:12 PC bluetoothd[2173]: Starting SDP server
oct 03 19:02:12 PC bluetoothd[2173]: Bluetooth management interface 1.17 initialized
oct 03 19:02:13 PC bluetoothd[2173]: Failed to set mode: Blocked through rfkill (0x12)
oct 03 19:02:14 PC bluetoothd[2173]: Endpoint registered: sender=:1.75 path=/MediaEndpoint/A2DPSink/sbc
oct 03 19:02:14 PC bluetoothd[2173]: Endpoint registered: sender=:1.75 path=/MediaEndpoint/A2DPSource/sbc
oct 03 19:02:14 PC bluetoothd[2173]: Failed to set mode: Blocked through rfkill (0x12)
我看到有一个问题:
bluetoothd[2173]: Failed to set mode: Blocked through rfkill (0x12)
2.
rfkill list
:1: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
3.
hciconfig -a
:hci0: Type: Primary Bus: USB
BD Address: 00:1A:7D:DA:71:11 ACL MTU: 679:9 SCO MTU: 48:16
UP RUNNING PSCAN ISCAN
RX bytes:1174 acl:0 sco:0 events:65 errors:0
TX bytes:1046 acl:0 sco:0 commands:65 errors:0
Features: 0xff 0xff 0x87 0xfa 0xdb 0xbf 0x7b 0x83
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'Daniel-MS-7529'
Class: 0x1c0104
Service Classes: Rendering, Capturing, Object Transfer
Device Class: Computer, Desktop workstation
HCI Version: 5.0 (0x9) Revision: 0x810
LMP Version: 5.0 (0x9) Subversion: 0x2312
Manufacturer: Cambridge Silicon Radio (10)
我看到一切都没问题。 4. btmon:
Bluetooth monitor ver 5.53
Failed to bind channel: Operation not permitted
5.
sudo dmesg | grep -i bluetooth
:[ 132.146271] Bluetooth: Core ver 2.22
[ 132.146302] Bluetooth: HCI device and connection manager initialized
[ 132.146308] Bluetooth: HCI socket layer initialized
[ 132.146310] Bluetooth: L2CAP socket layer initialized
[ 132.146314] Bluetooth: SCO socket layer initialized
[ 132.515401] Bluetooth: hci0: CSR: Unbranded CSR clone detected; adding workarounds...
[ 133.859424] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 133.859426] Bluetooth: BNEP filters: protocol multicast
[ 133.859431] Bluetooth: BNEP socket layer initialized
[ 135.263551] Bluetooth: RFCOMM TTY layer initialized
[ 135.263561] Bluetooth: RFCOMM socket layer initialized
[ 135.263570] Bluetooth: RFCOMM ver 1.11
[ 1017.955624] Bluetooth: hci0: inquiry failed: status 0x0c
[ 1023.331631] Bluetooth: hci0: inquiry failed: status 0x0c
[ 3305.392256] Bluetooth: hci0: CSR: Unbranded CSR clone detected; adding workarounds...
还有一个问题:
Bluetooth: hci0: inquiry failed: status 0x0c
6. 另一次,我在终端上输入了命令,然后进入蓝牙设置尝试配对和连接扬声器,结果在终端上显示如下:
HCI sniffer - Bluetooth packet analyzer ver 5.53
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
【多行与人机交互事件相关的内容】
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2744 class 0x240404 rssi -25
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 24:FC:E5:6E:53:5B mode 1 clkoffset 0x18bd class 0x08043c rssi -71
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 24:FC:E5:6E:53:5B mode 1 clkoffset 0x18bd class 0x08043c rssi -98
> HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Random Address (0x08|0x0005) ncmd 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Parameters (0x08|0x000b) ncmd 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
> HCI Event: Command Status (0x0f) plen 4
Disconnect (0x01|0x0006) status 0x00 ncmd 1
> HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 128 reason 0x16
Reason: Connection Terminated by Local Host
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -25
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Inquiry Complete (0x01) plen 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Random Address (0x08|0x0005) ncmd 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Parameters (0x08|0x000b) ncmd 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
> HCI Event: Command Complete (0x0e) plen 4
LE Set Scan Enable (0x08|0x000c) ncmd 1
status 0x00
> HCI Event: Command Status (0x0f) plen 4
Inquiry (0x01|0x0001) status 0x00 ncmd 1
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -27
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -27
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -24
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -24
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -23
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -24
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -23
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
> HCI Event: Extended Inquiry Result (0x2f) plen 255
bdaddr 88:D0:39:7C:24:61 mode 1 clkoffset 0x2745 class 0x240404 rssi -22
Complete local name: 'Soundcore Flare+'
Unknown type 0xff with 9 bytes data
Soundcore Flare+ 是这个音箱的型号。我看到还有另一个问题:
Unknown type 0xff with 9 bytes data
蓝牙USB 5.0在Windows 10上运行良好,但在Ubuntu 20.04上无法工作。因此,Ubuntu需要针对蓝牙5.0的驱动程序。
在5.8.14内核上,Ubuntu确实显示要配对和连接的设备,但配对和连接无法正常工作。
所以,有人能帮我解决在Ubuntu上与设备配对和连接的问题吗?
我在这个网站上找到了Linux的解决方案,但我不知道如何在Ubuntu 20.04上进行编译和修补,它只适用于内核版本5.8。
sudo hciconfig hci0 up
- Jeremy31rfkill list
的结果。 - Jeremy31