# Wireless Networking on Thinkpad T41



## LazloFalconi (Sep 13, 2010)

Hi, I'm setting up a FreeBSD system for the first time on an IBM Thinkpad T41, but I can't connect to my wireless network. I've read chapter 31.3 in the handbook, and followed the steps to connect but I just can't figure it out. My access point is running on 802.11g with DHCP set up, and WEP security. I know this isn't recommended, but I have certain devices that can't use WPA and I just want to keep people out. WiFi works on this machine, and since setting up /boot/loader.conf the WiFi light blinks, as if it's ready. When I do [cmd=]ifconfig wlan0 up scan[/cmd], I can see my access point (As well as a few others around), but it just won't connect.

/boot/loader.conf contains the following:

```
if_ath_load="YES"
wlan_wep_load="YES"
```

I've added the following to /etc/rc.conf

```
wlans_ath0="wlan0"
ifconfig_wlan0="mode 11g ssid Falconi DHCP"
```

And finally, /etc/wpa_supplicant.conf contains

```
network={
  ssid="Falconi"
  key_mgmt=NONE
  wep_key1=94B6711012
  wep_tx_keyidx=1
}
```

Now, in the handbook it said it should be [font="Fixedsys"]wep_key3=[/font], but I'm using WEP key 1. I tried setting it to 3, but that didn't change anything.

So, when I try [cmd=]/etc/rc.d/netif start[/cmd] I get

```
ifconfig: create: bad value
Starting Network: lo0 wlan0.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
     options=3<RXCSUM,TXCSUM>
```


----------



## gordon@ (Sep 13, 2010)

Try this on the command line. Using wep doesn't require the use of wpa_supplicant.


```
ifconfig wlan0 create wlandev ath0
ifconfig wlan0 mode 11g ssid Falconi wepkey 0x94B6711012
ifconfig wlan0
```

That last ifconfig(8) call should tell you if you have associated with the access point. Specifically, I think your problem is not prefixing your wepkey with 0x to indicate it is a hexadecimal key.


----------



## davidgurvich (Sep 13, 2010)

You haven't mentioned what your hardware is.  I'm guessing that you are using an intel wireless chipset.  These require a license accept in /boot/loader.conf with
	
	



```
legal.intel_DRIVER.license_ack="1"
```
Replace DRIVER with your actual driver, in my case that would be iwi.


----------



## LazloFalconi (Sep 14, 2010)

Ah, sorry, I thought I mentioned it, it's an Atheros chipset.

As for Gordon@'s suggestion, I tried it to no avail. The device connects when there's no security, it's just adding WEP into the mix that messes it up. I also tried WPA but that's no better. I'm certain it's something I'm doing wrong, I just don't know what. I'll probably just go with MAC address filtering, unless someone else has any ideas.


----------



## fronclynne (Sep 16, 2010)

Well, using old WEP junk at the house, here is the relevant portions of my own /etc/rc.conf

```
wlans_ath0="wlan0"
ifconfig_wlan0="WPA DHCP"
```
& /etc/wpa_supplicant.conf

```
network={
   ssid="Quit Stealing"
   key_mgmt=NONE
   wep_key0=[b]80BEEFBEEF[/b]
   priority=99
}
network={
   ssid="linksys"
   key_mgmt=NONE
   priority=2
}
network={
   ssid="WirelessPhiladelphia"
   key_mgmt=NONE
   priority=1
}
```
I don't have to use an *0x* for the key value (though it is a hex key) & wpa_supplicant(8) works quite well for WEP.


----------



## davidgurvich (Sep 16, 2010)

Before testing the following look at your laptop and see if there is a network kill switch.  The BIOS might also have a setting where the wireless is turned off.  I've configured systems where both were true with none of the message logs showing any errors, simply failing to connect.  If you can connect to unencrypted networks then that is not an issue.

Try to manually associate the wlan with ifconfig.  Check if wlan0 has been created then as root do the following
	
	



```
ifconfig wlan0 down
ifconfig wlan0 ssid SSID_NAME wepmode on wepkey 0xHEX_KEY # you may need 'deftxkey 0' on this line
ifconfig wlan0 up
ifconfig wlan0 #check association
dhclient wlan0
netstat -r # see if the routing table looks good
ping -c 2 ROUTER_IP # see if you can reach the router
ping www.google.com # see if you can reach the Internet
```
If that all works you've misconfigured your settings and the hardware is working well with freebsd.


----------

