求教11n的WIFI设置 ht mode 20mhz和距离优化分别何指

如何确认WiFi 11N工作模式_百度知道
如何确认WiFi 11N工作模式
WiFi 11N模式主要有4种1. HT202. HT403. HT20/40-20MHz4. HT20/40-40MHz现在我们可以通过OmniPeek软件来抓取modem发送的beacon帧来判别当前的工作模式。Beacon帧:主要是用来声明无线网络的存在,包括SSID,Channel,Country Code,HT Capability等信息,Modem会定期发送beacon帧,我们可以通过beacon帧里的HT Capability Info和HT Information字段来区分。1.
HT20:HT Capability Info字段里会明确注明”Only 20MHz Operation is Supported”,且没有HT Information字段;2. HT40:HT Capability Info字段里会明确注明”Both 20MHz and 40MHzOperation is Supported”,且HT Information Element 1字段里会包含有2nd Channel Offset的信息;3.HT20/40-20MHz:HT Capability Info字段里会明确注明”Both 20MHz and 40MHzOperation is Supported”,且HT Information Element 1字段里会注明”No Secondary ChannelPresent”;4.HT20/40-40MHz:HT Capability Info字段里会明确注明”Both 20MHz and 40MHzOperation is Supported”,且HT Information Element 1字段里会包含有2nd Channel Offset的信息;
其他类似问题
为您推荐:
wifi的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁30448人阅读
Linux(153)
1.缺省情况下,openwrt中的无线是关闭的,系统起来后,ifconfig和ifconfig -a, iwconfig均看不到wlan0接口
原始的wireless配置文件如下:
root@OpenWrt:/# cat /etc/config/wireless&
config wifi-device &radio0
& & & & option type & & mac80211
& & & & option channel &11
& & & & option macaddr &00:90:4b:24:ff:2a
& & & & option hwmode & 11ng
& & & & option htmode & HT20
& & & & list ht_capab & SHORT-GI-40
& & & & list ht_capab & DSSS_CCK-40
& & & & # REMOVE THIS LINE TO ENABLE WIFI:
& & & & option disabled 1
config wifi-iface
& & & & option device & radio0
& & & & option network &lan
& & & & option mode & & ap
& & & & option ssid & & OpenWrt
& & & & option encryption none
root@OpenWrt:/#&
root@OpenWrt:/# cat /etc/config/network&
config 'interface' 'loopback'
& & & & option 'ifname' 'lo'
& & & & option 'proto' 'static'
& & & & option 'ipaddr' '127.0.0.1'
& & & & option 'netmask' '255.0.0.0'
config 'interface' 'lan'
& & & & option 'ifname' 'eth0'
& & & & option 'type' 'bridge'
& & & & option 'proto' 'static'
& & & & option 'ipaddr' '192.168.1.1'
& & & & option 'netmask' '255.255.255.0'
config 'interface' 'wwan'
& & & & option 'proto' 'dhcp'
root@OpenWrt:/#&
可以先删除以前的,再用wifi命令生成,如下:
rm -f /etc/config/ wifi detect & /etc/config/wireless
mtg板子lan--连笔记本网口,Ip地址选dhcp模式,则笔记本会获得一个192.168.1.x的IP地址,
br-lan的ip地址为192.168.1.1,则在笔记本的地址栏输入192.168.1.1,打开板子的openwrt luci web 界面,network---&wifi,
如图一,点一下enable
串口打印如下:
root@OpenWrt:/# [ & 35.704581] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ & 35.732884] device wlan0 entered promiscuous mode
[ & 35.742912] br-lan: port 2(wlan0) entering forwarding state
[ & 35.748496] br-lan: port 2(wlan0) entering forwarding state
[ & 37.953439] device wlan0 left promiscuous mode
[ & 37.958101] br-lan: port 2(wlan0) entering forwarding state
[ & 38.122524] device wlan0 entered promiscuous mode
[ & 38.127514] br-lan: port 2(wlan0) entering forwarding state
[ & 38.133145] br-lan: port 2(wlan0) entering forwarding state
此时在用ifconfig和iwconfig查看均能看到wlan0接口
再查看wireless配置文件如下:
root@OpenWrt:/# cat /etc/config/wireless&
config 'wifi-device' 'radio0'
& & & & option 'type' 'mac80211'
& & & & option 'channel' '11'
& & & & option 'macaddr' '00:90:4b:24:ff:2a'
& & & & option 'hwmode' '11ng'
& & & & option 'htmode' 'HT20'
& & & & list 'ht_capab' 'SHORT-GI-40'
& & & & list 'ht_capab' 'DSSS_CCK-40'
config 'wifi-iface'
& & & & option 'device' 'radio0'
& & & & option 'network' 'lan'
& & & & option 'mode' 'ap'
& & & & option 'ssid' 'OpenWrt'
& & & & option 'encryption' 'none'
root@OpenWrt:/#&
可见前面的 & &# REMOVE THIS LINE TO ENABLE WIFI:
& & & & option disabled 1
两行已经没有了
2. web上点一下wifi标签,则会回到图一的状态,点scan,则会扫描出很多AP,选择要用的AP,并将其的BSSID号复制下来,后面有用,
这里的BSSID号即为AP的MAC地址
选择要用的AP,点join network,会出现Join Network: Settings页面,如图二,
WPA passphrase: 此处输入AP访问密码,如Flexcomm_WIFI的密码为a,TP-LINK_CPN/TP-LINK_CPN1的密码为
name of the new network: 缺省为wwan
Create/Assign firewall-zone: 缺省为wan:wwan:(empty)
再点submit,则会显示wifi配置界面,和图一中直接选edit之后的界面一样,如图三,再将前面保存的BSSID粘贴到BSSID栏中,其他的参数都不要改
再点save&apply
此时串口打印如下:
root@OpenWrt:/# [ & 26.962420] br-lan: port 1(eth0) entering forwarding state
[ & 26.987437] device eth0 left promiscuous mode
[ & 26.991893] br-lan: port 1(eth0) entering disabled state
[ & 27.040168] eth0: link down
[ & 30.500184] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ & 31.003220] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ & 31.040777] eth0: link up, speed 100 Mb/s, full duplex
[ & 31.046025] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ & 31.195658] device eth0 entered promiscuous mode
[ & 31.259063] br-lan: port 1(eth0) entering forwarding state
[ & 31.264621] br-lan: port 1(eth0) entering forwarding state
[ & 32.373424] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ & 35.279518] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
root@OpenWrt:/#&
查看配置文件为:
root@OpenWrt:/# cat /etc/config/wireless&
config 'wifi-device' 'radio0'
& & & & option 'type' 'mac80211'
& & & & option 'macaddr' '00:90:4b:24:ff:2a'
& & & & option 'hwmode' '11ng'
& & & & option 'htmode' 'HT20'
& & & & list 'ht_capab' 'SHORT-GI-40'
& & & & list 'ht_capab' 'DSSS_CCK-40'
& & & & option 'disabled' '0'
& & & & option 'channel' '6'
& & & & option 'country' 'CO'
& & & & option 'txpower' '17'
config 'wifi-iface'
& & & & option 'ssid' 'Flexcomm_WIFI'
& & & & option 'encryption' 'psk2'
& & & & option 'device' 'radio0'
& & & & option 'mode' 'sta'
& & & & option 'network' 'wwan'
& & & & option 'key' 'a'
& & & & option 'bssid' '00:1C:F0:C3:84:AC '
root@OpenWrt:/#&
root@OpenWrt:/# ifconfig wlan0
wlan0 & & Link encap:Ethernet &HWaddr 00:90:4B:24:FF:2A &
& & & & & inet addr:192.168.5.182 &Bcast:192.168.5.255 &Mask:255.255.255.0
& & & & & inet6 addr: fe80::290:4bff:fe24:ff2a/64 Scope:Link
& & & & & UP BROADCAST RUNNING MULTICAST &MTU:1500 &Metric:1
& & & & & RX packets:82 errors:0 dropped:0 overruns:0 frame:0
& & & & & TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
& & & & & collisions:0 txqueuelen:32&
& & & & & RX bytes: KiB) &TX bytes: KiB)
root@OpenWrt:/# iwconfig wlan0
wlan0 & & IEEE 802.11abgn &ESSID:&Flexcomm_WIFI& &
& & & & & Mode:Managed &Frequency:2.437 GHz &Access Point: 00:1C:F0:C3:84:AC &&
& & & & & Bit Rate=135 Mb/s & Tx-Power=17 dBm &&
& & & & & RTS thr:off & Fragment thr:off
& & & & & Encryption key:off
& & & & & Power Management:off
& & & & & Link Quality=53/70 &Signal level=-57 dBm &
& & & & & Rx invalid nwid:0 &Rx invalid crypt:0 &Rx invalid frag:0
& & & & & Tx excessive retries:0 &Invalid misc:4 & Missed beacon:0
root@OpenWrt:/#&
可见wlan0已经成功连上了AP,并自动获得了IP地址,AP为192.168.5.x网段的,并开了DHCP服务,所以wlan0能自动获得IP地址
root@OpenWrt:/# ping 192.168.5.1 & &//ping网关能通
PING 192.168.5.1 (192.168.5.1): 56 data bytes
64 bytes from 192.168.5.1: seq=0 ttl=64 time=4.500 ms
64 bytes from 192.168.5.1: seq=1 ttl=64 time=4.163 ms
--- 192.168.5.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 4.163/4.331/4.500 ms
root@OpenWrt:/# ping
& & //ping 外网能通
(220.181.111.147): 56 data bytes
64 bytes from 220.181.111.147: seq=0 ttl=54 time=222.212 ms
64 bytes from 220.181.111.147: seq=1 ttl=54 time=290.069 ms
64 bytes from 220.181.111.147: seq=2 ttl=54 time=212.674 ms
ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 212.674/241.651/290.069 ms
root@OpenWrt:/#&
root@OpenWrt:/#&
此时web页面wifi页状态显示连接,如图四:
说明:如果上面ping外网不通,可能是DNS没有设置
选一个可用的DNS,如8.8.8.8 为google的DNS服务器地址
可以在web页,DHCP and DNS页面中设置DNS forwardings: 8.8.8.8, save&apply
这样设置之后,就能ping通大网了
接mtgd的笔记本(网口接mtgd&lan口)也可以直接上大网了。
3.直接在命令行下手动配置wifi如下:
可以先删除老的配置文件rm -rf /etc/config/wireless
新建一个配置文件 wifi detect & /etc/config/wireless
在上面生成的配置文件/etc/config/wireless基础上修改,改成如下:
主要设置'disabled','channel','network','mode','ssid','encryption' ,'key','bssid'
即主要设置option参数
设置之后保存退出,再运行wifi命令
root@OpenWrt:/# vi /etc/config/wireless&
config 'wifi-device' 'radio0'
& & & & option 'type' 'mac80211'
& & & & option 'macaddr' '00:90:4b:24:ff:2a'
& & & & option 'hwmode' '11ng'
& & & & option 'htmode' 'HT20'
& & & & list 'ht_capab' 'SHORT-GI-40'
& & & & list 'ht_capab' 'DSSS_CCK-40'
& & & & option 'country' 'CN' &&
& & & & option 'disabled' '0' &
& & & & option 'channel' '1'&
& & & & option 'txpower' '17'
& & & & & & & & & & & & & & &
config 'wifi-iface' & & & & & &&
& & & & option 'device' 'radio0'
& & & & option 'network' 'wwan' &--------这个地方一定不能为lan,否则连不通,可为wan,wwan等,wwan只是一个别名
& & & & option 'mode' 'sta' & & & &
& & & & option 'ssid' 'TP-LINK_CPN'
& & & & option 'encryption' 'psk2' & & & &
& & & & option 'key' '' & & & & &&
& & & & option 'bssid' '5C:63:BF:FD:CF:FC'
~ & & & & & & & & & & & & & & & & & & & &&
root@OpenWrt:/# wifi &//启动wifi,可见下面已经连接
[ & 61.914007] cfg80211: Calling CRDA for country: CN
[ & 62.058611] cfg80211: Regulatory domain changed to country: CN
[ & 62.064531] cfg80211: & & (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ & 62.072894] cfg80211: & & (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ & 62.080467] cfg80211: & & (5735000 KHz - 5835000 KHz @ 40000 KHz), (N/A, 3000 mBm)
[ & 63.112131] ADDRCONF(NETDEV_UP): wlan0: link is not ready
root@OpenWrt:/# [ & &0.464589] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
root@OpenWrt:/# iwconfig wlan0
wlan0 & & IEEE 802.11abgn &ESSID:&TP-LINK_CPN& &
& & & & & Mode:Managed &Frequency:2.412 GHz &Access Point: 5C:63:BF:FD:CF:FC &&
& & & & & Bit Rate=180 Mb/s & Tx-Power=17 dBm &&
& & & & & RTS thr:off & Fragment thr:off
& & & & & Encryption key:off
& & & & & Power Management:off
& & & & & Link Quality=70/70 &Signal level=-29 dBm &
& & & & & Rx invalid nwid:0 &Rx invalid crypt:0 &Rx invalid frag:0
& & & & & Tx excessive retries:0 &Invalid misc:7 & Missed beacon:0
root@OpenWrt:/# ifconfig wlan0
wlan0 & & Link encap:Ethernet &HWaddr 00:90:4B:24:FF:2A &
& & & & & inet addr:192.168.8.108 &Bcast:192.168.8.255 &Mask:255.255.255.0
& & & & & inet6 addr: fe80::290:4bff:fe24:ff2a/64 Scope:Link
& & & & & UP BROADCAST RUNNING MULTICAST &MTU:1500 &Metric:1
& & & & & RX packets:66 errors:0 dropped:0 overruns:0 frame:0
& & & & & TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
& & & & & collisions:0 txqueuelen:32&
& & & & & RX bytes:1 KiB) &TX bytes: KiB)
root@OpenWrt:/#&
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:690469次
积分:6945
积分:6945
排名:第2192名
原创:13篇
转载:351篇
评论:63条
(3)(1)(3)(7)(7)(1)(9)(8)(1)(3)(3)(8)(3)(2)(3)(2)(4)(2)(2)(10)(6)(4)(3)(5)(7)(6)(11)(13)(8)(2)(5)(4)(24)(6)(15)(13)(3)(39)(23)(4)(7)(12)(21)(39)(1)(2)4993人阅读
无线(35)
原文地址:
11n有两种频宽模式:HT(High Throughput)20和HT40。
HT20是出于兼容性考虑:比如,一个区域内存在11b/g信号,那么为了尽量减少对它们的干扰,需要设定为HT20,以减少频带的重叠。
HT40是出于高性能考虑:HT40相当于两个HT20的捆绑,一个是主,一个是辅。主信道发送beacon报文和部分数据报文,辅信道发送其他报文。
由于HT40所需带宽为40M,在一个蜂窝式无线覆盖区域最好不要在2.4GHz使用,最好在5GHz使用。在2.4G使用HT40,则有效通道有3~13,非重叠的只有3,11.
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:364977次
积分:6822
积分:6822
排名:第2265名
原创:243篇
转载:449篇
评论:19条
(8)(3)(19)(18)(19)(54)(2)(23)(11)(24)(12)(5)(4)(12)(9)(13)(2)(4)(3)(14)(10)(1)(4)(15)(7)(13)(4)(14)(27)(9)(1)(7)(36)(93)(49)(56)(23)(61)(8)求教11n的WIFI设置 HT mode和距离优化分别何指_百度知道
求教11n的WIFI设置 HT mode和距离优化分别何指
提问者采纳
?,启用,输入cmd并回车打开命令指令符 ②?内容可以自己设定? 然后回车其中????key=。below和above是指占用上一个还是下一个信道??。你用cmd命令弄的话?????,还没听懂。距离优化??,ssid是wifi名?:win键+R打开运行程序:在命令指令符中输入 netsh wlan set hostednetwork mode=allow ssid=,40占用两个20占用一个信道?
其他类似问题
为您推荐:
其他1条回答
?,启用,输入cmd并回车打开命令指令符 ②?内容可以自己设定? 然后回车其中????key=。below和above是指占用上一个还是下一个信道??。你用cmd命令弄的话?????,还没听懂。距离优化??,ssid是wifi名?:win键+R打开运行程序:在命令指令符中输入 netsh wlan set hostednetwork mode=allow ssid=,40占用两个20占用一个信道?
wifi的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁802.11n 中HT20 HT40是什么意思_百度知道
802.11n 中HT20 HT40是什么意思
我有更好的答案
g信号,以减少频带的重叠:比如,一个是主.4GHz使用,则有效通道有3~13。由于HT40所需带宽为40M。在2,需要设定为HT20。主信道发送beacon报文和部分数据报文:HT(High Throughput)20和HT4011n有两种频宽模式,辅信道发送其他报文。HT20是出于兼容性考虑,在一个蜂窝式无线覆盖区域最好不要在2,一个是辅:HT40相当于两个HT20的捆绑,非重叠的只有3,那么为了尽量减少对它们的干扰,一个区域内存在11b&#47.4G使用HT40。HT40是出于高性能考虑,11,最好在5GHz使用
其他类似问题
为您推荐:
您可能关注的推广
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁}

我要回帖

更多关于 openwrt 距离优化 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信