点点滴滴学WIFI hostapd热点配置

        之前MIFI一直出现5G WIFI热点问题,基于此研究了下hostapd如何配置5G WIFI 热点的80HZ带宽

5g信道与频率的关系转化如下,n为信道,参考80211a文档

        中心频率(MHz)= 5,000+5 x n;n = 0,1,2,..199
        中心频率(MHz)= 5,000 – 5*(256 - n),n=240,241,.. 255

80211协议相关标准如下图

点点滴滴学WIFI hostapd热点配置_第1张图片

80211n增加HT Capability Info 和 HT Operation Information来标记是否支持40M

80211ac增加VHT Capabilities element和 VHT Operation element来标记是否支持80M 160M带宽

查看对应hostapd相关配置data/vendor/wifi/hostapd.conf有如下设置

ht_capab=[HT40+] ----------80211n

/* HT Capabilities Info field within HT Capabilities element */
#define HT_CAP_INFO_LDPC_CODING_CAP		((u16) BIT(0))
#define HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET	((u16) BIT(1))
#define HT_CAP_INFO_SMPS_MASK			((u16) (BIT(2) | BIT(3)))
#define HT_CAP_INFO_SMPS_STATIC			((u16) 0)
#define HT_CAP_INFO_SMPS_DYNAMIC		((u16) BIT(2))
#define HT_CAP_INFO_SMPS_DISABLED		((u16) (BIT(2) | BIT(3)))
#define HT_CAP_INFO_GREEN_FIELD			((u16) BIT(4))
#define HT_CAP_INFO_SHORT_GI20MHZ		((u16) BIT(5))
#define HT_CAP_INFO_SHORT_GI40MHZ		((u16) BIT(6))
#define HT_CAP_INFO_TX_STBC			((u16) BIT(7))
#define HT_CAP_INFO_RX_STBC_MASK		((u16) (BIT(8) | BIT(9)))
#define HT_CAP_INFO_RX_STBC_1			((u16) BIT(8))
#define HT_CAP_INFO_RX_STBC_12			((u16) BIT(9))
#define HT_CAP_INFO_RX_STBC_123			((u16) (BIT(8) | BIT(9)))
#define HT_CAP_INFO_DELAYED_BA			((u16) BIT(10))
#define HT_CAP_INFO_MAX_AMSDU_SIZE		((u16) BIT(11))
#define HT_CAP_INFO_DSSS_CCK40MHZ		((u16) BIT(12))
/* B13 - Reserved (was PSMP support

static int hostapd_config_ht_capab(struct hostapd_config *conf,
				   const char *capab)
{
    ......
	if (os_strstr(capab, "[HT40+]")) {
		conf->ht_capab |= HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
		conf->secondary_channel = 1;
	}

对应空口可以看到到此项是Beacon帧中HT元素 ,位于第二位带宽支持

点点滴滴学WIFI hostapd热点配置_第2张图片

 vht_oper_chwidth=1 ----------80211ac

此配置对应实际是协议ac协议带宽80HZ,1表示为80MHZ

点点滴滴学WIFI hostapd热点配置_第3张图片

5G模式

hw_mode=a

你可能感兴趣的:(Android,WIFI相关,p2p,fpga开发,tv)