与BLE遥控器配对后,Bluez崩溃

问题描述 投票:2回答:1

我有一个以前在另一个系统上使用过的蓝牙遥控器,现在正在运行4.52 BLUEZ,与遥控器配对后,bluetoothctl出现错误。

连接到蓝牙ctl

pi@marcophone:~$ sudo bluetoothctl
 Agent registered
[CHG] Controller B8:27:EB:1B:C4:00 Pairable: yes
[CHG] Device 20:C3:8F:BD:93:40 Connected: yes
[Remote RC]# trust
 Changing 20:C3:8F:BD:93:40 trust succeeded

这里我已成功连接到遥控器

[RC]# pair
 Attempting to pair with 20:C3:8F:BD:93:40
[CHG] Device 20:C3:8F:BD:93:40 Paired: yes
Pairing successful

此后bluetoothctl立即断开连接

[DEL] Descriptor (Handle 0x2ec8)
    /org/bluez/hci0/dev_20_C3_8F_BD_93_40/service0008/char0009/desc000b
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
[DEL] Characteristic (Handle 0x4cf0)
    /org/bluez/hci0/dev_20_C3_8F_BD_93_40/service0008/char0009
    00002a05-0000-1000-8000-00805f9b34fb
    Service Changed
[DEL] Primary Service (Handle 0x0073)
    /org/bluez/hci0/dev_20_C3_8F_BD_93_40/service0008
    00001801-0000-1000-8000-00805f9b34fb
    Generic Attribute Profile
[DEL] Characteristic (Handle 0x4cf0)
    /org/bluez/hci0/dev_20_C3_8F_BD_93_40/service000c/char000d
    00002a50-0000-1000-8000-00805f9b34fb
    PnP ID
[DEL] Primary Service (Handle 0x0073)
    /org/bluez/hci0/dev_20_C3_8F_BD_93_40/service000c
    0000180a-0000-1000-8000-00805f9b34fb
    Device Information
Agent unregistered
[DEL] Controller B8:27:EB:1B:C4:00 marcophone [default]
Waiting to connect to bluetoothd...con

日志:

pi@marcophone:~$ cat /var/log/syslog | grep bluetooth -a
Jan 27 18:39:40 marcophone bluetoothd[1048]: Bluetooth daemon 5.52
Jan 27 18:39:40 marcophone bluetoothd[1048]: Starting SDP server
Jan 27 18:39:40 marcophone systemd[1]: Started Raspberry Pi bluetooth helper.
Jan 27 18:39:40 marcophone bluetoothd[1048]: Bluetooth management interface 1.14 initialized
Jan 27 18:39:40 marcophone bluetoothd[1048]: Endpoint registered: sender=:1.21 path=/A2DP/SBC/Source/1
Jan 27 18:39:40 marcophone bluetoothd[1048]: Failed to set privacy: Rejected (0x0b)
Jan 27 18:41:07 marcophone bluetoothd[1048]: No cache for 20:C3:8F:BD:93:40
Jan 27 18:41:12 marcophone bluetoothd[1048]: Protocol Mode characteristic read failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: Report Map read failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: Read External Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:13 marcophone bluetoothd[1048]: HID Information read failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Protocol Mode characteristic read failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Report Map read failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Read External Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:41:24 marcophone bluetoothd[1048]: Error storing included service - can't find it
Jan 27 18:41:24 marcophone systemd[1]: bluetooth.service: Main process exited, code=killed, status=11/SEGV
Jan 27 18:41:24 marcophone systemd[1]: bluetooth.service: Unit entered failed state.
Jan 27 18:41:24 marcophone systemd[1]: bluetooth.service: Failed with result 'signal'.
Jan 27 18:43:07 marcophone bluetoothd[356]: Bluetooth daemon 5.52
Jan 27 18:43:07 marcophone bluetoothd[356]: Starting SDP server
Jan 27 18:43:08 marcophone systemd[1]: Started Raspberry Pi bluetooth helper.
Jan 27 18:43:08 marcophone bluetoothd[356]: Bluetooth management interface 1.14 initialized
Jan 27 18:43:08 marcophone bluetoothd[356]: Endpoint registered: sender=:1.5 path=/A2DP/SBC/Source/1
Jan 27 18:43:08 marcophone bluetoothd[356]: Failed to set privacy: Rejected (0x0b)
Jan 27 18:45:11 marcophone bluetoothd[356]: No cache for 20:C3:8F:BD:93:40
Jan 27 18:45:11 marcophone bluetoothd[356]: BATT attribute not found
Jan 27 18:45:11 marcophone bluetoothd[356]: batt-profile profile accept failed for 20:C3:8F:BD:93:40
Jan 27 18:45:11 marcophone bluetoothd[356]: GAP attribute not found
Jan 27 18:45:11 marcophone bluetoothd[356]: gap-profile profile accept failed for 20:C3:8F:BD:93:40
Jan 27 18:45:11 marcophone bluetoothd[356]: input-hog profile accept failed for 20:C3:8F:BD:93:40
Jan 27 18:45:14 marcophone bluetoothd[356]: HID Information read failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Protocol Mode characteristic read failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Report Map read failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Read External Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:14 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:17 marcophone bluetoothd[356]: HID Information read failed: Request attribute has encountered an unlikely error
Jan 27 18:45:17 marcophone bluetoothd[356]: Protocol Mode characteristic read failed: Request attribute has encountered an unlikely error
Jan 27 18:45:17 marcophone bluetoothd[356]: Report Map read failed: Request attribute has encountered an unlikely error
Jan 27 18:45:17 marcophone bluetoothd[356]: Read External Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:17 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:18 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:18 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:18 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:18 marcophone bluetoothd[356]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:45:18 marcophone bluetoothd[356]: Error storing included service - can't find it
Jan 27 18:45:18 marcophone systemd[1]: bluetooth.service: Main process exited, code=killed, status=11/SEGV
Jan 27 18:45:18 marcophone systemd[1]: bluetooth.service: Unit entered failed state.
Jan 27 18:45:18 marcophone systemd[1]: bluetooth.service: Failed with result 'signal'.
Jan 27 18:54:00 marcophone bluetoothd[358]: Bluetooth daemon 5.52
Jan 27 18:54:00 marcophone bluetoothd[358]: Starting SDP server
Jan 27 18:54:00 marcophone systemd[1]: Started Raspberry Pi bluetooth helper.
Jan 27 18:54:00 marcophone bluetoothd[358]: Bluetooth management interface 1.14 initialized
Jan 27 18:54:01 marcophone bluetoothd[358]: Endpoint registered: sender=:1.5 path=/A2DP/SBC/Source/1
Jan 27 18:54:01 marcophone bluetoothd[358]: Failed to set privacy: Rejected (0x0b)
Jan 27 18:55:30 marcophone bluetoothd[358]: No cache for 20:C3:8F:BD:93:40
Jan 27 18:55:30 marcophone bluetoothd[358]: BATT attribute not found
Jan 27 18:55:30 marcophone bluetoothd[358]: batt-profile profile accept failed for 20:C3:8F:BD:93:40
Jan 27 18:55:30 marcophone bluetoothd[358]: GAP attribute not found
Jan 27 18:55:31 marcophone bluetoothd[358]: gap-profile profile accept failed for 20:C3:8F:BD:93:40
Jan 27 18:55:31 marcophone bluetoothd[358]: input-hog profile accept failed for 20:C3:8F:BD:93:40
Jan 27 18:55:36 marcophone bluetoothd[358]: Protocol Mode characteristic read failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: Report Map read failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: Read External Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:36 marcophone bluetoothd[358]: HID Information read failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Protocol Mode characteristic read failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Report Map read failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Read External Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:47 marcophone bluetoothd[358]: Read Report Reference descriptor failed: Request attribute has encountered an unlikely error
Jan 27 18:55:48 marcophone bluetoothd[358]: Error storing included service - can't find it
Jan 27 18:55:48 marcophone systemd[1]: bluetooth.service: Main process exited, code=killed, status=11/SEGV
Jan 27 18:55:48 marcophone systemd[1]: bluetooth.service: Unit entered failed state.
Jan 27 18:55:48 marcophone systemd[1]: bluetooth.service: Failed with result 'signal'.

Hciconfig

pi@marcophone:~$ hciconfig -a
hci0:   Type: Primary  Bus: UART
    BD Address: B8:27:EB:1B:C4:00  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING 
    RX bytes:2850 acl:94 sco:0 events:117 errors:0
    TX bytes:3820 acl:92 sco:0 commands:62 errors:0
    Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
    Link policy: RSWITCH SNIFF 
    Link mode: SLAVE ACCEPT 
    Name: 'marcophone'
    Class: 0x480000
    Service Classes: Capturing, Telephony
    Device Class: Miscellaneous, 
    HCI Version: 4.1 (0x7)  Revision: 0x168
    LMP Version: 4.1 (0x7)  Subversion: 0x2209
    Manufacturer: Broadcom Corporation (15)

版本:

pi@marcophone:~$ sudo bluetoothctl -v
sudo: Hostname marcophone kann nicht aufgelöst werden
bluetoothctl: 5.52
pi@marcophone:~$ 

[我也应该在这里看到一个条目:/dev/input/event*,但是只有/dev/input/mice

我知道我在bluez 5.50中可以使用此功能,因此在bluez 5.52中可能是一个问题。

进行研究时,我确实在/lib/systemd/system/bluetooth.service中添加了以下三个选项:

ExecStart=/usr/libexec/bluetooth/bluetoothd --compat --noplugin=sap -E 
raspberry-pi bluetooth-lowenergy hid bluez gatt
1个回答
0
投票

我让它在另一台机器上工作。但是,该机器运行的是raspbian buster(4.19.97+#1294 Thu Jan 30 13:10:54 GMT 2020 armv6l GNU / Linux)。

我在与遥控器连接和配对时遇到了一些麻烦,所以我做了以下工作,终于使它工作了:

更新系统

sudo apt update && sudo apt upgrade

更新到最新的bluez堆栈

sudo apt-get remove bluez
date && sudo apt-get update && sudo apt-get install libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev -y && 

date && wget www.kernel.org/pub/linux/bluetooth/bluez-5.52.tar.xz &&  tar xvf bluez-5.52.tar.xz && 

date && cd bluez-5.52 && ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental && make -j4 && sudo make install && date && sudo reboot

现在如下更新服务ExecStart/lib/systemd/system/bluetooth.service部分:

ExecStart=/usr/lib/bluetooth/bluetoothd --compat --noplugin=sap -E 

也更新/etc/bluetooth/main.conf并在Privacy = off部分中设置[General]

© www.soinside.com 2019 - 2024. All rights reserved.