Use hostapd to set master mode?

Alexander Huemer alexander.huemer at sbg.ac.at
Sun Feb 22 15:09:20 EST 2009


Christian Lamparter wrote:
> On Sunday 22 February 2009 19:04:08 Alexander Huemer wrote:
>    
>   
>> i am plumbing to get an AP with hostapd and nl80211 working too, in my
>> case with driver p54_pci.
>> in order to get an interface in master mode, i have to use
>> # iw phy phy0 interface add myap type __ap
>> this gets me a seperate virtual interface that i can then use with
>> hostapd. 
>>     
> No you can do this much easier..
> just load the driver and run hostapd.
> (Of course you have to set interface=wlan0 (depends on your setup) in hostapd.conf before)
>
>   
>> unfortunately it is still not operational.
>> i don't know if there is a better way to achieve the  same effect.
>> i  would be interested in one.
>> i am using kernel 2.6.29_rc5, iw 0.9.9 and hostapd 0.6.8.
>>     
>
> no error messages, no crda, no logs?
>
> Regards,
> 	Chr
>   
you are right. using interface wlan0 does the right thing. thanks for
the hint.
you were asking for additional info on my situation. here is the output
of hostapd -dd /etc/hostapd/hostapd.conf

    Configuration file: /etc/hostapd/hostapd.conf
    ctrl_interface_group=0
    Opening raw packet socket for ifindex 673211762
    BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
    SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
    nl80211: Added 802.11b mode based on 802.11g information
    Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=27 dBm
    Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=27 dBm
    Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=27 dBm
    RATE[0] rate=10 flags=0x6
    RATE[1] rate=20 flags=0x6
    RATE[2] rate=55 flags=0x6
    RATE[3] rate=110 flags=0x6
    RATE[4] rate=60 flags=0x0
    RATE[5] rate=90 flags=0x0
    RATE[6] rate=120 flags=0x0
    RATE[7] rate=180 flags=0x0
    RATE[8] rate=240 flags=0x0
    RATE[9] rate=360 flags=0x0
    RATE[10] rate=480 flags=0x0
    RATE[11] rate=540 flags=0x0
    Passive scanning not supported
    Flushing old station entries
    Deauthenticate all stations
    Using interface wlan0 with hwaddr 00:04:e2:80:ee:66 and ssid 'blackbit'
    SSID - hexdump_ascii(len=8):
         62 6c 61 63 6b 62 69 74                           blackbit       
    PSK (ASCII passphrase) - hexdump_ascii(len=8):
         61 62 63 64 65 66 67 68                           abcdefgh       
    PSK (from passphrase) - hexdump(len=32): de f0 68 11 e2 22 fb 3c ff
    8b c7 52 a3 fb 5c 28 10 22 f3 1a ca 4b c2 1d dc f4 fb e2 20 8b
     14 00
    WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
    GMK - hexdump(len=32): [REMOVED]
    GTK - hexdump(len=32): [REMOVED]
    WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
    wlan0: Setup of interface done.
    MGMT (TX callback) ACK




    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    STA 00:1f:3c:87:51:99 sent probe request for our SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    STA 00:1f:3c:87:51:99 sent probe request for our SSID
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) fail
    mgmt::proberesp cb
    MGMT (TX callback) fail
    mgmt::proberesp cb
    MGMT (TX callback) fail
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for our SSID
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    MGMT (TX callback) ACK
    mgmt::proberesp cb
    STA 00:1f:3c:87:51:99 sent probe request for broadcast SSID
    MGMT (TX callback) ACK
    ...

the output after the newlines come from a testing notebook with windows
vista sp1.
the AP does not show up there.
is there anything i could try?

here is my config:

    interface=wlan0
    driver=nl80211
    logger_syslog=-1
    logger_syslog_level=2
    logger_stdout=-1
    logger_stdout_level=2
    dump_file=/tmp/hostapd.dump
    ctrl_interface=/var/run/hostapd
    ctrl_interface_group=0
    ssid=blackbit
    country_code=AT
    hw_mode=g
    beacon_int=100
    dtim_period=2
    max_num_sta=255
    rts_threshold=2347
    fragm_threshold=2346
    macaddr_acl=0
    auth_algs=3
    ignore_broadcast_ssid=0
    eapol_key_index_workaround=0
    eap_server=0
    wpa=1
    wpa_passphrase=abcdefgh
    wpa_key_mgmt=WPA-PSK
    wpa_pairwise=TKIP CCMP

please tell me if additional infos could be of use.

regards
-alex


More information about the HostAP mailing list