WEP wireless doesn't work

Hi guys

I've been reading about configure wireless and wpa works great. But when i try to connect to a wep network and I execute a dhclient on wlan0 I just don't receive and dhcp offers. This is my config:

Code:
localhost# ifconfig wlan0  list scan
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
ActMerch        00:21:29:7d:6e:1c    6   54M -78:-96  100 EP  
NOTARIA16       b4:82:fe:a7:31:87   11   54M -94:-96  100 EP   WPA

In /etc/wpa_supplicant.conf

Code:
network={
        ssid="ActMerch"
        key_mgmt=NONE
        wep_key1="B3EC935CB5"
        wep_tx_keyidx=1
}

# nohup wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf &

Code:
CTRL-EVENT-SCAN-RESULTS 
Trying to associate with 00:21:29:7d:6e:1c (SSID='ActMerch' freq=2437 MHz)
Associated with 00:21:29:7d:6e:1c
CTRL-EVENT-CONNECTED - Connection to 00:21:29:7d:6e:1c completed (auth) [id=4 id_str=]

# dhclient wlan0
Code:
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
Trying recorded lease 192.168.20.214
bound: renewal in 641564 seconds.

# ifconfig wlan0
Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:24:2b:92:95:23
	media: IEEE 802.11 Wireless Ethernet OFDM/48Mbps mode 11g
	status: associated
	ssid ActMerch channel 6 (2437 MHz 11g) bssid 00:21:29:7d:6e:1c
	regdomain 100 indoor ecm authmode OPEN privacy ON deftxkey 2
	wepkey 2:104-bit txpower 20 bmiss 7 scanvalid 450 bgscan
	bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS
	wme burst roaming MANUAL

What am I doing wrong?
 
So, do I have to put "0x" in all of my wep keys for my different wep networks, and thats it?
 
Anyway, the wireless access point is connected. This is a dhcp issue.

Can you give yourself an IP and use the network after you are connected like:
Code:
# ifconfig wlan0 192.168.1.23 netmask 255.255.255.0
# route add default <IP_of_the_router>
# echo 'nameserver <IP of the DNS>' >> /etc/resolv.conf

Maybe dhcp is not enabled on the WEP AP?
 
I was able to connect to a WEP encrypted network with the following network block added to my /etc/wpa_supplicant.conf file.

Code:
[B]# cat /etc/wpa_supplicant.conf[/B]
network={
	ssid="your ssid"
	key_mgmt=NONE
	wep_key0=your password
	wep_tx_keyidx=0
	}
 
I have a suggestion for this old post. I was recently having a similar problem with a WPA connection. After the initial setup it worked for a little bit at first, but then would no longer receive DHCPOFFER's from my router.

I pulled my hair out for a while on this and then tried manually specifying IP's (which did not help). I then dug into IFCONFIG and realized you can manually specify SSID's, and more specifically the channel configuration, which I think is what solved the problem for me.

Read this:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html

and the look at the channel section in IFCONFIG:

http://www.freebsd.org/cgi/man.cgi?query=ifconfig&sektion=8

I am using a N band router on channel 11 with a wideband 40 MHz extension channel on SSID center. So my ifconfig statement in /etc/rc.conf looks like this:

ifconfig_wlan0="WPA DHCP ssid center channel 2462:n/40-"

2463 being the frequency of channel 11. That seemed to do the trick, it seems that the wireless heuristics with some hardware/software combinations don't always work as I noticed prior to this modification ifconfig reported being associated but connected to channel 8. That's my guess.

I'd be curious to know if that works for you.
 
Correction, the line should read:

Code:
ifconfig_wlan0="WPA [B]SYNC[/B]DHCP ssid center channel 2462:n/40-"

The SYNCDHCP gives the wireless client more time to receive a IP from the DHCP server. Got that idea from here:

http://forums.freebsd.org/showthread.php?t=16373

I made that adjustment because although it was working better, it occasionally would not work (receive an IP assignment from the router).

PS. Type in the second to last line. It should obviously read 2462 not 2463.
 
Back
Top