首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Raspberry Pi 4-蓝牙问题(org.bluez.Error.Failed )

Raspberry Pi 4-蓝牙问题(org.bluez.Error.Failed )
EN

Stack Overflow用户
提问于 2020-04-09 03:56:42
回答 2查看 8K关注 0票数 2

我一直在寻找一个解决方案,因为几天…

我有一台覆盆子Pi 4,包括蓝牙。

当我回家的时候,我正试着把我的Android手机自动连接到树莓的蓝牙上。

我已经配对并信任我的设备:

代码语言:javascript
复制
Device EC:89:14:E9:43:B8 (public)
        Name: MyAndroidPhone
        Alias: MyAndroidPhone
        Class: 0x005a020c
        Icon: phone
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Unknown                   (0000046a-0000-1000-8000-00805f9b34fb)
        UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
        UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
        UUID: PANU                      (00001115-0000-1000-8000-00805f9b34fb)
        UUID: NAP                       (00001116-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
        UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: HUAWEI Technologies Co... (0000fe35-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v000Fp107Ed1436

第一次,当我信任并配对设备时,它连接成功,PulseAudio一切正常。

如果我重启树莓或者用service bluetooth restart重启蓝牙,问题就开始了。

在那之后,我无法重新连接到我的手机。

代码语言:javascript
复制
[bluetooth]# connect EC:89:14:E9:43:B8
Attempting to connect to EC:89:14:E9:43:B8
Failed to connect: org.bluez.Error.Failed

奇怪的是,我仍然可以用手机->连接我的覆盆子。但不是从我的覆盆子->到我的手机。对于我的项目,我需要使我的树莓能够自动连接到我的手机时,当它在范围内。

以下是我的蓝牙服务的日志:

代码语言:javascript
复制
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-04-08 21:55:48 CEST; 6s ago
     Docs: man:bluetoothd(8)
  Process: 2027 ExecStartPost=/usr/bin/sdptool add SP (code=exited, status=0/SUCCESS)
 Main PID: 2026 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 2200)
   Memory: 784.0K
   CGroup: /system.slice/bluetooth.service
           └─2026 /usr/lib/bluetooth/bluetoothd -C --noplugin=sap

Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Starting SDP server
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Excluding (cli) sap
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Bluetooth management interface 1.14 initialized
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.8 path=/MediaEndpoint/A2DPSource
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.8 path=/MediaEndpoint/A2DPSink
Apr 08 21:55:48 raspberrypi sdptool[2027]: Serial Port service registered
Apr 08 21:55:48 raspberrypi systemd[1]: Started Bluetooth service.
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.417 path=/org/bluez/hci0/A2DP/SBC/Source/1
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: Endpoint registered: sender=:1.417 path=/org/bluez/hci0/A2DP/SBC/Source/2
Apr 08 21:55:48 raspberrypi bluetoothd[2026]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
EN

回答 2

Stack Overflow用户

发布于 2020-07-27 14:56:54

我也有同样的问题。(地址已在使用中)如果我执行ps aux | grep pulseaudio,则有两个进程。所以pulseaudio --kill,因为还有pulseaudio进程在运行killall pulseaudio及其工作,(对我来说...)

票数 1
EN

Stack Overflow用户

发布于 2020-07-28 23:46:18

我遇到了完全相同的问题,我发现唯一能解决这个问题的就是丢弃板载USB,转而使用USB蓝牙适配器。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61108998

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档