说明:硬件提供调试使用,记录方便以后使用
无线速率模式配置大全!
----------------------------------------------------------------------------------------
方法一:
配置步骤:
ifconfig ath0 down
iwpriv ath0 mode 11NGHT20
iwpriv ath0 disablecoext 1
iwpriv puren 1
iwpriv ath0 maxrate 210000 //实际对应300Mbps 下的 MCS 12 162M
ifconfig ath0 up
iwpriv ath0 maxrate 210000 这一步的速率值参照速率表选择,实际上会按照你设置速率贴近对应速率表项,比如我上面的例子。
11n需要做disablecoext关闭ht40/20切换,其他模式不需要,所有步骤一定要放在ifconfig ath0 down/up之间,配置完成可以通过iwconfig查看速率。
----------------------------------------------------------------------------------------
方法二:
1. 固定速率的设置方法为:
a) 11n模式速率的配置方法:
iwpriv athXX set11NRates 0x80808080 表示MCS0
iwpriv athXX set11NRates 0x8f8f8f8f 表示MCS15
iwpriv athXX set11NRates 0x90909090 表示MCS16
iwpriv athXX set11NRates 0x9f9f9f9f 表示MCS31
iwpriv athXX set11NRates 0 表示自动速率
b) 11a/b/g模式速率的配置方法
iwconfig athXX rate 6M
iwconfig athXX rate 54M
iwconfig athXX rate 1M
iwconfig athXX rate 0M 表示自动速率
2. 固定速率设置的是发送速率(TX),也即所设置VAP(athXX)的发送数据时使用的速率。在这个TX方向上使用的速率,与衰减、距离无关。
可以使用命令确定是否设置正确: wlanconfig athx list,查看TXrate的列表。
----------------------------------------------------------------------------------------
速率表及模式参考:
2.4G
static const int wlanIntRateTable_300M[] =
{
1000,
2000,
5500,
6000,
7000,
9000,
11000,
12000,
13000,
15000,
18000,
21000,
24000,
26000,
30000,
36000,
39000,
45000,
48000,
52000,
54000,
60000,
65000,
72000,
78000,
90000,
104000,
117000,
120000,
130000,
135000,
150000,
180000,
240000,
270000,
300000
};
无线速率配置表
static const MCS_RATE_TABLE wlanRateTable[] =
{
{"Not use this item", 0x00000000, 0x00000000},
{"Best (Automatic)", 0x00000000, 0x00000000},
{"MCS 15 - 130M [270M]", 0x8F8F8F8F, 0x04040404},
{"MCS 14 - 117M [243M]", 0x8E8E8E8E, 0x04040404},
{"MCS 13 - 104M [216M]", 0x8D8D8D8D, 0x04040404},
{"MCS 12 - 78M [162M]", 0x8C8C8C8C, 0x04040404},
{"MCS 11 - 52M [108M]", 0x8B8B8B8B, 0x04040404},
{"MCS 10 - 39M [ 81M]", 0x8A8A8A8A, 0x04040404},
{"MCS 9 - 26M [ 54M]", 0x89898989, 0x04040404},
{"MCS 8 - 13M [ 29M]", 0x88888888, 0x04040404},
{"MCS 7 - 65M [135M]", 0x87878787, 0x04040404},
{"MCS 6 - 58.5M [121.5M]", 0x86868686, 0x04040404},
{"MCS 5 - 52M [108M]", 0x85858585, 0x04040404},
{"MCS 4 - 39M [ 81M]", 0x84848484, 0x04040404},
{"MCS 3 - 26M [ 54M]", 0x83838383, 0x04040404},
{"MCS 2 - 19.5M [40.5M]", 0x82828282, 0x04040404},
{"MCS 1 - 13M [ 27M]", 0x81818181, 0x04040404},
{"MCS 0 - 6.5M [13.5M]", 0x80808080, 0x04040404},
{"54M", 0x0C0C0C0C, 0x04040404},
{"48M", 0x08080808, 0x04040404},
{"36M", 0x0D0D0D0D, 0x04040404},
{"24M", 0x09090909, 0x04040404},
{"18M", 0x0E0E0E0E, 0x04040404},
{"12M", 0x0A0A0A0A, 0x04040404},
{"9M", 0x0F0F0F0F, 0x04040404},
{"6M", 0x0B0B0B0B, 0x04040404},
{"11M", 0x18181818, 0x04040404},
{"5.5M", 0x19191919, 0x04040404},
{"2M", 0x1A1A1A1A, 0x04040404},
{"1M", 0x1B1B1B1B, 0x04040404}
};
可供选择模式:
static const char* wlanMode[] = {
"11B",
"11G",
"11NGHT20",
"11NGHT40PLUS",
"11NGHT40MINUS",
"AUTO",
"11A",
"11NAHT20",
"11NAHT40PLUS",
"11NAHT40MINUS",
"11NGHT40",
"11NAHT40",
};
来源:CSDN
作者:wellnw
链接:https://blog.csdn.net/wgl307293845/article/details/103831617