LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 06-12-2007, 11:27 AM   #1
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Rep: Reputation: 30
WiFi Roaming not working


Ok, my wireless connection roaming works ok, with unsecured networks, but when I try to access networks with WEP or WAP security it doesn't work.

I am running Debian Etch and using wpa_supplicant with ifplugd (both updated to the most recent). This is how I have it setup:

/etc/network/interfaces:

Code:
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

#wireless interface
allow-hotplug wlan0
iface wlan0 inet dhcp
#make sure module is loaded
pre-up grep -q ndiswrapper /proc/modules || modprobe ndiswrapper
/etc/default/ifplugd:

Code:
INTERFACES="eth0 wlan0"
HOTPLUG_INTERFACES="eth0"
ARGS="-q -f -u0 -d10 -w -I -b"
SUSPEND_ACTION="stop"
/etc/default/wpasupplicant:

Code:
ENABLED=1
OPTIONS="-w -ddd -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf"
/etc/wpa_supplicant/wpa_supplicant.conf:

Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0

eapol_version=1
ap_scan=2
fast_reauth=1

network={
	ssid="home_net"
	key_mgmt=NONE
	wep_key0=somekey1
	wep_tx_keyidx=0
}

network={
	ssid="default"
	key_mgmt=NONE
}

network={
	ssid="school_lounge"
	key_mgmt=NONE
	wep_key0=somekey2
	wep_tx_keyidx=0
}

network={
	ssid="schoolnet"
	key_mgmt=NONE
}
Now, I can connect automagically (with roaming) to "default" and "schoolnet", but not to the other two. However if I enter the following on the command line manually I can connect to the other two networks just fine:

wpa_supplicant -w -ddd -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf

So how come my roaming to these networks doesn't work automatically? Also, where can I find log outputs for ifplugd and wpa_supplicant? I have looked in /var/log and neither seems to have it's own log file, and neither one seems to write anything useful to /var/log/syslog or /var/log/messages

Thanks!
 
Old 06-13-2007, 07:12 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
I think you might be missing a statement or two from your WEP network definition. Here is an example of one I know works:

Code:
network={
ssid="HomeSSID"
key_mgmt=NONE
auth_alg=SHARED
group=WEP104
wep_key0=HexWEPKey
wep_tx_keyidx=0
priority=5
}
The priority statement isn't important, but I think the group one is as it defines what type of WEP key is being used.
 
Old 06-13-2007, 01:19 PM   #3
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Original Poster
Rep: Reputation: 30
No, it's not my wpa_supplicant conf file, because doing this from the command line works perfectly fine in connecting me to my home network:

wpa_supplicant -w -ddd -i wlan0 -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf

If there was a problem with the conf, that wouldn't work, the problem is in the connection between ifplugd and wpa_suppllicant I believe, I just don't know where and I can't find the appropriate log file output. Any ideas?
 
Old 06-13-2007, 02:37 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
As far as I know, wpa_supplicant complains to the ususal log files you've looked at. The only other place I can think of to look is dmesg.

I don't use ifplugd, so I may be off the mark here, but does wpa_supplicant need to be running in daemon mode for this to work? Try adding the -B flag to the wpa_supplicant startup commands and see if that makes a difference.
 
Old 06-15-2007, 10:53 AM   #5
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Original Poster
Rep: Reputation: 30
Hrm... tried adding that. Still no dice. Turning my laptop on at home, now results in it connecting immediately to a network called "linksys" (apparently one of my neighbours has left their WiFi AP in all default settings).

I can get it to connect to my home network by issuing the command line, which makes it connect immediately to my home network with WEP I still can't figure out why it is connecting to "linksys" rather than "home_net" on boot though...

"linksys" isn't even in my wpa_supplicant conf file!!! but "home_net" is?
 
Old 06-15-2007, 11:27 AM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
I can get it to connect to my home network by issuing the command line, which makes it connect immediately to my home network with WEP I still can't figure out why it is connecting to "linksys" rather than "home_net" on boot though...
The only thing that makes any sense to me (and since I don't use ifplugd, it may be completely off base) is that wpa_supplicant really isn't starting at boot time. Do your log files show any indication that it has or has not?

One thing that might work would be to write a small script that starts wpa_supplicant and then starts ifplugd. If that works, then something is definitely going funny at boot time.

Quote:
"linksys" isn't even in my wpa_supplicant conf file!!! but "home_net" is?
wpa_supplicant will grab open networks, even if you don't have them listed in your .conf file, and apparently it is stumbling into the linksys network and finding it an easier connect.

You might try adding the priority statement to your wpa_supplicant.conf entries (see my earlier post for an example). In theory, the higher the integer in that field, the higher the priority that network has in connecting.
 
Old 06-24-2007, 12:06 PM   #7
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Original Poster
Rep: Reputation: 30
WiFi Roaming not working [SOLVED]

Ok, I figured out the problem, I started looking into whether or not wpa_supplicant was actually running as a system service and found the problem.

In Debian Etch, wpa_supplicant is not installed as a system service, and was therefore not running.

To get it to work properly, I had to follow the instructions in this file:

/usr/share/doc/wpasupplicant/README.modes

That cleared everything up. Now I even get log info in:

/var/log/wpa_action.log

Beautiful. Thanks for all the help.
 
Old 06-25-2007, 07:05 AM   #8
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Great! Congrats on figuring it out and thanks posting the solution. Believe me, you're not the only one who will run into this.
 
Old 07-18-2007, 04:58 PM   #9
pappy_mcfae
Member
 
Registered: Feb 2007
Location: Dallas
Distribution: Gentoo x86 & x86_64
Posts: 190

Rep: Reputation: 31
Post There's a tool for that

Quote:
Ok, my wireless connection roaming works ok, with unsecured networks, but when I try to access networks with WEP or WAP security it doesn't work.
Go to my thread on installing and configuring broadcom adapters. Find the reply titled "For those who are interested...". That will give you some information on a little something that ships with wpa_supplicant, but is undocumented. That little gem is called wpa_gui.

What it does is allow you to scan for and set up secured wireless networks on the fly. While it still hasn't fixed one of my problems (which I will write about unless I find it mentioned here), it does allow you to configure your wireless setup on the fly. Check it out and try it for yourself.

The instructions are there for how to compile and set up wpa_gui. I won't bother reposting them here. Go to my thread and check it out.

Blessed be!
Pappy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Canīt Get My Wifi Working... PETROSHP Linux - Newbie 4 02-20-2007 12:06 PM
Wifi working...but no ip kristersaurusrex Linux - Wireless Networking 5 12-31-2005 05:16 PM
roaming profiles not working?? tasinquefield Linux - Networking 1 12-29-2005 11:11 PM
wifi not working drsketch SUSE / openSUSE 11 11-02-2005 11:55 PM
SAMBA - Roaming profiles not working - Help!! Paulsuk Linux - Software 2 07-31-2005 03:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 01:32 AM.

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