From: Pranav on
I am having a Linksys router with WEP encryption enabled.
When I try to connect to it using wpa_supplicant using following
options, I establish a successful connection.

wpa_supplicant -iath0 -cwpa_supplicant.conf -B

and I get following output,

root(a)hmp10:~# channel hint set to 2462
Connect called with authmode 1 dot11 auth 1 PW crypto 2 PW crypto Len
5 GRP crypto 2 GRP crypto Len 5
AR6000 disconnected from 00:16:b6:c5:0f:3c
Disconnect Reason is 3
Protocol Reason/Status Code is 0
AssocResp Frame = NULL
AR6000 connected event on freq 2462 with bssid 00:e0:98:51:3d:92
listenInterval=100, beaconInterval = 100, beaconIeLen = 0
assocReqLen=26 assocRespLen =2
Network: Infrastructure

AssocRespIEs= 01 04 82 84 8b 96 32 08 0c 12 18 24 30 48 60 6c
AssocReqIEs= 00 04 61 31 32 33 01 08 82 84 8b 0c 12 96 18 24 32 04 30
48 60 6c


After this when I run iwconfig, I get following output,
lo no wireless extensions.

AR6000 updating target stats
ath0 AR6000SMSC: -->Smsc9118_do_ioctl
802.11g ESSID:SMSC: cmd=35585,SIOCGMIIPHY=35143,SIOCDEVPRIVATE=35312
"a123"
Mode:Managed Frequency:2.462 GHz Access Point:
00:E0:98:51:3D:92
Bit Rate=54 Mb/s Tx-Power=15 dBm Sensitivity=0/3
Retry:on
Encryption key:off
Link Quality:25/94 Signal level:-70 dBm Noise level:-96
dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

eth0 no wireless extensions.


It shows that it is connected to wifi router. Now when I try to obtain
IP with udhcpc -iath0 -n, I do not get the IP address. I end up with
following messages.
udhcpc (v1.9.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, failing


Also my wpa_supplicant.conf has following entries.

ctrl_interface=/var/run/wpa_supplicant GROUP=wheel
network={
ssid="a123"
key_mgmt=NONE
wep_key0=365a639ce0
wep_tx_keyidx=0
}

I am trying this when my wired connection is also UP and running.