-
HowTo: WPA with wpa_supplicant
Here was my first HowTo about this topic. It made a success, but now it's a bit out-to-date, as it was written for Hoary.
This stuff has started getting easier to configure since Breezy and now it's really very easy to have it work.
This HowTo will help you get WPA to work, no matter what wireless card you have. (This HowTo has been tested with an ipw2200).
So, let's start:
1) Open a terminal window and type:
Code:
wpa_passphrase your_ssid your_psk
Note: your_ssid is the name of your wireless network (a.k.a. SSID) and your_psk is the password you want to use to protect your network. (Look below for an example).
2) Now copy the psk string you got as output.
3) Type:
Code:
sudo gedit /etc/wpa_supplicant.conf
Then paste this as follow:
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2
network={
ssid="your_ssid"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=your_psk
}
Note: your_psk is the psk string you got from step 1.
Here is an example:
Code:
luca@laptop1:~$ wpa_passphrase mywlan thisisthepassword
network={
ssid="mywlan"
#psk="thisisthepassword"
psk=b22ec921c254c73f99b31b76ff876692ecde36839a1f2d92150829e6afcb5515
}
The red string is what you have to paste into /etc/wpa_supplicant.conf as your_psk (without quotes obviously). So you'll have something like this:
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2
network={
ssid="mywlan"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=b22ec921c254c73f99b31b76ff876692ecde36839a1f2d92150829e6afcb5515
4) Save the file and close Gedit.
5) Now we have to make wpa_supplicant load when system boots, so go back to the terminal window and type:
Code:
sudo gedit /etc/network/interfaces
6) Add the following lines in the part regarding your wireless card, as in the example below:
Code:
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
Note: "eth0" is your wireless device and "wext" is the driver; this is a kind of generic driver, so it should work with most wireless cards. If it doesn't, please try another driver, such as hostap, ndiswrapper, etc.
Here is an example:
Code:
iface eth0 inet static
address 192.168.1.15
netmask 255.255.255.0
wireless-essid my_essid
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
7) Now run wpa_supplicant:
Code:
sudo wpa_supplicant -Bw -Dwext -i eth0 -c/etc/wpa_supplicant.conf
You should be online!
Troubleshooting:
You can run wpa_supplicant with -dd flag for a detailed debug output.
1) If you don't manage to connect to the AccessPoint, try to uncomment line 2 in /etc/wpa_supplicant.conf.
2) If that doesn't help, try change its value to 0 or 1.
3) If you get troubles while authenticating, try removing "RSN" and/or "CCMP" strings from /etc/wpa_supplicant.conf.
-
Re: HowTo: WPA with wpa_supplicant
Only like to say that if you put the string in "/etc/network/interfaces" you will get an error if you try to reload the DHCP "sudo ifup -a --force"
I would go for a boot script in the /etc/init.d/your_own_script
And add it using
Code:
update-rc.d -f your_own_script start 40 S .
-
Re: HowTo: WPA with wpa_supplicant
If you use DHCP, your /etc/network/interfaces should look like the following:
Code:
auto eth0
iface eth0 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
Does this cause that error?
-
Re: HowTo: WPA with wpa_supplicant
I know you should not enter the IP etc if using DHCP.
I did get an error
Code:
/etc/network/interfaces:12: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"
But what was because of this:
Code:
iface eth0 inet dhcp
auto eth0
Instead of:
Code:
auto eth0
iface eth0 inet dhcp
Strange this only happen if I enter the pre-up/down to the interface file
-
Re: HowTo: WPA with wpa_supplicant
Another thing is that if you use the interface file and you dis/enable you network interfaces, it over writes the interface file.
-
Re: HowTo: WPA with wpa_supplicant
I am so close - I can almost taste it, but still not having luck. Can someone direct me?
I am running a LAMP server with a Linksys card running the Broadcom chipset. It can see the access point, but it won't hook up correctly. Here's the output of iwlist
Code:
eth0 Scan completed :
Cell 01 - Address: 00:0C:41:D0:46:A0
ESSID:"matthewboh"
Protocol:IEEE 802.11g
Mode:Master
Channel:6
Encryption key:on
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 24 36 48 54
Quality=100/100 Signal level=-145 dBm
IE: WPA Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Extra: Last beacon: 270ms ago
and here's what the iwconfig brings back
Code:
eth0 IEEE 802.11b/g ESSID:"matthewboh" Nickname:"Broadcom 4318"
Mode:Managed Frequency=2.484 GHz Access Point: Invalid
Bit Rate=11 Mb/s Tx-Power=19 dBm
RTS thr:off Fragment thr:off
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
The contents of the wpa_supplicant.conf
Code:
# Minimal /etc/wpa_supplicant.conf to associate with open
# access points. Please see
# /usr/share/doc/wpasupplicant/wpa_supplicant.conf.gz for more complete
# configuration parameters.
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
### Associate with any open access point
### Scans/ESSID changes can be done with wpa_cli
# network={
# ssid=""
# key_mgmt=NONE
# }
# reading passphrase from stdin
network={
ssid="matthewboh"
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKPI
group=CCMP TKPI
psk=c43ae013621f4aa1db2d1127664349f425a2852c352c2c1d6913bfb056736b8d
}
-
Re: HowTo: WPA with wpa_supplicant
@ mattewboh: Are you trying without any protection/encryption? Otherwise, could you post the output of
Code:
sudo wpa_supplicant -Bw -Dwext -i eth0 -c/etc/wpa_supplicant.conf -dd
?
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
yopnono
I know you should not enter the IP etc if using DHCP.
I did get an error
Code:
/etc/network/interfaces:12: misplaced option
ifup: couldn't read interfaces file "/etc/network/interfaces"
But what was because of this:
Code:
iface eth0 inet dhcp
auto eth0
Instead of:
Code:
auto eth0
iface eth0 inet dhcp
Strange this only happen if I enter the pre-up/down to the interface file
Yeah, that's a bit strange.
-
Re: HowTo: WPA with wpa_supplicant
It just comes back with
Daemonize...
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
matthewboh
It just comes back with
Daemonize...
Oh sorry, my mistake, I meant:
Code:
sudo wpa_supplicant -w -Dwext -i eth0 -c/etc/wpa_supplicant.conf -dd
-
Re: HowTo: WPA with wpa_supplicant
Got this
Code:
Initializing interface 'eth0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
Line: 22 - start of a new network block
ssid - hexdump_ascii(len=10):
6d 61 74 74 68 65 77 62 6f 68 matthewboh
proto: 0x3
key_mgmt: 0x2
Line 26: invalid cipher 'TKPI'.
Line 26: failed to parse pairwise 'CCMP TKPI'.
Line 27: invalid cipher 'TKPI'.
Line 27: failed to parse group 'CCMP TKPI'.
PSK - hexdump(len=32): [REMOVED]
Line 29: failed to parse network block.
Failed to read read or parse configuration '/etc/wpa_supplicant.conf'.
Failed to add interface eth0
Cancelling scan request
-
Re: HowTo: WPA with wpa_supplicant
D'oh! It's TKIP instead of TKPI - fixed that, but still having a bit of a problem. Here's the new debug file
Code:
Initializing interface 'eth0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
Line: 22 - start of a new network block
ssid - hexdump_ascii(len=10):
6d 61 74 74 68 65 77 62 6f 68 matthewboh
proto: 0x3
key_mgmt: 0x2
pairwise: 0x18
group: 0x18
PSK - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='matthewboh'
Initializing interface (2) 'eth0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Could not set interface 'eth0' UP
SIOCGIWRANGE: WE(compiled)=19 WE(source)=18 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
Own MAC address: 00:18:39:15:1c:11
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Added interface eth0
Wireless event: cmd=0x8b06 len=8
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'matthewboh'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 24 pairwise 24 key_mgmt 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_associate
Setting authentication timeout: 60 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b06 len=8
Wireless event: cmd=0x8b1a len=19
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface eth0
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Cancelling scan request
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
matthewboh
The contents of the wpa_supplicant.conf
Code:
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKPI
group=CCMP TKPI
Try to replace your code with this
Code:
scan_ssid=1
key_mgmt=WPA-PSK
proto=WPA
-
Re: HowTo: WPA with wpa_supplicant
Okay - I've changed the wpa_supplicant.conf to
Code:
# Minimal /etc/wpa_supplicant.conf to associate with open
# access points. Please see
# /usr/share/doc/wpasupplicant/wpa_supplicant.conf.gz for more complete
# configuration parameters.
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
### Associate with any open access point
### Scans/ESSID changes can be done with wpa_cli
# network={
# ssid=""
# key_mgmt=NONE
# }
# reading passphrase from stdin
network={
ssid="matthewboh"
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
# pairwise=CCMP TKIP
# group=CCMP TKIP
psk=c43ae013621f4aa1db2d1127664349f425a2852c352c2c1d6913bfb056736b8d
}
and when I typed in the wpa_supplicant cmd with a redirect to a debug file, got
Code:
Initializing interface 'eth0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
Line: 22 - start of a new network block
ssid - hexdump_ascii(len=10):
6d 61 74 74 68 65 77 62 6f 68 matthewboh
scan_ssid=1 (0x1)
proto: 0x1
key_mgmt: 0x2
PSK - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='matthewboh'
Initializing interface (2) 'eth0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Could not set interface 'eth0' UP
SIOCGIWRANGE: WE(compiled)=19 WE(source)=18 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
Own MAC address: 00:18:39:15:1c:11
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Added interface eth0
Wireless event: cmd=0x8b06 len=8
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'matthewboh'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_associate
Setting authentication timeout: 60 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b06 len=8
Wireless event: cmd=0x8b1a len=19
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface eth0
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Cancelling scan request
-
Re: HowTo: WPA with wpa_supplicant
Try playing with the parameter "ap_scan", setting it to 0, 1 and 2 and see if something changes.
Anyway, what wireless card do you have? It should also be a matter of driver, that is you should change "wext" (in the wpa_supplicant run command) to something else such as hostap, ndiswrapper, etc.
-
Re: HowTo: WPA with wpa_supplicant
Yes, which driver/card are you using, does it support WPA. Is WPA on at the router. etc,etc. Is it the same password.
-
Re: HowTo: WPA with wpa_supplicant
I don't understand -- why is it eth0 if your wireless device is by default eth1?
I also get "Daemonize.." as the output of "sudo wpa_supplicant -Bw -Dwext -i eth0 -c/etc/wpa_supplicant.conf -dd"
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
beetee2
I don't understand -- why is it eth0 if your wireless device is by default eth1?
I also get "Daemonize.." as the output of "sudo wpa_supplicant -Bw -Dwext -i eth0 -c/etc/wpa_supplicant.conf -dd"
In the HowTo I supposed the wireless card was eth0, but you have to change this with your device (as I wrote in the HowTo itself).
As for your output of wpa_supplicant, it's right if you are running it (you have to get "Daemonize..."), while if you want to see a detailed output for debug, just take the "-B" flag out and add "-dd".
-
Re: HowTo: WPA with wpa_supplicant
luca_linux... Thank you very much. I have been fighting with this for a long time and I feel I am now really close. WPA-PSK is linking and my interface (ath0) is receiving an IP address via DHCP. The only problem is the networking drops off from time to time... I opened a terminal window and let it "iwevent" to see what has been happening and here is the result...
Code:
onioneater36@dell-c840-linux:~$ iwevent
Waiting for Wireless Events from interfaces...
18:45:22.846118 ath0 New Access Point/Cell address:Not-Associated
18:45:22.950340 ath0 Set ESSID:"my_wlan"
18:45:25.190388 ath0 Scan request completed
18:45:25.190576 ath0 Set ESSID:"my_wlan"
18:45:25.194708 ath0 New Access Point/Cell address:00:0F:B5:10:F9:77
18:45:25.326064 ath0 Custom driver event:MLME-REPLAYFAILURE.indication(keyid=0 unicast addr=00:0f:b5:23:bd:15)
18:45:35.236426 ath0 New Access Point/Cell address:Not-Associated
18:45:35.236653 ath0 Set ESSID:off/any
18:45:37.475151 ath0 Scan request completed
18:45:37.475325 ath0 Set ESSID:"my_wlan"
18:45:37.479323 ath0 New Access Point/Cell address:00:0F:B5:10:F9:77
18:45:37.627722 ath0 Custom driver event:MLME-REPLAYFAILURE.indication(keyid=0 unicast addr=00:0f:b5:23:bd:15)
Anyone have any idea how I can correct this problem??? Your guide taught me alot about what is going on and I really appreciate it.
-
Re: HowTo: WPA with wpa_supplicant
Check if you have more then one "wpa_supplicant" running in the system monitor.
Or more then one "dhclient3"
-
Re: HowTo: WPA with wpa_supplicant
yopnono...
I assume you wanted me to check in gnome under SYSTEM > ADMINISTRATION > SYSTEM MONITOR and I did not see even 1 instance of either wpa_supplicant or dhclient. Is there something at the command line you wanted me to execute to examine these processes?
-
Re: HowTo: WPA with wpa_supplicant
-
Re: HowTo: WPA with wpa_supplicant
Moreover, did you add the SSID also to the configuration of your wireless card in Gnome network-admin?
-
Re: HowTo: WPA with wpa_supplicant
From what you have written, I see you have an Atheros-based wireless card, so in the wpa_supplicant run command you should change "-Dwext" into "-Dmadwifi".
-
Re: HowTo: WPA with wpa_supplicant
Just wanted everyone to know that I got my WMP54GS card running WPA TKIP using ndiswrapper and wpa_supplicant - NOT the bcm43xx driver. Thanks everyone for your help and assistance!
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
luca_linux
From what you have written, I see you have an Atheros-based wireless card, so in the wpa_supplicant run command you should change "-Dwext" into "-Dmadwifi".
Woops. Sorry. I should have mentioned that I did use -Dmadwifi and I also used -iath0 as my interface has the different designation. Thank you.
I will try the ps -A when I get home this evening. Thanks. I have also noticed that if I am using the network with heavy traffic over the wifi it seems to stay up. Droppings seems to occur during no/low usage.
-
Re: HowTo: WPA with wpa_supplicant
I did have a problem like yours before.
This was because the wpa_supplicant started after suspend, so I had more then one wpa_s running and conflicting.
So I did put a killall wpa_supplicant script in the /etc/acpi/suspend.d folder. On the other hand I don't start my wpa using the interface file, I use a boot script, so it may not be the same issue.
-
Re: HowTo: WPA with wpa_supplicant
Hi all,
Don't mean to go off on a little tangent, but i have a quick question.
First off, I have everything working. I connect fine and its not problem. My issue is with my laptop when i got to different networks. its a pain to constantly change the config file and the interface. when i am going back and forth from unsecured to secured its not that bad but then i go from WPA to WPA its just a pain having to change all the files.
basically all I do is change my /etc/network/interfaces from
Code:
auto eth1
iface eth1 inet dhcp
wireless-essid COVAD1
pre-up wpa_supplicant -Bw -Dwext -ieth1 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
to
Code:
auto eth1
iface eth1 inet dhcp
wireless-essid COVAD1
#pre-up wpa_supplicant -Bw -Dwext -ieth1 -c/etc/wpa_supplicant.conf
#post-down killall -q wpa_supplicant
then i have to restart the computer. I know that there is a way to restart the networking and i have tried ifdown and then ifup, but no luck. Is there a applet out there that I can create profiles for different locations so i can just switch locations and deal with changing the wpa_supplicant.conf file and the interfaces file? i am running gnome and i have tried the network configuration but no luck, it just overwrites the ESSID and nothing else.
thanks in advance and sorry for being slightly off topic, but i thought it kinda pertained to this how to
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
00trav
I connect fine and its not problem. My issue is with my laptop when i got to different networks. its a pain to constantly change the config file and the interface. when i am going back and forth from unsecured to secured its not that bad but then i go from WPA to WPA its just a pain having to change all the files.
This wpa config used in this thread is not for you. You should use network-manager.
You will find it in synaptic, or use the terminal.
Code:
sudo aptitude install network-manager
-
Re: HowTo: WPA with wpa_supplicant
Yeah, you should use network-manager. Anyway, if I'm not mistaken, it only works with DHCP.
-
Re: HowTo: WPA with wpa_supplicant
I have network manager installed, i even reinstalled it, and it still doesn't seem to work right. It sees wired network but not wireless, maybe i am not useing it correctly, i do see a signal strength up in the upper right, which when i open gives me some network into, i can click configure and then i can see my network configuration setting to which i can click on configure of my wireless device and then i can see a drop down list of networks in the area, but there is only a spot for a wep key, and WPA doesn't work.
As this is getting way off topic, i am going to start a new thread in the noob section, but thanks to everyone here since i at least could connect by altering the interface file and wpa_supplicant.conf,
-
Re: HowTo: WPA with wpa_supplicant
I had looked everywhere and could not get WIFI working until I found this thread.
Therefore, I would vote to make this thread a sticky.
-
Re: HowTo: WPA with wpa_supplicant
great info luca
using a ipw2200 with wpa-psk ccmp here and couldnt get network manager to act reliably
I would connect and drop until I removed all TKIP references and the RSN for wpa_supplicant.conf which I thought was weird. Then I'd connect longer and die until I commented out the ap_scan command. I had it commented out originally but it still wouldnt connect for longer than a few seconds.
The essid parameter in network/interfaces has disappeared.
And now my connection has dropped again. :(
I can see (network monitor) and hear (the minipci card buzzes when it scans) my adapter falling into scan mode. I think there was a bug in the ipw2200 driver that it defaulted to scanning constantly - that was patched in march so this kernel driver is old. Im gonna try to throw it an option that is supposed to stop it, i think it was hwcrypto=0 I have to check on that one
How do I set permanent ip,gateway and dns settings for my wireless adapter? If I set them using the network monitor(gnome panel) they reset the adapter and the adapter generally doesnt reauthenticate with the ap. If I set them in the etc/network/interfaces they are ignored in part when I throw an ifup/ifdown to the interface. My ip might get set but the route might not.
what overwrites the interfaces file?
-
Re: HowTo: WPA with wpa_supplicant
echo options ipw2200 hwcrypto=0 > /etc/modprobe.d/ipw2200
solved all my weird problems so far
-
Re: HowTo: WPA with wpa_supplicant
One thing worth noting, I mentioned that my network would work most of the time but would drop occasionally. Referencing the wpa_supplicant.conf file here...
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2
network={
ssid="your_ssid"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=your_psk
}
I changed the one line to "proto=WPA" instead of "proto=WPA RSN" and it has not dropped since. I did this on a guess just trying things to see if it would work and it did. I knew what WPA was, but not what RSN meant and that is why I removed it. Is there someplace that explains some of these major configuration files like /etc/network/interfaces and /etc/X11/xorg.conf and all these major files a linux noob who wants to become a linux junkie should know about? I keep trying to learn more about the boot process and what happens and take it a file at a time, but if someone has advice how to learn the system, I'd definately take it. I digress. If anyone can answer the WPA vs WPA RSN and what that means, and why it may have fixed my problem, I'd appreciate it.
Thanks
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
onioneater36
One thing worth noting, I mentioned that my network would work most of the time but would drop occasionally. Referencing the wpa_supplicant.conf file here...
Code:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2
network={
ssid="your_ssid"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=your_psk
}
I changed the one line to "proto=WPA" instead of "proto=WPA RSN" and it has not dropped since. I did this on a guess just trying things to see if it would work and it did. I knew what WPA was, but not what RSN meant and that is why I removed it. Is there someplace that explains some of these major configuration files like /etc/network/interfaces and /etc/X11/xorg.conf and all these major files a linux noob who wants to become a linux junkie should know about? I keep trying to learn more about the boot process and what happens and take it a file at a time, but if someone has advice how to learn the system, I'd definately take it. I digress. If anyone can answer the WPA vs WPA RSN and what that means, and why it may have fixed my problem, I'd appreciate it.
Thanks
check out the wpa supplicant website it has alot of info and the readme files that break down all the wpa_supplicant.conf options
rsn is wpa2, listing it as a possible option shouldnt effect the connectivity of other encryption protocols but it did for me too
http://hostap.epitest.fi/cgi-bin/vie...ype=text/plain
http://hostap.epitest.fi/cgi-bin/vie...ype=text/plain
if u want to learn about anything id suggest using google to research the program/technology etc that youre interested in learning
gentoo forums and wiki are jampacked with info - remember to omit words with less than 4 letters in your searches on many sites including ubuntuforums, they will turn up blank - google wont do that and has a fair amount of the info here and on other forums indexed
good luck
-
Re: HowTo: WPA with wpa_supplicant
looks like ifup/down is the best tool
here's my wireless section of /etc/network/interfaces
Code:
#wireless
iface eth1 inet static
pre-up modprobe ipw2200
pre-up wpa_supplicant -Bw -Dwext -ieth11 -c/etc/wpa_supplicant.conf
address 192.168.98.71
netmask 255.255.255.0
gateway 192.168.89.178
wireless-essid leper
wireless-mode Managed
post-down rmmod ipw2200
post-down rmmod ieee80211
post-down rmmod ieee80211_crypt_ccmp
post-down rmmod ieee80211_crypt
post-down killall -q wpa_supplicant
that way i dont have to hear the adapter scan and everything gets a restart when I bring it back up
-
Re: HowTo: WPA with wpa_supplicant
The "proto=WPA RSN" parameter does not cause any issue to me...that's strange. It could probably depend on how your routers handles the authentication.
Anyway, thanks for your feedback. I'll add that suggestion (that is removing the "RSN" string to the HowTo.
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
onioneater36
I had looked everywhere and could not get WIFI working until I found this thread.
Therefore, I would vote to make this thread a sticky.
Oh, thanks so much. I'm glad to have helped you out.
-
Re: HowTo: WPA with wpa_supplicant
Sorry to report that I am still having problems. This is really frustrating the heck out of me. I won't report anything else unless I am sure what fixed it, but when I run "iwevent" in a terminal window, I still get...
Quote:
Waiting for Wireless Events from interfaces...
17:24:29.917329 ath0 New Access Point/Cell address:Not-Associated
17:24:30.022573 ath0 Set ESSID:"my_network_id"
17:24:32.262922 ath0 Scan request completed
17:24:32.263077 ath0 Set ESSID:"my_network_id"
17:24:32.266839 ath0 New Access Point/Cell address:00:0F:B5:10:F9:77
17:24:32.396782 ath0 Custom driver event:MLME-REPLAYFAILURE.indication(keyid=0 unicast addr=00:0f:b5:23:bd:15)
17:24:42.304204 ath0 New Access Point/Cell address:Not-Associated
17:24:42.304391 ath0 Set ESSID: off/any
17:24:44.543386 ath0 Scan request completed
17:24:44.543569 ath0 Set ESSID:"my_network_id"
It seems to come back soon enough, but sometimes it just keeps playing now you see me now you don't. I have loosened up some things on my router (no Super-G, no MAC address address list, broadcast SSID=yes, etc). I will keep pluggin' and chuggin' and will report if the problem is solved. Any ideas are sincerely appreciated (especially based on the error messages I have listed above from "iwevent".
Should I maybe download the source for the latest version of madwifi and wpa_supplicant and try updating? I have whatever comes with Ubuntu 6.06 LTS 32bit at present. I am also considering trying the NDISWRAPPER method as well, but right now, this is the closest I have gotten, so I don't want to persue that yet.
-
Re: HowTo: WPA with wpa_supplicant
Please, post the wpa_supplicant.conf you are using at the moment.
-
Re: HowTo: WPA with wpa_supplicant
Here is my current wpa_supplicant.conf
You will see that I put the RSN back in since taking it out was actually not the problem.
Quote:
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2
network={
ssid="my_network_id"
scan_ssid=1
proto=WPA RSN
# proto=WPA
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=9ae6b101b503bedc93b2570b0c2d77e161932e752a82e0 ffc5db9317fb390ee4
}
-
Re: HowTo: WPA with wpa_supplicant
First of all, I suggest you removing the psk key from your post for your privacy. :p
Then, as for your problem, try to uncomment the second line and rebooting wpa_supplicant. If that doesn't help, try changing its value to 0 and/or 1.
In the meanwhile, also try taking "CCMP" out, even though that shouldn't help as "RSN".
-
Re: HowTo: WPA with wpa_supplicant
Thanks luca...
Just so you know, I too was concerned about putting the psk key in there too, so I changed a few numbers in there. I figured you wanted to make sure I had one in there, so left it in (altered) for demonstration purposes.
I assume by rebooting wpa_supplicant, you want me to either reboot the lappy or do a...
Code:
wpa_supplicant -Bw -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf
at a terminal window prompt. After I do the wpa_supplicant command, do I have to do an...
sudo ifconfig ath0 down
sudo ifconfig ath0 up
Thanks again.
-
Re: HowTo: WPA with wpa_supplicant
there is a bug in the 1.1.1 version of the ipw2200 driver that is included with ubuntu dapper/edgy etc and kernels (from linus) including 2.6.17
the bug will show you the following messages repeatedly
[4295722.986000] eth1: NETDEV_TX_BUSY returned; driver should report queue full via ieee_device->is_queue_full.
this bug causes connection problems like disconnects - its behind alot of my connection troubles
im compiling the new driver from source to try to solve my problems
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
onioneater36
Thanks luca...
Just so you know, I too was concerned about putting the psk key in there too, so I changed a few numbers in there. I figured you wanted to make sure I had one in there, so left it in (altered) for demonstration purposes.
I assume by rebooting wpa_supplicant, you want me to either reboot the lappy or do a...
Code:
wpa_supplicant -Bw -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf
at a terminal window prompt. After I do the wpa_supplicant command, do I have to do an...
sudo ifconfig ath0 down
sudo ifconfig ath0 up
Thanks again.
Yeah, that's what I meant.
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
Magneto
there is a bug in the 1.1.1 version of the ipw2200 driver that is included with ubuntu dapper/edgy etc and kernels (from linus) including 2.6.17
the bug will show you the following messages repeatedly
[4295722.986000] eth1: NETDEV_TX_BUSY returned; driver should report queue full via ieee_device->is_queue_full.
this bug causes connection problems like disconnects - its behind alot of my connection troubles
im compiling the new driver from source to try to solve my problems
Ok, good to know.
Then let us know how it goes.
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
luca_linux
Ok, good to know.
Then let us know how it goes.
well I installed the latest ieee80211, wireless tools, ipw2200 firmware and ipw2200 drivers and its a big improvement
no more queue full problems , no more disconnects every time I attempt to use the network
its much more reliable now - no need for the hwcrypto=0 module option because the issue has been fixed
one thing I did have to do is re-enable the apscan option in wpa_supplicant.conf because my essid is hidden and without that option I have serious problems trying to authenticate
its pretty much the same process as your old howto although some make processes run the removal scripts automatically
for me its really worth it - i have no idea why stable drivers and tools that have been out more than 6 months havent been included in ubuntu
wireless tools is at 28 ubuntu is at 18
ipw2200 is at 1.2.0 ubuntu is at 1.1.1
ipw firmware is at 3.0 ubuntu is at 2.4
same with ieee
:(
-
Re: HowTo: WPA with wpa_supplicant
good to find this how-to. is it advisable to delete anything before trying this...ie network-manager, network-manager-gnome etc? thankyou.
-
Re: HowTo: WPA with wpa_supplicant
No, they shouldn't be a problem.
-
Re: HowTo: WPA with wpa_supplicant
luca & magneto...
Having learned from one of your previous posts that the RSN in the WPA RSN line for "proto" meant WPA2, I re-did my WPA_supplicant.conf to use WPA2 and reconfigured my router as well. Although it has not worked on WPA, it does seem to be working on WPA2. Perhaps this could help someone else if they had the same problem.
-
Re: HowTo: WPA with wpa_supplicant
matthewboh or anyone who can help -> I have a bcm4311 wireless card using it with ndiswrapper. I am trying to set up wpa_supplicant per the how-to but I get the following when running it with -dd option:
Code:
Driver doesn't support WPA
I get this when using option -Dndiswrapper of wpa_supplicant. If I use -Dwext I don't get that message but I can't connect to my network. I know there is some info you might need but I am not sure what else to post here. Oh yes, I am using AMD64 Dapper. And I got a connection before when using WEP, but I want the stronger WPA security.
-
Re: HowTo: WPA with wpa_supplicant
Bobbyone - I found out the drivers that come with Ubuntu don't support the stronger WPA security. I ended up using the Windows drivers that came with the card. I ended up using this HOWTO in order to set up my card - http://ubuntuforums.org/showthread.php?t=263136
-
Re: HowTo: WPA with wpa_supplicant
I can connect to the internet with this method. However, for some reason the router detects it as a direct connection, not wireless. The router reports that it has given 192.168.2.3 as ip, but Ubuntu says 192.168.2.103. I can't access the local network, it doesn't find the computers it should find. And when I try to access the router on 192.168.2.1 it wants a login and password which I normally don't give in that manner (it should show the router login page).
Any ideas on how this weirdness is happening? Ofcourse, everything works as it should on Windows. I've tried this on Arch Linux also and it's the same. I may try a wep key with mac filtering later but only to test it.
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
Haiyadragon
I can connect to the internet with this method. However, for some reason the router detects it as a direct connection, not wireless. The router reports that it has given 192.168.2.3 as ip, but Ubuntu says 192.168.2.103. I can't access the local network, it doesn't find the computers it should find. And when I try to access the router on 192.168.2.1 it wants a login and password which I normally don't give in that manner (it should show the router login page).
Any ideas on how this weirdness is happening? Ofcourse, everything works as it should on Windows. I've tried this on Arch Linux also and it's the same. I may try a wep key with mac filtering later but only to test it.
I guess you are using DHCP, so just try using a Static IP.
-
Re: HowTo: WPA with wpa_supplicant
I followed these steps and now my wireless card does not show up at all anywhere. I am using kubuntu, and my wireless card is an intel 3945ABG. Does anybody have any ideas on how I can at least get it to show up?
-
Re: HowTo: WPA with wpa_supplicant
Nice How-to luca_linux.
This thread has been added to the UDSF wiki.
WPA with wpa_supplicant
bodhi.zazen
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
luca_linux
1) Open a terminal window and type:
Code:
wpa_passphrase your_ssid your_psk
Note: your_ssid is the name of your wireless network (a.k.a. SSID) and your_psk is the password you want to use to protect your network. (Look below for an example).
Hello,
I do not understand what is meant with 'your_psk'.
Is this something I choose locally on my computer in Ubuntu or is this supposed to be stored on the router?
My netgear router is set to use wpa-psk but i only have a passphrase, no psk.
And another question, is wpa_supplicant already installed in Dapper? Or do I have to download it manually?
-
Re: HowTo: WPA with wpa_supplicant
pf...
as for me; i'd stick to WEP for a few more years8) until out of the box bla bla
No need to configure - concerning my state of health i prefer no configure to some neighbour-nerds trying to access me web
-
Re: HowTo: WPA with wpa_supplicant
kewla.
this worked for me. i thought it was screwed, then checked my _passphrase output AND IT WAS WRONG. so, all changed and working perfectly ta.
thanks for the great work =P
edit: actually, now i want to know how to script it so that i can run from my desktop or panel. i dont want it running at boot as im scared that it will be broadcasting my ssid and psk from boot, so i want to choose. Can i just chmod +x it?
PartisanEntity - follow the walkthru earlier in this post or browse the many links from here - you will find a solution, or closure.
-
Re: HowTo: WPA with wpa_supplicant
I followed this set of instructions and it all went smoothly, bar forgetting to change eth0 to eth2 in my case. I'm using a Broadcomm chipset card, Belkin F5D7001UK, if that helps anyone who's unsure whether it will work or not.
-
Re: HowTo: WPA with wpa_supplicant
Hi,
I'm new with Linux...I'm trying to use my WPA-wifi connection with my notebook... the wifi card is a Intel 2200BG.
This is what I've done so far:
sudo kwrite /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2
network={
ssid=Sydney
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=370d97a2c2d4564c0c34647ac4d57f9b49b068f06aae32 b2df243d48a74408771
}
(SSID and PSK aren't the one I use, just copy and pasted and changed a bit)
Then....
sudo kwrite /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
iface wlan0 inet dhcp
wireless-essid Sydney
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
and last
sudo wpa_supplicant -Bw -Dwext -i eth0 -c/etc/wpa_supplicant.conf
....everything should work but it doesn't...
So...anyone can help me?
I'm not sure if this makes any difference but I receive this message when I'm running Kwrite...
X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
giruzz@giruzz-laptop:~$ sudo kwrite /etc/network/interfaces
X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 168
Major opcode: 145
Minor opcode: 3
Resource id: 0x0
Failed to open device
Thanks for any help!
giruzz
-
Re: HowTo: WPA with wpa_supplicant
First off, thanks Luca. I used your previous how-to for an install about a year ago, and this one has me close to wireless. My last problem is that for some reason it keeps dropping and picking up the access point
Code:
iablt:/home/iab# iwevent
Waiting for Wireless Events from interfaces...
23:25:57.780616 eth2 New Access Point/Cell address:Not-Associated
23:25:57.780856 eth2 New Access Point/Cell address:Not-Associated
23:26:00.882024 eth2 Set Mode:Managed
23:26:00.882091 eth2 Set ESSID:"WiFabu"
23:26:01.086865 eth2 New Access Point/Cell address:00:14:BF:39:40:EE
23:26:05.052726 eth2 New Access Point/Cell address:Not-Associated
23:26:05.053576 eth2 New Access Point/Cell address:Not-Associated
23:26:08.154450 eth2 Set Mode:Managed
23:26:08.154474 eth2 Set ESSID:"WiFabu"
23:26:08.333068 eth2 New Access Point/Cell address:00:14:BF:39:40:EE
23:26:12.296069 eth2 New Access Point/Cell address:Not-Associated
23:26:12.296097 eth2 New Access Point/Cell address:Not-Associated
23:26:15.399157 eth2 Set Mode:Managed
23:26:15.399184 eth2 Set ESSID:"WiFabu"
23:26:15.588405 eth2 New Access Point/Cell address:00:14:BF:39:40:EE
23:26:19.546805 eth2 New Access Point/Cell address:Not-Associated
23:26:19.547655 eth2 New Access Point/Cell address:Not-Associated
a similar symptom is seen with random hits from iwconfig:
Code:
iablt:/home/iab# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
eth1 no wireless extensions.
eth2 unassociated ESSID:"WiFabu"
Mode:Managed Channel=0 Access Point: 00:14:BF:39:40:EE
Bit Rate=0 kb/s Tx-Power=20 dBm Sensitivity=8/0
Retry limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
sit0 no wireless extensions.
iablt:/home/iab# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
eth1 no wireless extensions.
eth2 IEEE 802.11g ESSID:"WiFabu"
Mode:Managed Frequency:2.437 GHz Access Point: 00:14:BF:39:40:EE
Bit Rate=54 Mb/s Tx-Power=20 dBm Sensitivity=8/0
Retry limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=98/100 Signal level=-28 dBm Noise level=-80 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
sit0 no wireless extensions.
You can see the Bit rate, signal level, noise level and the associated channel 0 then have values.
My wpa_supplicant.conf and interface files are cut and paste from your how-to, excepting for my ssid and psk. The machine has a Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)
I don't think this *should* make any difference, but I am running debian etch with kernel 2.6.17 Any ideas?
-
Re: HowTo: WPA with wpa_supplicant
You're amazing! uch a star! I followed your tutorial and it worked on the first time. After following step by step I just rebooted and off it went.
Thank you very much!
-
Re: HowTo: WPA with wpa_supplicant
i'm wondering if router affect this
I have two linksys routers, one a WRT54G and a WRT54GL
both with DD-WRT v23 SP2, both with the same SSID and PSK.
The 54GL likes wpa_supplicant, then WRT54G gives me this error:
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
any thoughts?
-
Re: HowTo: WPA with wpa_supplicant
Quote:
Originally Posted by
matthewboh
D'oh! It's TKIP instead of TKPI - fixed that, but still having a bit of a problem. Here's the new debug file
Code:
Initializing interface 'eth0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
Line: 22 - start of a new network block
ssid - hexdump_ascii(len=10):
6d 61 74 74 68 65 77 62 6f 68 matthewboh
proto: 0x3
key_mgmt: 0x2
pairwise: 0x18
group: 0x18
PSK - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='matthewboh'
Initializing interface (2) 'eth0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Could not set interface 'eth0' UP
SIOCGIWRANGE: WE(compiled)=19 WE(source)=18 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
Own MAC address: 00:18:39:15:1c:11
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
Setting scan request: 0 sec 100000 usec
Added interface eth0
Wireless event: cmd=0x8b06 len=8
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'matthewboh'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 24 pairwise 24 key_mgmt 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
No keys have been configured - skip key clearing
wpa_driver_wext_set_drop_unencrypted
State: SCANNING -> ASSOCIATING
wpa_driver_wext_associate
Setting authentication timeout: 60 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Wireless event: cmd=0x8b06 len=8
Wireless event: cmd=0x8b1a len=19
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface eth0
State: ASSOCIATING -> DISCONNECTED
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_wext_set_wpa
wpa_driver_wext_set_drop_unencrypted
wpa_driver_wext_set_countermeasures
No keys have been configured - skip key clearing
Cancelling scan request
Can you tell me where is this debug or how command you use ? I need this information - I have a problem concerning WPA-TKIP.
Many thanks !
-
Re: HowTo: WPA with wpa_supplicant
L.S.,
After trying a number of different options I managed to get connection working. I will detail the options on a website in Dutch so other people who want to use wpa on a Dutch network can find help. Thanks for all the advise here on these pages.
-
ipw2200, unable to find/scan network
I had wireless working with Ubuntu until I upgraded to Edgy (I did a clean wipe and install), but I am totally stumped at why I can't get it to work anymore. I've followed every post in this thread and tried playing around with many different configuration settings, but I've had absolutely no luck.
My main problem is that my wireless card can't find (scan?) my network (I have an Intel ipw2200 wireless card, and the device is eth1), nor any networks for that matter. My network's name is "dude wireless" and uses WEP encryption. My Debian desktop is connected to it just fine. I've tried both the wext and ipw drivers for wpa_supplicant, but neither of them worked.
Here is the output of a ton of commands/files, so if anyone can help me figure out what's wrong, I would appreciate it.
$ /etc/network/interfaces
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet dhcp
wireless-essid dude wireless
wireless-mode managed
wireless-key MYSECRET
pre-up wpa_supplicant -Bw -Dipw -ieth1 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
#iface eth0 inet dhcp
$ cat wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ap_scan=0
network={
ssid="dude wireless"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=SECRET :D
}
$ iwconfig
Code:
lo no wireless extensions.
eth0 no wireless extensions.
eth1 radio off ESSID:"dude wireless"
Mode:Managed Channel:0 Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power=off Sensitivity=8/0
Retry limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
sit0 no wireless extensions.
$ ifconfig
Code:
eth1 Link encap:Ethernet HWaddr 00:12:F0:55:A8:4C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:201 Memory:dcffd000-dcffdfff
$ dmesg | grep ipw
Code:
[17179590.608000] ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.1.2kmprq
[17179590.608000] ipw2200: Copyright(c) 2003-2006 Intel Corporation
[17179590.608000] Driver 'ipw2200' needs updating - please use bus_type methods
[17179590.608000] ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection
[17179591.332000] ipw2200: Radio Frequency Kill Switch is On:
[17179591.332000] ipw2200: Detected geography ZZM (11 802.11bg channels, 0 802.11a channels)
$ sudo wpa_supplicant -dd -Dipw -ieth1 -c/etc/wpa_supplicant.conf
Code:
Initializing interface 'eth1' conf '/etc/wpa_supplicant.conf' driver 'ipw' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=13):
64 75 64 65 20 77 69 72 65 6c 65 73 73 dude wireless
scan_ssid=1 (0x1)
proto: 0x3
key_mgmt: 0x2
pairwise: 0x18
group: 0x18
PSK - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='dude wireless'
Initializing interface (2) 'eth1'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_ipw_init is called
SIOCGIWRANGE: WE(compiled)=20 WE(source)=18 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:12:f0:55:a8:4c
wpa_driver_ipw_set_wpa: enabled=1
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
wpa_driver_ipw_set_key: alg=none key_idx=0 set_tx=0 seq_len=0 key_len=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
Failed to set encryption.
wpa_driver_ipw_set_key: alg=none key_idx=1 set_tx=0 seq_len=0 key_len=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
Failed to set encryption.
wpa_driver_ipw_set_key: alg=none key_idx=2 set_tx=0 seq_len=0 key_len=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
Failed to set encryption.
wpa_driver_ipw_set_key: alg=none key_idx=3 set_tx=0 seq_len=0 key_len=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
Failed to set encryption.
wpa_driver_ipw_set_countermeasures: enabled=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
wpa_driver_ipw_set_drop_unencrypted: enabled=1
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
Setting scan request: 0 sec 100000 usec
Added interface eth1
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added
State: DISCONNECTED -> SCANNING
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=13):
64 75 64 65 20 77 69 72 65 6c 65 73 73 dude wireless
Trying to get current scan results first without requesting a new scan to speed up initial association
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Selecting BSS from priority group 0
No suitable AP found.
Setting scan request: 0 sec 0 usec
Starting AP scan (broadcast SSID)
Scan timeout - try to get results
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Selecting BSS from priority group 0
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (specific SSID)
Scan SSID - hexdump_ascii(len=13):
64 75 64 65 20 77 69 72 65 6c 65 73 73 dude wireless
Scan timeout - try to get results
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Selecting BSS from priority group 0
No suitable AP found.
Setting scan request: 5 sec 0 usec
Starting AP scan (broadcast SSID)
Scan timeout - try to get results
Received 0 bytes of scan results (0 BSSes)
Scan results: 0
Selecting BSS from priority group 0
No suitable AP found.
Setting scan request: 5 sec 0 usec
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface eth1
State: SCANNING -> DISCONNECTED
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_ipw_set_wpa: enabled=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
wpa_driver_ipw_set_drop_unencrypted: enabled=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
wpa_driver_ipw_set_countermeasures: enabled=0
ioctl[IPW_IOCTL_WPA_SUPPLICANT]: Operation not supported
No keys have been configured - skip key clearing
WEXT: Operstate: linkmode=0, operstate=6
Cancelling scan request
-
Re: HowTo: WPA with wpa_supplicant
I don't have a clue why, but now suddenly it works. :confused: Its so weird, I didn't change anything from my post above! Oh well, I'm just happy to have it working finally. :D
-
Re: HowTo: WPA with wpa_supplicant
First of all, I'm new to this so go easy on me. I have come to the part where I'm to paste that thread in to interfaces. But I'm not sure where, under the eth0 or wlan0?
this is what interfaces says:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0 inet dhcp
iface wlan0 inet dhcp
auto eth1
iface eth1 inet dhcp
And should I get any reply when I try to run Wpa_supplicant? I don't get any =S
Thanks in advance
-
Re: HowTo: WPA with wpa_supplicant
I'm having problems. I've confirmed that my Broadcom 4318 is working; iwlist eth1 scan shows me both mine and my neighbour's networks. Here's what my /etc/wpa_supplicant.conf looks like:
Code:
# Minimal /etc/wpa_supplicant.conf to associate with open
# access points. Please see
# /usr/share/doc/wpasupplicant/wpa_supplicant.conf.gz for more complete
# configuration parameters.
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
### Associate with any open access point
### Scans/ESSID changes can be done with wpa_cli
# network={
# ssid=""
# key_mgmt=NONE
# }
# reading passphrase from stdin
network={
ssid="obcomputer"
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
# pairwise=CCMP TKIP
# group=CCMP TKIP
psk=792f89822002762c11thisnotmyrealpsk114236da73a3f7c9b
}
When I run sudo wpa_supplicant -Dndiswrapper -ieth1 -c/etc/wpa_supplicant.conf -dd I see a few things that don't look right. Here I've bolded them:
Code:
Initializing interface 'eth1' conf '/etc/wpa_supplicant.conf' driver 'ndiswrapper' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
Line: 22 - start of a new network block
ssid - hexdump_ascii(len=10):
6f 62 63 6f 6d 70 75 74 65 72 obcomputer
scan_ssid=1 (0x1)
proto: 0x1
key_mgmt: 0x2
PSK - hexdump(len=32): [REMOVED]
Priority group 0
id=0 ssid='obcomputer'
Initializing interface (2) 'eth1'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
SIOCGIWRANGE: WE(compiled)=20 WE(source)=18 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:14:a4:3b:7c:63
Driver does not support WPA.
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
Setting scan request: 0 sec 100000 usec
Added interface eth1
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'obcomputer'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
WEXT: Operstate: linkmode=-1, operstate=5
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Authentication with 00:00:00:00:00:00 timed out.
Added BSSID 00:00:00:00:00:00 into blacklist
State: ASSOCIATING -> DISCONNECTED
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'obcomputer'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
WEXT: Operstate: linkmode=-1, operstate=5
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
Authentication with 00:00:00:00:00:00 timed out.
BSSID 00:00:00:00:00:00 blacklist count incremented to 2
State: ASSOCIATING -> DISCONNECTED
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Setting scan request: 0 sec 0 usec
State: DISCONNECTED -> SCANNING
Trying to associate with SSID 'obcomputer'
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
WPA: No WPA/RSN IE available from association info
WPA: Set cipher suites based on configuration
WPA: Selected cipher suites: group 30 pairwise 24 key_mgmt 2
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK CCMP
WPA: using PTK CCMP
WPA: using KEY_MGMT WPA-PSK
WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 04 01 00 00 50 f2 02
No keys have been configured - skip key clearing
State: SCANNING -> ASSOCIATING
WEXT: Operstate: linkmode=-1, operstate=5
Association request to the driver failed
Setting authentication timeout: 5 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface eth1
State: ASSOCIATING -> DISCONNECTED
WEXT: Operstate: linkmode=-1, operstate=5
No keys have been configured - skip key clearing
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
Failed to disable WPA in the driver.
No keys have been configured - skip key clearing
WEXT: Operstate: linkmode=0, operstate=6
Removed BSSID 00:00:00:00:00:00 from blacklist (clear)
Cancelling scan request
@matthewboh
I looks like you have similar hardware to mine. Maybe you could post your wpa_supplicant.conf?
@all
Any help or suggestions would be greatly appreciated. I'd love to get my new laptop online on linux.
EDIT: Nevermind, I have it working. I changed the driver to wext and ap_scan to 1. Though no one had a chance to help me directly, I'd like to thank you all for your help; this thread has really been helpful.
-
Re: HowTo: WPA with wpa_supplicant
This seems a good thread, but after I do step one, and then Gedit /etc/wpa_supplicant.conf the file does not exist, why is this?](*,)
-
Re: HowTo: WPA with wpa_supplicant
Thanks for the Howto. I got it to work such that I can connect if I run
Code:
sudo /etc/init.d/networking restart
however, when the computer starts up, it doesn't seem to be getting an IP. How do I configure it so I don't have to manually restart networking? Thanks.
-
Re: HowTo: WPA with wpa_supplicant
I've followed the HOW-TO exactly.
I've got a Netgear WG111v2 USB dongle that I have installed using NDISWRAPPER.
'iwlist scan' shows me the available network:
Code:
anjan@supernal:~$ iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 00:14:6C:F0:03:06
ESSID:"AnjanWireless"
Protocol:IEEE 802.11bg
Mode:Master
Channel:11
Encryption key:on
Bit Rates:54 Mb/s
Extra: Rates (Mb/s): 1 2 5.5 6 9 11 12 18 22 24 36 48 54
Quality:17 Signal level:0 Noise level:2
Extra: Last beacon: 0ms ago
Output of 'iwconfig'
Code:
anjan@supernal:~$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 802.11b/g link.. ESSID:"AnjanWireless"
Mode:Managed Channel=11 Access Point: Not-Associated
Bit Rate=11 Mb/s
Retry:on Fragment thr:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
sit0 no wireless extensions.
Contents of my 'interfaces' file:
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wireless-essid AnjanWireless
wpa-driver wext
wpa-conf master
wpa-ssid AnjanWireless
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk <hidden>
First, before reading this How-To, I had my 'interfaces' file without all the wpa config commands. Instead I had these two lines:
Code:
pre-up wpa_supplicant -Bw -Dwext -ieth0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant
Contents of my 'wpa_supplicant.conf' file:
Code:
# Minimal /etc/wpa_supplicant.conf to associate with open
# access points. Please see
# /usr/share/doc/wpasupplicant/wpa_supplicant.conf.gz for more complete
# configuration parameters.
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1
network={
ssid="AnjanWireless"
scan_ssid=1
key_mgmt=WPA-PSK
proto=WPA
#pairwise=CCMP TKIP
#group=CCMP TKIP
#psk="<hidden>"
psk=<hidden>
}
Everything seems OK to me. But I just cannot hook up to my wireless router, even after disabling my wired connection (eth0) and disconnecting my ethernet cable.
Please, I've spent three days on this now and Ubuntu is really starting to frustrate me. Someone help!
-
Re: HowTo: WPA with wpa_supplicant
Just a thought:
Have you tried using NetworkManager? (choose network-manager-gnome in synaptic)
Once it is installed, comment out all the lines that refer to your wireless interface in your interfaces file
Then reboot
Some references: 1 2