Results 1 to 7 of 7

Thread: Can hostapd support WEP clients?

  1. #1

    Default Can hostapd support WEP clients?

    Hi,

    I know WEP is frowned upon and enverone should be using WPA. And my hostapd AP is working with WPA clients. However, I would like to alow some older clients that can only "talk" WEP to connect.

    All my attempts so far have failed! Can anyone point me in the right direction?
    The hostapd.conf file comments suggests that hostapd can support WEP. There are no contraindications or flags that I can find in the defconfig file that suggest that a WEP module needs to be complied-in to the final make.

    Regards, Martin

  2. #2
    Join Date
    Mar 2008
    Location
    Bochum, Germany
    Posts
    3,587

    Default Re: Can hostapd support WEP clients?

    Martin,

    which errors do you see? Can you post your hostapd.conf file?

    Uwe

  3. #3

    Default Re: Can hostapd support WEP clients?

    Quote Originally Posted by buckesfeld View Post
    which errors do you see? Can you post your hostapd.conf file?
    Hi,
    Thanks for taking an interest. These are the errors hostapd reports when run as:

    /usr/local/bin/hostapd -d /etc/hostapd.conf

    Code:
    Configuration file: /etc/hostapd.conf
    ctrl_interface_group=0
    nl80211: Add own interface ifindex 3
    nl80211: New interface mon.wlan0 created: ifindex=6
    nl80211: Add own interface ifindex 6
    BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
    nl80211: Added 802.11b mode based on 802.11g information
    RATE[0] rate=10 flags=0x1
    RATE[1] rate=20 flags=0x1
    RATE[2] rate=55 flags=0x1
    RATE[3] rate=110 flags=0x1
    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
    Completing interface initialization
    Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
    Flushing old station entries
    Deauthenticate all stations
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=1 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=5
    wpa_driver_nl80211_set_key: ifindex=3 alg=1 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=5
    wpa_driver_nl80211_set_key: ifindex=3 alg=1 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=5
    wpa_driver_nl80211_set_key: ifindex=3 alg=1 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=5
    Using interface wlan0 with hwaddr 00:0d:54:fb:55:58 and ssid 'myP54AP'
    Deriving WPA PSK based on passphrase
    SSID - hexdump_ascii(len=7):
         6d 79 50 35 34 41 50                              myP54AP         
    PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
    PSK (from passphrase) - hexdump(len=32): [REMOVED]
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
    wpa_driver_nl80211_set_key: ifindex=3 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
    IEEE 802.1X: New default WEP key index 2
    IEEE 802.1X: New default WEP key - hexdump(len=5): [REMOVED]
    wpa_driver_nl80211_set_key: ifindex=3 alg=1 addr=(nil) key_idx=2 set_tx=1 seq_len=0 key_len=5
    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)
    wpa_driver_nl80211_set_key: ifindex=3 alg=2 addr=(nil) key_idx=1 set_tx=1 seq_len=0 key_len=32
    nl80211: Set beacon (beacon_set=0)
    wlan0: Setup of interface done.
    RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
    RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
    Unknown event 5
    RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
    RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
    Unknown event 5
    RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
    RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
    Unknown event 5
    mgmt::proberesp cb
    mgmt::proberesp cb
    mgmt::proberesp cb
    mgmt::auth
    authentication: STA=00:02:2d:29:d5:88 auth_alg=0 auth_transaction=1 status_code=0 wep=0
      New STA
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: authentication OK (open system)
    wlan0: STA 00:02:2d:29:d5:88 MLME: MLME-AUTHENTICATE.indication(00:02:2d:29:d5:88, OPEN_SYSTEM)
    wlan0: STA 00:02:2d:29:d5:88 MLME: MLME-DELETEKEYS.request(00:02:2d:29:d5:88)
    authentication reply: STA=00:02:2d:29:d5:88 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
    mgmt::auth cb
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: authenticated
    mgmt::assoc_req
    association request: STA=00:02:2d:29:d5:88 capab_info=0x11 listen_interval=1
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: No WPA/RSN IE in association request
    mgmt::assoc_resp cb
    mgmt::assoc_req
    association request: STA=00:02:2d:29:d5:88 capab_info=0x11 listen_interval=1
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: No WPA/RSN IE in association request
    mgmt::assoc_resp cb
    mgmt::assoc_req
    association request: STA=00:02:2d:29:d5:88 capab_info=0x11 listen_interval=1
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: No WPA/RSN IE in association request
    mgmt::assoc_resp cb
    mgmt::assoc_req
    association request: STA=00:02:2d:29:d5:88 capab_info=0x11 listen_interval=1
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: No WPA/RSN IE in association request
    mgmt::assoc_resp cb
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: did not acknowledge association response
    And this is my hostapd.conf via

    grep -v "^#" /etc/hostapd.conf

    Code:
    interface=wlan0
    driver=nl80211
    
    logger_syslog=-1
    logger_syslog_level=0
    logger_stdout=-1
    logger_stdout_level=0
    
    dump_file=/tmp/hostapd.dump
    ctrl_interface=/var/run/hostapd
    ctrl_interface_group=0
    
    ssid=myP54AP
    country_code=UK
    hw_mode=g
    channel=6
    beacon_int=100
    dtim_period=2
    max_num_sta=32
    rts_threshold=2347
    fragm_threshold=2346
    
    
    
    
    macaddr_acl=0
    auth_algs=3
    ignore_broadcast_ssid=0
    wep_default_key=0
    wep_key0=1234567890
    wep_key1=1234567890
    wep_key2=1234567890
    wep_key3=1234567890
    
    wep_key_len_broadcast=5
    wep_key_len_unicast=5
    wep_rekey_period=0
    
    eapol_key_index_workaround=0
    eap_server=0
    
    own_ip_addr=127.0.0.1
    
    wpa=3
    wpa_passphrase=1234567890
    Your comments will be appreciated.

    Regards, Martin

  4. #4
    Join Date
    Mar 2008
    Location
    Bochum, Germany
    Posts
    3,587

    Default Re: Can hostapd support WEP clients?

    Martin,

    looks to me the WPA part isn't working, it doesn't even get to play with WEP.

    Uwe


  5. #5

    Default Re: Can hostapd support WEP clients?

    Quote Originally Posted by buckesfeld View Post
    looks to me the WPA part isn't working, it doesn't even get to play with WEP.
    Hi Uwe,

    Thank you for your thoughts. Can you expand a little more?
    From a complete novices point of view, I see things a little differently: As this line is at the server (hostapd) end...
    Code:
    wlan0: STA 00:02:2d:29:d5:88 IEEE 802.11: No WPA/RSN IE in association request mgmt::assoc_resp cb
    ... is it not saying that "I can not see any WPA information in the association request from the client"?
    Which is perfectly true. There is no WPA from the client. The client can only talk WEP.
    However, when a WPA or WPA2 does come along, it can connect quite happily to this access point.

    But why can't hostapd fall-back to a WEP module or whatever is need to support the WEP-only client?

    Puzzled, Martin

  6. #6
    Join Date
    Mar 2008
    Location
    Bochum, Germany
    Posts
    3,587

    Default Re: Can hostapd support WEP clients?

    Martin,

    okay, I didn't realize it does work with WPA. I'm sorry, but I am out. I have no hardware supporting hostapd so I cannot try it myself.

    Uwe

  7. #7

    Red face Re: Can hostapd support WEP clients?

    Quote Originally Posted by martinprowe View Post
    Code:
    wep_default_key=0
    wep_key0=1234567890
    wep_key1=1234567890
    wep_key2=1234567890
    wep_key3=1234567890
    
    wep_key_len_broadcast=5
    wep_key_len_unicast=5
    wep_rekey_period=0
    Hi Martin,

    I'm very new here and I'm not an expert either but looks like your configuration is not correct. You don't need to give all the keys (key0, key1, key2, and key3) like that. The wep_default_key determines which wep_key you're going to use, and the value is from 0 to 3. For example, if you set wep_default_key=0, you need to use only wep_key0.

    Also, you cannot enter the key string the same length for all the keys. You need to use it in accordance with the valid key length, i.e. 40-bit, 104-bit, and 128-bit.

    The following config works fine in WEP option for me. Note the wep_default_key and wep_key1:
    Code:
    interface=wlan0
    bridge=br0
    driver=nl80211
    ssid=testing
    channel=1
    hw_mode=g
    auth_algs=3
    ignore_broadcast_ssid=0
    wep_default_key=1
    wep_key1="abcde"
    wep_key_len_broadcast="5"
    wep_key_len_unicast="5"
    wep_rekey_period=300
    The key string should be in one of the following formats:
    Code:
    wep_key0=123456789a
    wep_key1="vwxyz"
    wep_key2=0102030405060708090a0b0c0d
    wep_key3=".2.4.6.8.0.23"
    Hope this helps!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •