You are not logged in.
Hello everybody,
first of, thanks for the great wiki & forum. I am very new to linux (I've startet with Ubuntu last week) so configuring is something very new to me. Now, on topic:
I am using a Belkin Wireless G USB Network Adapter (F5D7050 / v.4003). The Ubuntu Wiki says that the zd1211rw driver is the correct one. But: if I don't have any encryption set
on my wireless network , I can simply connect using
# iwconfig
# ifconfig wlan0 up
# iwconfig wlan0 essid <myssid>
# dhcpcd wlan0
so it is working, I can browse the web, etc.
But if I re-enable WPA/WPA2 (a mixed network), I cannot connect, neither using the method described above, nor using this:
# ifconfig wlan0 up
# iwconfig wlan0 essid <myssid>
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
If I use the wpa_supplicant method, it gives me the following error:
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='<myssid>' freq=2442 MHz)
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
ioctl[SIOCSIWENCODEEXT]: No such file or directory
Associated with xx:xx:xx:xx:xx:xx
Authentication with xx:xx:xx:xx:xx:xx timed out.
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
ioctl[SIOCSIWENCODEEXT]: No such file or directory
And it goes on and on like that, just reprinting these lines forever until I stop the session. I have also tried ndiswrapper, madwifi, prism54 (and zd1211rw, but it says it doesn't exist), without success.
Here's my wpa_supplicant.conf:
ctrl_interface=DIR=/var/run/wpa_supplicant
ctrl_interface_group=users
network={
ssid="<myssid>"
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
proto=WPA
#psk="verysecretphrase"
psk=xxxxxxxxxxxxxxxxxxxxxxxxxxx
}
And here's (some of) my rc.conf:
INTERFACES=(!eth0 wlan0)
wlan0="dhcp"
interface=(wlan0)
gateway="default gw 192.168.01"
ROUTES=(!gateway)
Now, i don't know whether this is a driver problem (driver I'm using not working with WPA), a config problem (but why can I connect to unencrypted networks, then?) a router problem (I dont think so, because Windows can connect to the encrypted network without problems.), or anything else...
I have also tried netcfg, but according to the wiki it doesn't work without a properly configured wpa_supplicant anyway, so the fact that it isn't working is not surprising.
I have read in a lot of places about this, and many people seem to have wireless problems but none of the sollutions worked. I seem to be missing something crucial, like configurating a file. Could anyone give me a pointer? If you need additional files / outputs, let me know!
Last edited by MrAllan (2008-12-12 19:42:53)
Offline
First off, welcome to the Arch forums.
I had problems initially with wpa_supplicant, as well, but that was awhile ago so I'll try to see if I can give you a little assistance. This is my /etc/wpa_suppicant.conf.
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="ssid_name"
psk=a_bunch_of_numbers_and_letters_with_no_quotation_marks
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
proto=WPA
}
So as you can see, I don't have the ctrl_interface=DIR=...etc, so I don't know if that is your problem. Also, did you create a /var/run/wpa_supplicant directory (this messed me up at first, even though it was mentioned in the wiki)?
I do use netcfg, as well as wifi-radar to let me see what networks are available when I travel. This is my /etc/network.d/wireless profile--if you want to try that.
CONNECTION="wireless"
INTERFACE=wlan0
SCAN="yes"
SECURITY="wpa-config"
ESSID="ssid_name"
KEY=""
IP="static"
IFOPTS="192.168.0.101 netmask 255.255.255.0 broadcast 192.168.0.255"
GATEWAY="192.168.0.1"
TIMEOUT=30
My ip is static but I believe you just have to replace "static" with "dhcp" if you choose that.
Don't know if any of that will help but if you can connect without encryption, wpa is likely your culprit.
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
I use wicd to handle that for me, dhcp+encryption+multiple sites. Works very well and doesn't have many dependencies.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
MrAllan: I think you better take out the hex equivalent of your key also.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
MrAllan: I think you better take out the hex equivalent of your key also.
Yeah, done that for you...
Offline
Thanks for the replies, but I do not have success.
MrAllan: I think you better take out the hex equivalent of your key also.
It's not the right key, @Allan thanks for removing anway, saves people the time converting it back
Using netcfg I now get the following output:
dhcpcd: invalid option -- 'q'
...
-DHCP IP lease attempt failed
I will post the output of the wpa_supplicant later, I'm at school right now, all I know is that it's not working right now.
Offline
If you're trying out netcfg now you should comment out the network portions of your /etc/rc.conf, like so:
INTERFACES=(!eth0 !wlan0)
#wlan0="dhcp"
#interface=(wlan0)
gateway="default gw 192.168.01"
ROUTES=(!gateway)
and add:
NETWORKS=(wireless)
Your wireless--or whatever you call it--network profile will deal with the connection so you don't want /etc/rc.conf competing with it. Actually the second "interface=(wlan0)" shouldn't even be there so I'd delete it to save on future confusion--but that's just me. Hope this gets you a little farther.
Edit: spelling
Last edited by bgc1954 (2008-12-11 14:17:35)
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
All right I changed all my files and here's what I get:
Using
# netcfg wireless
I get this:
:: wireless up - Wireless association failed. [FAIL]
When doing this, I have outcommented my /etc/rc.conf
When using wpa_supplicant I get the same error as described in my first post.
Here's my modificated /etc/rc.conf (only when not using netcfg):
INTERFACES=(wlan0)
wlan0="dhcp"
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
And my wpa_supplicant.conf:
ctrl_interface=DIR=/var/run/wpa_supplicant
ctrl_interface_group=users
eapol_version=2
ap_scan=1
fast_reauth=1
network={
ssid="<myssid>"
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
proto=WPA
#psk="verysecretphrase"
psk=xxxxxxxxxxxxxxxxxxxxxxxxxxx
}
And lastly, my /etc/network.d/wireless:
CONNECTION="wireless"
INTERFACE="wlan0"
DRIVER=zd1211rw #I have no idea whether this actually does anything.
SCAN="yes"
DHCP_TIMEOUT=10
SECURITY="wpa-config"
ESSID="<myssid>"
KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
IP="dhcp"
TIMEOUT=30
Now, I don't know where to start.
Could it be a driver problem with just WPA?
Or is it still a config problem?
Offline
You should use netcfg and netprofiles OR /etc/rc.conf and /etc/wpa_supplicant.conf, not both. Mixing the methods creates a conflict and the wireless card does not function properly. Please choose which system you want (I advice you the former). I think it is a configuration problem.
Reviewing your previous post, you should not assign your card to an essid with iwconfig and then try to run wpa_supplicant. Just use wpa_supplicant, you should see if there are other problems doing:
# iwconfig wlan0 up
# wpa_supplicant -v -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
then check if it associates. If it does, try getting an IP address with
# dhcpcd wlan0
HTH
syntaxerrormmm - Homepage
Offline
Thanks!
Doing what you said still makes me get the same output as above. According to the Ubuntu Wiki, I need the zd1211rw driver. I installed it, but
# wpa_supplicant -Dzd1211rw -iwlan0 -c/etc/wpa_supplicant.conf
doesn't work (it says "Unsupported driver 'zd1211rw' ). The zd1211rw driver is not listed as compatible with wpa_supplicant in the arch wiki.
So where's the problem?
Offline
The zd1211rw driver is not listed as compatible with wpa_supplicant in the arch wiki.
You should simply use the argument "wext" as said in `man wpa_supplicant`:
# wpa_supplicant -v -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
Try it and report back if it associates correctly.
syntaxerrormmm - Homepage
Offline
Here's my wpa_supplicant.conf:
ctrl_interface=DIR=/var/run/wpa_supplicant ctrl_interface_group=users
[..]
ctrl_interface=/var/run/wpa_supplicant [..]
So as you can see, I don't have the ctrl_interface=DIR=...etc, so I don't know if that is your problem.
Nope, that for sure is not the problem as MrAllan's code is more correct than your's. The structure of ctrl_interface has changed quite a while ago. ctrl_interface_group will be ignored even. The new correct line looks like this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=users
(I prefer "wheel" group over users though.)
Offline
When using WPA, should you even configure the wlan interface in /etc/rc.conf anyway ? I am asking this because I am in the process of rewriting the wiki part for wireless management, which is a little confusing with all the encryption methods and the various config ways. It seems to me, that if you need wpa_supplicant for an encrypted association, this should be done after normal association (iwconfig) but before requesting the IP. If one configure wlan0 in /etc/rc.conf, then the wpa_supplicant will not be done between those two steps and the link will fail.
If I summarise the different steps of a manual setup (requiring no config at all in /etc/rc.conf), then we have:
1. Bring up interface, ex: ifconfig wlan0 up
1b. Scan for wireless networks (optional), ex: iwlist wlan0 scan
2. Associate interface with access point ssid, using iwconfig; if using WEP specify encryption key, otherwise (open or WPA) do not specify key
3. If using WPA, use wpa_supplicant to complete encrypted association (need suitable wpa_supplicant.conf)
4. setup IP address normally, either with DHCP (dhcpcd) or manually (static IP with ifconfig)
Am I mistaken here ? Or are there people who have been able to declare their wlan interface in /etc/rc.conf and still use it with wpa_supplicant ?
Last edited by zebulon (2008-12-12 16:12:02)
Offline
Inkaine wrote:
Nope, that for sure is not the problem as MrAllan's code is more correct than your's.
Well, I'll be. They keep changing things and I don't change things until they don't work anymore. My wireless has been working for ages so I never really look at it.
Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz
Offline
2. Associate interface with access point ssid, using iwconfig; if using WEP specify encryption key, otherwise (open or WPA) do not specify key
I've never done this step on WPA wireless LAN, Arch and Debian. Maybe it's only optional, since you can have multiple essid configuration in wpa_supplicant.conf and with this passage you can choose which one to use. Never tried, though.
Thanks, regards
syntaxerrormmm - Homepage
Offline
zebulon wrote:2. Associate interface with access point ssid, using iwconfig; if using WEP specify encryption key, otherwise (open or WPA) do not specify key
I've never done this step on WPA wireless LAN, Arch and Debian. Maybe it's only optional, since you can have multiple essid configuration in wpa_supplicant.conf and with this passage you can choose which one to use. Never tried, though.
Well, if you have several possible access points available (ex. in a public location) and in your wpa_supplicant.conf file, how do you associate your interface to the correct SSID ?
Also, I tried yesterday the method in the wiki (http://wiki.archlinux.org/index.php/WPA_Supplicant), which does use iwconfig to associate first and it seemed to work.
BTW, since you are a WPA man, do you declare your WAP wlan in /etc/rc.conf ? Or do you use a network manager ?
Thanks a lot.
Last edited by zebulon (2008-12-12 16:41:02)
Offline
It seems that according to some Debian doc, wpa_supplicant does not need to be strictly run at the step I mentioned (although what I wrote is correct). Maybe I should experiment more, but your feedback will be helpful
Offline
BTW, since you are a WPA man, do you declare your WAP wlan in /etc/rc.conf ? Or do you use a network manager ?
I'm using netprofiles + netcfg, no wlan interface is described in /etc/rc.conf. I find netprofiles much more simpler (and more flexible) than rc.conf.
Also standard NIC profile is quite tricky to be explicited in rc.conf: I was in a situation where I had eth0 assigned with a static IP (as I wish) but without a cable connected. Leaving out 'network' from DAEMONS array did the trick. I prefer to leave the upping of the interface to ifplugd and load a network profile also for cabled LAN (did so adding 'ifplugd net-profiles' to DAEMONS in rc.conf).
Regarding the usage of wpa_supplicant; when I use it manually, I do that in the way you first said it, so sorry that you have to experiment all by yourself
Thanks, cheers,
syntaxerrormmm - Homepage
Offline
I got it working. It seems that doing
wpa_passphrase <myssid> <mypassphrase>
sometimes just randomly cuts out parts of the PSK (e.g. a PSK like "arch_linux_rocks" gets deformed to "arcux_rocks"). I changed my PSK and now I got wireless.
Here are my working configs:
/etc/rc.conf
INTERFACES=(wlan0)
/etc/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="<myssid>"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
#psk="verysecretphrase"
psk=xxxxxxxxxxxxxxxxxxxxxxxxxxx
}
So yeah, thanks for helping!
Offline
Regarding the usage of wpa_supplicant; when I use it manually, I do that in the way you first said it, so sorry that you have to experiment all by yourself
I have tried this: I use wpa_supplicant directly, without bringing the interface up or setting the ssid, and it worked (followed with dhcpcd). So some other commands are probably redundant. On the other hand, I did not try configuring wlan0 in /etc/rc.conf and/or static IP. Also, there are some wireless interfaces that are more or less "difficult" to setup, that need some quirks (delay between association and ip request, etc...) so I need to find out the lowest denominator for all devices (if that is ever possible).
Last edited by zebulon (2008-12-15 11:16:39)
Offline