VectorLinux
December 28, 2014, 01:43:01 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Setting up WPA-PSK Encrypted Wireless - SOLVED  (Read 6851 times)
Martin109
Vectorite
***
Posts: 290


« on: August 05, 2008, 04:01:55 pm »

I've made some progress on this, using the Madwifi Wiki.

Having edited /etc/wpa_supplicant.conf with my SSID and 64-byte code string, the commands I've used are:

Code:
ifconfig ath0 up
modprobe wlan_scan_sta
wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant.conf

The output I get from running the last command is:

Code:
Trying to associate with 00:1b:2f:71:09:98 (SSID="NETGEAR" freq=2462 Mhz)
Associated with 00:1b:2f:71:09:98
WPA: Key negotiation completed with 00:1b:2f:71:09:98 [PTK=TKIP GTK=TKIP]
CRTL-EVENT-CONNECTED - Connection to 00:1b:2f:71:09:98 completed (auth) [id=0 is str=]

which seems to indicate success.

However, I can't connect to the internet!

Any ideas?
« Last Edit: August 08, 2008, 02:27:09 pm by Martin109 » Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
nightshift
Member
*
Posts: 22


« Reply #1 on: August 05, 2008, 04:10:11 pm »

Not sure but:
   wpa_supplicant -B -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf

I think ath uses the madwifi driver

Edit:
  check "route -n" as root in terminal without quotes for your gateway, also /etc/resolv.conf (at work and can't confirm this but I think this is where the nameserver ip is.) stuck using OTHER OP. it should have your dns server listed there.
end Edit:

nightshift
« Last Edit: August 05, 2008, 04:14:05 pm by nightshift » Logged
Martin109
Vectorite
***
Posts: 290


« Reply #2 on: August 05, 2008, 04:46:56 pm »

Not sure but:
   wpa_supplicant -B -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf

I think ath uses the madwifi driver

Edit:
  check "route -n" as root in terminal without quotes for your gateway, also /etc/resolv.conf (at work and can't confirm this but I think this is where the nameserver ip is.) stuck using OTHER OP. it should have your dns server listed there.
end Edit:

nightshift



Thanks, nightshift.

Output of route -n (using cable connection at present, so is this valid?) is:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

and /etc/resolv.conf shows:

Code:
# Generated by dhcpcd for interface eth0
nameserver 212.135.1.36
nameserver 195.40.1.36

I got command argument '-Dwext' from instructions on Madwifi Wiki.  Will try your suggestion when it's not 01:39 and I need sleep!

Thanks for help so far.
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #3 on: August 05, 2008, 04:52:51 pm »

did you run dhcpcd after you connected?

Code:
dhcpcd ath0
Logged
nightshift
Member
*
Posts: 22


« Reply #4 on: August 05, 2008, 05:47:04 pm »

Martin109:
     Is your nic a eth0 or a ath0?  Huh Do you have an internal nic card that is hard wired to your computer?  Huh the gateway belongs to eth0! -- ath0 is not in the rouning table, do what uelsk8s said and then re-run the route -n. It should show a ath0 in the routing table. If it does then you will have to straighten out the routing table. To get wireless connection to the internet the gateway has to belong to ath0.
  The nameserver may be the correct one, not sure but if you are connected to a cable modem the nameserver may have come from your ISP. wait a minute # Generated by dhcpcd for interface eth0 again the dns was created by eth0. I am not that familiar with dns and don't know if by eth0 creating it, if it will affect ath0, but I think it won't. You will have to cross that bridge when you get there. Maybe someone with more dns expierence can guide you on this.

nightshift
Logged
caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #5 on: August 05, 2008, 08:36:04 pm »

A couple of notes that may help:

1.  madwifi driver was deprecated beginning with the 2.6.15 kernel.  wext is the correct driver now.

2.  See: http://madwifi.org/wiki/UserDocs/802.11i

    It does have a couple of additional steps you can try.
Logged

eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1
nightshift
Member
*
Posts: 22


« Reply #6 on: August 05, 2008, 08:49:33 pm »

Thanks caitlyn:

A couple of notes that may help:

1.  madwifi driver was deprecated beginning with the 2.6.15 kernel.  wext is the correct driver now.

2.  See: http://madwifi.org/wiki/UserDocs/802.11i

    It does have a couple of additional steps you can try.

Did not know that about the kernel.

nightshift
Logged
Martin109
Vectorite
***
Posts: 290


« Reply #7 on: August 07, 2008, 11:47:49 am »

did you run dhcpcd after you connected?

Code:
dhcpcd ath0


Thanks, uelsk8s.

I've now managed to get WPA_PSK wireless working, but with a couple of hitches.

First, in a terminal, as root, I do the following:

Code:
ifconfig ath0 up
modprobe wlan_scan_sta  (is this line actually necessary?)
wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant.conf

but the terminal hangs, ie I don't get the Vector prompt back.

However, if I start up another terminal, and log on as root again, I can then add the final line:

Code:
dhcpcd ath0

and I can get online.

Occasionally, after the line:

Code:
wpa_supplicant -Dwext -iath0 -c/etc/wpa_supplicant.conf

the terminal will cycle endlessly, trying to associate, but then timing out, and tries again, ad infinitum.

That once got me into trouble, when I thought I'd cracked how to do this, and put the lines into /etc/rc.d/rc.local, and the system behaved as above, and could not complete booting!  I had to re-install! Undecided

Can you give advice on:

a) how to get all commands to sequence without the hanging after calling wpa_supplicant?
b) how to avoid the system not associating with the network and continuously sysling while trying?



Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
newt
Vectorian
****
Posts: 1132



« Reply #8 on: August 07, 2008, 12:42:23 pm »

You should include '-B' (i.e. run the daemon in the background) switch to your command line as suggested by nightshift.  I tend to use '-Bw' which runs the daemon in the background and will wait for the interface to be added to the system rather than just dying if the interface is not found (I recommend this if you're adding the line to rc.local).

HTH!
Logged
caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #9 on: August 07, 2008, 01:17:37 pm »

Newtor beat me to it Smiley

One more note:  if you ever get into a position where a normal boot hangs like that you don't have to reinstall.  You can boot in single user mode.  When lilo comes up hit your Tab key.  You will then be able to enter the lilo line that boots the kernel.  Simply add the word "single" to that line and you'll boot into the console in single user mode with no networking.  You can then make whatever changes you need to make to repair your system.  Entering the command init 4 will then end single user mode and complete a normal boot assuming you boot to the GUI as a desktop.  If not substitue your preferred runlevel for the 4.

The other (alternate) method is to boot to a live CD.  It doesn't matter if it's VL Live or another distro so long as it supports the filesystem you are using.  Then mount your hard drive, fix whatever is broken, and reboot into VL.

One of the nice things about Linux is you rarely if ever have to reinstall because something gets broken.  Heck, you rarely even need to reboot unless you install a new kernel.
Logged

eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1
Martin109
Vectorite
***
Posts: 290


« Reply #10 on: August 08, 2008, 02:26:39 pm »

Thanks everyone - it's now working, and I've been able to automate it by putting the lines into rc.local, including the -Bw argument.
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!