Android7.1 RK3328热点支持Wifi5

平台:Android7.1
芯片:RK3328
Wifi:rtl8822cu

1、hostapd.conf 增加ieee80211ac=1

系统起热点(AP)的时候,会走SoftapController生成hostapd.conf,我们让他生成的时候附带上需要的参数

system/netd/server/SoftapController.cpp
diff --git a/server/SoftapController.cpp b/server/SoftapController.cpp
old mode 100644
new mode 100755
index 7e99cf3..7a34662
--- a/server/SoftapController.cpp
+++ b/server/SoftapController.cpp
@@ -145,7 +145,10 @@ int SoftapController::setSoftap(int argc, char *argv[]) {
             "ssid=%s\n"
             "channel=%d\n"
             "ieee80211n=1\n"
+            "ieee80211ac=1\n"
             "hw_mode=%c\n"
+           //速度有提高,但部分电脑会不支持导致连接不上
+            //"ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+] \n"   
             "ignore_broadcast_ssid=%d\n"
             "wowlan_triggers=any\n",
             argv[2], argv[3], channel, (channel <= 14) ? 'g' : 'a', hidden));

rk3328_box:/ # cat data/misc/wifi/hostapd.conf
interface=wap0
driver=nl80211
ctrl_interface=/data/misc/wifi/hostapd
ssid=TEST-AP
channel=48
ieee80211n=1
ieee80211ac=1
hw_mode=a
ignore_broadcast_ssid=0
wowlan_triggers=any
wpa=2
rsn_pairwise=CCMP
wpa_psk=f8a7abffc92c6d16b5dcfdae0aaaf34e5734b11775d0925c80eba154e9ff2643

2、 瑞昱(RTW)的wifi模块 insmod的时候需要增加参数,rtw_vht_enable=2

这个根据设备起AP的方式来,我是脚本的方式就直接 insmod rtl8822cu.ko rtw_vht_enable=2

3、wpa增加CONFIG_IEEE80211AC=y

这里两个配置文件增加CONFIG_IEEE80211AC=y,让wpa代码支持CONFIG_IEEE80211AC
external\wpa_supplicant_8\wpa_supplicant\android.config
external\wpa_supplicant_8\hostapd\android.config 

4、手机验证

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值