D1s 使用 XR829 BT 配置 a2dp-source 出错
-
首先按照帖子《D1 开发板使用 XR829 mesh fw 出现 code(56) 错误,如何解决》:
https://bbs.aw-ol.com/topic/361/share/1 配置了蓝牙,输出root@TinaLinux:/# hciattach -n ttyS1 xradio >/dev/null 2>&1 & root@TinaLinux:/# [ 341.203731]sunxi-rfkill soc@3000000:rfkill@0: set block: 1 [ 341.210080]sunxi-rfkill soc@3000000:rfkill@0: bt power off success [ 341.237565]sunxi-rfkill soc@3000000:rfkill@0: set block: 0 [ 341.253736]sunxi-rfkill soc@3000000:rfkill@0: bt power on success [ 341.280858][XR_BT_LPM] bluedroid_write_proc_btwake: bluedroid_write_proc_btwake 1 [ 341.289318][XR_BT_LPM] bluedroid_write_proc_btwake: wakeup bt device [ 341.296571][XR_BT_LPM] bluedroid_write_proc_lpm: disable lpm mode root@TinaLinux:/# hciconfig -a hci0 up root@TinaLinux:/# hciconfig hci0: Type: Primary Bus: UART BD Address: 22:22:65:05:28:FE ACL MTU: 1021:8 SCO MTU: 255:4 UP RUNNING RX bytes:1154 acl:0 sco:0 events:54 errors:0 TX bytes:744 acl:0 sco:0 commands:54 errors:0
然后
bt_test -i -p a2dp-source
root@TinaLinux:/# bt_test -i -p a2dp-source 8163.127547: BTMG[bt_manager_enable:407]: bt manager version:Version:3.0.1.202110291544,builed time:Oct 29 2021-09:42:35 8163.128196: BTMG[bt_test_status_cb:82]: bt is turnning on. Bluetooth init has been completed!! ln: /var/lib/bluetooth: No such file or directory bluetoothd[296]: Bluetooth daemon 5.54 D-Bus setup failed: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory bluetoothd[296]: Unable to get on D-Bus bluealsa: Couldn't initialize controller thread: Bad file descriptor 8164.563437: BTMG[bt_profile_global_init:355]: start bluealsa :1 times 8164.572354: BTMG[bt_routine:68]: Couldn't obtain D-Bus connection: Could not connect: No such file or directory 8165.065054: BTMG[bt_manager_enable:449]: init connection to bluez failed! [ 577.128339]sunxi-rfkill soc@3000000:rfkill@0: block state already is 1 stop bluetoothd and hciattach 8165.198016: BTMG[bt_test_status_cb:65]: BT is off
估计是我什么配置的问题,麻烦大佬分析一下
-
ln: /var/lib/bluetooth: No such file or directory bluetoothd[296]: Bluetooth daemon 5.54 D-Bus setup failed: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory bluetoothd[296]: Unable to get on D-Bus bluealsa: Couldn't initialize controller thread: Bad file descriptor
看起来好像没开 dbus?
-
@whycan dbus肯定开了的,不开都跑不起来
-
@whycan 看着像dbus-daemon没起来,但是我没找到怎么启动
-
@whycan
dbus报错Unknown group "lp" in message bus configuration file Failed to start message bus: Configuration file needs one or more <listen> elements giving addresses
-
改了一下conf
root@TinaLinux:/# cat /etc/dbus-1/system.d/bluetooth.conf <!-- This configuration file specifies the required security policies for Bluetooth core daemon to work. --> <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig> <!-- ../system.conf have denied everything, so we just punch some holes --> <policy user="root"> <allow own="org.bluez"/> <allow send_destination="org.bluez"/> <allow send_type="method_call"/> <allow send_type="method_return"/> <allow send_interface="org.bluez.Agent1"/> <allow send_interface="org.bluez.MediaEndpoint1"/> <allow send_interface="org.bluez.MediaPlayer1"/> <allow send_interface="org.bluez.ThermometerWatcher1"/> <allow send_interface="org.bluez.AlertAgent1"/> <allow send_interface="org.bluez.Profile1"/> <allow send_interface="org.bluez.HeartRateWatcher1"/> <allow send_interface="org.bluez.CyclingSpeedWatcher1"/> <allow send_interface="org.bluez.GattCharacteristic1"/> <allow send_interface="org.bluez.GattDescriptor1"/> <allow send_interface="org.freedesktop.DBus.ObjectManager"/> <allow send_interface="org.freedesktop.DBus.Properties"/> </policy> <policy at_console="true"> <allow send_path="/"/> <allow send_destination="org.bluez"/> <allow send_destination="org.bluez.Manager"/> <allow receive_sender="org.bluez.Manager"/> <allow send_destination="org.bluez.Adapter"/> <allow receive_sender="org.bluez.Adapter"/> <allow send_destination="org.bluez.Device"/> <allow receive_sender="org.bluez.Device"/> <allow send_destination="org.bluez.Service"/> <allow receive_sender="org.bluez.Service"/> <allow send_destination="org.bluez.Database"/> <allow receive_sender="org.bluez.Database"/> <allow send_destination="org.bluez.Security"/> <allow receive_sender="org.bluez.Security"/> </policy> <!-- allow users of lp group (printing subsystem) to communicate with bluetoothd --> <policy context="default"> <deny send_destination="org.bluez"/> </policy> </busconfig>
Failed to start message bus: Configuration file needs one or more <listen> elements giving addresses
-
/etc/init.d/dbus restart
然后就好了
root@TinaLinux:/# bt_test -i -p a2dp-source 11964.769186: BTMG[bt_manager_enable:407]: bt manager version:Version:3.0.1.202110291544,builed time:Oct 29 2021-09:42:35 11964.769783: BTMG[bt_test_status_cb:82]: bt is turnning on. hcidump_xr existed Bluetooth init has been completed!! 11964.938952: [a2dp_sink_thread_process:318]: Couldn't read event: Bad message 11964.939616: [hfp_thread_process:711]: Couldn't read event: Bad message bluetoothd[275]: Endpoint unregistered: sender=:1.1 path=/A2DP/SBC/Sink/1 bluetoothd[275]: Endpoint registered: sender=:1.3 path=/A2DP/SBC/Source/1 11965.263831: BTMG[bt_profile_global_init:355]: start bluealsa :1 times 11965.825855: BTMG[bt_test_adapter_power_state_cb:47]: Turn on bt successfully 11966.266042: BTMG[bt_test_status_cb:67]: BT is ON scan 0[bt]1 [bt]#12145.074175: BTMG[bt_test_discovery_status_cb:91]: bt start scanning. 12145.074243: BTMG[btmg_gap_bluez_callback:1228]: Discovery started 12145.206434: BTMG[bt_test_dev_add_cb:115]: address:EC:FA:5C:63:37:94,name:MI BT18 BLE,class:0,icon:(null),address type:public,rssi:-86 [bt]#12147.415742: BTMG[bt_test_dev_add_cb:115]: address:A4:FC:77:29:EA:7A,name:KD-43X8500F,class:0,icon:(null),address type:public,rssi:-96 s Invalid command [bt]# [bt]#sca12150.809068: BTMG[bt_test_dev_add_cb:115]: address:EC:FA:5C:DD:66:16,name:MI BT18,class:3408900,icon:audio-card,address type:public,rssi:-53 12150.862888: BTMG[bt_test_update_rssi_cb:139]: address:A4:FC:77:29:EA:7A,name:KD-43X8500F,rssi:-81 12150.872707: BTMG[bt_test_update_rssi_cb:139]: address:EC:FA:5C:DD:66:16,name:MI BT18,rssi:-25 12150.893906: BTMG[bt_test_update_rssi_cb:139]: address:EC:FA:5C:DD:66:16,name:MI BT18,rssi:-53 n12151.284176: BTMG[bt_test_update_rssi_cb:139]: address:EC:FA:5C:DD:66:16,name:MI BT18,rssi:-25 12151.334754: BTMG[bt_test_update_rssi_cb:139]: address:EC:FA:5C:DD:66:16,name:MI BT18,rssi:-55 12151.887915: BTMG[cmd_bt_discovery:86]: Unexpected argc: 0, see help [bt]# [bt]#scan 0 [bt]#12155.870176: BTMG[btmg_gap_bluez_callback:1232]: Discovery Stopped due to user input 12155.870297: BTMG[bt_test_discovery_status_cb:97]: stop scan by user. [bt]#connect EC:FA:5C:DD:66:16 12190.724040: BTMG[bt_test_a2dp_source_connection_state_cb:296]: A2DP source connecting with device: EC:FA:5C:DD:66:16 addr:EC:FA:5C:DD:66:16,name:MI BT18,state:CONNECTED bluetoothd[385]: Endpoint registered: sender=:1.4 path=/A2DP/SBC/Source/2 [bt]#bluetoothd[385]: Can't open input device: No such file or directory (2) bluetoothd[385]: AVRCP: failed to init uinput for MI BT18 12192.076985: BTMG[bt_test_a2dp_source_connection_state_cb:298]: A2DP source connected with device: EC:FA:5C:DD:66:16
-
-
-
@yuzukitsuru 请教下dbus-daemon没起来怎么解决的
-
@whycan 大佬,怎么从根本上解决这个问题,dbus-daemon能够自启动
-
@yuzukitsuru 你好朋友,我联系你是因为我开始使用电视盒,我遇到了一个问题,我找不到在 Linux 操作系统 Ubuntu 24.04.1 上刷新带有 Allwinner 处理器的盒子的工具长期运输服务
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号