-   Linux - Networking (
-   -   Whats the deal with wpa_supplicant.conf (

svenxix 04-20-2012 06:43 PM

Whats the deal with wpa_supplicant.conf
I'm trying to connect to a wpa wireless network via linux command line. As many of you know, this is needlessly complex.

I am using a BackTrack 5 CD with an Alfa networks USB wireless card. The interface is named wlan0.

After browsing around for several hours, it seems the best way to establish a connection is via the wpa_supplicant command. The problem is there are lots of different ways to write a config file, but no website explains how to actually build one.

One common method is to use the wpa_password command. This generally creates the following file.



Most websites ask me to uncomment the plaintext password or to delete the hex password.

Many websites also tell me to include the following lines



Although the ap_scan arguement can be a value between 0 and 2 depending on the website. It instructs me to pick the one that's appropriate for my card. Whatever that is.

the ctrl_interface is interesting because it always seems to reference /var/run/wpa_supplicant regardless of the website, but that file doesn't even exist on my machine.

Other information that is often included but never explained are the following lines.



Anyway, regardless of the config file I use the result is always the same.


Trying to associate with <My MAC address> (SSID="mynetwork" freq=2462 MHz)
Authentication with <My MAC address> timed out.
Trying to associate with <My MAC address> (SSID="mynetwork" freq=2462 MHz)
Associated with <My MAC Address>
CTRL-EVENT-DISCONNECTED - Disconnect even - remove keys

Then it repeats the last four lines until I ctrl+c.

A lot of websites also suggest editing startup scripts and rebooting the computer, but since this is a live disk, that won't work.

If anyone could explain any part of what I just talked about, I would be ecstatic.

Peacedog 04-22-2012 07:26 AM

Hi svenxix, Welcome to LQ. Here is an example file with explanations.

Good luck. ;-)

dru8274 04-23-2012 02:18 AM

The crunchbang forums have an interesting howto on wpasupplicant here...

All times are GMT -5. The time now is 12:13 PM.