AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[bluez](ubuntu)

Martin Hope
Lesath
Asked: 2020-07-15 01:57:45 +0800 CST

我在 Ubuntu 20.04 中同时遇到蓝牙鼠标和蓝牙耳机的问题

  • 0

在我的笔记本电脑(戴尔 XPS-9343)上启动 Ubuntu 20.04 时,我的鼠标(Logitech MX Anywhere 2)连接成功 - 日志中只有几个警告( bt_uhid_send: Invalid argument (22) )。

当我还连接到耳机(Sony WH-1000XM3)时,麻烦就开始了。我必须多次连接/断开鼠标和耳机,直到它最终工作。

Ubuntu 的安装是全新安装 - 在我认为从 Ubuntu 16.04 升级时出现问题之后。

有人对此有所了解,或者这是否也发生在其他人身上?

sound headphones mouse bluez 20.04
  • 2 个回答
  • 369 Views
Martin Hope
wouter205
Asked: 2018-11-07 01:19:26 +0800 CST

升级到 18.x 蓝牙问题:hci0: last event is not cmd complete (0x0f)

  • 2

由于我已经升级了 Ubuntu 18.04(以及之后升级到 18.10),我遇到了蓝牙连接问题。例如,我的蓝牙扬声器播放的音乐严重滞后。经过调查dmesg,我遇到了很多这些错误:

Bluetooth: hci0: last event is not cmd complete (0x0f)

我尝试bluez通过官方 PPA 更新(5.48 -> 5.50),但这没有成功。

输出自lsusb | grep Blue

Bus 006 Device 003: ID 0930:0508 Toshiba Corp. Integrated Bluetooth HCI

奇怪的是,执行时我有 2 个蓝牙设备列表rfkill list

0: Toshiba Bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

的输出dmesg | egrep -i 'blue|firm'可能表明固件存在一些问题:

[    0.069143] acpi PNP0A08:00: [Firmware Info]: MMCONFIG for domain 0000 [bus 00-3f] only partially covers this bridge
[   18.813225] toshiba_bluetooth: Toshiba ACPI Bluetooth device driver
[   19.651213] iwl4965 0000:01:00.0: loaded firmware version 228.61.2.24
[   55.834864] iwl4965 0000:01:00.0: Enabling power save might cause firmware crashes
[ 1204.278716] Bluetooth: Core ver 2.22
[ 1204.278758] Bluetooth: HCI device and connection manager initialized
[ 1204.278764] Bluetooth: HCI socket layer initialized
[ 1204.278771] Bluetooth: L2CAP socket layer initialized
[ 1204.278783] Bluetooth: SCO socket layer initialized
[ 1204.664153] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 1204.664155] Bluetooth: BNEP filters: protocol multicast
[ 1204.664162] Bluetooth: BNEP socket layer initialized
[ 1204.769152] Bluetooth: RFCOMM TTY layer initialized
[ 1204.769161] Bluetooth: RFCOMM socket layer initialized
[ 1204.769172] Bluetooth: RFCOMM ver 1.11

我的内核版本:

4.18.0-10-generic

请问我该如何解决?

bluetooth 18.04 bluez bluetooth-speaker
  • 1 个回答
  • 2042 Views
Martin Hope
tttapa
Asked: 2018-08-12 04:30:03 +0800 CST

安装 BlueZ 5.50 不会更新蓝牙

  • 1

我正在尝试在 Ubuntu 16.04 上安装 BlueZ 5.50,因为我需要 MIDI 支持。

我编译并安装如下:

sudo apt-get install libudev-dev
sudo apt-get install libical-dev
sudo apt-get install libreadline-dev
cd bluez-5.50
./configure --enable-midi
make -j8
sudo make install

问题是它不更新/usr/sbin/bluetoothd,这是我重新启动时启动的默认版本。
bluetoothd -v结果,5.37
但./src/bluetoothd -v结果5.50。

