In this tutorial, I am going to explain how to configure and run wpa_supplicant with pre-shared key (PSK) authentication, and make necessary changes to /etc/network/interfaces file in order to obtain connectivity while booting up.
Let's start
1) type wpa_passphrase "your wireless network name" "password" > /etc/wpa_supplicant.conf
Don't forget to remove the commented line including your password in ascii.
2) type iwconfig to learn your wireless interface.
let's say it is wlan0 then you have to add these lines to /etc/network/interfaces file.
STATIC IP ASSIGNMENT (preferred):
orCode:auto wlan0 iface wlan0 inet static pre-up wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf # you might change these bold parameters to suit your wireless card and interface. address 192.168.1.2 # change this if this does not suit your gateway's netmask. gateway 192.168.1.1 # change this if your router is on a different ip netmask 255.255.255.0 post-down killall -q wpa_supplicant
ALLOCATE IP via dhcp (TAKES TIME at boot-up)
3) Add a nameserver entry to your /etc/resolv.conf file if you haven't created one:Code:auto wlan0 iface wlan0 inet dhcp pre-up wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf # you might change these bold parameters to suit your wireless card and interface. post-down killall -q wpa_supplicant
echo "nameserver 208.67.222.222" > /etc/resolv.conf
4) and by default, bt4 starts up in "stealthy" mode and you need to add networking system startup entry by issuing: update-rc.d networking defaults.
5) I suggest that you remove unnecessary interfaces from interfaces file and then type /etc/init.d/networking restart.
Finally, type iwconfig "your wlan interface" to determine whether or not you're associated.
That's all![]()



