trouble associating in busybox based environment

Davide louigi600 at yahoo.it
Fri May 13 07:49:38 EDT 2011


I'm having trouble getting hostapd to work correctly in a busybox based system.

I'm using 2.6.38rc8-kirkwood , BusyBox v1.18.4 and hostapd-0.7.3

This is hoe I configured hostapd during build:
root at slackware:/usr/src/hostapd-0.7.3/hostapd/# grep -vE "^#|^ *$" .config 
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_NL80211=y
CONFIG_IAPP=y
CONFIG_RSN_PREAUTH=y
CONFIG_PEERKEY=y
CONFIG_EAP=y
CONFIG_EAP_MD5=y
CONFIG_EAP_TLS=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_GTC=y
CONFIG_EAP_TTLS=y
CONFIG_PKCS12=y
CONFIG_IPV6=y
root at slackware:/usr/src/hostapd-0.7.3/hostapd/#
I can supply config files for all the components on the system.

And this is the config file for interface wlan0:
root at surap:/etc/hostapd# grep -vE "^#|^ *$" wlan0.conf
interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/var/run/hostapd/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=ArmedZone
hw_mode=g
channel=11
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
accept_mac_file=/etc/hostapd/wlan0.accept
deny_mac_file=/etc/hostapd/wlan0.deny
auth_algs=3
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=1
wpa_passphrase=cicciobello
wpa_key_mgmt=WPA-PSK WPA-EAP
wpa_pairwise=TKIP CCMP
wpa_group_rekey=600
wpa_gmk_rekey=86400
wpa_ptk_rekey=600
root at surap:/etc/hostapd#

Also the hostapd bianry seems to have all the required libraries:
root at surap:/tmp# ldd $(type -p hostapd)
        libnl.so.1 => /usr/lib/libnl.so.1 (0x4020c000)
        libssl.so.0 => /lib/libssl.so.0 (0x40107000)
        libcrypto.so.0 => /lib/libcrypto.so.0 (0x40253000)
        libc.so.6 => /lib/libc.so.6 (0x40385000)
        libm.so.6 => /lib/libm.so.6 (0x404d0000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4014f000)
        libdl.so.2 => /lib/libdl.so.2 (0x40162000)
        /lib/ld-linux.so.3 (0x400e0000)
root at surap:/tmp#

But none the less I cannot get any client to associate.

This is what hostapd produces when started with debug flag:
Configuration file: /etc/hostapd/wlan0.conf
ctrl_interface_group=0
nl80211: Add own interface ifindex 5
nl80211: New interface mon.wlan0 created: ifindex=7
nl80211: Add own interface ifindex 7
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: 11  Frequency: 2462 MHz
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 34:08:04:32:85:34 and ssid 'ArmedZone'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=9):
     41 72 6d 65 64 5a 6f 6e 65                        ArmedZone       