路径中唯一的版本似乎是旧版本:

whereis bluetoothd
bluetoothd: /usr/sbin/bluetoothd /usr/share/man/man8/bluetoothd.8.gz

为什么安装脚本保留旧版本?如何将所有内容更新到新版本?我一定要吗?

现在,即使使用旧版本的蓝牙,MIDI BLE 似乎也可以正常工作。

bluetooth 16.04 bluez
  • 1 个回答
  • 4611 Views
Martin Hope
Vallu
Asked: 2018-04-13 03:30:28 +0800 CST

如何在 Lubuntu 上启动 Bluez

  • 1

尝试启动 BT 适配器/管理器(默认安装在 Lubu 上)一个小窗口告诉我它不能,因为没有启动 Bluez。

在终端:sudo apt install bluez,它回答:Bluez 已经是新版本(5.46-0ubuntu3)然后邀请我删除几个过时的包。

那么 Bluez Daemon 在哪里启动呢?

写作:systemctl status bluetooth.service ; hcitool dev

回答:

bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset
   Active: inactive (dead)
     Docs: man:bluetoothd(8)

命令:lspci -k | grep -A3 -i "wireless\|network\|bluetooth" 答案:04:00.0 Ethernet controller: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01) Subsystem: Quanta Microsystems, Inc AR242x / AR542x Wireless Network Adapter (PCI-Express) Kernel driver in use: ath5k Kernel modules: ath5k 0f:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller oem@oem-Extensa-5220:~$

bluetooth lubuntu services bluez aptdaemon
  • 1 个回答
  • 13739 Views
Martin Hope
SebMa
Asked: 2018-03-30 04:48:49 +0800 CST

bluez5:无法连接到 Ubuntu 17.10 上的配对蓝牙设备

  • 19

我在 Ubuntu 17.10 上使用 bluez v5.46,但无法连接到配对的蓝牙设备。

这是bluetoothctl命令的输出:

$ bluetoothctl 
[NEW] Controller 6C:0B:84:27:43:66 tensorFlowPHY [default]
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 6C:0B:84:27:43:66 Discovering: yes
[NEW] Device FC:58:FA:A1:C2:70 OE-P51
[bluetooth]# pair FC:58:FA:A1:C2:70 
Attempting to pair with FC:58:FA:A1:C2:70
[CHG] Device FC:58:FA:A1:C2:70 Connected: yes
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: yes
[CHG] Device FC:58:FA:A1:C2:70 Paired: yes
Pairing successful
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: no
[CHG] Device FC:58:FA:A1:C2:70 Connected: no
[CHG] Controller 6C:0B:84:27:43:66 Discoverable: no
[bluetooth]# connect FC:58:FA:A1:C2:70 
Attempting to connect to FC:58:FA:A1:C2:70
Failed to connect: org.bluez.Error.Failed

这是更多信息:

$ journalctl -u bluetooth | tail
Mar 29 12:06:01 tensorFlowPHY systemd[1]: Started Bluetooth service.
Mar 29 12:06:01 tensorFlowPHY bluetoothd[1136]: Starting SDP server
Mar 29 12:06:01 tensorFlowPHY bluetoothd[1136]: Bluetooth management interface 1.14 initialized
Mar 29 14:36:12 tensorFlowPHY bluetoothd[1136]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available
Mar 29 14:36:59 tensorFlowPHY bluetoothd[1136]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available

并systemctl说:

$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-03-30 16:30:15 CEST; 21s ago
     Docs: man:bluetoothd(8)
 Main PID: 1492 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   Memory: 1.5M
      CPU: 42ms
   CGroup: /system.slice/bluetooth.service
           └─1492 /usr/lib/bluetooth/bluetoothd

