Firefly开源社区

标题: BT异常 [打印本页]

作者: tigerlh    时间: 2020-8-31 16:38
标题: BT异常
rkwifibt-rebuild输出日志如下:
umask 0022 && make -C /root/rk3308b_rockchip/buildroot O=/root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/. rkwifibt-rebuild
rm -f /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_rsynced
rm -f /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_staging_installed
rm -f /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_target_installed
rm -f /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_images_installed
rm -f /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_host_installed
rm -f /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/.stamp_built
>>> rkwifibt 1.0.0 Syncing from source dir /root/rk3308b_rockchip/buildroot/../external/rkwifibt
rsync -au --chmod=u=rwX,go=rX --exclude .svn --exclude .git --exclude .hg --exclude .bzr --exclude CVS /root/rk3308b_rockchip/buildroot/../external/rkwifibt/ /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0
>>> rkwifibt 1.0.0 Building
/root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/host/bin/aarch64-rockchip-linux-gnu-gcc -o /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/brcm_patchram_plus1 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/brcm_patchram_plus1.c
/root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/host/bin/aarch64-rockchip-linux-gnu-gcc -o /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/dhd_priv /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/dhd_priv.c
/root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/dhd_priv.c: In function ‘main’:
/root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/dhd_priv.c:81:15: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
  ifr.ifr_data = &priv_cmd;
               ^
/root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/dhd_priv.c:89:2: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
  close(ioctl_sock);
  ^~~~~
>>> rkwifibt 1.0.0 Installing to target
mkdir -p /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/lib/modules
mkdir -p /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/system/etc/firmware
/usr/bin/install -D -m 0644 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/firmware/broadcom/AP6236/wifi/* /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/system/etc/firmware
/usr/bin/install -D -m 0644 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/firmware/broadcom/AP6236/bt/* /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/system/etc/firmware
/usr/bin/install -D -m 0755 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/brcm_patchram_plus1 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/brcm_patchram_plus1
/usr/bin/install -D -m 0755 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/brcm_tools/dhd_priv /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/dhd_priv
sed -i 's/MODULE_PATH/\/usr\/lib\/modules\/bcmdhd.ko/g' /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/S66load_wifi_modules
/usr/bin/install -D -m 0755 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/S66load_wifi_modules /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/etc/init.d
sed -i 's/BTFIRMWARE_PATH/\/system\/etc\/firmware\/BCM4343B0.hcd/g' /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/bt_load_broadcom_firmware
sed -i 's/BT_TTY_DEV/\/dev\/ttyS0/g' /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/bt_load_broadcom_firmware
/usr/bin/install -D -m 0755 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/bt_load_broadcom_firmware /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/bt_load_broadcom_firmware
/usr/bin/install -D -m 0755 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/bin/arm64/* /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/
/usr/bin/install -D -m 0755 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/wpa_supplicant.conf /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/etc
/usr/bin/install -D -m 0755 /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/build/rkwifibt-1.0.0/wifi_start.sh /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin
rm -rf /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/bt_pcba_test
rm -rf /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/bt_init.sh
cp -r /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/bt_load_broadcom_firmware /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/bt_pcba_test
cp -r /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/bt_load_broadcom_firmware /root/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release/target/usr/bin/bt_init.sh
root@ubuntu:~/rk3308b_rockchip/buildroot/output/firefly_rk3308_qt_release#

deviceio_test 测试输出如下:
/ # deviceio_test wificonfig
version:V1.2.1
#### Please Input Your Test Command Index ####
01.  ble_wifi_config_start
02.  ble_wifi_config_stop
03.  airkiss_wifi_config_start
04.  airkiss_wifi_config_stop
05.  softap_wifi_config_start
06.  softap_wifi_config_stop
Which would you like: 1
===== rk_ble_wifi_init =====
hcd_file = /system/etc/firmware/BCM4343B0.hcd
killall: bsa_server: no process killed
bsa_server died.
start broadcom bluetooth server bsa_sever
|----- bluetooth bsa server is open ------|
BSA_trace 1@ 01/01 08h:02m:26s:196ms: bsa_sv_dm_set_3d_type type=chip_id (not safe)
BSA_trace 2@ 01/01 08h:02m:26s:197ms: Command [all] with arg [0]
BSA_trace 3@ 01/01 08h:02m:26s:197ms: [ all ] trace level = 0
BSA_trace 4@ 01/01 08h:02m:26s:197ms: BTM_SetTraceLevel
DEBUG: check_bsa_server: wait bsa_server open.
DEBUG: check_bsa_server: bsa_server has been opened.
DEBUG: rk_bt_init: p_bt_content->bt_name: RockChip
BSA_trace 1@ 01/01 08h:02m:27s:176ms: BSA_MgtOpenInit
BSA_trace 2@ 01/01 08h:02m:27s:177ms: BSA_MgtOpen (/data/bsa/config/)
Created thread with thread_id=  9f3881d0
BSA_trace 3@ 01/01 08h:02m:27s:179ms: bsa_cl_mgt_init
BSA_trace 4@ 01/01 08h:02m:27s:179ms: UIPC_Init
BSA_trace 5@ 01/01 08h:02m:27s:179ms: UIPC_Open ChId:3
BSA_trace 6@ 01/01 08h:02m:27s:179ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 7@ 01/01 08h:02m:27s:179ms: uipc_cl_control_open fails to connect control socket
BSA_trace 8@ 01/01 08h:02m:27s:179ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (0), retrying...
BSA_trace 9@ 01/01 08h:02m:28s:180ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 10@ 01/01 08h:02m:28s:180ms: bsa_cl_mgt_init
BSA_trace 11@ 01/01 08h:02m:28s:180ms: UIPC_Init
BSA_trace 12@ 01/01 08h:02m:28s:180ms: UIPC_Open ChId:3
BSA_trace 13@ 01/01 08h:02m:28s:180ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 14@ 01/01 08h:02m:28s:180ms: uipc_cl_control_open fails to connect control socket
BSA_trace 15@ 01/01 08h:02m:28s:180ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (1), retrying...
BSA_trace 16@ 01/01 08h:02m:29s:181ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 17@ 01/01 08h:02m:29s:181ms: bsa_cl_mgt_init
BSA_trace 18@ 01/01 08h:02m:29s:181ms: UIPC_Init
BSA_trace 19@ 01/01 08h:02m:29s:181ms: UIPC_Open ChId:3
BSA_trace 20@ 01/01 08h:02m:29s:181ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 21@ 01/01 08h:02m:29s:181ms: uipc_cl_control_open fails to connect control socket
BSA_trace 22@ 01/01 08h:02m:29s:181ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (2), retrying...
BSA_trace 23@ 01/01 08h:02m:30s:182ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 24@ 01/01 08h:02m:30s:182ms: bsa_cl_mgt_init
BSA_trace 25@ 01/01 08h:02m:30s:182ms: UIPC_Init
BSA_trace 26@ 01/01 08h:02m:30s:182ms: UIPC_Open ChId:3
BSA_trace 27@ 01/01 08h:02m:30s:182ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 28@ 01/01 08h:02m:30s:182ms: uipc_cl_control_open fails to connect control socket
BSA_trace 29@ 01/01 08h:02m:30s:182ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (3), retrying...
BSA_trace 30@ 01/01 08h:02m:31s:183ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 31@ 01/01 08h:02m:31s:183ms: bsa_cl_mgt_init
BSA_trace 32@ 01/01 08h:02m:31s:183ms: UIPC_Init
BSA_trace 33@ 01/01 08h:02m:31s:183ms: UIPC_Open ChId:3
ERROR: app_mgr_read_config: app_xml_read_cfg failed:-1
ERROR: app_mgr_config: Creating default XML config file
BSA_trace 34@ 01/01 08h:02m:31s:184ms: BSA_DmGetConfigInit
BSA_trace 35@ 01/01 08h:02m:31s:184ms: BSA_DmGetConfig
DEBUG: app_mgr_get_bt_config: Enable:1
DEBUG: app_mgr_get_bt_config: Discoverable:0
DEBUG: app_mgr_get_bt_config: Connectable:0
DEBUG: app_mgr_get_bt_config: Name:Broadcom Bluetooth Device
DEBUG: app_mgr_get_bt_config: Bdaddr c0:84:7d:8d:2f:d1
DEBUG: app_mgr_get_bt_config: ClassOfDevice:00:00:00
DEBUG: app_mgr_get_bt_config: First host disabled channel:255
DEBUG: app_mgr_get_bt_config: Last host disabled channel:255
DEBUG: app_mgr_write_config: Enable:1
DEBUG: app_mgr_write_config: Discoverable:1
DEBUG: app_mgr_write_config: Connectable:1
DEBUG: app_mgr_write_config: Name:RockChip
DEBUG: app_mgr_write_config: Bdaddr c0:84:7d:8d:2f:d1
DEBUG: app_mgr_write_config: ClassOfDevice:00:04:24
DEBUG: app_mgr_write_config: RootPath:/data/bsa/pictures
ERROR: app_xml_read_db: open(/data/bsa/config/bt_devices.xml) failed
ERROR: app_mgr_read_remote_devices: app_xml_read_db failed:-1
ERROR: app_mgr_config: No remote device database found
DEBUG: app_mgr_sec_set_security:
BSA_trace 36@ 01/01 08h:02m:31s:189ms: BSA_SecSetSecurityInit
BSA_trace 37@ 01/01 08h:02m:31s:189ms: BSA_SecSetSecurity
INFO: app_mgr_config: Add all devices found in database
ERROR: app_xml_read_si_db: open(/data/bsa/config/si_devices.xml) failed
ERROR: app_read_xml_si_devices: app_xml_read_si_db failed: -1
BSA_trace 38@ 01/01 08h:02m:31s:190ms: BSA_DmSetConfigInit
DEBUG: app_mgr_set_bt_config: Enable:1
DEBUG: app_mgr_set_bt_config: Discoverable:1
DEBUG: app_mgr_set_bt_config: Connectable:1
DEBUG: app_mgr_set_bt_config: Name:RockChip
DEBUG: app_mgr_set_bt_config: Bdaddr c0:84:7d:8d:2f:d1
DEBUG: app_mgr_set_bt_config: ClassOfDevice:00:04:24
DEBUG: app_mgr_set_bt_config: First host disabled channel:79
DEBUG: app_mgr_set_bt_config: Last host disabled channel:79
BSA_trace 39@ 01/01 08h:02m:31s:190ms: BSA_DmSetConfig
BSA_trace 40@ 01/01 08h:02m:31s:251ms: BSA_TmReadVersionInit
BSA_trace 41@ 01/01 08h:02m:31s:252ms: BSA_TmReadVersion
INFO: app_mgr_read_version: Server status:0
INFO: app_mgr_read_version: FW Version:2.1.12.102
INFO: app_mgr_read_version: BSA Server Version:BSA0107
DEBUG: app_dm_get_dual_stack_mode: Get DualStackMode
BSA_trace 42@ 01/01 08h:02m:31s:253ms: BSA_DmGetConfigInit
BSA_trace 43@ 01/01 08h:02m:31s:254ms: BSA_DmGetConfig
DEBUG: app_manager_init: Current DualStack mode:DUAL_STACK_MODE_BSA
>>>>> Start ble ....
DEBUG: app_ble_rk_server_open: app_ble_rk_server_open
[RK] ble status: RK_BLE_STATE_IDLE
INFO: app_ble_start: app_ble_start
BSA_trace 44@ 01/01 08h:02m:34s:255ms: BSA_BleEnableInit
BSA_trace 45@ 01/01 08h:02m:34s:255ms: BSA_BleEnable
DEBUG: app_ble_rk_server_set_device_name: app_ble_device_name: RockChipBle
INFO: app_ble_rk_server_gatt_server_init: wifi_introducer_gatt_server_init
BSA_trace 46@ 01/01 08h:02m:34s:256ms: BSA_BleSeAppRegisterInit
BSA_trace 47@ 01/01 08h:02m:34s:256ms: BSA_BleSeAppRegister
INFO: app_ble_rk_server_register: server_if:4
INFO: app_ble_rk_server_create_gatt_database: app_ble_rk_server_create_gatt_database
DEBUG: app_ble_rk_server_set_uuid: len: 16, uuid: 0000180A-0000-1000-8000-00805F9B34FB
uu.uuid128: 0xfb 0x34 0x9b 0x5f 0x80 0x0 0x0 0x80 0x0 0x10 0x0 0x0 0xa 0x18 0x0 0x0
BSA_trace 48@ 01/01 08h:02m:35s:259ms: BSA_BleSeCreateServiceInit
BSA_trace 49@ 01/01 08h:02m:35s:259ms: BSA_BleSeCreateService
DEBUG: app_ble_rk_server_profile_cback: event = 13
INFO: app_ble_rk_server_profile_cback: BSA_BLE_SE_CREATE_EVT server_if:4 status:0 service_id:40
INFO: app_ble_rk_server_profile_cback: BSA_BLE_SE_CREATE_EVT attr_index:0
DEBUG: app_ble_rk_server_create_gatt_database: srvc_attr_index: 0
DEBUG: app_ble_rk_server_set_uuid: len: 16, uuid: 00009999-0000-1000-8000-00805F9B34FB
uu.uuid128: 0xfb 0x34 0x9b 0x5f 0x80 0x0 0x0 0x80 0x0 0x10 0x0 0x0 0x99 0x99 0x0 0x0
DEBUG: app_ble_rk_server_add_char: attr_type: 1, attr_index: 1
BSA_trace 50@ 01/01 08h:02m:35s:361ms: BSA_BleSeAddCharInit
BSA_trace 51@ 01/01 08h:02m:35s:361ms: BSA_BleSeAddChar
DEBUG: app_ble_rk_server_profile_cback: event = 14
INFO: app_ble_rk_server_profile_cback: BSA_BLE_SE_ADDCHAR_EVT status:0
INFO: app_ble_rk_server_profile_cback: attr_id:0x2a
INFO: app_ble_rk_server_profile_cback: BSA_BLE_SE_ADDCHAR_EVT attr_index:1
DEBUG: app_ble_rk_server_add_char: attr_type: 2, attr_index: 2
BSA_trace 52@ 01/01 08h:02m:35s:462ms: BSA_BleSeAddCharInit
BSA_trace 53@ 01/01 08h:02m:35s:462ms: BSA_BleSeAddChar
DEBUG: app_ble_rk_server_profile_cback: event = 14
INFO: app_ble_rk_server_profile_cback: BSA_BLE_SE_ADDCHAR_EVT status:0
INFO: app_ble_rk_server_profile_cback: attr_id:0x2b
INFO: app_ble_rk_server_profile_cback: BSA_BLE_SE_ADDCHAR_EVT attr_index:2
BSA_trace 54@ 01/01 08h:02m:35s:563ms: BSA_BleSeStartServiceInit
INFO: app_ble_rk_server_start_service: service_id:40
BSA_trace 55@ 01/01 08h:02m:35s:563ms: BSA_BleSeStartService
DEBUG: app_ble_rk_server_profile_cback: event = 15
INFO: app_ble_rk_server_profile_cback: BSA_BLE_SE_START_EVT status:0
DEBUG: app_ble_rk_server_set_advertisement_data: ble_name: RockChipBle
DEBUG: app_ble_rk_server_set_advertisement_data: attr_UUID 0 is service uuid, service_uuid_len: 16
BSA_trace 56@ 01/01 08h:02m:36s:564ms: BSA_DmSetConfigInit
BSA_trace 57@ 01/01 08h:02m:36s:564ms: BSA_DmSetConfig
BSA_trace 58@ 01/01 08h:02m:36s:565ms: BSA_DmSetConfigInit
BSA_trace 59@ 01/01 08h:02m:36s:566ms: BSA_DmSetConfig
DEBUG: app_dm_set_ble_local_privacy: Set BLE Local Privacy : 1
BSA_trace 60@ 01/01 08h:02m:36s:567ms: BSA_DmSetConfigInit
BSA_trace 61@ 01/01 08h:02m:36s:567ms: BSA_DmSetConfig
DEBUG: app_dm_set_ble_visibility: Set BLE Visibility Discoverable:1 Connectable:1
BSA_trace 62@ 01/01 08h:02m:36s:568ms: BSA_DmSetConfigInit
BSA_trace 63@ 01/01 08h:02m:36s:568ms: BSA_DmSetConfig
#### Please Input Your Test Command Index ####
01.  ble_wifi_config_start
02.  ble_wifi_config_stop
03.  airkiss_wifi_config_start
04.  airkiss_wifi_config_stop
05.  softap_wifi_config_start
06.  softap_wifi_config_stop
Which would you like:
为什么一直提示connect(/data/bsa/config/./bt-daemon-socket) failed,我看过文档配置了AP6236,可是问题依旧存在。
作者: zyk    时间: 2020-8-31 17:29
参考这个帖子去试一下http://dev.t-firefly.com/thread-102206-1-1.html
作者: tigerlh    时间: 2020-8-31 18:47
帖子看过,最后提及的:bsa目录没修改,手动修改;如何手动修改。AP6236配置确认一致

作者: zyk    时间: 2020-9-1 08:53
  1. diff --git a/buildroot/package/rockchip/broadcom_bsa/Config.in b/buildroot/package/rockchip/broadcom_bsa/Config.in
  2.     index d69fd18..8395ecf 100644
  3.     --- a/buildroot/package/rockchip/broadcom_bsa/Config.in
  4.     +++ b/buildroot/package/rockchip/broadcom_bsa/Config.in
  5.     @@ -7,6 +7,8 @@ choice
  6.             default BR2_PACKAGE_BROADCOM_BSA_AP6255
  7.         prompt "wifi/bt chip support"

  8.     +       config BR2_PACKAGE_BROADCOM_BSA_AP6236
  9.     +                bool "AP6236"
  10.             config BR2_PACKAGE_BROADCOM_BSA_AP6255
  11.                     bool "AP6255"


  12. diff --git a/buildroot/package/rockchip/broadcom_bsa/broadcom_bsa.mk b/buildroot/package/rockchip/broadcom_bsa/broadcom_bsa.mk
  13.     index 44122ac..6e44a82 100644
  14.     --- a/buildroot/package/rockchip/broadcom_bsa/broadcom_bsa.mk
  15.     +++ b/buildroot/package/rockchip/broadcom_bsa/broadcom_bsa.mk
  16.     @@ -23,6 +23,12 @@ ifeq ($(BR2_PACKAGE_BROADCOM_BSA_AP6255),y)
  17.             BTFIRMWARE = BCM4345C0.hcd
  18.     endif

  19.     +
  20.     +ifeq ($(BR2_PACKAGE_BROADCOM_BSA_AP6236),y)
  21.     +        BTFIRMWARE = BCM4343B0.hcd
  22.     +endif
  23.     +
  24.     ifeq ($(BR2_PACKAGE_BROADCOM_BSA_AP6212A1),y)
  25.             BTFIRMWARE = bcm43438a1.hcd
  26.     endif
复制代码

作者: tigerlh    时间: 2020-9-1 10:47
本帖最后由 tigerlh 于 2020-9-1 10:55 编辑
zyk 发表于 2020-9-1 08:53

感谢,感谢!
我检查过这部分的配置是对的。
rk_wifi_init.c里需要增加6236的配置吗,
static wifi_device supported_wifi_devices[] = {
        {"RTL8188EU",        "0bda:8179"},
        {"RTL8188EU",        "0bda:0179"},
        {"RTL8723BU",        "0bda:b720"},
        {"RTL8723BS",        "024c:b723"},
        {"RTL8822BS",        "024c:b822"},
        {"RTL8723CS",        "024c:b703"},
        {"RTL8723DS",        "024c:d723"},
        {"RTL8188FU",        "0bda:f179"},
        {"RTL8822BU",        "0bda:b82c"},
        {"RTL8189ES",        "024c:8179"},
        {"RTL8189FS",        "024c:f179"},
        {"RTL8192DU",        "0bda:8194"},
        {"RTL8812AU",        "0bda:8812"},
        {"AP6354",                "02d0:4354"},
        {"AP6330",                "02d0:4330"},
        {"AP6356S",                "02d0:4356"},
        {"AP6398S",                "02d0:4359"},
        {"AP6335",                "02d0:4335"},
        {"AP6255",      "02d0:a9bf"},
        {"AP6212A",     "02d0:a9a6"},
        {"RTL8822BE",        "10ec:b822"},
};
wifi_ko_file_name module_list[] =
{
        {"RTL8723BU", RTL8723BU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8188EU", RTL8188EU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8192DU", RTL8192DU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8822BU", RTL8822BU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8822BS", RTL8822BS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8188FU", RTL8188FU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8189ES", RTL8189ES_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8723BS", RTL8723BS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8723CS", RTL8723CS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8723DS", RTL8723DS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, "RTL8723DS"},
        {"RTL8812AU", RTL8812AU_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8189FS", RTL8189FS_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"RTL8822BE", RTL8822BE_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"AP6335",          BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6335_BT_FIRMWARE_MODULE_PATH},
        {"AP6330",          BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6330_BT_FIRMWARE_MODULE_PATH},
        {"AP6354",          BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6354_BT_FIRMWARE_MODULE_PATH},
        {"AP6356S",         BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6356_BT_FIRMWARE_MODULE_PATH},
        {"AP6255",          BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6255_BT_FIRMWARE_MODULE_PATH},
        {"AP6212",          BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6212_BT_FIRMWARE_MODULE_PATH},
        {"AP6212A",         BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6212A_BT_FIRMWARE_MODULE_PATH},
        {"AP6356",          BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6356_BT_FIRMWARE_MODULE_PATH},
        {"AP6398S",         BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, AP6398s_BT_FIRMWARE_MODULE_PATH},
        {"APXXX",           BCM_DRIVER_MODULE_PATH, UNKKOWN_DRIVER_MODULE_ARG, ""},
        {"UNKNOW",       DRIVER_MODULE_PATH_UNKNOW, UNKKOWN_DRIVER_MODULE_ARG, ""}

};
结构里都缺少6236的配置项
作者: zyk    时间: 2020-9-1 11:40
tigerlh 发表于 2020-9-1 10:47
感谢,感谢!
我检查过这部分的配置是对的。
rk_wifi_init.c里需要增加6236的配置吗,
不需要也可以

作者: tigerlh    时间: 2020-9-1 11:55
目前broadcom_bsa里的Config.in 和broadcom_bsa.mk 配置项都检查过,确认一致配置成了6236,但问题依旧:
/ # deviceio_test bluetooth
version:V1.2.1
#### Please Input Your Test Command Index ####
01.  bt_server_open
02.  bt_test_set_class
03.  bt_test_enable_reconnect
04.  bt_test_disable_reconnect
05.  bt_test_source_auto_start
06.  bt_test_source_connect_status
07.  bt_test_source_auto_stop
08.  bt_test_sink_open
09.  bt_test_sink_visibility00
10.  bt_test_sink_visibility01
11.  bt_test_sink_visibility10
12.  bt_test_sink_visibility11
13.  bt_test_sink_status
14.  bt_test_sink_music_play
15.  bt_test_sink_music_pause
16.  bt_test_sink_music_next
17.  bt_test_sink_music_previous
18.  bt_test_sink_music_stop
19.  bt_test_sink_disconnect
20.  bt_test_sink_set_volume
21.  bt_test_sink_close
22.  bt_test_ble_start
23.  bt_test_ble_write
24.  bt_test_ble_stop
25.  bt_test_ble_get_status
26.  bt_test_spp_open
27.  bt_test_spp_write
28.  bt_test_spp_close
29.  bt_test_spp_status
30.  bt_test_hfp_sink_open
31.  bt_test_hfp_hp_open
32.  bt_test_hfp_hp_accept
33.  bt_test_hfp_hp_hungup
34.  bt_test_hfp_hp_redail
35.  bt_test_hfp_hp_report_battery
36.  bt_test_hfp_hp_set_volume
37.  bt_test_hfp_hp_close
38.  bt_server_close
Which would you like: 1
--------------- BT BLUETOOTH INIT ----------------
hcd_file = /system/etc/firmware/BCM4343B0.hcd
killall: bsa_server: no process killed
bsa_server died.
start broadcom bluetooth server bsa_sever
|----- bluetooth bsa server is open ------|
BSA_trace 1@ 01/01 08h:04m:28s:258ms: bsa_sv_dm_set_3d_type type=chip_id (not safe)
BSA_trace 2@ 01/01 08h:04m:28s:259ms: Command [all] with arg [0]
BSA_trace 3@ 01/01 08h:04m:28s:259ms: [ all ] trace level = 0
BSA_trace 4@ 01/01 08h:04m:28s:259ms: BTM_SetTraceLevel
DEBUG: check_bsa_server: wait bsa_server open.
DEBUG: check_bsa_server: bsa_server has been opened.
DEBUG: rk_bt_init: p_bt_content->bt_name: ROCKCHIP_AUDIO
BSA_trace 1@ 01/01 08h:04m:29s:222ms: BSA_MgtOpenInit
BSA_trace 2@ 01/01 08h:04m:29s:224ms: BSA_MgtOpen (/data/bsa/config/)
Created thread with thread_id=  8d5b41d0
BSA_trace 3@ 01/01 08h:04m:29s:225ms: bsa_cl_mgt_init
BSA_trace 4@ 01/01 08h:04m:29s:225ms: UIPC_Init
BSA_trace 5@ 01/01 08h:04m:29s:225ms: UIPC_Open ChId:3
BSA_trace 6@ 01/01 08h:04m:29s:225ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 7@ 01/01 08h:04m:29s:226ms: uipc_cl_control_open fails to connect control socket
BSA_trace 8@ 01/01 08h:04m:29s:226ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (0), retrying...
BSA_trace 9@ 01/01 08h:04m:30s:226ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 10@ 01/01 08h:04m:30s:226ms: bsa_cl_mgt_init
BSA_trace 11@ 01/01 08h:04m:30s:226ms: UIPC_Init
BSA_trace 12@ 01/01 08h:04m:30s:226ms: UIPC_Open ChId:3
BSA_trace 13@ 01/01 08h:04m:30s:226ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 14@ 01/01 08h:04m:30s:226ms: uipc_cl_control_open fails to connect control socket
BSA_trace 15@ 01/01 08h:04m:30s:226ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (1), retrying...
BSA_trace 16@ 01/01 08h:04m:31s:226ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 17@ 01/01 08h:04m:31s:226ms: bsa_cl_mgt_init
BSA_trace 18@ 01/01 08h:04m:31s:226ms: UIPC_Init
BSA_trace 19@ 01/01 08h:04m:31s:226ms: UIPC_Open ChId:3
BSA_trace 20@ 01/01 08h:04m:31s:227ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 21@ 01/01 08h:04m:31s:227ms: uipc_cl_control_open fails to connect control socket
BSA_trace 22@ 01/01 08h:04m:31s:227ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (2), retrying...
BSA_trace 23@ 01/01 08h:04m:32s:227ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 24@ 01/01 08h:04m:32s:227ms: bsa_cl_mgt_init
BSA_trace 25@ 01/01 08h:04m:32s:227ms: UIPC_Init
BSA_trace 26@ 01/01 08h:04m:32s:227ms: UIPC_Open ChId:3
BSA_trace 27@ 01/01 08h:04m:32s:227ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 28@ 01/01 08h:04m:32s:227ms: uipc_cl_control_open fails to connect control socket
BSA_trace 29@ 01/01 08h:04m:32s:227ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (3), retrying...
BSA_trace 30@ 01/01 08h:04m:33s:227ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 31@ 01/01 08h:04m:33s:227ms: bsa_cl_mgt_init
BSA_trace 32@ 01/01 08h:04m:33s:227ms: UIPC_Init
BSA_trace 33@ 01/01 08h:04m:33s:227ms: UIPC_Open ChId:3
BSA_trace 34@ 01/01 08h:04m:33s:228ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 35@ 01/01 08h:04m:33s:228ms: uipc_cl_control_open fails to connect control socket
BSA_trace 36@ 01/01 08h:04m:33s:228ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (4), retrying...
BSA_trace 37@ 01/01 08h:04m:34s:228ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 38@ 01/01 08h:04m:34s:228ms: bsa_cl_mgt_init
BSA_trace 39@ 01/01 08h:04m:34s:228ms: UIPC_Init
BSA_trace 40@ 01/01 08h:04m:34s:228ms: UIPC_Open ChId:3
BSA_trace 41@ 01/01 08h:04m:34s:228ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 42@ 01/01 08h:04m:34s:228ms: uipc_cl_control_open fails to connect control socket
BSA_trace 43@ 01/01 08h:04m:34s:228ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (5), retrying...
BSA_trace 44@ 01/01 08h:04m:35s:228ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 45@ 01/01 08h:04m:35s:228ms: bsa_cl_mgt_init
BSA_trace 46@ 01/01 08h:04m:35s:228ms: UIPC_Init
BSA_trace 47@ 01/01 08h:04m:35s:228ms: UIPC_Open ChId:3
BSA_trace 48@ 01/01 08h:04m:35s:229ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 49@ 01/01 08h:04m:35s:229ms: uipc_cl_control_open fails to connect control socket
BSA_trace 50@ 01/01 08h:04m:35s:229ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (6), retrying...
BSA_trace 51@ 01/01 08h:04m:36s:229ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 52@ 01/01 08h:04m:36s:229ms: bsa_cl_mgt_init
BSA_trace 53@ 01/01 08h:04m:36s:229ms: UIPC_Init
BSA_trace 54@ 01/01 08h:04m:36s:229ms: UIPC_Open ChId:3
BSA_trace 55@ 01/01 08h:04m:36s:229ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 56@ 01/01 08h:04m:36s:229ms: uipc_cl_control_open fails to connect control socket
BSA_trace 57@ 01/01 08h:04m:36s:229ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (7), retrying...
BSA_trace 58@ 01/01 08h:04m:37s:229ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 59@ 01/01 08h:04m:37s:229ms: bsa_cl_mgt_init
BSA_trace 60@ 01/01 08h:04m:37s:229ms: UIPC_Init
BSA_trace 61@ 01/01 08h:04m:37s:229ms: UIPC_Open ChId:3
BSA_trace 62@ 01/01 08h:04m:37s:230ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 63@ 01/01 08h:04m:37s:230ms: uipc_cl_control_open fails to connect control socket
BSA_trace 64@ 01/01 08h:04m:37s:230ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (8), retrying...
BSA_trace 65@ 01/01 08h:04m:38s:230ms: BSA_MgtOpen (/data/bsa/config/)
BSA_trace 66@ 01/01 08h:04m:38s:230ms: bsa_cl_mgt_init
BSA_trace 67@ 01/01 08h:04m:38s:230ms: UIPC_Init
BSA_trace 68@ 01/01 08h:04m:38s:230ms: UIPC_Open ChId:3
BSA_trace 69@ 01/01 08h:04m:38s:230ms: uipc_cl_socket_connect: connect(/data/bsa/config/./bt-daemon-socket) failed(No such file or directory)
BSA_trace 70@ 01/01 08h:04m:38s:230ms: uipc_cl_control_open fails to connect control socket
BSA_trace 71@ 01/01 08h:04m:38s:230ms: BSA_MgtOpen UIPC_open fails (cannot connect to server)
ERROR: app_mgt_open: Connection to server unsuccessful (9), retrying...
ERROR: app_mgt_open: Unable to connect to server
ERROR: app_manager_init: Unable to connect to server
DEBUG: rk_bt_init: app_manager init failed.
作者: zyk    时间: 2020-9-1 11:59
tigerlh 发表于 2020-9-1 11:55
目前broadcom_bsa里的Config.in 和broadcom_bsa.mk 配置项都检查过,确认一致配置成了6236,但问题依旧:
...

1、再确认一下是否按这个步骤操作了
  1. make broadcom_bsa-dirclean && make broadcom_bsa-rebuild

  2. make deviceio-dirclean && make deviceio-rebuild

  3. ./build.sh
复制代码


2、top命令看一下是不是运行了brcm_patchram_plus1程序,如果有运行,kill掉它再使用deviceio
作者: tigerlh    时间: 2020-9-1 13:20
OK了,谢谢
作者: tigerlh    时间: 2020-9-1 13:50
继续追问下BT的问题,机器重启后使用brcm_patchram_plus1:
brcm_patchram_plus1 --bd_addr_rand --enable_hci --no2bytes --use_baudrate_for_download  --tosleep  200000 --baudrate 115200 --patchram  /system/etc/firmware/BCM4343B0.hcd /dev/ttyS0 &
hciconfig hci0 up
hciconfig hci0 piscan
分别执行以上指令后用hciconfig -a指令查看:
hci0:   Type: BR/EDR  Bus: UART
        BD Address: 3A:AB:66:BD:11:8F  ACL MTU: 1021:7  SCO MTU: 64:1
        UP RUNNING
        RX bytes:1668 acl:0 sco:0 events:75 errors:0
        TX bytes:874 acl:0 sco:0 commands:75 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: 'BCM43436 26MHz Class 1.5 Ampak AP6236'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Version:  (0x8)  Revision: 0x66
        LMP Version:  (0x8)  Subversion: 0x410c
        Manufacturer: Broadcom Corporation (15)

但是用手机或电脑蓝牙搜不到该设备,请教原因
作者: tigerlh    时间: 2020-9-1 14:09
zyk 发表于 2020-9-1 11:59
1、再确认一下是否按这个步骤操作了

帮忙继续指点下
作者: zyk    时间: 2020-9-1 14:47
tigerlh 发表于 2020-9-1 14:09
帮忙继续指点下

你用的板子型号是哪个
作者: tigerlh    时间: 2020-9-1 15:09
zyk 发表于 2020-9-1 14:47
你用的板子型号是哪个

基于ROC-RK3308-CC
作者: zyk    时间: 2020-9-1 15:14
tigerlh 发表于 2020-9-1 15:09
基于ROC-RK3308-CC

试一下重启一遍,然后执行
  1. echo 1 >/sys/class/rfkill/rfkill0/state

  2. brcm_patchram_plus1 --bd_addr_rand --enable_hci --no2bytes --use_baudrate_for_download  --tosleep  200000 --baudrate 115200 --patchram  /system/etc/firmware/BCM4343B0.hcd /dev/ttyS4 &
复制代码

作者: tigerlh    时间: 2020-9-1 16:12
zyk 发表于 2020-9-1 15:14
试一下重启一遍,然后执行

Android手机可以收到了,iOS估计被屏蔽了




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