AP6275 Linux系统定频测试指导
一、环境搭建
- Windows ADB 环境 搭建(如果已经有ADB 环境可以忽略)
1.1 下载安装ADB 工具
1.2 下载解压后运行adb.exe就可以
1.3 win+R 运行 CMD,在对话框 输入adb version,安装成功会显示版本,如果没成功,借助AI帮助
二. 主机与电脑连接
2.1 电脑端 安装 USB 驱动,下载下面驱动包安装,安装成功后从启电脑
2.2 电脑USB口连接到主板 Type-c口, 并接通电源
2.3 开机30S 以后,在CMD 对话窗口输入adb devices 查看有没有adb 设备,如果没有,驱动安装部成功,重复上面步骤。为保证输入正确性,后续的命令请复制 ,然后在CMD对话框右键粘贴,
如果能看到设备信息,准备工作已经全部完成。
三、WiFi 定频
非信令定频方法
1.文件下载
2.文件下载后可以放在 一样路径下,这样就不用 改命令
3.命令
adb root adb remount adb push D:\WiFi\fw_bcm43752a2_pcie_ag_mfg.bin /usr/lib/firmware/fw_bcm43752a2_pcie_ag.bin adb push D:\WiFi\wl.1.333.static /usr/bin/wl adb shell chmod 777 /usr/bin/wl adb shell ifconfig wlan0 down ifconfig wlan0 up wl ver
4.图示
5. 测试前关闭 蓝牙
关闭蓝牙 echo 0 > /sys/class/rfkill/rfkill0/state 查看蓝牙是否关闭 cat /sys/class/rfkill/rfkill0/state
6.WiFi 定频命令
1 Introduction of Command for 2G T/Rx 1.1 802.11b mode for TX wl pkteng_stop tx wl down wl mpc 0 wl country ALL wl band b wl mimo_bw_cap 1 wl mimo_txbw -1 wl nrate -m 0 wl txchain 2 wl up wl 2g_rate -r 11 -b 20 wl channel 11 wl phy_watchdog 0 wl scansuppress 1 wl phy_forcecal 1 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:90:4c:14:43:19 tx 100 1000 0 1.2 802.11g mode for TX wl pkteng_stop tx wl down wl mpc 0 wl country ALL wl band b wl mimo_bw_cap 1 wl mimo_txbw -1 wl nrate -m 0 wl txchain 2 wl up wl 2g_rate -r 54 -b 20 wl channel 1 wl phy_watchdog 0 wl scansuppress 1 wl phy_forcecal 1 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:90:4c:14:43:19 tx 100 1000 0 1.3 802.11n mode for TX wl pkteng_stop tx wl down wl mpc 0 wl country ALL wl band b wl chanspec 11/20 wl mimo_bw_cap 1 wl mimo_txbw -1 wl up wl phy_forcecal 1 wl scansuppress 1 wl txchain 2 wl 2g_rate -h 7 -b 20 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:90:4c:14:43:19 tx 100 1000 0 1.4 802.11ax mode for TX wl pkteng_stop tx wl mpc 0 wl phy_watchdog 0 wl country ALL wl mimo_txbw -1 wl up wl he cap 1 wl band b wl chanspec 11/20 wl txchain 2 wl txcore -s 1 -c 1 wl 2g_rate -e 9 -s 1 -i 1 --ldpc -b 20 wl phy_forcecal 1 wl scansuppress 1 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:11:22:33:44:55 tx 100 1000 0 1.4 802.11b/g/n mode for RX wl down wl band auto wl mpc 0 wl country ALL wl mimo_bw_cap 1 wl mimo_txbw -1 wl txchain 1 wl rxchain 1 wl channel 7 wl bi 65535 wl up wl phy_watchdog 0 wl scansuppress 1 wl phy_forcecal 1 wl counters wl reset_cnts ## Check “ rxdtmcast ” number. 1.5 802.11ax mode for RX wl mpc 0 wl PM 0 wl up wl scansuppress 1 wl country ALL wl band b wl chanspec 7/20 wl txchain 2 wl rxchain 2 wl 2g_rate -e 9 -s 1 -i 2 --ldpc -b 20 wl phy_watchdog 0 wl phy_forcecal 1 wl he cap 1 wl phy_bsscolor 0 color 4 staid0 65 staid1 65 staid2 65 staid3 65 wl counters wl reset_cnts ## Check “ rxdtocast ” number. 2 Introduction of Command for 5G T/Rx 2.1 802.11a mode for TX wl pkteng_stop tx wl down wl mpc 0 wl phy_watchdog 0 wl country ALL wl band a wl channel 36 wl btc_mode 0 wl mimo_txbw -1 wl up wl phy_forcecal 1 wl scansuppress 1 wl txchain 1 wl 5g_rate -r 54 -b 20 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:90:4c:14:43:19 tx 100 1000 0 2.2 802.11n (20MHz) mode for TX wl pkteng_stop tx wl down wl mpc 0 wl country ALL wl band a wl mimo_bw_cap 1 wl mimo_txbw -1 wl nrate -m 0 wl txchain 2 wl up wl 5g_rate -h 7 -b 20 wl chanspec 36/20 wl scansuppress 1 wl phy_forcecal 1 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:90:4c:14:43:19 tx 100 1000 0 2.3 802.11n (40MHz) mode for TX wl pkteng_stop tx wl down wl mpc 0 wl phy_watchdog 0 wl country ALL wl band a wl chanspec -c 159 -b 5 -w 40 -s 0 wl mimo_txbw 4 wl up wl phy_forcecal 1 wl scansuppress 1 wl txchain 2 wl txcore -s 1 -c 1 wl 5g_rate -h 7 -b 40 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:90:4c:14:43:19 tx 100 1500 0 wl phy_forcecal 1 2.4 802.11ac (20/40/80MHz) mode for TX wl pkteng_stop tx wl down wl mpc 0 wl country ALL wl band a wl mimo_bw_cap 1 wl mimo_txbw -1 wl nrate -m 0 wl txchain 1 wl up wl 5g_rate -v 9 -s 1 -b 80 wl chanspec -c 42 -b 5 -w 80 -s 0 wl phy_watchdog 0 wl scansuppress 1 wl phy_forcecal 1 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:90:4c:14:43:19 tx 100 1000 0 2.5 802.11ax (20/40/80MHz) mode for TX wl pkteng_stop tx wl mpc 0 wl phy_watchdog 0 wl country ALL wl mimo_txbw -1 wl up wl he cap 1 wl band a wl chanspec -c 155 -b 5 -w 80 -s 0 wl txchain 1 wl rxchain 1 wl txcore -s 1 -c 1 wl 5g_rate -e 11 -s 1 -i 1 --ldpc -b 80 wl phy_forcecal 1 wl scansuppress 1 wl phy_txpwrctrl 1 wl txpwr1 -1 wl pkteng_start 00:11:22:33:44:55 tx 100 1000 0 2.6 802.11a/n mode for RX wl down wl band auto wl mpc 0 wl country ALL wl mimo_bw_cap 1 wl mimo_txbw -1 wl txchain 1 wl rxchain 1 wl channel 13 wl bi 65535 wl up wl phy_watchdog 0 wl scansuppress 1 wl phy_forcecal 1 wl counters wl reset_cnts ## Check “ rxdtmcast ” number. 2.7 802.11ac (20/40/80MHz)mode for RX wl down wl band auto wl mpc 0 wl country ALL wl mimo_bw_cap 1 wl mimo_txbw -1 wl txchain 2 wl rxchain 2 wl chanspec -c 155 -b 5 -w 80 -s 0 wl bi 65535 wl up wl phy_watchdog 0 wl scansuppress 1 wl phy_forcecal 1 wl counters wl reset_cnts ## Check “ rxdtmcast ” number. 2.8 802.11ax (20/40/80MHz)mode for RX wl mpc 0 wl PM 0 wl up wl scansuppress 1 wl country ALL wl band a wl chanspec -c 155 -b 5 -w 80 -s 0 wl txchain 2 wl rxchain 2 wl 5g_rate -e 11 -s 1 -i 2 --ldpc -b 20 wl phy_watchdog 0 wl phy_forcecal 1 wl he_cap 1 wl phy_bsscolor 0 color 4 staid0 65 staid1 65 staid2 65 staid3 65 wl counters wl reset_cnts ## Check “ rxdtocast ” number
7.wifi 定频命令参考 单击可以下载
WiFi_WL_Command_and_Power_Setting_20220527(1).pdf
三、蓝牙测试
断电重启
1.资料下载
下载蓝牙工具到D:\BT 路径下
下载后并解压
第一部分:Windows CMD 操作(只做一次,上传源码)
adb root adb remount # 推送c源码到板子/root,固件系统自带跳过推送hcd adb push D:\BT\brcm_patchram_plus.c /root/ # 进入板子终端 adb shell
以太网连接网络,然后执行以下命令
第二部分:板子内完整流程(重启后完整走一遍)
步骤 1:安装编译依赖(首次环境搭建,只执行一次)
adb shell apt update && apt install gcc libbluetooth-dev bluez-tools -y
步骤 2:编译 brcm 工具(仅编译留存,实际蓝牙初始化不用它)
ifconfig wlan0 down ifconfig wlan1 down cd /root gcc brcm_patchram_plus.c -o brcm_patchram_plus -lbluetooth mv brcm_patchram_plus /usr/bin/ chmod 755 /usr/bin/brcm_patchram_plus # 验证编译成功 brcm_patchram_plus --help
步骤 3:启用 hci0 蓝牙适配器(核心前置,解决 resource busy)
# 查看占用串口进程 lsof /dev/ttyS6 # 有输出就杀进程,无输出直接下一步 kill -9 $(lsof -t /dev/ttyS6) # 确认无占用,无输出代表释放完成 lsof /dev/ttyS6 echo 0 > /sys/class/rfkill/rfkill0/state sleep 0.2 echo 1 > /sys/class/rfkill/rfkill0/state sleep 0.3 chmod 777 /dev/ttyS6 hciattach /dev/ttyS6 any 115200 noflow bcm /usr/lib/firmware/BCM4362A2.hcd # 等待设备生成 sleep 0.1 hciconfig hci0 up # 查看硬件状态,出现UP RUNNING代表初始化成功 hciconfig
步骤 4:原厂文档底层 HCI 硬件自检(验证通信链路无故障)
# 复位蓝牙控制器 hcitool cmd 0x03 0x0003 # 本地参数配置 hcitool cmd 0x03 0x1a 0x03 # 产线射频测试配置 hcitool cmd 0x03 0x05 0x02 0x00 0x02 # 退出工厂测试模式(必须执行,否则扫描异常) hcitool cmd 0x06 0x03
每条指令返回末尾 00 = 硬件正常。