Mar 30 16:30:15 tensorFlowPHY systemd[1]: Starting Bluetooth service...
Mar 30 16:30:15 tensorFlowPHY bluetoothd[1492]: Bluetooth daemon 5.46
Mar 30 16:30:15 tensorFlowPHY systemd[1]: Started Bluetooth service.
Mar 30 16:30:15 tensorFlowPHY bluetoothd[1492]: Starting SDP server
Mar 30 16:30:15 tensorFlowPHY bluetoothd[1492]: Bluetooth management interface 1.14 initialized
Mar 30 16:30:20 tensorFlowPHY bluetoothd[1492]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available
Mar 30 16:30:31 tensorFlowPHY bluetoothd[1492]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available

编辑 1:我安装了一个缺少的 Ubuntu 软件包:pulseaudio-module-bluetooth并使​​用以下命令重新启动了 pulseaudio:pulseaudio -k

现在连接试验后蓝牙日志的输出是:

Mar 30 16:36:59 tensorFlowPHY bluetoothd[1492]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Mar 30 16:37:00 tensorFlowPHY bluetoothd[1492]: connect error: Connection refused (111)
Mar 30 16:37:02 tensorFlowPHY bluetoothd[1492]: connect error: Connection refused (111)

知道为什么吗?

编辑 2:我刚刚按照有人要求重新启动了 Ubuntu。仍然有相同的铅。

编辑 3:我已经加载了两个模块/etc/pulse/default.pa:

$ egrep "(policy|discover)" /etc/pulse/default.pa
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover

但是我在硬盘上找不到那些,我需要安装其他东西吗?

编辑 4:我的错误,我使用了locate命令。在 a 之后sudo updatedb,该locate命令现在能够找到这两个文件。

编辑 5:这是pactl输出:

$ pactl list modules | grep "Name:"
    Name: module-device-restore
    Name: module-stream-restore
    Name: module-card-restore
    Name: module-augment-properties
    Name: module-switch-on-port-available
    Name: module-udev-detect
    Name: module-alsa-card
    Name: module-alsa-card
    Name: module-bluetooth-policy
    Name: module-bluetooth-discover
    Name: module-bluez5-discover
    Name: module-native-protocol-unix
    Name: module-default-device-restore
    Name: module-rescue-streams
    Name: module-always-sink
    Name: module-intended-roles
    Name: module-suspend-on-idle
    Name: module-console-kit
    Name: module-systemd-login
    Name: module-position-event-sounds
    Name: module-role-cork
    Name: module-filter-heuristics
    Name: module-filter-apply
    Name: module-switch-on-connect
    Name: module-x11-publish
    Name: module-x11-cork-request
    Name: module-x11-xsmp

和dpkg -l输出:

$ dpkg -l | grep blue
ii  bluefish                                  2.2.9-1                                                    amd64        advanced Gtk+ text editor for web and software development
ii  bluefish-data                             2.2.9-1                                                    all          advanced Gtk+ text editor (data)
ii  bluefish-plugins                          2.2.9-1                                                    amd64        advanced Gtk+ text editor (plugins)
ii  blueman                                   2.0.4-1ubuntu3                                             amd64        Graphical bluetooth manager
ii  bluez                                     5.46-0ubuntu3                                              amd64        Bluetooth tools and daemons
ii  bluez-cups                                5.46-0ubuntu3                                              amd64        Bluetooth printer driver for CUPS
ii  bluez-obexd                               5.46-0ubuntu3                                              amd64        bluez obex daemon
ii  bluez-tools                               0.2.0~20140808-5build1                                     amd64        Set of tools to manage Bluetooth devices for linux
ii  gnome-bluetooth                           3.26.1-1                                                   amd64        GNOME Bluetooth tools
ii  indicator-bluetooth                       0.0.6+17.10.20170605-0ubuntu3                              amd64        System bluetooth indicator.
ii  libbluetooth3:amd64                       5.46-0ubuntu3                                              amd64        Library to use the BlueZ Linux Bluetooth stack
ii  libgnome-bluetooth13:amd64                3.26.1-1                                                   amd64        GNOME Bluetooth tools - support library
ii  pulseaudio-module-bluetooth               1:10.0-2ubuntu3.1                                          amd64        Bluetooth module for PulseAudio sound server

这是加载的蓝牙脉冲音频模块:

$ pactl list modules short | grep module-bluetooth
9   module-bluetooth-policy     
10  module-bluetooth-discover

编辑 6:您的解决方案有效!所以总结一下:

$ bluetoothctl
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 6C:0B:84:27:43:66 Powered: yes
[bluetooth]# remove FC:58:FA:A1:C2:70
[DEL] Device FC:58:FA:A1:C2:70 OE-P51
Device has been removed
[bluetooth]# exit
Agent unregistered
[DEL] Controller 6C:0B:84:27:43:66 tensorFlowPHY [default]
$ sudo service bluetooth restart

最后:

$ bluetoothctl
[NEW] Controller 6C:0B:84:27:43:66 tensorFlowPHY [default]
Agent registered
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 6C:0B:84:27:43:66 Powered: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 6C:0B:84:27:43:66 Discovering: yes
[NEW] Device FC:58:FA:A1:C2:70 OE-P51
[bluetooth]# pair FC:58:FA:A1:C2:70 
Attempting to pair with FC:58:FA:A1:C2:70
[CHG] Device FC:58:FA:A1:C2:70 Connected: yes
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: yes
[CHG] Device FC:58:FA:A1:C2:70 Paired: yes
Pairing successful
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: no
[CHG] Device FC:58:FA:A1:C2:70 Connected: no
[bluetooth]# connect FC:58:FA:A1:C2:70 
Attempting to connect to FC:58:FA:A1:C2:70
[CHG] Device FC:58:FA:A1:C2:70 Connected: yes
Connection successful
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: yes
[OE-P51]#
pulseaudio bluetooth bluez
  • 3 个回答
  • 37473 Views
Martin Hope
user301828
Asked: 2018-03-27 00:45:54 +0800 CST

16.04 LTS:关闭蓝牙后蓝牙仍在运行,无法真正停止蓝牙

  • 2

问题:

通过面板控制关闭蓝牙后,蓝牙仍在运行,如下命令所示:

sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
  Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor    preset: enabled)
  Active: active (running) since lun. 2018-03-26 10:03:39 CEST; 22min ago
    Docs: man:bluetoothd(8)
Main PID: 3713 (bluetoothd)
  Status: "Running"
  CGroup: /system.slice/bluetooth.service
          └─3713 /usr/lib/bluetooth/bluetoothd

下面是附加信息(命令测试、配置)


运行命令测试:

关于官方 ubuntu 蓝牙文档页面,这里是与 bluez 相关的返回:

snap interfaces bluez
Slot  Plug

snap interfaces | grep blue
:bluetooth-control         -
:bluez                     -

systemctl status snap.bluez.bluez.service
● snap.bluez.bluez.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

类似的讨论

ubuntu 论坛上的类似讨论提出了解决方案,但它们并没有解决我的问题。

版本和内核:

cat /etc/issue
Ubuntu 16.04.4 LTS \n \l

uname -a
Linux dell-vostro1510 4.4.0-67-generic #88-Ubuntu SMP Wed Mar 8 16:34:04 UTC 2017 i686 i686 i686 GNU/Linux

电脑型号及品牌

戴尔 VOSTRO 1510

配置:

lspci -knn | grep Net -A2; lsusb
06:00.0 Network controller [0280]: Broadcom Corporation BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)
        Subsystem: Dell Wireless 1395 WLAN Mini-Card [1028:000b]
        Kernel driver in use: wl
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0c45:63e0 Microdia Sonix Integrated Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 005: ID 413c:8140 Dell Computer Corp. Wireless 360 Bluetooth
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
bluetooth dell 16.04 bluez
  • 1 个回答
  • 410 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve