БЕСПРОВОДНОЙ USB-ДОНГЛ - BLUETOOTH USB DONGLE - MINI 5.0 - ВЕРСИЯ 5.48 - 0a12:0001
Недавно я купил USB-ключ Bluetooth - номер модели: 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
User@PC:~$ uname -sr
Linux 5.8.13-050813-generic
Я увидел, что это было успешно, и bluetooth 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. В другой раз я набрал на терминале hcidump -X
и вошел, а затем я пошел в настройки Bluetooth, чтобы попытаться выполнить сопряжение и подключить динамик, и я получил следующие результаты на терминале:
HCI sniffer - Bluetooth packet analyzer ver 5.53
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
[несколько строк, связанных с событием HCI]
> 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
Bluetooth USB 5.0 отлично работает в Windows 10, но не работает в Ubuntu 20.04. Итак, Ubuntu нужны драйверы для Bluetooth 5.0.
В ядре 5.8.14 Ubuntu действительно отображает устройства для сопряжения и подключения, но сопряжение и подключение не работают.
Итак, кто-нибудь может помочь мне решить эту проблему сопряжения и подключения к устройствам из Ubuntu?
Я нашел проблему, решенную для Linux, на этом веб-сайте, но я не знаю, как компилировать и исправлять Ubuntu 20.04, это может работать только для версии ядра 5.8.