Page 1 of 2
Dealing with WPA on Linux
Posted: Fri Sep 15, 2006 3:03 pm
by Wally Balljacker
For all the people here that are running Linux on their laptops, with a secured home network, how do you go about connecting to it? When I was using Ubuntu, I used NetworkManager, which worked fairly well at switching between wired, and wireless networks. Unfortunately, that seems to be the only GUI tool out there for Linux that supports WPA, and NetworkManager is incompatible with Frugalware. Is it fairly trivial to deal with WPA encrypted networks from the command line? It's sad that so many GUI tools on Linux, such as gtkwifi, WiFi-Radar, and KWifiManager support WEP and unencrypted networks only.
Posted: Fri Sep 15, 2006 4:19 pm
by snarkout
Huh - that's a big fat bummer. What's incompatible about it? Truthfully that's all I've ever used - my home network is the only one I'm ever on that's wpa protected. I used to leave it open and dmz it, but that became an issue when my wife needed to move data over the network from her lappy. IIRC, though, from the early days of wpa_supplicant, there are some pretty basic commands you can use similar to the iwconfig ones.
Posted: Sun Sep 17, 2006 9:53 pm
by Wally Balljacker
Snarkout wrote:Huh - that's a big fat bummer. What's incompatible about it? Truthfully that's all I've ever used - my home network is the only one I'm ever on that's wpa protected. I used to leave it open and dmz it, but that became an issue when my wife needed to move data over the network from her lappy. IIRC, though, from the early days of wpa_supplicant, there are some pretty basic commands you can use similar to the iwconfig ones.
Arrg, I can't get wpa supplicant to connect to my network. I'm using WPA2-Personal on a D-Link 802.11g router, and I had no problems using NetworkManager on Ubuntu with it. When I run "wpa_supplicant -d -c/etc/wpa_supplicant.conf -ieth1 -Dwext", it basically goes into an endless loop partly consisting of this message.
Code: Select all
State: 4WAY_HANDSHAKE -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: SUPP_BE entering state INITIALIZE
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
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_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
RTM_NEWLINK, IFLA_IFNAME: Interface 'eth1' added
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 00:00:00:00:00:00
BSSID 00:00:00:00:00:00 blacklist count incremented to 3
State: DISCONNECTED -> DISCONNECTED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - EAP success=0
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
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_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
State: DISCONNECTED -> SCANNING
Starting AP scan (broadcast SSID)
Authentication with 00:00:00:00:00:00 timed out.
BSSID 00:00:00:00:00:00 blacklist count incremented to 4
State: SCANNING -> DISCONNECTED
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
Starting AP scan (broadcast SSID)
Scan timeout - try to get results
Received 813 bytes of scan results (4 BSSes)
Scan results: 4
Selecting BSS from priority group 0
0: 00:15:e9:69:ab:54 ssid='Linux Network' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
skip - blacklisted
1: 00:13:10:fe:5c:71 ssid='mrhhc' wpa_ie_len=0 rsn_ie_len=0 caps=0x11
skip - no WPA/RSN IE
2: 00:e0:98:e0:e4:ae ssid='05B401972627' wpa_ie_len=0 rsn_ie_len=0 caps=0x1
skip - no WPA/RSN IE
3: 00:e0:98:d6:0d:04 ssid='04B412683302' wpa_ie_len=0 rsn_ie_len=0 caps=0x1
skip - no WPA/RSN IE
No APs found - clear blacklist and try again
Removed BSSID 00:00:00:00:00:00 from blacklist (clear)
Removed BSSID 00:15:e9:69:ab:54 from blacklist (clear)
Selecting BSS from priority group 0
0: 00:15:e9:69:ab:54 ssid='Linux Network' wpa_ie_len=0 rsn_ie_len=22 caps=0x11
selected based on RSN IE
Trying to associate with 00:15:e9:69:ab:54 (SSID='Linux Network' freq=0 MHz)
Cancelling scan request
WPA: clearing own WPA/RSN IE
Automatic auth_alg selection: 0x1
RSN: using IEEE 802.11i/D9.0
WPA: Selected cipher suites: group 16 pairwise 16 key_mgmt 2
WPA: clearing AP WPA IE
WPA: set AP RSN IE - hexdump(len=22): 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 01 00
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: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=Auto
WPA: Sending EAPOL-Key 2/4
RX EAPOL from 00:15:e9:69:ab:54
IEEE 802.1X RX: version=1 type=3 length=95
EAPOL-Key type=2
key_info 0x8a (ver=2 keyidx=0 rsvd=0 Pairwise Ack)
key_length=16 key_data_length=0
replay_counter - hexdump(len=8): 00 00 00 00 00 00 00 03
key_nonce - hexdump(len=32): 2a 9d c7 73 5b a6 9e e6 47 c0 40 04 5a 76 42 86 da 8c 21 60 be d6 97 67 29 98 c4 a3 d3 d9 c0 d3
key_iv - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
key_rsc - hexdump(len=8): 00 00 00 00 00 00 00 00
key_id (reserved) - hexdump(len=8): 00 00 00 00 00 00 00 00
key_mic - hexdump(len=16): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
State: 4WAY_HANDSHAKE -> 4WAY_HANDSHAKE
WPA: RX message 1 of 4-Way Handshake from 00:15:e9:69:ab:54 (ver=2)
RSN: msg 1/4 key data - hexdump(len=0):
WPA: WPA IE for msg 2/4 - 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
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=64): [REMOVED]
WPA: Sending EAPOL-Key 2/4
Posted: Sun Sep 17, 2006 10:30 pm
by Chess
Wally-
I've been using wpa for awhile now, and while it can be a pain to set up, once you get it going, it works great. Here are a couple of ideas you may want to try:
1. I don't know if you have your ssid set to broadcast on the router, but if not, turn it on. Once you get it going, you can turn it off to troubleshoot.
2. Use the "-Bw" switch to tell wpa_supplicant to go into the background and wait until your wireless card is brought back up. My wpa_supplicant command is like this:
Code: Select all
wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0 -D wext -Bw
3. I see you use the -d switch, which is debugging output. Use -dd for more verbosity.
4. Here is my wpa_supplicant.conf file which works fine with my linksys router with ssid broadcast set to off:
Code: Select all
ap_scan=2
network={
ssid="myessid"
scan_ssid=1
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="myencryptionkey"
}
You need the pairwise and group settings if your ssid broadcast is off and you can use TKIP or CCMP/AES, depending on which you are using.
Hopefully, something in there might help.
Posted: Sun Sep 17, 2006 11:00 pm
by Wally Balljacker
Thanks for the advice, but it's still a no go. It seems like I've tried everything to get this working. Sigh.. maybe I should just go back to Ubuntu. I had WPA + NetworkManager working in just a few minutes on Dapper, and Edgy is really shaping up.
Posted: Sun Sep 17, 2006 11:44 pm
by snarkout
possibly dumb question: have you tried turning the firewall off?
Also, have you tried compiling networkmanager? There are pkgbuilds for knetworkmanager, gnome-netowrk-manager and networkmanager in the arch AUR. They can be changed to FrugalBuilds pretty easily from what I've seen.
Posted: Mon Sep 18, 2006 1:06 am
by Wally Balljacker
Snarkout wrote:possibly dumb question: have you tried turning the firewall off?
Also, have you tried compiling networkmanager? There are pkgbuilds for knetworkmanager, gnome-netowrk-manager and networkmanager in the arch AUR. They can be changed to FrugalBuilds pretty easily from what I've seen.
When I tried compiling NetworkManager, it bombed out on the part where it checks for what distro I'm running in /etc/distro-version. I had asked the Frugal developers on IRC what the deal was, and they basically said it is incompatible at this point, and to expect something similar to NetworkManager to be released along with Frugalware 0.6 early next year.
As for the firewall, I still can't get it to connect even with it disabled.
Re: Dealing with WPA on Linux
Posted: Mon Sep 18, 2006 8:28 am
by Gomer_X
Wally Balljacker wrote:For all the people here that are running Linux on their laptops, with a secured home network, how do you go about connecting to it?
I plug one end of the ethernet cable into the PCMCIA ethernet card, then plug the other end into my router.
It works great!

