channel_policy

Boris boris at cation.de
Tue Jul 22 05:44:25 EDT 2008


Hej all,


I'm new to this list and did subscribe due to a concrete trouble that I
have. My name is Boris and I live in Kiel, Germany. I'm doing in Linux
since years and use Debian mainly.

I'm right now setting up a WLAN AP based on leaf.sourceforge.net (I can
recommend this
for router-stuff!!) following this howto:
http://leaf.sourceforge.net/doc/bucu-ap.html

I am using an Alix-Box from pcengines.ch (alix2c1) with a
pcengines.ch/wlm54g23.htm WLAN adapter. I use the same adapter in my
laptop (with Debian Etch).

Because I had a lot of troubles associating with the AP even unencrypted,
I borrowed a Belkin AP as a reference. I found out that it seems that
channel 1 is extremely noisy and I should switch to channel 7 or 8.

Now my asking is how to switch channels. I already tried setting
wireless-channel in /etc/network/interfaces with no success. The Alix-AP
still uses channel 1.

The leaf software is handled in standard manner. As far as I know, they
don't change anything concerning the way the driver has to be
configured. I already asked the leaf-user-list and got the hint to set
the channel and channel_policy in the hostapd.conf:

By the way, they use this binary:
# apkg -l hostapd.lrp
hostapd 0.5.7 Rev 2 uClibc 0.9.28

So, I enabled wpa with the following hostapd.conf (I collected all
parameters at the bottom of that file):

interface=ath0
driver=madwifi
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=4
ctrl_interface=/var/run/hostapd
# ctrl_interface_group=0
# ssid=gartenstr
hw_mode=g
channel_policy=2
channel=8
macaddr_acl=0         # 1 = deny unless in accept list
auth_algs=3
ignore_broadcast_ssid=0
wpa=3
wpa_psk=<my stog key generated by https://www.grc.com/passwords.htm>
#wpa_passphrase=Spass
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
#####eap_authenticator=0
#####eap_message=Moin
eap_server=0
eapol_key_index_workaround=0
#####own_ip_addr=127.0.0.1

Starting the daemon manually:

# /usr/sbin/hostapd -B -P /var/run/hosapd.pid $DAEMON_OPTS
/etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 733: unknown configuration item 'channel_policy'
1 errors found in configuration file '/etc/hostapd/hostapd.conf'

So I commented the line and hostapd is starting. WPA is enabled but
still the card works on channel 1. Here is the scan from my laptop:

Cell 04 - Address: 00:80:48:54:85:81
                    ESSID:""
                    Mode:Master
                    Frequency:2.412 GHz (Channel 1)
                    Quality=18/70  Signal level=-77 dBm  Noise level=-95 dBm
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Extra:bcn_int=100
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK

Extra:wme_ie=dd180050f2020101830002a3400027a4000042435e0062322f00
                    Extra:ath_ie=dd0900037f01010020ff7f

I found this in the hostapd-configuration:
Channel and Channel Policy

Either the channel is set explicitly (channel_policy=0) and channel is
set to the specified channel number or automatic channel selection is
configured. There are three options for automatic channel selection::

   1. Select the first available channel of the first available mode
(channel_policy=1). In this case, the channel item is ignored.
   2. Automatically select the best channel (channel_policy=2). In this
case, the channel item is ignored.
   3. Automatically select the best channel and allow channel to be
changed (channel_policy=3).

It seems, I should use '0', but the parameter seems invalid...???


Thanks,

Boris


More information about the HostAP mailing list