LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-11-2009, 01:47 AM   #1
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
how do I switch between a pci and usb wifi adpters


the built in pci wifi is a G type my router is an N type that I would like to use at full speed
the usb wifi is an N type

I have the PCI wifi card working
I have the USB wifi card showing up in ifconfig ( this is nas far as I have
gotten so far with it
I think I need a script like /etc/rc.d/rc.inet1 that tacks one card down
and brings up the other one maybe even 2 scripts one for each card I want to use
could I add it to /etc/rc.d/rc.inet1.conf
like so
IFNAME[5]="ath0"
IPADDR[5]=""
NETMASK[5]=""
USE_DHCP[5]="yes"
 
Old 12-11-2009, 03:57 PM   #2
jiobo
Member
 
Registered: Nov 2008
Posts: 180

Rep: Reputation: 36
Take a look at iwconfig too.

Code:
man iwconfig
There should be two names for the wifi cards, probably wlan0 and wlan1. You can take a look at the output of ifconfig to see which ones are enabled by default on your system.

Code:
man ifconfig
You can edit the rc scripts to adjust what the default behaviour is. If both are running, and you open a web browser, you could need to configure the web browser to use a particular wifi card.
 
Old 12-11-2009, 05:08 PM   #3
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Once you've used iwconfig to configure all network settings, such as essid/key/ap just:
$ killall dhcpcd && dhcpcd INTERFACE
 
Old 12-11-2009, 07:16 PM   #4
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Original Poster
Rep: Reputation: 205Reputation: 205Reputation: 205
I added the lines from my first post to /etc/rc.d/rc.inet1.conf so that /etc/rc.d/rc.inet1 configures both of them
then I use Wcid to switch between the 2 of them I manually set the interface in the preferences ath0 (usb ) wlan0 (pci)
just a slight delay at boot time while both wifi cards grab an IP address

BTW I used wiconfig to get the ath0 name for the usb wifi adapter
 
Old 12-12-2009, 06:40 AM   #5
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
Are you sure they're grabbing IP addresses at boot time? Maybe just looking for APs? Notice if you try to run dhcpcd again while it's already running, it will let you know there's a problem. I don't think it's designed to allow you to grab two IP addresses at once.
 
Old 12-12-2009, 02:55 PM   #6
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
You can also use commands like this.

/etc/rc.d/rc.inet1 ath0_stop
/etc/rc.d/rc.inet1 wlan0_start
/etc/rc.d/rc.inet1 wlan0_restart

I don't remember if you can put multiple options on each command. This might work.

/etc/rc.d/rc.inet1 ath0_stop wlan0_start
 
Old 12-14-2009, 12:50 AM   #7
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Original Poster
Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by voyciz View Post
Are you sure they're grabbing IP addresses at boot time? Maybe just looking for APs? Notice if you try to run dhcpcd again while it's already running, it will let you know there's a problem. I don't think it's designed to allow you to grab two IP addresses at once.
ifconfig shows IP addresses for both cards

it's not the computer that gets the IP address it's the network interface that gets the address


the only problem I have had is when the usb card is unpluged the pluged back in I get a phcpd already running with PID number xxxxxx on device ath0
so I kill the PID number then rerun /etc/rc.d/rc.inet1 and the usb card comes right back up
 
Old 12-14-2009, 12:54 AM   #8
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Original Poster
Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by Erik_FL View Post
You can also use commands like this.

/etc/rc.d/rc.inet1 ath0_stop
/etc/rc.d/rc.inet1 wlan0_start
/etc/rc.d/rc.inet1 wlan0_restart

I don't remember if you can put multiple options on each command. This might work.

/etc/rc.d/rc.inet1 ath0_stop wlan0_start
Wicd dose the same thing by typing wlan0 or ath0 as the interface in the preferences
 
  


Reply



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
PCI WiFi wg5o Linux - Hardware 5 12-05-2007 12:05 PM
Best WiFi PCI (or else) card in general for Linux and WiFi network experimentation? ICEMANII Linux - Wireless Networking 2 09-21-2006 04:50 PM
What WiFi adapter USB/PCI works with Fedora? cormacr Fedora 2 01-29-2004 02:07 PM
Mandrake 9.1, Conexant Accessrunner PCI ASDL modem, AC97 Sound and USB Wifi too mr crow Linux - Hardware 5 06-05-2003 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:15 PM.

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