Re: Dealing with WPA on Linux
Posted: Mon Sep 18, 2006 9:00 am
by Tsuroerusu
Gomer_X wrote:Wally Balljacker wrote:For all the people here that are running Linux on their laptops, with a secured home network, how do you go about connecting to it?
I plug one end of the ethernet cable into the PCMCIA ethernet card, then plug the other end into my router.
It works great!

And talk about simplicity, now this is the ultimate plug'n'play solution!

Posted: Mon Sep 18, 2006 9:15 am
by snarkout
Well, the frugalware users must do 99% of their communication through IRC. The forums are dead, as are the mailing lists. I'm amazed, really - it's a nice distro with a whole slew of packages available.
FWIW, I had a similar issue with arch on my lappy - I could never get pcmciautils working correctly and eventually had to give up.
Posted: Mon Sep 18, 2006 9:32 am
by Chess
That is really frustrating. I have had wpa working great on my Dell 700m using Slackware, Arch, and Debian for a couple of years now. However, I was not able to get it working well using the Ubuntu network manager thing, though. Go figure.
One more idea: try recompiling wpa_supplicant from source using your own .config file with only your driver supported. I have had issues with wpa_supplicant binaries from time to time that were solved by recompling. My wpa_supplicant .config file only has this:
Code: Select all
CONFIG_DRIVER_WEXT=y
CONFIG_WIRELESS_EXTENSION=y
CONFIG_EAP_PSK=y
This is with an intel ipw2200 wifi card on my dell 700m connecting to a Linksys wrt54g.
Posted: Mon Sep 18, 2006 9:49 am
by Patrick
Chess wrote:That is really frustrating. I have had wpa working great on my Dell 700m using Slackware, Arch, and Debian for a couple of years now. However, I was not able to get it working well using the Ubuntu network manager thing, though. Go figure.
You know Ubuntu/Kubuntu are great distros overall. I have had issues with their wireless support. My POS laptop uses the wlan_ng driver and have had to compile the drivers myself. The packaged drivers for whatever reason would not work too well for me. I just got my machine back from servicing and Kubuntu was really flaking out with the wireless card. I was starting to get hard lockups when firing up the wireless card. So I went and installed Suse and I have to say it working great. Network Manager is still unusable for me but I blame that on the POS Airvast wireless card. I know how to get it working fairly easily and just coded up a couple scripts to take care of it. I'm sure Troels is ecstastic that I have Suse running on my laptop!