PSK (ASCII passphrase) - hexdump_ascii(len=11): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
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=5 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
...
...same line repeated some 60 times
...
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::deauth
deauthentication: STA=00:19:d2:bd:96:21 reason_code=3
Station 00:19:d2:bd:96:21 trying to deauthenticate, but it is not authenticated.
mgmt::auth
authentication: STA=00:19:d2:bd:96:21 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: authentication OK (open system)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-AUTHENTICATE.indication(00:19:d2:bd:96:21, OPEN_SYSTEM)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
authentication reply: STA=00:19:d2:bd:96:21 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::proberesp cb
mgmt::assoc_req
association request: STA=00:19:d2:bd:96:21 capab_info=0x431 listen_interval=5
Validating WMM IE: OUI 00:50:f2  OUI type 2  OUI sub-type 0  version 1  QoS info 0x0
  new AID 1
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: association OK (aid 1)
mgmt::auth cb
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: authenticated
Data/PS-poll frame from not associated STA 00:19:d2:bd:96:21
mgmt::assoc_resp cb
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: associated (aid 1)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-ASSOCIATE.indication(00:19:d2:bd:96:21)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: start authentication
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.1X: unauthorizing port
WPA: 00:19:d2:bd:96:21 WPA_PTK_GROUP entering state IDLE
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state AUTHENTICATION
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state AUTHENTICATION2
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITPSK
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state PTKSTART
wlan0: STA 00:19:d2:bd:96:21 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
unknown mgmt cb frame subtype 10
mgmt::deauth
deauthentication: STA=00:19:d2:bd:96:21 reason_code=3
AP-STA-DISCONNECTED 00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: event 3 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state DISCONNECTED
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.1X: unauthorizing port
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: deauthenticated
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DEAUTHENTICATE.indication(00:19:d2:bd:96:21, 3)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::auth
authentication: STA=00:19:d2:bd:96:21 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: authentication OK (open system)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-AUTHENTICATE.indication(00:19:d2:bd:96:21, OPEN_SYSTEM)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
authentication reply: STA=00:19:d2:bd:96:21 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::proberesp cb
mgmt::assoc_req
association request: STA=00:19:d2:bd:96:21 capab_info=0x431 listen_interval=5
Validating WMM IE: OUI 00:50:f2  OUI type 2  OUI sub-type 0  version 1  QoS info 0x0
  new AID 1
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: association OK (aid 1)
mgmt::auth cb
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: authenticated
Data/PS-poll frame from not associated STA 00:19:d2:bd:96:21
mgmt::assoc_resp cb
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: associated (aid 1)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-ASSOCIATE.indication(00:19:d2:bd:96:21)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: start authentication
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.1X: unauthorizing port
WPA: 00:19:d2:bd:96:21 WPA_PTK_GROUP entering state IDLE
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state AUTHENTICATION
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state AUTHENTICATION2
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITPSK
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state PTKSTART
wlan0: STA 00:19:d2:bd:96:21 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
unknown mgmt cb frame subtype 10
mgmt::deauth
...
...messages produced from here on seem very much similar an cyclic
...I'll leave a few more just in case they are usefull
...
deauthentication: STA=00:19:d2:bd:96:21 reason_code=3
AP-STA-DISCONNECTED 00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: event 3 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state DISCONNECTED
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.1X: unauthorizing port
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: deauthenticated
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DEAUTHENTICATE.indication(00:19:d2:bd:96:21, 3)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::auth
authentication: STA=00:19:d2:bd:96:21 auth_alg=0 auth_transaction=1 status_code=0 wep=0
  New STA
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: authentication OK (open system)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-AUTHENTICATE.indication(00:19:d2:bd:96:21, OPEN_SYSTEM)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
authentication reply: STA=00:19:d2:bd:96:21 auth_alg=0 auth_transaction=2 resp=0 (IE len=0)
mgmt::proberesp cb
mgmt::assoc_req
association request: STA=00:19:d2:bd:96:21 capab_info=0x431 listen_interval=5
Validating WMM IE: OUI 00:50:f2  OUI type 2  OUI sub-type 0  version 1  QoS info 0x0
  new AID 1
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: association OK (aid 1)
mgmt::auth cb
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: authenticated
Data/PS-poll frame from not associated STA 00:19:d2:bd:96:21
mgmt::assoc_resp cb
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: associated (aid 1)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-ASSOCIATE.indication(00:19:d2:bd:96:21)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: start authentication
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.1X: unauthorizing port
WPA: 00:19:d2:bd:96:21 WPA_PTK_GROUP entering state IDLE
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state AUTHENTICATION
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state AUTHENTICATION2
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITPSK
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state PTKSTART
wlan0: STA 00:19:d2:bd:96:21 WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=1 secure=0 mic=0 ack=1 install=0 pairwise=8 kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
unknown mgmt cb frame subtype 10
mgmt::deauth
deauthentication: STA=00:19:d2:bd:96:21 reason_code=3
AP-STA-DISCONNECTED 00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 WPA: event 3 notification
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state DISCONNECTED
WPA: 00:19:d2:bd:96:21 WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.1X: unauthorizing port
wlan0: STA 00:19:d2:bd:96:21 IEEE 802.11: deauthenticated
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DEAUTHENTICATE.indication(00:19:d2:bd:96:21, 3)
wlan0: STA 00:19:d2:bd:96:21 MLME: MLME-DELETEKEYS.request(00:19:d2:bd:96:21)
wpa_driver_nl80211_set_key: ifindex=5 alg=0 addr=0x8e3c90 key_idx=0 set_tx=1 seq_len=0 key_len=0
   addr=00:19:d2:bd:96:21
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
...
...same message many times
...
mgmt::proberesp cb
mgmt::proberesp cb
mgmt::proberesp cb
Signal 2 received - terminating
Flushing old station entries
Deauthenticate all stations
nl80211: Remove interface ifindex=7
netlink: Operstate: linkmode=0, operstate=6
...this would go on but I got pissed off and got the client to stop trying 
...to authenticate


Another things that I notice is that although busybox was built with support for unix domain sockets while hostapd is running on interface 
wlan0 using fuser on /var/run/hostapd/wlan0
tells me that no process has that opened ?

How can I get this hostapd working in this environment ?


More information about the HostAP mailing list