这篇文章将为大家详细讲解有关RK3288怎么添加WiFi和BT模块AP6212,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。CPU:RK3288系统:Android 5.1 注:系
这篇文章将为大家详细讲解有关RK3288怎么添加WiFi和BT模块AP6212,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。
CPU:RK3288
系统:Android 5.1
注:系统中自带的模块没有AP6212,相近的只有AP6210,设置为AP6210,直接添加固件也可以正常使用。
此文是手动添加AP6212的例程。
在设备树中修改 wifi 芯片为 ap6212,
kernel/arch/arm/boot/dts/rk3288-tb_8846.dts
diff --git a/kernel/arch/arm/boot/dts/rk3288-tb_8846.dts b/kernel/arch/arm/boot/dts/rk3288-tb_8846.dtsindex 6a65163..aa5480d 100755--- a/kernel/arch/arm/boot/dts/rk3288-tb_8846.dts+++ b/kernel/arch/arm/boot/dts/rk3288-tb_8846.dts@@ -42,7 +42,7 @@ * rtl8188eu, rtl8723bs, rtl8723bu * esp8089 */- wifi_chip_type = "ap6330";+ wifi_chip_type = "ap6212"; sdio_vref = <1800>; //1800mv or 3300mv
在 Kconfig 文件中增加 AP6212 选项。
/kernel/drivers/net/wireless/Kconfig
diff --git a/kernel/drivers/net/wireless/Kconfig b/kernel/drivers/net/wireless/Kconfigindex 544aa86..3e1026d 100755--- a/kernel/drivers/net/wireless/Kconfig+++ b/kernel/drivers/net/wireless/Kconfig@@ -84,6 +84,10 @@ choice config AP6210 bool "AP6210" depends on RKWIFI+ + config AP6212+ bool "AP6212"+ depends on RKWIFI config AP6234 bool "AP6234"
在配置文件 rockchip_defconfig 中屏蔽旧 wifi 芯片,增加新的 wifi 芯片
kernel/arch/arm/configs/rockchip_defconfig
diff --git a/kernel/arch/arm/configs/rockchip_defconfig b/kernel/arch/arm/configs/rockchip_defconfigindex e7c697a..5199ec0 100755--- a/kernel/arch/arm/configs/rockchip_defconfig+++ b/kernel/arch/arm/configs/rockchip_defconfig@@ -299,7 +299,7 @@ CONFIG_USB_SIERRA_NET=y CONFIG_RTL8188EU=y CONFIG_ESP8089=y CONFIG_RKWIFI=y-CONFIG_AP6335=y+# CONFIG_AP6335 is not set+CONFIG_AP6212=y # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_EVDEV=y CONFIG_INPUT_KEYRESET=y
此时串口打印中会出现打开文件 fw_bcm43438a1.bin 失败,需要更新 wifi 模块固件。
[ 18.686420] dhdsdio_download_code_file: Open firmware file failed /system/etc/firmware/fw_bcm43438a1.bin[ 18.686430] _dhdsdio_download_firmware: dongle image file download failed
WiFI 固件路径:/external/wlan_loader/firmware
将模块供应商提供的固件文件拷贝到此目录下,然后编译烧录。
external/wlan_loader/firmware/fw_bcm43438a1.binexternal/wlan_loader/firmware/fw_bcm43438a1_apsta.binexternal/wlan_loader/firmware/fw_bcm43438a1_p2p.binexternal/wlan_loader/firmware/nvram_ap6212.txt
编译后,系统会将模块固件拷贝到 out/target/product/rk3288/system/etc//firmware/ 目录下
如果只是调试,可以通过 adb 将固件 push 到 /system/etc//firmware/ 目录下,然后重启。
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/rk_wifi_config.c
wifi 驱动路径:kernel/net/rfkill/rfkill-wlan.c
如果器件升级,比如器件为AP6212A,供应商给的文件问 nvram_ap6212a.txt,则需要修改下面文件。(直接用以前的 nvram_ap6212.txt 也可以用,但文件不一样,不清楚)
路径:\kernel\drivers\net\wireless\rockchip_wlan\rkwifi\bcmdhd\dhd_config.c
diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.cindex 39641e1..91d7925 100755--- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c+++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_config.c@@ -477,7 +477,7 @@ dhd_conf_set_fw_name_by_chip(dhd_pub_t *dhd, char *fw_path, char *nv_path) strcpy(&fw_path[i+1], bcm43438a0_fw_name[fw_type]); else if (chiprev == BCM43430A1_CHIP_REV) strcpy(&fw_path[i+1], bcm43438a1_fw_name[fw_type]);- strcpy(&nv_path[j+1], "nvram_ap6212.txt");+ strcpy(&nv_path[j+1], "nvram_ap6212a.txt");break; case BCM43340_CHIP_ID: if (chiprev == BCM43340B0_CHIP_REV)
BT 驱动中增添代码,支持 AP6212
BT 驱动路径:kernel/net/rfkill/rfkill-bt.c
diff --git a/kernel/net/rfkill/rfkill-bt.c b/kernel/net/rfkill/rfkill-bt.cindex a1a156c..3070080 100755--- a/kernel/net/rfkill/rfkill-bt.c+++ b/kernel/net/rfkill/rfkill-bt.c@@ -95,6 +95,8 @@ static const char bt_name[] = #else "ap6210_24M" #endif+#elif defined(CONFIG_AP6212)+ "ap6212" #elif defined(CONFIG_AP6330) "ap6330" #elif defined(CONFIG_AP6476)@@ -266,7 +268,7 @@ static int rfkill_rk_set_power(void *data, bool blocked) struct rfkill_rk_data *rfkill = data; struct rfkill_rk_gpio *poweron = &rfkill->pdata->poweron_gpio; struct rfkill_rk_gpio *reset = &rfkill->pdata->reset_gpio;-#if defined(CONFIG_AP6210) || defined(CONFIG_AP6335)+#if defined(CONFIG_AP6210) || defined(CONFIG_AP6212) || defined(CONFIG_AP6335) struct rfkill_rk_gpio* rts = &rfkill->pdata->rts_gpio; struct pinctrl *pinctrl = rfkill->pdata->pinctrl; #endif@@ -307,7 +309,7 @@ static int rfkill_rk_set_power(void *data, bool blocked) msleep(20); gpio_direction_output(reset->io, reset->enable); }-#if defined(CONFIG_AP6210) || defined(CONFIG_AP6335)+#if defined(CONFIG_AP6210) || defined(CONFIG_AP6212) || defined(CONFIG_AP6335) if (pinctrl != NULL && gpio_is_valid(rts->io)) { pinctrl_select_state(pinctrl, rts->gpio_state);
到此 AP6212 就可以正常使用了,但是不知道供应商提供的 BT 固件应该拷贝到哪里。
关于RK3288怎么添加WiFi和BT模块AP6212就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
--结束END--
本文标题: RK3288怎么添加WiFi和BT模块AP6212
本文链接: https://lsjlt.com/news/243580.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
2024-05-24
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0