-
开发环境
cpu:ARM芯片
系统:使用buildroot(版本为2016.11)编译出的linux系统(无界面)
BT模块:AP6212(该芯片有bt+wifi功能) -
测试步骤
1.加载bcmdhd驱动
2.rfkill来控制bt的供电
3.执行brcm_patchram_plus程序控制ap6212的工作方式以及固件下载
以上三个命令我写入了脚本openbt.sh
#!/bin/sh
insmod /system/vendor/modules/bcmdhd.ko
echo "0" >/sys/class/rfkill/rfkill0/state
slepp 5
echo "1" >/sys/class/rfkill/rfkill0/state
brcm_patchram_plus -d --enable_hci --no2bytes --tosleep 200000 --use_baudrate_for_download --baudrate 1500000 --bd_addr "11:22:33:44:55:66" --patchram /lib/firmware/ap6212/bcm43438a1.hcd /dev/ttyS3 &
sleep 10
kill -9 `ps -elf | grep brcm | grep -v grep | awk '{print $1}'`
brcm_patchram_plus -d --enable_hci --no2bytes --tosleep 200000 --use_baudrate_for_download --baudrate 1500000 --bd_addr "11:22:33:44:55:66" --patchram /lib/firmwa