You are not logged in.

#1 2010-03-26 18:40:58

Viriato
Member
Registered: 2010-03-09
Posts: 4

Wifi not working if encrypted

A couple of weeks ago I posted a message about a problem with an "ad hoc" network. The problem persists but I've noticed something I wasn't aware of before.

My problem, in short:
I have two computers, A runs Debian, B, Arch.
A is connected to a cable modem to Internet and works as the gateway for B via wifi in an "ad hoc" network.
This ad hoc network was working for more than 3 years, when both computers had Debian.
A couple of weeks ago I decided to try Arch in the machine B. I dowloaded the FTP installtion image and put it on a USB stick. I booted with this stick and I could configure my ad hoc network and continue the installation from the repositories. No problems so far.
When I completed the installation, restarted the computer and booted from my new Arch system in my hard disk, the same network connection failed miserably.
Both machines seem to associate, but there's no data transmission, not even responses to pings sent from each other:

PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
From 192.168.0.2 icmp_seq=2 Destination Host Unreachable
From 192.168.0.2 icmp_seq=3 Destination Host Unreachable
etc.

ifconfig, route and iwconfig outputs seem correct.

The news:
Some days ago I noticed that if I established the network without encryption it worked, although rather irregularly: begins being relatively fast but as time passes it becomes slower, a lot slower (from around 200 KB/s drops to 25 - 30 in 2-3 hours). It doesn't worry me now, since wht I want is, obviously, to encrypt my connection; if once encrypted the speed problem persists then will be time to investigate.

So, I know that at least my network configuration works, what I can't figure out is what may be the problem with encryption. The problematic machine has had kernel 2.6.32 and now it has 2.6.33 (the problem happens with both); wifi driver is iwl3945 15.32.2.9-2 and wireless_tools version is 29-3.
I have disabled the network daemon in rc.conf and commented all the "Networking" section except the machine's name to start my network from command line with:

iwconfig wlan0 mode ad-hoc channel 8
ifconfig wlan0 192.168.0.2
iwconfig wlan0 essid "MY_SSID"
route add default gw 192.168.0.1

When I try WEP encryption I run:

iwconfig wlan0 mode ad-hoc channel 8
ifconfig wlan0 192.168.0.2
iwconfig wlan0 essid "MY_SSID" key s:MY-WEP-KEY
route add default gw 192.168.0.1

I've tried also WPA, with the same results: association but no transmission. Anyway, for now I don't want to complicate things, so I'll stick to WEP.

Here my rc.conf. To make it shorter I'm not posting all the descriptions and such in the file:

#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
LOCALE="es_ES.UTF-8"
HARDWARECLOCK="UTC"
TIMEZONE="Europe/Madrid"
KEYMAP="es-cp850"
CONSOLEFONT="default8x16"
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(!pcspkr acpi-cpufreq cpufreq_ondemand cpufreq_powersave)
# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
HOSTNAME="myhost"

#eth0="dhcp"
#INTERFACES=(eth0)
#INTERFACES=(wlan0)

#gateway="default gw 192.168.0.1"
#ROUTES=(!gateway)

#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
DAEMONS=(syslog-ng hal dbus iptables !network !netfs crond cpufreq kdm)

I've tried several combinations in rc.conf, I even copied the rc.conf and the "network" script from the USB stick system to mu HD one with the same result (I obviously restored the fromer ones, after doing the tests). I've tried also networkmanager and Wicd, nada. Tried disabling Iptables, but as I expected nothing changed, if it allows traffic when transmission is unencrypted wouldn't make sense Iptables blocked it when encrypted. I wanted to try with the same kernel in the installation image (2.6.30) but being Arch a rolling release distro I don't know where to find old kernels, and not too sure if it would be any helpful.

I think I'm missing something, maybe there's some configuration needed for encryption management? I didn't read nothing like that in the wiki. Any hint is very welcome.

Thanks and regards

Last edited by Viriato (2010-03-26 18:41:43)

Offline

#2 2010-03-29 12:35:58

donallen
Member
Registered: 2009-11-30
Posts: 23

Re: Wifi not working if encrypted

I am not going to attempt to debug your specific problem (for starters, I have no direct experience with WEP -- I have always used WPA), but I can tell you that getting WPA-encrypted wireless working is tricky, setting it up manually. The documentation is barely sufficient, especially weak in the area of what you need in rc.conf, to go with the explicit commands in rc.local. I would suggest instead that you give netcfg a try. Again, the documentation is underwhelming, but the example scripts are well-debugged and you may find that they work in your situation. i think it's worth a try.

/Don

Offline

#3 2010-03-29 13:08:57

davidgurvich
Member
Registered: 2010-02-11
Posts: 118

Re: Wifi not working if encrypted

