You are not logged in.

#1 2007-11-13 13:52:41

test1000
Member
Registered: 2005-04-03
Posts: 834

How do I connect to the internet over wifi manually?

I upgraded(pacman -Syu) my comp and now the old auto-wifi script won't connect anymore and none of the other auto-everything, netcfg2, wicd, wifi-radar work either. Now auto-tools are great when they work but kind of crap when they don't, so i would like to know how do i connect to the internet manually?

I have a WPA-enabled router/gateway which is connected to the internet and i connect to this over wifi.

I'm thinking something like this(eth0 is my interface):

sudo ifconfig eth0 192.168.0.100

UPDATE: i figured it out and partially 'solved' it:

sudo ifconfig eth0 192.168.0.109
sudo iwconfig eth0 essid examplessid channel 13 key s:exampleWAPkey
# then comment out all but the most simle wap example in wpa_supplicant.conf and edit in the ssid and wap key.
sudo wpa_supplicant -i eth0 -c /etc/wpa_supplicant.conf # perhaps -B too if you want daemon
sudo dhcpcd eth0 -s 192.168.0.109

tada! now i get internet...

This would have been easier if i was taught how to do this from the start so i wouldn't have had to rely on flaky auto-apps. Not that i mind them, it's just that one think this stuff is hard and gets scared when there already exist an autoapp for it... Would be nice to have manual way to do this explained by people who already understand it or made auto-script for it wink

Last edited by test1000 (2007-11-13 18:54:12)


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#2 2007-11-13 16:19:18

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: How do I connect to the internet over wifi manually?

$ man iwconfig
$ man wpa_supplicant
$ man dhcpcd

There you have the documentation you need to get up and running manually.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2007-11-13 18:23:22

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: How do I connect to the internet over wifi manually?

Yeah, you are right of course. The precedent to that however is understanding the terminology used, understanding how networks work and then finally putting it together.

I suppose if it was that easy, we wouldn't have auto-tools, but a manual example would still be nice. I'm putting this in the wiki so that people can add upon it from there if needed.


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#4 2007-11-13 18:56:00

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: How do I connect to the internet over wifi manually?

Well, mostly you have to tell the device what AP you want. You can specify the channel too, but afaik that's optional (because it is set by the AP anyway). Then you run wpa_supplicant to perform the encrypted authentication. After that you obtain an IP (or set one, if on static) and you're good to go.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2007-11-13 20:16:20

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: How do I connect to the internet over wifi manually?

Place your manual statements in /etc/rc.local......


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#6 2007-11-23 16:00:49

test1000
Member
Registered: 2005-04-03
Posts: 834

Re: How do I connect to the internet over wifi manually?

a question first: How would one force the UP flag to come up on ifconfig in most likeliness? What's that linked to specifically? noone probably knows...

this seemed to be the only difference in network setting from the times i was able to connect and the times i wasn't.

i know i said i got this to work but i didn't. the things i did suddenly stopped working and whatever random hackery i tried to do from there on end sometimes enabled me to connect but most often didn't. Even sometimes when i DID manage to connect it was so slow&crashy it wasn't worth using. I'm now running with a cable attached directly to my wifirouter...

Still waiting for that how-to-connect manually howto wink


KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein

Offline

#7 2007-11-23 16:06:59

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How do I connect to the internet over wifi manually?

Add 'man ifconfig' to the list given earlier - it has all the details.

I'd recommend using the Arch network profiles. They are manual i.e. you have to manually create/edit the config, and then manually run the netcfg command. When you're happy with the setup, you can then add the relevant details to /etc/rc.conf to automate it.

And if you would like to help with testing, you could try the new netcfg version from the testing repo.

Offline

#8 2007-11-23 16:11:08

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: How do I connect to the internet over wifi manually?

test1000 wrote:

a question first: How would one force the UP flag to come up on ifconfig in most likeliness? What's that linked to specifically? noone probably knows...

What do you mean by come up on ifconfig in most likeliness?

Also, I suggest having a look at the Wireless Setup wiki, specifically the section on Arch-based non-roaming wireless:

http://wiki.archlinux.org/index.php/Wir … Management

Using this method you could simply restart the 'network' daemon any time your wifi connection drops.

Last edited by thayer (2007-11-23 16:18:01)


thayer williams ~ cinderwick.ca

Offline

#9 2007-12-03 07:41:30

johnvoisey
Member
Registered: 2006-11-04
Posts: 28

Re: How do I connect to the internet over wifi manually?

lilsirecho wrote:

Place your manual statements in /etc/rc.local......

This did not work for me.

I recently posted a thread requesting assistance for a similar issue (but I use wep not wpa).  An answer in that thread suggested I try the netcfg in the testing repository and I am mid way through that, but I feel your (outwardly very sensible) suggestion required a response.

In brief: I have a zydas zd1211 based usb stick that connected automatically when I had a 0.7.2 system but stopped working altogether after a pacman update pushed my system to 0.8. Nothing would make it conenct after that so I abandoned wireless on this machine altogether. I thought I'd start again with the 'Dont Panic' ISO.

I was VERY pleased to see on first boot my dmesg output showed the zydas chip had been detected as eth0 (I have disabled the wired lan socket on this motherboard in the bios, so the usb stick IS the only ethernet port. So far, so good.

I set up my rc.conf and /etc.conf.d wireless as per the wiki, declaring mode managed essid MySSID key WHAT-EVER-ZZ and sat back.

Reboot brought dismay as the network script showed 'eth0 timed out', iwconfig showed the SSID and KEY were set but AP was invalid and ifconfig showed my eth0 was using a 169.154.x.x address. /var/log/everything.log confirmed dhcpcd was struggling manfully to fetch an ip address and failing.

I found that if I then ran a further MANUAL" iwconfig essid MY_ESSID key WHAT-EVER-ZZ" The AP would be set up and the dhcp process which was STILL running in the background WOULD then get an IP from the router and finish the job for me. I could see this happen with a tail -f /var/log/everything.log

One of the first things I tried was to comment out all the wireless and eth0 config stuff, bring the system up with just lo enabled and then run the following commands manually at an xterm

        ifconfig eth0 up
        iwconfig eth0 mode managed essid MYSSID key WHAT-EVER-ZZ
        dhcpcd eth0

When I realised this WORKED I wrote up the whole thing as a set of commands in /etc/rc.local. I am guessing - and it is just a guess - that the scripted command does not wait long enough for the iwconfig to finish BECAUSE ... that failed miserably. We were back with the iwconfig step setting the SSID and key but not getting an AP.

As I mentioned above, I'm currently working on looking at using the netcfg stuff in the testing repo but i felt I should post here that I too had expected your very sensible suggestion of trying to script the commands in /etc/rc.local might solve my problem, but when I tried it I found it did not work for me.

regards johnvoisey

Last edited by johnvoisey (2007-12-03 07:42:55)

Offline

Board footer

Powered by FluxBB