LINUX.ORG.RU

bluetooth на ubuntu 20 не работает

 


0

1

Привет! Купил usb адаптер bluetooth на настольный комп. Запустил sudo blueman-manager, включил bluetooth. Нажал выбор адаптера, получил кучу ошибок связанных с питоном и адаптера не нашел. Как победить?

blueman-manager version 2.1.2 starting
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.InProgress: Operation already in progress (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusInProgressError:  Operation already in progress
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] Нет такого файла или каталога: '/var/crash/_usr_bin_blueman-manager.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.InProgress: Operation already in progress (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusInProgressError:  Operation already in progress
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.InProgress: Operation already in progress (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusInProgressError:  Operation already in progress
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] Нет такого файла или каталога: '/var/crash/_usr_bin_blueman-manager.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.InProgress: Operation already in progress (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusInProgressError:  Operation already in progress

Запускаю bluetoothctl:

[bluetooth]# list
Controller 00:1A:7D:DA:71:10 nail-home [default]
Контроллер есть.

В статусе есть ошибка

sudo systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-10-20 20:09:03 -03; 22min ago
       Docs: man:bluetoothd(8)
   Main PID: 1026 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 8790)
     Memory: 2.1M
     CGroup: /system.slice/bluetooth.service
             └─1026 /usr/lib/bluetooth/bluetoothd

окт 20 20:09:03 nail-home systemd[1]: Started Bluetooth service.
окт 20 20:09:03 nail-home bluetoothd[1026]: Starting SDP server
окт 20 20:09:03 nail-home bluetoothd[1026]: Bluetooth management interface 1.14 initialized
окт 20 20:09:04 nail-home bluetoothd[1026]: Failed to set mode: Blocked through rfkill (0x12)
окт 20 20:09:07 nail-home bluetoothd[1026]: Endpoint registered: sender=:1.37 path=/MediaEndpoint/A2DPSink/sbc
окт 20 20:09:07 nail-home bluetoothd[1026]: Endpoint registered: sender=:1.37 path=/MediaEndpoint/A2DPSource/sbc
окт 20 20:09:15 nail-home bluetoothd[1026]: Endpoint unregistered: sender=:1.37 path=/MediaEndpoint/A2DPSink/sbc
окт 20 20:09:15 nail-home bluetoothd[1026]: Endpoint unregistered: sender=:1.37 path=/MediaEndpoint/A2DPSource/sbc
окт 20 20:09:16 nail-home bluetoothd[1026]: Endpoint registered: sender=:1.47 path=/MediaEndpoint/A2DPSink/sbc
окт 20 20:09:16 nail-home bluetoothd[1026]: Endpoint registered: sender=:1.47 path=/MediaEndpoint/A2DPSource/sbc

Blocked through rfkill

rfkill блокировки проверь

anonymous
()

Да, надо посмотреть блокировки: rfkill list all

Если блокировок нет, приложи вывод dmesg | grep -i bluetooth, в случае с внешними устройствами я часто встречаю там полезную информацию.

PhysShell ★★
()
Ответ на: комментарий от PhysShell

Блокировка есть, а как его вырубить?

$ rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
Вывод dmesg:
dmesg | grep -i bluetooth
[    6.362537] Bluetooth: Core ver 2.22
[    6.362562] Bluetooth: HCI device and connection manager initialized
[    6.362567] Bluetooth: HCI socket layer initialized
[    6.362569] Bluetooth: L2CAP socket layer initialized
[    6.362573] Bluetooth: SCO socket layer initialized
[    7.345605] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.345608] Bluetooth: BNEP filters: protocol multicast
[    7.345613] Bluetooth: BNEP socket layer initialized
[   10.996509] Bluetooth: RFCOMM TTY layer initialized
[   10.996515] Bluetooth: RFCOMM socket layer initialized
[   10.996526] Bluetooth: RFCOMM ver 1.11
[   65.002176] Bluetooth: hci0: command 0x2005 tx timeout
[   67.014368] Bluetooth: hci0: command 0x200b tx timeout
[   69.034441] Bluetooth: hci0: command 0x200c tx timeout
[   71.046517] Bluetooth: hci0: command 0x0401 tx timeout
[ 1087.018998] Bluetooth: hci0: command 0x2005 tx timeout
[ 1089.035055] Bluetooth: hci0: command 0x200b tx timeout
[ 1091.051120] Bluetooth: hci0: command 0x200c tx timeout
[ 1093.067197] Bluetooth: hci0: command 0x0401 tx timeout
[ 1541.370387] Bluetooth: hci0: command 0x0c1a tx timeout
[ 1543.386453] Bluetooth: hci0: command 0x0c3a tx timeout
[ 1545.402519] Bluetooth: hci0: command 0x0c1a tx timeout
[ 1547.259117] Bluetooth: hci0: setting interface failed (110)
[ 1578.043651] Bluetooth: hci0: command 0x2005 tx timeout
[ 1580.059729] Bluetooth: hci0: command 0x200b tx timeout
[ 1582.075802] Bluetooth: hci0: command 0x200c tx timeout
[ 1584.091852] Bluetooth: hci0: command 0x0401 tx timeout
[ 1613.052741] Bluetooth: hci0: command 0x2005 tx timeout
[ 1615.068930] Bluetooth: hci0: command 0x200b tx timeout
[ 1617.084891] Bluetooth: hci0: command 0x200c tx timeout
[ 1619.100947] Bluetooth: hci0: command 0x0401 tx timeout

rustamych ★★★
() автор топика
Ответ на: комментарий от rustamych

sudo rfkill unblock bluetooth

После этого перезапустить сервис bluetooth:

sudo systemctl restart bluetooth

Если не поможет, посмотри, изменилось ли что в статусе сервиса и что dmesg отдаёт.

PhysShell ★★
()
Ответ на: комментарий от PhysShell

Не катит ваша мантра :-(. Статус изменился, но не работает все равно.

$ rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
$ dmesg | grep -i bluetooth
[    6.362537] Bluetooth: Core ver 2.22
[    6.362562] Bluetooth: HCI device and connection manager initialized
[    6.362567] Bluetooth: HCI socket layer initialized
[    6.362569] Bluetooth: L2CAP socket layer initialized
[    6.362573] Bluetooth: SCO socket layer initialized
[    7.345605] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.345608] Bluetooth: BNEP filters: protocol multicast
[    7.345613] Bluetooth: BNEP socket layer initialized
[   10.996509] Bluetooth: RFCOMM TTY layer initialized
[   10.996515] Bluetooth: RFCOMM socket layer initialized
[   10.996526] Bluetooth: RFCOMM ver 1.11
[   65.002176] Bluetooth: hci0: command 0x2005 tx timeout
[   67.014368] Bluetooth: hci0: command 0x200b tx timeout
[   69.034441] Bluetooth: hci0: command 0x200c tx timeout
[   71.046517] Bluetooth: hci0: command 0x0401 tx timeout
[ 1087.018998] Bluetooth: hci0: command 0x2005 tx timeout
[ 1089.035055] Bluetooth: hci0: command 0x200b tx timeout
[ 1091.051120] Bluetooth: hci0: command 0x200c tx timeout
[ 1093.067197] Bluetooth: hci0: command 0x0401 tx timeout
[ 1541.370387] Bluetooth: hci0: command 0x0c1a tx timeout
[ 1543.386453] Bluetooth: hci0: command 0x0c3a tx timeout
[ 1545.402519] Bluetooth: hci0: command 0x0c1a tx timeout
[ 1547.259117] Bluetooth: hci0: setting interface failed (110)
[ 1578.043651] Bluetooth: hci0: command 0x2005 tx timeout
[ 1580.059729] Bluetooth: hci0: command 0x200b tx timeout
[ 1582.075802] Bluetooth: hci0: command 0x200c tx timeout
[ 1584.091852] Bluetooth: hci0: command 0x0401 tx timeout
[ 1613.052741] Bluetooth: hci0: command 0x2005 tx timeout
[ 1615.068930] Bluetooth: hci0: command 0x200b tx timeout
[ 1617.084891] Bluetooth: hci0: command 0x200c tx timeout
[ 1619.100947] Bluetooth: hci0: command 0x0401 tx timeout

rustamych ★★★
() автор топика
Ответ на: комментарий от PhysShell

Он почему то не находит устройство. Запускаю манагер

$ sudo blueman-manager 
blueman-manager version 2.1.2 starting
Запускаю поиск устройств и получаю много букоф и устройство не находит. Наушники работают, проверял на смартфоне. Может каким другим приложением воспользоваться?
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusNotReadyError:  Resource Not Ready
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] Нет такого файла или каталога: '/var/crash/_usr_bin_blueman-manager.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusNotReadyError:  Resource Not Ready
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusNotReadyError:  Resource Not Ready
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] Нет такого файла или каталога: '/var/crash/_usr_bin_blueman-manager.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 81, in callback
    value = proxy.call_finish(result).unpack()
gi.repository.GLib.Error: g-io-error-quark: GDBus.Error:org.bluez.Error.NotReady: Resource Not Ready (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/Base.py", line 90, in callback
    raise parse_dbus_error(e)
blueman.bluez.errors.DBusNotReadyError:  Resource Not Ready

rustamych ★★★
() автор топика
Ответ на: комментарий от rustamych

Если ещё актуально, нагуглил пару мантр. Возможна проблема питанием.

bluetootchtl->show. Если выйдет Powered: no, надо запитать: power on.

Убедиться с помощью hciconfig -a hci0. Важна третья строка вывода, нужно, чтобы адаптер был включён (UP):

hci0:   Type: USB
        BD Address: 00:1B:DC:0F:DB:40 ACL MTU: 310:10 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN

Ещё можно поднять адаптер так: sudo hciconfig hci0 up.

Может каким другим приложением воспользоваться?

hcitool можно попробовать.

PhysShell ★★
()
Последнее исправление: PhysShell (всего исправлений: 1)
Ответ на: комментарий от PhysShell

Спасибо. Буду у этого компа только через три недели. Проверю. Может еще причина, что компу уже 9 лет. Недавно приобрел ноут, samsung s51 pro. Поставил linux mint mate. Bluetooth подцепился с ходу без бубна.

rustamych ★★★
() автор топика
Ответ на: комментарий от rustamych

Может еще причина, что компу уже 9 лет.

Насчёт этого только могу предположить какие-то проблемы с гнездом от времени, что он не выдаёт достаточно питания. Но этот сценарий целиком взят с потолка. Подкрепить матчастью или опытом не могу.

Однако, пока сёрфил, видел пару людей со схожими симптомами, у которых оказались убунтопроблемы. Хотя они и накатали багрепорты, так, на всякий случай, можно с лайв-версии того же минта загрузиться и попробовать.

PhysShell ★★
()
27 декабря 2021 г.
Ответ на: комментарий от PhysShell

Вчера попробовал еще раз запустить и, о чудо, блютуз заработал. НО. Недолго было щастье. Я запустил deadbeef для проверки, все работало. Потом решил проверить как скайп подцепится и тут все отвалилось и уже не оживает. Теперь адаптер работает, блютуз есть, устройство (наушники) тоже видит, то при попытке согласовать устройство (через bleuman-aplet) выдает ошибку согласования - Pairing is failed. Черт те что происходит. Причем устройство находит, выдает название и мас адрес. Версия blueman 2.1.2. Обсуждения такой ошибки много, но решения не нашел. Есть еще идеи? Ниже выводы основных данных

$ hcitool dev 
Devices: hci0	00:1A:7D:DA:71:10
$ hciconfig -a
hci0:	Type: Primary  Bus: USB
	BD Address: 00:1A:7D:DA:71:10  ACL MTU: 310:4  SCO MTU: 64:8
	UP RUNNING PSCAN ISCAN 
	RX bytes:696 acl:0 sco:0 events:49 errors:0
	TX bytes:2696 acl:0 sco:0 commands:55 errors:0
	Features: 0xff 0xff 0x8f 0xfa 0xdb 0xff 0x5b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: SLAVE ACCEPT 
Can't read local name on hci0: Connection timed out (110)
$ rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
sudo hcitool scan    
Scanning ...
Inquiry failed: Connection timed out

rustamych ★★★
() автор топика
Ответ на: комментарий от rustamych

В системе ничего не менялось? Может апгрейдился и это уже какая-то скайпопроблема, а не ОП? Странное поведение, по этим данным не могу ничего сказать.

Можно зарыться в логи, интересно, например, что было, когда скайп выбил адаптер, что выдаёт при подключении сейчас vs вчера, как оно вчера определилось при подключении.

Запустить sudo journalctl -f после подключения адаптера в usb-порт.

Если вчера было дело, думаю можно будет найти вчерашний лог в списке запусков системы: sudo journalctl --list-boots, потом по айдишнику открыть лог того запуска: sudo journalctl -b нужный-id.

Погрепать sudo journalctl --grep=hci0.

PhysShell ★★
()

bluetoothctl

remove 00:1A:7D:DA:71:10

scan on

Чуть подождать

connect 00:1A:7D:DA:71:10

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.