View Full Version : How do I setup wireless connection... SHELL ONLY!!!!
Sunnz
2005-03-04, 09:14 PM CST
I have an wireless adaptor that's being setup on my FC3 box (I think), and I want to connect it to my wireless AP... it is SHELL only so solutions like "system tools - internet configuration wizard - wireless" won't do any good, I need to know how to do it in shell only. I can log on as the root.
james_in_denver
2005-03-04, 10:20 PM CST
First off, and more importantly, what adapter????????????????????????????????
Second off, I don't know of many wireless network adapters that don't require some shell work to install.
If your using Linux, and really want to learn it, learn to love the shell first.
Sunnz
2005-03-05, 03:50 AM CST
http://www.fedoraforum.org/forum/showthread.php?t=45529
It seems like that alot of people are setting up their wireless connection in X Windows, but I want to do it in shell!
And well, if you haven't notice the title say "shell only", I am learning to use shell indeed, and that's why I ask here, because I want to do it in shell, NOT X Windows!
Note that the adaptor should have already being installed, it is just that I don't know how to have it to connect to my LAN.
chili555
2005-03-05, 07:18 AM CST
Here are the steps I took when I got my wireless card going, once I had the card's drivers properly installed. Let us know if it works for you.
Plugged in the card. As root, I then did:
/sbin/iwconfig eth1 up
(The green light on the card came on and stayed on. Sweet!)
/sbin/iwconfig eth1 mode Managed
/sbin/iwlist eth1 scanning
eth1 Scan completed
Cell 01 – Address: 00:99:88:AA:BB:CC <==the mac address of my router
ESSID: “ROUTER1” <==the SSID of my router
and a whole buncha other stuff
Great! The card works and is aware of traffic coming from the outside world!
Created a file with vi (you could use vim, emacs but maybe not a crayon) called /etc/sysconfig/network-scripts/ifcfg-eth1. It says:
DEVICE=eth1
BOOTPROTO=dhcp
ONBOOT=no
TYPE=Wireless
MODE=Managed
USERCTL=yes
KEY=123yourkeyhere456
Save and quit.
Then, as root, do /sbin/ifup eth1
BOOM! Got an IP address, surfing the web. Sweet again.
I have had little luck trying to get the card to start on boot. Therefor, when the machine is booted, I do /sbin/ifup eth1. You will be able to do this as user, because USERCTL=Yes.
Sunnz
2005-03-05, 06:22 PM CST
Well it didn't work quite work for me... so I tried enter iwconfig eth1 and see what happens, it says no such device... so how do I know where is my wireless card installed? How do I know if it is installed? And by the way, it is not a network card for laptop, it goes into a PCI slot on a desktop... if there is a difference.
Thanks.
dickinsd
2005-03-05, 07:02 PM CST
I have an wireless adaptor that's being setup on my FC3 box (I think), and I want to connect it to my wireless AP... it is SHELL only so solutions like "system tools - internet configuration wizard - wireless" won't do any good, I need to know how to do it in shell only. I can log on as the root.
what adapter is it?
I have not used a single wireless network card that relied on the X windows setup in order to work, or to be setup.
you say you think the wireless adapter has been setup, why do you think this, did you install it?
your wireless adapter can appear as any number of names, I would guess that as it is a PCI card, there is a chance that you have no other network device (possibly?) in this case it could be eth0
I have found that the command ifconfig usually lists all of your network devices, try this command, you may get the name of your wireless device and be able to carry out the above mentioned iwconfig commands.
alternatively typing iwconfig may give you the name of your wireless device assuming it has been installed.
I have only installed 2 wireless cards, a PCMCIA and a PCI card, and neither of them required me to use X, I just prefer it.
hope this helps you track down the name of your wireless card.
Dave
Sunnz
2005-03-05, 07:49 PM CST
Well I am not too sure if I setted up my wireless card correctly, my card should be Atheros and I tried to follow through this how-to: http://www.fedoraforum.org/forum/showthread.php?t=43718
I wasn't aware of what YUM is all about, but it seems like that it requires internet access, which I don't have on FC3... so instead ofyum install madwifi-kmdl-2.6.10-1.760_FC3-0.9.4.12-15.rhfc3.at.i686.rpmI instead didrpm -ivh madwifi-kmdl-2.6.10-1.760_FC3-0.9.4.12-15.rhfc3.at.i686.rpm...
Then I reboot, and there was a network configuration screen during the boot... it ask me to setup IP and stuff, but I checked DHCP or something like that and it is just going to get a dynamic IP, which is how it worked on my XP box.
I press OK and it goes back to booting, and it saysbringing up device eth0: Ath1 device doesn't seem to be present at eth0, delaying initialization [failed]That isn't the exact message, I don't have much time remembering it...
I tried ifconfig, it doesn't tell me much, not that I understand what it is about... and for iwconfig:lo no wireless extension
sit0 no wireless extensionDoes that mean the adaptor wasn't installed afterall?
chili555
2005-03-06, 09:33 AM CST
Is the module inserted? Check with /sbin/lsmod. You are looking for ath_pci. If not, you might try, as root; /sbin/modprobe ath_pci, then/sbin/modprobe wlan and /sbin/modprobe ath_hal.
Also, I believe the madwifi driver is going to show up as ath0. In any event, let us know the interfaces listed in /sbin/ifconfig -a. FYI, in my FC2 box, the interfaces listed are eth0 and lo. If yours indeed shows up as ath0, then try; /sbin/iwconfig ath0 up. See if the light comes on.
Let us know.
Sunnz
2005-03-07, 06:12 AM CST
ath_pci is on there when I did lsmod, there are three entries:
ath_pci ............. some number ......... ath_pci
wlan ............ some number .......... ath_pci, ath_rate_onoe
ath_hal .............number ................. ath_pci
Does that mean it is installed? BTW, the "light" was always on on the back... just one of them I think.
chili555
2005-03-07, 09:55 AM CST
OK! We're getting there. Looks like the driver is installed OK.
Now do:
/sbin/ifconfig -a
and let us know the interfaces listed (ath0, sit0 and lo, hopefully). If ath0 is listed, then do:
/sbin/iwconfig ath0 up
and see what happens.
Also, do:
cat /etc/sysconfig/network-scripts/ifcfg-ath0
and let us know what it says.
We're getting closer!
Sunnz
2005-03-08, 02:12 AM CST
/sbin/ifconfig -a has lo and sit0 only, I don't see ath0 or eth0 anywhere...
however,
there is /etc/sysconfig/network-scripts/ifcfg-eth0, but not /etc/sysconfig/network-scripts/ifcfg-ath0.
Anyway, /etc/sysconfig/network-scripts/ifcfg-eth0 has:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
which looks like ifcfg-eth1 that you had, so I tried to edit it to be like it, but still DEVICE=eth0 and a different KEY. I then reboot and try ifup eth0, but it says "ath_pci device eth0 does not seem to be present, delaying initialization...
Anyway, before I did all this, I tried to boot up in "Interactive" mode, there was a prompt: "Start service eth0 (Y/N)", I chose Y and it has this error:
Bringing up interface eth0: ath1_pci device eth0 does not seem to be present, delaying initialization [failed]
chili555
2005-03-08, 08:22 AM CST
Please create a file, with vi, vim or whatever you are comfortable with, called /etc/sysconfig/network-scripts/ifcfg-ath1:
DEVICE=ath1
BOOTPROTO=dhcp
ONBOOT=no
TYPE=Wireless
MODE=Managed
USERCTL=yes
KEY=only include this line if you need to use a WEP key
Then modify /etc/modprobe.conf to add:
alias ath1 ath_pci
Then do:
/sbin/service network restart
What we are looking for is: Bringing up interface ath1: [ OK ]
Then ping -c5 <your router IP address> or your internet service provider, for example:
ping -c5 192.168.0.1
Or:
ping -c5 www.comcast.net
If you can get to your router, you know your wireless card is working correctly. If you can get to your internet service provider, you know everything works correctly!
Let us know.
Sunnz
2005-03-08, 12:43 PM CST
Well it got Bringing up interface ath1: [ OK ] going now!!!
So I tried SSH to my school, but it said cannot lookup DNS or something...
Then I tried ping <rounter IP address>, well I forgot to put -c5... does that matter? Anyway it just say network unavailable...
But, I never get to enter the SSID of the rounter, so I would guess I need to put that somewheret... but I don't know where or which file...
chili555
2005-03-08, 04:28 PM CST
Getting close now!
Add to /etc/sysconfig/network-scripts/ifcfg-ath1
ESSID="ssid of router" <---needs to be in quotes
Then do /sbin/ifup ath1
Then ping -c5 <IP address of router>
The -c5 means for a count of five. Otherwise, ping will continue endlessly, or until you do Ctrl-C.
If you can get to the router, then try ssh. If you can't get to the router, you will never ssh, yum or otherwise to the outside world.
Sunnz
2005-03-09, 06:54 AM CST
Ok I just added the ESSID thing, but when I do /sbin/ifup ath1, it still says Bringing up interface ath1: ath1_pci device ath1 does not seem to be present, delaying initialization [failed]
This is getting really confusing now, is the network card eth0 or ath1? Does the names eth0/ath1 matter? And the light on the card does come on, it is just weird... Kazku(sp) sometime come up, and if I follow it to configure, it resets the /etc/sysconfig/network-scripts/ifcfg-ath1 files which I then go and edit it back to what I had. There is also ifcfg-lo, is lo some device?
Sunnz
2005-03-10, 02:33 AM CST
I did ifconfig -a and iwconfig ath1 up again, ath1 doesn't appear anywhere, but it is indeed in modprobe and modprobe.conf.
chili555
2005-03-11, 06:45 AM CST
I am afraid your manual configuration and kudzu's automatic configuration have worked against themselves. Let's troubleshoot.
First, is this the ONLY network device in the computer? Many computers have an ethernet, that is for a wire, network interface built in. Fedora will usually assign that eth0. If you are sure, very sure that your wireless card is the one and only network interface, then let's assign it ath0. We use athX because the madwifi drivers use athX. If there IS another network interface, i.e. ethernet, we need to leave it as eth0 and our wireless will be ath1. Everything that follows depends on your configuration.
Next, look in /etc/sysconfig/network-scripts/ and see if there is a file ifcfg-eth0. If you are very sure there is no other network interface, very sure, then remove ifcfg-eth0 if it is there.
If ath1 is there, let's rename it ath0. As root, do:
mv /etc/sysconfig/network-scripts/ifcfg-ath1 /etc/sysconfig/network-scripts/ifcfg-ath0
Then modify /etc/sysconfig/network-scripts/ifcfg-ath0 to change it so DEVICE=ath0.
Change /etc/modprobe.conf to remove any references to eth0 and change the line
alias ath1 ath_pci to say alias ath0 ath_pci
Do lsmod to be sure the ath_pci, wlan and ath_hal modules are in place.
Do /sbin/iwconfig ath0 up and see what happens.
Restart the network: /sbin/service network restart
See if ath0 comes up. If it does, do /sbin/ifup ath0. If you get back to a command prompt without seeing those dreaded words, "failed" then you are good. Ping as outlined above.
Finally, the lo device is the loopback that the operating system uses. Please do not touch, ever, unless you want to wreck your box completely.
Sunnz
2005-03-11, 07:39 AM CST
Ok, I have just opened the case and looked at it: there was only two PCI cards: Graphics card and wireless adaptor; the only other ports are just PS/2, parralell ports, usb, etc, that is built into the motherboard. I can't see a ethernet port anywhere. So I guess the wireless card is indeed the only network card it has.
So I took your advice and applied it so that is only has ath0 now, and I found something weird:
If "alias ath0 ath_pci" is indeed in modprobe.conf; then when I do service network restart, it always fails at bringing up device ath0.
But if "alias ath0 ath_pci" is NOT in modprobe.conf; then when I do service network restart, it will do OK at bringing up device ath0; then I would do ifup ath0, but it just goes straight back to prompt; then when I tried ping -c5 192.168.0.1, it saids network unrearchable.
When I do iwconfig ath0 up; it will say: unknown command up.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.