Wireless WPA Configuration in Freebsd

Posted in FREEBSD by edeguzman on March 12, 2009

Recently I formated my laptop and installed freebsd. It was really a pain in the head, because I suddenly forget how to do basic configuration such as setting gnome desktopĀ  and other stuffs. That’s why I’d decided to post every configuration that I’ll be doing on my laptop starting on this day.

This is the procedure that I did on configuring my wireless connection specifically on WPA mode of cryptography. Before doing proceeding this tutorial make sure that the you had the right driver installed in your freebsd. I’ll go straight forward the configuration that I did is on a intel wireless.

First load the driver as module during boot time, place the following lines in /boot/loader.conf :

if_iwi_load="YES"
wlan_load="YES"
firmware_load="YES"

The firmware that is loaded to have license and this can be done by simply adding the line in /boot/loader.conf :

legal.intel_iwi.license_ack=1

Edit your /etc/rc.conf and add the line :

ifconfig_iwi0=”WPA DHCP”

Create a file named to wpa_supplicant in /etc directory and add the following lines

network={
ssid=”MY_SSID”
psk=”MY_PASSPHRASE”
}

Reboot your freebsd. Then you should be accessing your internet.

NOTE :
There is also other way of doing it without the need to rebooting your freebsd.

* Loading your wireless driver :
kldload if_iwi

* Verifying if wireless is correctly recognized :
dmesg | grep iwi

* Enabling the wireless radio transmitter :
sysctl dev.iwi.0.radio

* Restarting your wireless interface :
/etc/rc.d/netif restart

* Running the wpa_supplicant :
wpa_supplicant -i iwi0 -c /etc/wpa_supplicant.conf -d

* Getting IP from DHCP :
dhclient iwi0


cheers guys =)