ophub / amlogic-s9xxx-armbian

Support for Armbian in Amlogic, Rockchip and Allwinner boxes. Support a311d, s922x, s905x3, s905x2, s912, s905d, s905x, s905w, s905, s905l, rk3588, rk3568, rk3399, rk3328, h6, etc.
GNU General Public License v2.0
6.14k stars 1.97k forks source link

CM311-1a启用蓝牙遇到问题,求助 #2271

Closed twallpasser closed 6 months ago

twallpasser commented 6 months ago

盒子是从咸鱼上买来刷好了armbian系统的。 参考#1513提供的方法,我发现系统里已经有rtl8761b的固件和配置了,然后ttyAML1设备也有。rtk_hciattach是拉了这个仓库 https://github.com/radxa/rkwifibt.git 用里面的源码realtek/rtk_hciattach编译的。 按照前面的方法我写了各测试的脚本

armbian:~:# cat ./hci_test.sh
#!/bin/zsh
/usr/bin/rtk_hciattach -n -s 115200 ttyAML1 rtk_h5 &
gpioset -s 1 -m time 0 82=0
gpioset 0 82=1

但是执行到下载固件的时候就出错了

armbian:~:# ./hci_test.sh    
Realtek Bluetooth :Realtek Bluetooth init uart with init speed:115200, type:HCI UART H5
Realtek Bluetooth :Realtek hciattach version 3.1.8905594.20200602-140152

Realtek Bluetooth :Use epoll
Realtek Bluetooth WARN: OP_H5_SYNC Transmission timeout
Realtek Bluetooth WARN: OP_H5_SYNC Transmission timeout
armbian:~:# Realtek Bluetooth WARN: OP_H5_SYNC Transmission timeout
Realtek Bluetooth :[SYNC] Get SYNC Resp Pkt
Realtek Bluetooth :[CONFIG] Get SYNC pkt
Realtek Bluetooth :[CONFIG] Get SYNC pkt
Realtek Bluetooth :[CONFIG] Get CONFG pkt
Realtek Bluetooth WARN: OP_H5_CONFIG Transmission timeout
Realtek Bluetooth :[CONFIG] Get CONFG resp pkt
Realtek Bluetooth :dic is 1, cfg field 0x14
Realtek Bluetooth :H5 init finished

Realtek Bluetooth :Realtek H5 IC
Realtek Bluetooth :Receive cmd complete event of command: 1001
Realtek Bluetooth :HCI Version 0x0a
Realtek Bluetooth :HCI Revision 0x000b
Realtek Bluetooth :LMP Subversion 0x8761
Realtek Bluetooth :Receive cmd complete event of command: fc6d
Realtek Bluetooth :Read ROM version 01
Realtek Bluetooth :LMP Subversion 0x8761
Realtek Bluetooth :EVersion 1
Realtek Bluetooth :Receive cmd complete event of command: fc61
Realtek Bluetooth :Read chip type 00
Realtek Bluetooth :IC: RTL8761BTV
Realtek Bluetooth :Firmware/config: rtl8761b_fw, rtl8761b_config
Realtek Bluetooth :Couldnt open extra config /opt/rtk_btconfig.txt, No such file or directory
Realtek Bluetooth :Couldnt access customer BT MAC file /opt/bdaddr
Realtek Bluetooth :Origin cfg len 25
Realtek Bluetooth :55 ab 23 87 13 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b
Realtek Bluetooth :Config baudrate: 04928002
Realtek Bluetooth :uart flow ctrl: 1
Realtek Bluetooth :Vendor baud from Config file: 04928002
Realtek Bluetooth :New cfg len 25
Realtek Bluetooth :55 ab 23 87 13 00 0c 00 10 02 80 92 04 50 c5 ea
Realtek Bluetooth :19 e1 1b fd af 5f 01 a4 0b
Realtek Bluetooth :Load FW /lib/firmware/rtlbt/rtl8761b_fw OK, size 44204
Realtek Bluetooth :rtb_get_fw_project_id: opcode 0, len 1, data 14
Realtek Bluetooth :FW version 0x0ca98a6b, Patch num 2
Realtek Bluetooth :Chip id 0x0001
Realtek Bluetooth :Chip id 0x0002
Realtek Bluetooth :Patch length 0x74e4
Realtek Bluetooth :Start offset 0x00003780
Realtek Bluetooth :Svn version: 1291247300
Realtek Bluetooth :Coexistence: BTCOEX_20190327-0202

Realtek Bluetooth :FW  exists, Config file  exists
Realtek Bluetooth :Total len 29949 for fwc
Realtek Bluetooth :baudrate in change speed command: 0x02 0x80 0x92 0x04
Realtek Bluetooth :Receive cmd complete event of command: fc17
Realtek Bluetooth :Received cc of vendor change baud
Realtek Bluetooth :Final speed 1500000
Realtek Bluetooth :end_idx: 118, lp_len: 213, additional pkts: 4

Realtek Bluetooth :Start downloading...
Realtek Bluetooth WARN: Patch pkt trans timeout, re-trans
Realtek Bluetooth WARN: Patch pkt trans timeout, re-trans
Realtek Bluetooth WARN: Patch pkt trans timeout, re-trans
Realtek Bluetooth WARN: Patch pkt trans timeout, re-trans
Realtek Bluetooth ERROR: h5_download_patch: Retransmission exhausts
ophub commented 6 months ago

你看看从哪下载,这个网站现在能不能打开,或者你的网络是否能访问这个网站

twallpasser commented 6 months ago

你看看从哪下载,这个网站现在能不能打开,或者你的网络是否能访问这个网站

看起来这个过程没有从远程服务器下载数据,只是读写串口。

twallpasser commented 6 months ago

你看看从哪下载,这个网站现在能不能打开,或者你的网络是否能访问这个网站

谢谢。解决了,参考了这个回答 https://github.com/lwfinger/rtl8723bs_bt/issues/31#issuecomment-536043830 看起来是配置不对导致的。