Try setting everything up with wicd.  That bypasses the arch network scripts by using wicd to configure your interfaces and connections.  The arch network scripts did not work well for wireless, failing  to start properly during boot and manually afterwards.   

Disabling the network scripts and manually configuring everything did work, showing that the hardware and drivers were properly installed.

Recent updates may or may not have dealt with the issue but I've been pleased with the way wicd works and haven't tested whether the network scripts are fixed.

Last edited by davidgurvich (2010-03-29 13:10:49)

Offline

#4 2010-03-30 18:44:34

Viriato
Member
Registered: 2010-03-09
Posts: 4

Re: Wifi not working if encrypted

donallen wrote:

getting WPA-encrypted wireless working is tricky

I know, that's why I first want to solve my problem with WEP, and then I'll continue fighting with WPA

donallen wrote:

I would suggest instead that you give netcfg a try. Again, the documentation is underwhelming, but the example scripts are well-debugged and you may find that they work in your situation. i think it's worth a try.

Thanks, Don, I followed your suggestion, but it didn't work :-/. Using WPA I get exactly the same results than trying manually from command line: association ok but "Destination Host Unreachable".
The weird thing is when using WEP; I get this message:

 > WPA Authentication/Association Failed

WPA? o_O I don't understand where does that come from, my config file is very clear:

CONNECTION='wireless'
DESCRIPTION='A simple WEP encrypted wireless connection'
INTERFACE='wlan0'
SECURITY='wep'
ESSID='My_ESSID'
KEY='s:Password'
IP='static'
ADDR='192.168.0.2'
GATEWAY='192.68.0.1'
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc channel 8"
DNS=('62.37.228.20')

But the mother of all weirdnesses happens when trying to associate without any encription at all. I made a netcfg configuration file like this:

CONNECTION='wireless'
DESCRIPTION='A simple opened wireless connection'
INTERFACE='wlan0'
SECURITY='none'
ESSID='My_ESSID'
IP='static'
ADDR='192.168.0.2'
GATEWAY='192.168.0.1'
PRE_UP="ifconfig wlan0 down; iwconfig wlan0 mode ad-hoc; iwconfig wlan0 channel 8"
DNS=('62.37.228.20')

but I get the same "WPA Authentication/Association Failed" message.


davidgurvich wrote:

Try setting everything up with wicd.  That bypasses the arch network scripts by using wicd to configure your interfaces and connections.

I tried wicd and it failed as well, with several and diverse errors (like insisting that my WPA password was WEP), also networkmanager. Anyway I dont like that kind of tools because I don't know what are they really doing, I don't like network daemons for the same reason, that's why I prefer to disable everything and write simple scrips which deal directly with modules and drivers.
Thanks for trying to help anyways, David.

davidgurvich wrote:

The arch network scripts did not work well for wireless

The weird thing is that I dont have any problem if I'm on the basic system the installation image loads, otherwise, I'd think Arch simply doesn't like my computer and would not try it.

I've noticed something else: even if connecting unencrypted from console with iwconfig works, I can just connect once; if I disconnect or reboot the Arch machine (I don't even touch the Debian machine) it's impossible to reconnect, I have to restart the network on the Debian computer and then connect normally. But if instead rebooting the Arch computer normally, from its hard drive, I reboot it from the USB stick with the Arch installation image there's no problem at all and I can connect flawlessly without need to restart the network in the Debian machine.
I can't imagine what's wrong with this installation, I have even formatted and reinstalled the whole system; I suppose it comes from the encryption stuff side, but I'm totally lost.

Last edited by Viriato (2010-03-30 18:47:06)

Offline

#5 2010-04-13 04:03:58

nitroguy
Member
Registered: 2009-10-16
Posts: 16

Re: Wifi not working if encrypted

I think I may be having the same problem as you.  I finally debugged my annoying wireless connection issues to WPA2 (forget it) WEP (sometimes) UNSECURED (flawless).  This is a recent bug introduced who-knows-when but I can't seem to find a good workaround (wicd even allows several dhcp clients, all which fail -- as well as static ip config).  I've used wpa_supplicant manually and wasted several hours running in circles.

I don't know how to debug this further.  I have loved arch linux for almost 6 months now but this is about to be a show-stopper.  This issue has persisted for weeks now.

Offline

#6 2010-04-13 06:42:43

nitroguy
Member
Registered: 2009-10-16
Posts: 16

Re: Wifi not working if encrypted

Just to confirm again that my wireless connection works fine in WEP.  Seems to be a bug in wpa_supplicant v0.6.10 or something.  It will associate with APs using WPA2-PSK but future ip packets are not received on AP of the WLAN.  If AP is using WEP it seems to work okay at the moment.

Offline

Board footer

Powered by FluxBB