Posted: Mon Sep 18, 2006 12:04 pm
by Tsuroerusu
Patrick wrote:Network Manager is still unusable for me but I blame that on the POS Airvast wireless card.
If you need a good card, this is a good one:
http://www.dlink.com/products/?pid=11
Did I mention that the Madwifi drivers are really easy to install on a certain distro?
(
Code: Select all
sudo /usr/bin/smart channel -y --add SL-10.1-madwifi type=rpm-md name="SUSE Linux 10.1 - Madwifi drivers" baseurl=http://madwifi.org/suse
sudo /usr/bin/smart update
sudo /usr/bin/smart install madwifi madwifi-kmp-default
)
Patrick wrote:I'm sure Troels is ecstastic that I have Suse running on my laptop!

Oh heresy! How could that ever be the case!

Posted: Mon Sep 18, 2006 12:11 pm
by Patrick
Thanks for the recommendation. The POS laptop doesn't have a PCMCIA slot. The crappy airvast card works fine. It just doesn't work with Network Manager. I can live with it.
Posted: Mon Sep 18, 2006 12:45 pm
by Tsuroerusu
Patrick wrote:
Thanks for the recommendation. The POS laptop doesn't have a PCMCIA slot. The crappy airvast card works fine. It just doesn't work with Network Manager. I can live with it.
Now I can really see why you call it a PoS laptop
Anyway, that card I suggested should work 100%, it's record is quite clean at madwifi.org:
http://madwifi.org/wiki/Compatibility#DWLG650
It does use a partly-proprietary driver, be aware of that, but this is the card to tell newbies to buy, it's widely available, not hard to find, can easily be bought on Amazon (
http://www.amazon.com/D-Link-DWL-G650-W ... B00007LTB6) without having to worry about which firmware/version/revision/chipset the card uses, it'll just work if you're willing to accept that some proprietary HAL code gets loaded.