View previous topic :: View next topic |
Author |
Message |
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Mon Jul 04, 2011 2:32 pm Post subject: Wireless and WPA configuration? |
|
|
Decided to start a new thread with the remaining wireless problem, since it is more of a configuration than an installation problem.
Machine is as before an ASUS eeePC 1008HA
The one I've got is an ASUS 1008HA with approx specs:
processor, chipset and probably graphics: Intel Atom N280
RAM: 1GB DDR2
HDD: 160GB 2.5" SATA II
I/O: 2 x USB2
LAN 02:00.0 Ethernet controller: Atheros Communications AR8132 Fast Ethernet (rev c0)
WLAN 01:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
My wireless network runs from a router that not serve as a DHCP-server.
Authentication through WPA-PSK (TKIP) + WPA2-PSK (AES). Have no problems with no Windows nor Debian connecting through wireless with WPA.
-As I mentioned, I intended to consult a friend who is much more experirienced with Slackware, so I did. He now has installed SMS on a somewhat bigger 64-bit laptop that he normally uses, and normally has no problem with wifi. He tred the same setup as I (permanent IP, router not as DHCP-server and WPA-authentication). -He could not get the wireless work in SMS, neither with wpa_supplicant, nor wicd.
As you gerasimos, answered in my installation post Quote: | "KDE-3.5.x had a weak point with WPA authentication, you can try wpa_supplicant GUI, it's available, or you can install wicd and give it a try." |
I haven't installed wicd yet, wanted to try out wpa_supplicant first.
I could not get the wpa_supplicant GUI working? In KDE-menu I found an icon named "wpa_gui", I guess it is the supplicant gui? No answer.
Tried to run wpa_gui in terminal:
Code: | # wpa_gui
wpa_gui: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory |
Therefore my friend and I tried to configure the wlan- and wpa_supplicant interfaces in text, i e through
/etc/rc.d/rcinet1.conf and /etc/wpa_supplicant.conf.
I wonder I you could take a look at the attached combined conf-files and see if you have got any suggestions?
Best regards
Lars
PS. I have not looked into your suggestion http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network#wireless_configuration_in_rc.inet1.conf. YET! DS.
Description: |
|
Download |
Filename: |
rc.inet1.conf_and_wpa_suppl.conf.txt |
Filesize: |
4.58 KB |
Downloaded: |
1614 Time(s) |
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Jul 04, 2011 5:38 pm Post subject: |
|
|
Code: | # wpa_gui
wpa_gui: error while loading shared libraries: libQtGui.so.4: cannot open shared object file: No such file or directory |
That's from slackware and it's compile for KDE 4 as it seems, Sorry, SMS top priority ain't KDE and we keep kde-3.5 for managing basic stuff,and we don't want KDE-4 for now.
Your configs look OK! but you can try
Code: | network={
scan_ssid=1
ssid="NNNNN"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="*****"
} |
And try to connect with
Code: | wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf |
If not, what's the output of "ifconfig"?
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Mon Jul 04, 2011 8:12 pm Post subject: |
|
|
You were right from the beginning!
Quote: | Your configs look OK! but you can try |
The configs were allright, finally found a way to create the encrypted psk for WPA/WPA2
Code: | # wpa_passphrase YOURESSID YOURPASSPHRASE |
in your erlier suggestion, which I read as a whole:
http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network#wireless_configuration_in_rc.inet1.conf
But! I never knew I had to connect to the WPA-wifi though your suggested command!
Code: | # wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf |
Is it so? Do I have to connect that way every session? Or can I configure wpa_supplicant to startup at boot and run in the background?
Best regards
Lars
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Jul 04, 2011 8:32 pm Post subject: |
|
|
So does it work now? Are you connected?
Lars wrote: | Is it so? Do I have to connect that way every session? Or can I configure wpa_supplicant to startup at boot and run in the background? |
If you configure it right, then rc.inet1 will call rc.wireless and will connect automatically.
If it is not, then add line
Code: | wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf |
in /etc/rc.d/rc.local
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Mon Jul 04, 2011 10:39 pm Post subject: |
|
|
Yes, with
Code: | wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf | running in the terminal I am connected, can ping out and access my other machines and inet.
There seem to be some problem with rc.inet1 starting rc.wireless, though it's executable??
I will have to look in to that, but tomorrow.
You have been very helpful, I must say
Regards
Lars
|
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Tue Jul 05, 2011 4:14 pm Post subject: |
|
|
Sorry, no
there seems to be no way for me to start wpa_supplicant(?), i e the wireless connection, through
Quote: | /etc/rc.d/rc.inet1 wlan0_start |
I've tried some very stripped configuration files my friend sent me, adapted to my network, I've tried the debugging from http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network#wireless_configuration_in_rc.inet1.conf
Among those:
DEBUG_ETH_UP="yes" in /etc/rc.d/rc.inet1.conf
/etc/rc.d/rc.inet1 wlan0_start gave in short in /var/log/messages:
Code: | Jul 5 13:12:22 eserver logger: /etc/rc.d/rc.inet1: List of interfaces: 'eth0 eth1 eth2 eth3 wlan0 eth5'
.............
Jul 5 13:12:22 eserver logger: /etc/rc.d/rc.inet1: /sbin/ifconfig lo 127.0.0.1
Jul 5 13:12:22 eserver logger: /etc/rc.d/rc.inet1: /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
...........................
Jul 5 13:12:23 eserver logger: /etc/rc.d/rc.inet1: /sbin/ifconfig wlan0 192.168.0.11 broadcast 192.168.0.255 netmask 255.255.255.0
Jul 5 13:12:23 eserver kernel: [ 1694.428731] ADDRCONF(NETDEV_UP): wlan0: link is not ready
..................................
Jul 5 13:12:23 eserver logger: /etc/rc.d/rc.inet1: /sbin/route add default gw 192.168.0.1 metric 1 |
and finally
WLAN_WPAWAIT[4]=60
without success
The suggested debugging gave results that I cannot interpret, seems that most of the tests finally succeeded (connected), but on the other hand the subject for debugging was the wpa_supplicant only, not the connection through /etc/rc.d/rc.inet1<->/etc/rc.d/rc.wireless<-> wpa_supplicant?
Best regards
Lars
|
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Tue Jul 05, 2011 5:49 pm Post subject: |
|
|
PS.
The suggestion
Quote: | If you configure it right, then rc.inet1 will call rc.wireless and will connect automatically.
If it is not, then add line
Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
in /etc/rc.d/rc.local |
made the bootup never reach login:
I could have figured it out myself since that is exactly the way it behaves
in Terminal [a process, continuously running with subsequent reKeying]
Seems no way to get the wireless really working on the eeePC? Hadn't it been simple in Windows XP/7 and Debian 5 though...
DS.
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Jul 05, 2011 7:15 pm Post subject: |
|
|
[quote"Lars"]Hadn't it been simple in Windows XP/7 and Debian 5 though...[/quote]
You had problems with windows too?
Anyway if with wpa_supplicant it's working we will figure a way..
Can you post the output of "ifconfig" and "iwconfig"?
Looking at your debug
ADDRCONF(NETDEV_UP): wlan0: link is not ready
It seems that your wlan0 isn't there when running rc.inet1.
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Tue Jul 05, 2011 9:13 pm Post subject: |
|
|
Quote: | You had problems with windows too? |
I knew I expressed myself hazy
No problems with Win or Debian 5.
Quote: | Anyway if with wpa_supplicant it's working we will figure a way..
Can you post the output of "ifconfig" and "iwconfig"? |
Absolutely! In what state? With rc.inet1 up or down? -With wpa_supplicant running in the background or not?
Quote: | Looking at your debug
ADDRCONF(NETDEV_UP): wlan0: link is not ready
It seems that your wlan0 isn't there when running rc.inet1. |
-I thought it was remarkable? That's why I wanted to show you that line. I myself cannot interpret it though?
Best regards
Lars
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Jul 05, 2011 9:56 pm Post subject: |
|
|
Post ifconfig, after you login at first boot.
Try to create a script and call it /etc/rc.d/rc.wpa
Code: | #!/bin/sh
ifconfig wlan0 down
wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
/etc/rc.d/rc.inet1 wlan0_start |
make it executable with
chmod +x /etc/rc.d/rc.wpa
and place an entry in /etc/rc.d/ rc.local
/etc/rc.d/rc.wpa
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Tue Jul 05, 2011 10:26 pm Post subject: |
|
|
ifconfig and iwconfig after boot as an attached textfile.
By Quote: | and place an entry in /etc/rc.d/rc.local
/etc/rc.d/rc.wpa |
do you mean just place a line
in /etc/rc.d/rc.local?
Regards
Lars
Description: |
|
Download |
Filename: |
if- and iwconfig.txt |
Filesize: |
1.16 KB |
Downloaded: |
1447 Time(s) |
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Jul 05, 2011 10:43 pm Post subject: |
|
|
Lars wrote: | do you mean just place a line
/etc/rc.d/rc.wpa
in /etc/rc.d/rc.local?
|
Yes, so it start at boot. Try it, and if doesn't work try to disable the card after wpa_supplicant , by editing /etc/rc.d/rc.wpa as
Code: | #!/bin/sh
wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
sleep 9
ifconfig wlan0 down
/etc/rc.d/rc.inet1 wlan0_start |
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Wed Jul 06, 2011 10:01 am Post subject: |
|
|
I have never written a script! Are you shure there are no lines missing? Som "entrances" or "exits"?
Made the script executable, but it is not possible to run: "/bin/sh: Bad interpreter: No such file or directory"
|
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed Jul 06, 2011 2:33 pm Post subject: |
|
|
The script is OK! but w need to be capital...
Something went wrong when you copy/paste it probably.
I attach it.
gerasimos_h
Description: |
|
Download |
Filename: |
rc.wpa.zip |
Filesize: |
265 Bytes |
Downloaded: |
1690 Time(s) |
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
Lars Senior Member
Joined: 25 Oct 2010 Posts: 136
|
Posted: Wed Jul 06, 2011 8:16 pm Post subject: Solved! |
|
|
Hi gerasimos!
In short, I tried both your first and second script. (the error in my first was, beside the W, I had left out the slash in # !/bin/sh )
First I had to change the line "ifconfig wlan0 down" to "/etc/rc.d/rc.inet1 wlan0_stop" because of a bootmsg: " Code: | line 2(/4 respectively) ifconfig: command not found. | The it ran smoothly during boot.
But no connection with the wireless network after boot. Neither with your first nor your second script. Trying to restart rc.inet1 had no effect on the connection.
But when I tried to start wpa_supplicant manually (like before) I got a long protesting message that told me a wpa_supplicant process were already running! I. e. your script obviously had set the wpa_supplicant running in the background but without ability to establish the encrypted connection?
gave:
Code: | 2398 ? Ss 0:00 wpa_supplicant -BW -Dwext -iwlan
# kill 2398
# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf |
now starts and immediately establishes contact.
I wonder if it is not time to give this up!? 3 days to get a wireless interface up, without success is not reasonable? But indeed you have been extremely helpful!
....but wait...
Your suggestion to put the example startupcommand from wpa_supplicant in /etc/rc.d/rc.local blocked the boot (and obviously got the process running)
Therefore your idea to put a Background startup script in /etc/rc.d/ was good! It obviously got the wpa_supplicant process running in the background running, but still not competent to negotiate a WPA-PSK connection with my router? -Could it be something wrong with the WAY it was running?
-The only difference from the working example-command were the -BW-flags? Could it be the Wait or the Background or both?
Decided to try it in your suggested way: A startup script that was initiated from /etc/rc.d/rc.local. -The worst that could happen were a boot-hangup like before.
Tried your first, shorter script, but excluded W (Wait).
Code: | #! /bin/sh
# /etc/rc.d/rc.wpa
# local script to get wpa_supplicant and wlan0 working. gerasimos_h & Lars
# ifconfig wlan0 down
# bootmsg: line 2 ifconfig: command not found, changed it to:
/etc/rc.d/rc.inet1 wlan0_stop
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
/etc/rc.d/rc.inet1 wlan0_start |
What do you know? It worked!
The WPA-PSK-connection established immediately after boot!
Thank you very much for your patience and all your help!
My best regards
Lars
|
|
Back to top |
|
|