hostpd.conf设置

Reference:
http://lists.shmoo.com/pipermail/hostap/2012-March/025542.html
http://permalink.gmane.org/gmane.linux.drivers.hostap/25697

Dear all,

I am using hostapd 0.7.3 stable release as make atherose based (having  
ar9287 chipset) wifi module in AP and other settings.

Acually, i want to set the module's hw_mode(Network mode) with some  
options as listed bellow.

1) b only mode
2) g only mode
3) n only mode
4) b&g mode
5) b&n mode
6) g&n mode
7) mixed (b/g&n) mode

i have referred hostapd.conf and as per my knowledge, i think it can  
allow to set options as bellow listed modes.

1) b only mode [by hw_mode=b and ieee80211n=0]
2) g only mode [by hw_mode=g and ieee80211n=0]

5) b&n mode [by hw_mode=b and ieee80211n=1]
6) g&n mode [by hw_mode=g and ieee80211n=1]

    If, i am correct?

and also, how to set rest of options, like
3) n only mode
4) b&g mode
7) mixed (b/g&n) mode

Thanks,
Darshan Prajapati.
*****************************************************************************
Hello, see comments below.

> Dear all,
>> I am using hostapd 0.7.3 stable release as make atherose based (having  
> ar9287 chipset) wifi module in AP and other settings.

You'd better to compile hostapd from sources (trunk or release candidate) 
if you want to use n-mode. As I remember 0.7.3 works bad in N.

>> Acually, i want to set the module's hw_mode(Network mode) with some  
> options as listed bellow.
>> 1) b only mode
> 2) g only mode
> 3) n only mode
> 4) b&g mode
> 5) b&n mode
> 6) g&n mode
> 7) mixed (b/g&n) mode
>> i have referred hostapd.conf and as per my knowledge, i think it can  
> allow to set options as bellow listed modes.
>> 1) b only mode [by hw_mode=b and ieee80211n=0]

Yes.

> 2) g only mode [by hw_mode=g and ieee80211n=0]

Yes.

>> 5) b&n mode [by hw_mode=b and ieee80211n=1]

Yes.

> 6) g&n mode [by hw_mode=g and ieee80211n=1]

Yes.

>> If, i am correct?
>> and also, how to set rest of options, like
> 3) n only mode

n-mode works on top of b/g-mode, so you can not enable just "n". 
Also you can play with ht_capab parameter, for ex to use HT40 mode.
I'm currently use ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40][TX-STBC][RX-STBC1] 
with TP-Link TL-WN851N (ar9xxx chip).

> 4) b&g mode
> 7) mixed (b/g&n) mode

Can't give an answer to you about b-mode, it's a bit old and I never used it.

>> Thanks,
> Darshan Prajapati.
>>
*******************************************************************************
b only mode:
iwconfig:
wlan0     IEEE 802.11bg  ESSID:"AndroidAPn"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 5C:0A:5B:E0:A5:59   
          Bit Rate=18 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=69/70  Signal level=-41 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:42   Missed beacon:0

g only mode:
iwconfig:
wlan0     IEEE 802.11bg  ESSID:"AndroidAPn"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 5C:0A:5B:E0:A5:59   
          Bit Rate=48 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=69/70  Signal level=-41 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:37   Missed beacon:0

g&n mode:
wlan0     IEEE 802.11bg  ESSID:"AndroidAPn"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 5C:0A:5B:E0:A5:59   
          Bit Rate=48 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=66/70  Signal level=-44 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:34   Missed beacon:0

好像我的WIFI Client只支持b和g mode, 即使WIFI Server设置为n mode, 
Client也只能支持到g mode.

**************************************************************************
WIFI Client信息:
wv@wv-ThinkPad-SL:~$ iw list
Wiphy phy0
	Band 1:
		Frequencies:
			* 2412 MHz [1] (20.0 dBm)
			* 2417 MHz [2] (20.0 dBm)
			* 2422 MHz [3] (20.0 dBm)
			* 2427 MHz [4] (20.0 dBm)
			* 2432 MHz [5] (20.0 dBm)
			* 2437 MHz [6] (20.0 dBm)
			* 2442 MHz [7] (20.0 dBm)
			* 2447 MHz [8] (20.0 dBm)
			* 2452 MHz [9] (20.0 dBm)
			* 2457 MHz [10] (20.0 dBm)
			* 2462 MHz [11] (20.0 dBm)
			* 2467 MHz [12] (20.0 dBm) (passive scanning)
			* 2472 MHz [13] (20.0 dBm) (passive scanning)
			* 2484 MHz [14] (disabled)
		Bitrates (non-HT):
			* 1.0 Mbps
			* 2.0 Mbps (short preamble supported)
			* 5.5 Mbps (short preamble supported)
			* 11.0 Mbps (short preamble supported)
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
	max # scan SSIDs: 4
	max scan IEs length: 2285 bytes
	Coverage class: 0 (up to 0m)
	Supported Ciphers:
		* WEP40 (00-0f-ac:1)
		* WEP104 (00-0f-ac:5)
		* TKIP (00-0f-ac:2)
		* CCMP (00-0f-ac:4)
	Available Antennas: TX 0x3 RX 0x3
	Configured Antennas: TX 0x3 RX 0x3
	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
		 * mesh point
	software interface modes (can always be added):
		 * AP/VLAN
		 * monitor
	valid interface combinations:
		 * #{ managed } <= 2048, #{ AP, mesh point } <= 4,
		   total <= 2048, #channels <= 1
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * new_beacon
		 * new_station
		 * new_mpath
		 * set_mesh_params
		 * set_bss
		 * authenticate
		 * associate
		 * deauthenticate
		 * disassociate
		 * join_ibss
		 * join_mesh
		 * set_tx_bitrate_mask
		 * action
		 * frame_wait_cancel
		 * set_wiphy_netns
		 * set_channel
		 * set_wds_peer
		 * Unknown command (84)
		 * Unknown command (87)
		 * Unknown command (85)
		 * testmode
		 * connect
		 * disconnect
	Supported TX frame types:
		 * IBSS: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * managed: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * AP/VLAN: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * mesh point: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-client: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
		 * P2P-GO: 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 0x00f0
	Supported RX frame types:
		 * IBSS: 0x00d0
		 * managed: 0x0040 0x00d0
		 * AP: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * AP/VLAN: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
		 * mesh point: 0x00b0 0x00c0 0x00d0
		 * P2P-client: 0x0040 0x00d0
		 * P2P-GO: 0x0000 0x0020 0x0040 0x00a0 0x00b0 0x00c0 0x00d0
	Device supports RSN-IBSS.

你可能感兴趣的:(host)