setting wpa supplicant for wifi access

November 11th, 2006 mysurface Posted in dhclient, Network, wpa_supplicant | Hits: 70035 | 8 Comments »

Most of the people nowadays don’t use WEP for wifi encryption, most of the wireless router support wpa tkip algorithm for encryption. I read a page which people can actually uses 10 minutes to crack WEP encrytion, which amazing and in the sense that you do not want to use WEP for your WLAN too.

So a better choice is uses, WPA. To enable support for WPA in linux is not that simple, first you need to run wpa supplicant, then you can dhclient to acquire for IP leasing. Thanks to Aizatto, I have successfully do that for my home wireless environment.

First, create a configuration file, lets put at /etc/wpa/wpa.conf



Next, run the command,

wpa_supplicant -c /etc/wpa/wpa.conf -D wext -dd -i eth1 -B

-c is to read the configuration file from.
-D is the driver to use, you need one west is a generic one, check the manuals for alternatives.
-dd is to show very debugging verbose messages, take if off if you don’t want.
-B run as deamon
-i to specified your wireless interface.

After successfully do this, you can acquire for IP leasing.

dhclient eth1

I put the entire process into a script, so I can just type, wifi-start to allow me to get connected.

if [ "$1" == 'done' ]
    wpa_supplicant -c /etc/wpa/wpa.conf -D wext -dd -i $NETIF -B
    dhclient $NETIF
    sudo wifi-start done

This script I use for my ubuntu linux.

8 Responses to “setting wpa supplicant for wifi access”

  1. […] To connect to wifi Acess Point which uses WPA encryption, you can uses wpa_supplicant. […]

  2. sir

    i am using X-micro usb wifi adapter,which has ZD1211 chipset.My platform is linux.
    I have downloaded the drivers for the same from,also i have installed the drivers and it is detecting the device.
    I want to know whether i should install WPA-supplicant for the wifi usb.
    Also what is the difference between the driver and WPA-supplicant .

    Prompt reply will be highly appreciated.

  3. Thanks for viewing LBE, we hope we could help more. First of all, to check whether your wireless ethernet adapter is work, try on



    You make me realized that we haven’t come up with the examples of some wireless commands. iwconfig is just like ifconfig, iwconfig is a ethernet configurator for wireless adapter. It will show you some of your wireless adapter info, for those eth that are not wireless adapter, it display as “no wireless extensions.”

    If your wireless is working,

    You can try

    iwlist scanning

    To scan the wireless access point around your environment. You will only need wpa-applicant if you wanna access the wireless access point that uses wpa encryption. Some access point uses WEP encryption, if so, you do not need wpa-applicant.

    If you have GUI Desktop or WM, let say gnome or fluxbox, you can try this

  4. Hello I have ubuntu installed on my pc. I Have XMicro-WLAN 11g USB Adapter. I have been trying days together for getting the Adapter up but my device doesnt seem to get detected. Which driver would be required to be installed in Linux For the same. Please help me. I have tried googling and installing bcmwl driivers but no avail. I also tried the fwmcutter way still the device doesnt get detected.

    Please Help

  5. Hey Its Working Now!

  6. Preetam: Congrats!

  7. Thanks A Lot!

  8. […] tu ce ai face pentru cinci euro? […]

Leave a Reply