LinuxQuestions.org
Register a domain and help support LQ
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 03-02-2007, 07:39 PM   #1
darkangel29
Member
 
Registered: Nov 2004
Location: Puerto Rico
Distribution: Ubuntu 10.04
Posts: 121

Rep: Reputation: 15
how to connect to multiples AP


Ok here my situation next week I will start my new trimester at my college and I have there a few AP I can connect to some open some with wep. My quesion is how can I connect to this AP using wpa_supplicant and choose which one to connect?
This is my wpa_supplicant that currently connect to my home AP that uses wpa:
# /etc/wpa_supplicant/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0

eapol_version=2
ap_scan=1
fast_reauth=1
#eapol_version=1
network={
        ssid="SSID"
        psk="passphrase"
        key_mgmt=WPA-PSK
        pairwise=TKIP
        scan_ssid=1
        priority=5
}


# Final default, will connect to nearly anything
network={
        key_mgmt=NONE
        priority=-9999999
}
And my /etc/conf.d/net:
Code:
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
config_eth0=("dhcp")
modules=(
    "iproute2"
    "dhcpcd"
    "wpa_supplicant"
)

wpa_timeout_wlan0=60
plug_timeout="5"
wpa_supplicant_wlan0="-Dwext -c /etc/wpa_supplicant/wpa_supplicant.conf"
My next question is how to use my usb wlan that i bought and already kind of configure, well i install and loaded the driver. Is a linksys wusb54g version4 with the ralink chipset. I want to make it work with the wpa_supplicant and be able to choose which wlan to use.

Also I try today using the ethernet connection but It didn't work. I guess this have something to do with the wlan but I try ifconfig eth0 up but it didnt help.

Thanks for the help!!!!!!
 
Old 03-03-2007, 06:31 AM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,778
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Your wpa_supplicant.conf file can hold the information for pretty much any number of networks you might connect to. So for each access point you know about, you add another network={} block with the correct information. After that, wpa_supplicant should be able to pick between them automatically.

As for your wusb54 card, post the output of iwconfig and we'll go from there.
 
Old 03-03-2007, 03:15 PM   #3
darkangel29
Member
 
Registered: Nov 2004
Location: Puerto Rico
Distribution: Ubuntu 10.04
Posts: 121

Original Poster
Rep: Reputation: 15
Ok this my ethernet connection works now. This is my iwconfig:
Code:
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11g  ESSID:off/any  
          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated   
          Bit Rate:54 Mb/s   Tx-Power:24 dBm   
          RTS thr:2347 B   Fragment thr:2346 B   
          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

rausb0    RT2500USB WLAN  ESSID:""  
          Mode:Managed  Frequency=2.412 GHz  
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Link Quality=0/100  Signal level:-120 dBm  Noise level:-256 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
Keep in my that rigth now I change my AP to use Wep so I can tested before I go. What is the configuration command that I need to put in the wpa_supplicant.conf in oder to it use wep. Thanks!!
 
Old 03-03-2007, 03:31 PM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,778
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
I was kind of afraid of this....

It looks as if you have two drivers going here, ndiswrapper and an ralink driver. You're probably going to have to choose one or the other as having them both loaded is likely to cause trouble. Have a read through one of the howtos and see if you want to keep using the ralink driver. Personally, I prefer native linux drivers over ndiswrapper, but it is your choice.

Quote:
What is the configuration command that I need to put in the wpa_supplicant.conf in oder to it use wep.
Take a look at my web site (the link is in my signature). I've got an example wpa_supplicant.conf file that has WEP entries in it. Hopefully that will give you the example you need.
 
Old 03-04-2007, 01:49 AM   #5
darkangel29
Member
 
Registered: Nov 2004
Location: Puerto Rico
Distribution: Ubuntu 10.04
Posts: 121

Original Poster
Rep: Reputation: 15
Ok remove the ndiswrapper driver left only the ralink driver. Now I made a copy of the wpa_supplicant.conf file and put in the /etc directory then in the /etc/conf.d/net i added this line wpa_supplicant_rausb0="-Dwext -c /etc/wpa_supplicant.conf" abd erase the line of wlan0, after that I made a symbolic link of net.rausb0 to net.lo just the same configuration I had for the ndiswrapper but it just doesnt work. What Im doing wrong or what do I have to do to make rausb0 use wpa and wep is there is a specific file and command that i need to configure for the ralink driver?
 
Old 03-04-2007, 07:16 AM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,778
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Quote:
after that I made a symbolic link of net.rausb0 to net.lo
Sorry, but I have absolutely no idea what this is supposed to be about. I'm guessing this is a distraction.

Lets try this from the command line and see if we get any errors. Make sure the ralink driver is loaded and you can see it in iwconfig. If you can't, we've got a driver problem.

Next, start up wpa_supplicant from the command line (you'll need to be root):
Code:
wpa_supplicant -Bw -Dwext -c/etc/wpa_supplicant.conf -irausb0
When you've done that, you should see the card configured if you look at the iwconfig output. If the card does associate with your access point, you should be able to request an IP and be good to go.
 
  


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
Installing multiples linux OS pas Linux - Newbie 5 06-02-2005 11:27 PM
Setting nfs wsize to multiples of 1024 on RHAS 2.1 zeezoz Linux - Enterprise 0 01-06-2005 03:02 AM
Split large file into multiples jdozarchuk Linux - Newbie 1 11-04-2004 09:42 AM
encode multiples files with lame kevinlux Linux - Software 4 09-19-2004 11:53 AM
email sending multiples of all messages Michele Linux - Newbie 1 02-19-2001 09:42 AM


All times are GMT -5. The time now is 08:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration