LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-20-2012, 07:43 PM   #1
svenxix
LQ Newbie
 
Registered: Feb 2012
Distribution: Debian, Fedora
Posts: 24

Rep: Reputation: 0
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.

Code:
network={
    ssid="MyNetwork"
    #psk="mypassword"
    psk=000459ac030f03858e192349599ffa934
}
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

Code:
ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
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.

Code:
scan_ssid=0
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP

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

Code:
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
WPS-AP-AVAILABLE
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.
 
Old 04-22-2012, 08:26 AM   #2
Peacedog
Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,292

Rep: Reputation: 168Reputation: 168
Hi svenxix, Welcome to LQ. Here is an example file with explanations.

http://hostap.epitest.fi/gitweb/gitw...upplicant.conf

Good luck. ;-)
 
Old 04-23-2012, 03:18 AM   #3
dru8274
Member
 
Registered: Oct 2011
Location: New Zealand
Distribution: Debian
Posts: 105

Rep: Reputation: 36
The crunchbang forums have an interesting howto on wpasupplicant here... http://www.crunchbanglinux.org/forums/post/171244/
 
  


Reply

Tags
backtrack, wireless, wpa


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats the deal with UTC anyway?? tekhead2 Linux - General 3 07-27-2009 11:30 AM
Whats the deal with bootstrap? tsunami_imcool Linux - Software 3 07-11-2007 06:35 PM
Whats the deal with Kaffeine? Balarabay1 Suse/Novell 1 04-09-2006 07:43 PM
Whats the deal with libraries? Smaugur [SWE] Linux - Newbie 9 04-02-2004 10:39 AM
kernel 2.6 whats the deal demmylls Linux - General 2 09-11-2003 10:56 AM


All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration