Firefly开源社区

标题: 蓝牙问题 [打印本页]

作者: Jerryhe    时间: 2019-6-17 19:02
标题: 蓝牙问题
你好,执行机器里自带的:/usr/bin/bsa_bt_sink.sh start命令作为音乐蓝牙接收端,出现以下错误,请问是什么原因?

# bsa_bt_sink.sh start
hcd_file = /system/etc/firmware/BCM4345C0.hcd
[   57.708712] [BT_RFKILL]: bt shut off power
[   58.719288] [BT_RFKILL]: rfkill_rk_set_power: set bt wake_host pin output high!
[   58.781648] [BT_RFKILL]: rfkill_rk_set_power: set bt wake_host pin input!
[   58.781741] [BT_RFKILL]: ENABLE UART_RTS
[   58.882724] [BT_RFKILL]: DISABLE UART_RTS
[   58.882851] [BT_RFKILL]: bt turn on power
start broadcom bluetooth server bsa_sever
killall: bsa_server: no process killed
BSA_trace 1@ 12/31 19h:01m:00s:003ms: bsa_sv_dm_set_3d_type type=chip_id (not safe)
BSA_trace 2@ 12/31 19h:01m:00s:005ms: Command [all] with arg [0]
BSA_trace 3@ 12/31 19h:01m:00s:005ms: [ all ] trace level = 0
BSA_trace 4@ 12/31 19h:01m:00s:006ms: BTM_SetTraceLevel
start broadcom bluetooth app_manager
start broadcom bluetooth app_avk
BSA_trace 1@ 12/31 19h:01m:01s:974ms: BSA_MgtOpenInit
BSA_trace 2@ 12/31 19h:01m:01s:975ms: BSA_MgtOpen (./)
Created thread with thread_id=  8d6551f0
BSA_trace 3@ 12/31 19h:01m:01s:977ms: bsa_cl_mgt_init
BSA_trace 4@ 12/31 19h:01m:01s:977ms: UIPC_Init
BSA_trace 5@ 12/31 19h:01m:01s:978ms: UIPC_Open ChId:3
BSA_trace 6@ 12/31 19h:01m:01s:978ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 7@ 12/31 19h:01m:01s:979ms: uipc_cl_control_open fails to connect control socket
BSA_trace 8@ 12/31 19h:01m:01s:980ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
BSA_trace 1@ 12/31 19h:01m:01s:980ms: BSA_MgtOpenInit
ERROR: app_mgt_open: Connection to server unsuccessful (0), retrying...
BSA_trace 2@ 12/31 19h:01m:01s:981ms: BSA_MgtOpen (./)
Created thread with thread_id=  9266f1e0
BSA_trace 3@ 12/31 19h:01m:01s:984ms: bsa_cl_mgt_init
BSA_trace 4@ 12/31 19h:01m:01s:984ms: UIPC_Init
BSA_trace 5@ 12/31 19h:01m:01s:985ms: UIPC_Open ChId:3
BSA_trace 6@ 12/31 19h:01m:01s:985ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 7@ 12/31 19h:01m:01s:986ms: uipc_cl_control_open fails to connect control socket
BSA_trace 8@ 12/31 19h:01m:01s:987ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (0), retrying...
BSA_trace 9@ 12/31 19h:01m:02s:982ms: BSA_MgtOpen (./)
BSA_trace 10@ 12/31 19h:01m:02s:982ms: bsa_cl_mgt_init
BSA_trace 11@ 12/31 19h:01m:02s:983ms: UIPC_Init
BSA_trace 12@ 12/31 19h:01m:02s:983ms: UIPC_Open ChId:3
BSA_trace 13@ 12/31 19h:01m:02s:984ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 14@ 12/31 19h:01m:02s:985ms: uipc_cl_control_open fails to connect control socket
BSA_trace 15@ 12/31 19h:01m:02s:986ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (1), retrying...
BSA_trace 9@ 12/31 19h:01m:02s:989ms: BSA_MgtOpen (./)
BSA_trace 10@ 12/31 19h:01m:02s:989ms: bsa_cl_mgt_init
BSA_trace 11@ 12/31 19h:01m:02s:989ms: UIPC_Init
BSA_trace 12@ 12/31 19h:01m:02s:990ms: UIPC_Open ChId:3
BSA_trace 13@ 12/31 19h:01m:02s:991ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 14@ 12/31 19h:01m:02s:992ms: uipc_cl_control_open fails to connect control socket
BSA_trace 15@ 12/31 19h:01m:02s:992ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (1), retrying...
BSA_trace 16@ 12/31 19h:01m:03s:987ms: BSA_MgtOpen (./)
BSA_trace 17@ 12/31 19h:01m:03s:988ms: bsa_cl_mgt_init
BSA_trace 18@ 12/31 19h:01m:03s:988ms: UIPC_Init
BSA_trace 19@ 12/31 19h:01m:03s:989ms: UIPC_Open ChId:3
BSA_trace 20@ 12/31 19h:01m:03s:989ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 21@ 12/31 19h:01m:03s:990ms: uipc_cl_control_open fails to connect control socket
BSA_trace 22@ 12/31 19h:01m:03s:991ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (2), retrying...
BSA_trace 16@ 12/31 19h:01m:03s:994ms: BSA_MgtOpen (./)
BSA_trace 17@ 12/31 19h:01m:03s:994ms: bsa_cl_mgt_init
BSA_trace 18@ 12/31 19h:01m:03s:995ms: UIPC_Init
BSA_trace 19@ 12/31 19h:01m:03s:995ms: UIPC_Open ChId:3
BSA_trace 20@ 12/31 19h:01m:03s:996ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 21@ 12/31 19h:01m:03s:997ms: uipc_cl_control_open fails to connect control socket
BSA_trace 22@ 12/31 19h:01m:03s:998ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (2), retrying...
#########act as a bluetooth music player#########
send msg:2 to app_avk
setup_socket_client: can not connect to socket
fail to connect server socket
BSA_trace 23@ 12/31 19h:01m:04s:993ms: BSA_MgtOpen (./)
BSA_trace 24@ 12/31 19h:01m:04s:993ms: bsa_cl_mgt_init
BSA_trace 25@ 12/31 19h:01m:04s:993ms: UIPC_Init
BSA_trace 26@ 12/31 19h:01m:04s:994ms: UIPC_Open ChId:3
BSA_trace 27@ 12/31 19h:01m:04s:994ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 28@ 12/31 19h:01m:04s:996ms: uipc_cl_control_open fails to connect control socket
BSA_trace 29@ 12/31 19h:01m:04s:996ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (3), retrying...
BSA_trace 23@ 12/31 19h:01m:04s:999ms: BSA_MgtOpen (./)
BSA_trace 24@ 12/31 19h:01m:04s:999ms: bsa_cl_mgt_init
BSA_trace 25@ 12/31 19h:01m:05s:000ms: UIPC_Init
BSA_trace 26@ 12/31 19h:01m:05s:000ms: UIPC_Open ChId:3
BSA_trace 27@ 12/31 19h:01m:05s:001ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 28@ 12/31 19h:01m:05s:002ms: uipc_cl_control_open fails to connect control socket
BSA_trace 29@ 12/31 19h:01m:05s:003ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (3), retrying...
BSA_trace 30@ 12/31 19h:01m:05s:998ms: BSA_MgtOpen (./)
BSA_trace 31@ 12/31 19h:01m:05s:998ms: bsa_cl_mgt_init
BSA_trace 32@ 12/31 19h:01m:05s:999ms: UIPC_Init
BSA_trace 33@ 12/31 19h:01m:05s:999ms: UIPC_Open ChId:3
BSA_trace 34@ 12/31 19h:01m:06s:000ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 35@ 12/31 19h:01m:06s:001ms: uipc_cl_control_open fails to connect control socket
BSA_trace 36@ 12/31 19h:01m:06s:002ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (4), retrying...
BSA_trace 30@ 12/31 19h:01m:06s:004ms: BSA_MgtOpen (./)
BSA_trace 31@ 12/31 19h:01m:06s:005ms: bsa_cl_mgt_init
BSA_trace 32@ 12/31 19h:01m:06s:005ms: UIPC_Init
BSA_trace 33@ 12/31 19h:01m:06s:006ms: UIPC_Open ChId:3
BSA_trace 34@ 12/31 19h:01m:06s:006ms: uipc_cl_socket_connect: connect(././bt-daemon-socket) failed(No such file or directory)
BSA_trace 35@ 12/31 19h:01m:06s:007ms: uipc_cl_control_open fails to connect control socket
BSA_trace 36@ 12/31 19h:01m:06s:008ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (4), retrying...
|----- bluetooth music player ------|
# ERROR: app_mgt_open: Unable to connect to server
ERROR: main: Unable to connect to server
ERROR: app_mgt_open: Unable to connect to server
ERROR: main: Unable to connect to server
作者: qq984304095    时间: 2019-6-18 16:32
您好,请尝试以下方法来代替脚本使用蓝牙音响功能
hciconfig hci0 up        #使能蓝牙
hciconfig -a        #查看设备信息
hcitool scan        #扫描蓝牙设备
hciconfig hci0 iscan        #可见
hciconfig hci0 pscan        #开启Inquiry Scan和Page Scan,使设备处于可被搜索和可连接状态
sdptool browse local        #查看自己

sdptool add A2SNK                #增加Sink服务
pulseaudio --start -v        #启动pulseaudio

手机打开蓝牙,搜索设备连接上即可。
作者: Jerryhe    时间: 2019-6-19 09:06
qq984304095 发表于 2019-6-18 16:32
您好,请尝试以下方法来代替脚本使用蓝牙音响功能
hciconfig hci0 up        #使能蓝牙
hciconfig -a        #查看设备信 ...

你好,直接执行hciconfig hci0 up不行
/ # echo 1 > /sys/class/rfkill/rfkill0/state
/ # hciconfig hci0 up
Can't get device info: No such device
/ #
作者: qq984304095    时间: 2019-6-19 14:15
尝试下在DuerOS固件中执行, http://www.t-firefly.com/doc/download/55.html#other_155
作者: Jerryhe    时间: 2019-6-19 17:01
qq984304095 发表于 2019-6-19 14:15
尝试下在DuerOS固件中执行, http://www.t-firefly.com/doc/download/55.html#other_155

一样的:
/ # echo 1 > /sys/class/rfkill/rfkill0/state
/ # hciconfig hci0 up
Can't get device info: No such device
/ #
作者: qcxlf    时间: 2019-7-26 14:42
蓝牙驱动怎么支持的呢??
作者: qq984304095    时间: 2019-8-26 09:44
DTS中的bluetooth_sound 有没有打开呢
作者: sai-blf    时间: 2020-4-14 10:01
qq984304095 发表于 2019-6-18 16:32
您好,请尝试以下方法来代替脚本使用蓝牙音响功能
hciconfig hci0 up        #使能蓝牙
hciconfig -a        #查看设备信 ...

您好,我按照您这些指令操作,蓝牙设备可以scan到手机,手机也能scan到开发板,但是配对不上?请问这有遇到吗?
作者: whopawho    时间: 2020-7-9 18:52
兄弟你的问题解决了吗?我也是同样的问题
作者: zyk    时间: 2020-7-18 22:08
本帖最后由 zyk 于 2020-7-18 22:10 编辑

如果要查看到hci0的话可以echo 1 > /sys/class/rfkill/rfkill0/state,再运行brcm_patchram_plus1。若使用deviceio_test时要查看一下后台有没有运行brcm_patchram_plus1程序,如果有就kill它再运行,运行bsa_bt_sink.sh也是这样操作




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1