LinuxQuestions.org
Register a domain and help support LQ
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 11-23-2012, 02:38 PM   #1
michijo
Member
 
Registered: Apr 2011
Posts: 162

Rep: Reputation: 0
Slackware on Toshiba Laptop, No WIFI Scanning Ability


I just installed Slackware on my laptop, and only installed XFCE4 without KDE. Now, when I tried to use wpa_gui, it claims "cannot get status from wpa supplicant". This error doesnt bother me, but the inability to scan for wifi hotspots is troublesome. Since I didnt install KDE, it is saying I dont have kdesu. I assume this is a GUI that asks for a root password when starting root programs. So I run wpa gui either from su, or I have it set to run automatically when I startx.
 
Old 11-23-2012, 02:54 PM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,971

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Hi,

you can do it in a terminal. As root execute
Code:
ifconfig wlan0 up
iwlist wlan0 scan
this should show you the wifi hotspots (and shows that wifi is working on your laptop).

Markus
 
Old 11-23-2012, 03:12 PM   #3
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by markush View Post
Hi,

you can do it in a terminal. As root execute
Code:
ifconfig wlan0 up
iwlist wlan0 scan
this should show you the wifi hotspots (and shows that wifi is working on your laptop).

Markus
Iwlist is annoying in that it only works under root. I made a symlink to my user bin folder and now run it under a normal user. Yes, that works well enough. I guess I can use that instead.
 
Old 11-23-2012, 04:03 PM   #4
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Any idea haw to set a wifi password from the command line?

Also, I am not sure why, but suddenly wpa_gui has begun scanning and I connected to a wifi hotspot through it. It's strange. I was messing around with wifi-radar, and it scans. Then I tried wpa_gui again and now it scans, though I am not sure why, or what I am doing that suddenly made it work.
 
Old 11-23-2012, 04:08 PM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,971

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
Originally Posted by michijo View Post
Any idea haw to set a wifi password from the command line?
...
That's possible with wpa_supplicant. You will have to edit your /etc/wpa_supplicant.conf

Markus
 
Old 11-23-2012, 04:20 PM   #6
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by markush View Post
That's possible with wpa_supplicant. You will have to edit your /etc/wpa_supplicant.conf

Markus
should this supplicant only be group "root"? Maybe that is the problem with wpa-gui. How set password in supplicant.conf?
 
Old 11-23-2012, 04:26 PM   #7
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,971

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Well, wpa-gui may use another mechanizm..... I use only wpa_supplicant to connect to wifi (no NetworkManager or wicd). Here as an example my wpa_supplicant.conf:
Code:
ctrl_interface=/var/run/wpa_supplicant GROUP=0

network={
	ssid="yourssidhere"
	proto=WPA RSN
	key_mgmt=WPA-PSK
	pairwise=CCMP
	psk="1pVA9kRxiaBp8SQRjRjmK73hmnhYzkKln1sed58mr0CSgQReu2eDdiGtWCSuRlE"
}
wpa_supplicant can only be executed with root-permissions. But you can enable it in /etc/rc.d/rc.inet1.conf

Markus
 
Old 11-23-2012, 07:43 PM   #8
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 252

Rep: Reputation: 27
As root I did

wpa_passphrase <ssid> [passphrase]

paste that output into wpa_supplicant psk="<paste here>"
 
Old 11-25-2012, 11:16 AM   #9
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by glorsplitz View Post
As root I did

wpa_passphrase <ssid> [passphrase]

paste that output into wpa_supplicant psk="<paste here>"
Yes, I am still not 100 percent efficient at connecting to WIFI this way. I just failed for a good 30 minutes to connect to the hotspot that I connected to yesterday.
 
Old 11-26-2012, 02:55 PM   #10
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Interesting, but I cannot configure wpa_supplicant to use a passphrase. I can connect to wifi if it does not need a password, like the public library where I live doesn't ask for a password, so I am able to connect with merely

Code:
iwconfig wlan0 essid "Public Library"
ifconfig wlan0 up
and that is sufficient to connect to passphraseless library signal. Though at a coffee shop that has a passkey, I try using something like

Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
And it fails to connect, even though I ran wpa_passphrase and pasted the contents into wpa_supplicant.conf

I tried starting supplicant a few ways. The best I got back was:

Code:
bash-4.2# wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
wlan0: Trying to associate with 00:26:bb:74:aa:0f (SSID='CBD Congress' freq=2462 MHz)
wlan0: Associated with 00:26:bb:74:aa:0f
wlan0: WPA: Key negotiation completed with 00:26:bb:74:aa:0f [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 00:26:bb:74:aa:0f completed (auth) [id=0 id_str=]
But this in no way allowed me the surf the web. It appears like it is connected but the browser cannot go to any websites.

Last edited by michijo; 11-26-2012 at 02:57 PM.
 
Old 11-26-2012, 03:02 PM   #11
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,971

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
Originally Posted by michijo View Post
...
But this in no way allowed me the surf the web. It appears like it is connected but the browser cannot go to any websites.
Well, wpa_supplicant manages only the authentication to the accesspoint. You will have to use a dhcp-client programm afterwards in order to require an IP-configuration.
After the authentication was succesfull try
Code:
dhcpcd wlan0
as root. This should give you an IP-configuration (IP-adress, gateway, mask and nameserver(s)). You can check this with "ifconfig" and "cat /etc/resolv.conf".

Markus
 
Old 11-27-2012, 08:51 AM   #12
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by markush View Post
Well, wpa_supplicant manages only the authentication to the accesspoint. You will have to use a dhcp-client programm afterwards in order to require an IP-configuration.
After the authentication was succesfull try
Code:
dhcpcd wlan0
as root. This should give you an IP-configuration (IP-adress, gateway, mask and nameserver(s)). You can check this with "ifconfig" and "cat /etc/resolv.conf".

Markus
Thanks so much, that worked immediately. these are the commands I used in order:

# ifconfig wlan0 up
# wpa_supplicant -B -c/etc/wpa_supplicant.conf -iwlan0
# dhcpcd wlan0

I am not sure if any of these are irrelevant or not.
 
Old 11-27-2012, 10:08 AM   #13
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,971

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
You could put this in a script and start it automatically. But actually I meant this steps to show that the wireless adapter of your laptop and the accesspoint are really working.

If you have this wireless network always available when the laptop runs, you could put those three lines of code into your /etc/rc.d/rc.local You could also put a line with iwlist between this lines and check if your wireless network is available. But actually there is networkmanager or similar tools which should do this.

Markus
 
Old 11-28-2012, 07:57 AM   #14
michijo
Member
 
Registered: Apr 2011
Posts: 162

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by markush View Post
You could put this in a script and start it automatically. But actually I meant this steps to show that the wireless adapter of your laptop and the accesspoint are really working.

If you have this wireless network always available when the laptop runs, you could put those three lines of code into your /etc/rc.d/rc.local You could also put a line with iwlist between this lines and check if your wireless network is available. But actually there is networkmanager or similar tools which should do this.

Markus
I made some bash-aliases actually, just simple alias words like "wiup", "pass", and "connect". I was thinking of combining them into one alias "connect", and also I made soft links of wpa_supplicant, etc, into my bin folder, so I only had to add "sudo" to the aliases. If that works, I only type "connect" then my sudoer's password.

Still working it out though, and as you say, putting these these commands in a startup script could save trouble.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Wifi problem Toshiba laptop Ledge Linux - Newbie 13 08-25-2010 10:11 PM
Does anyone have laptop-mode-tools screen brightness ability working in Slackware? kevin01123 Slackware 5 03-16-2010 10:19 PM
Wifi issues on toshiba laptop lextori Linux - Laptop and Netbook 2 03-16-2010 09:51 AM
laptop wifi is not scanning for netwoks and cannot activate wla0 mukami Linux - Wireless Networking 2 07-23-2009 10:50 AM


All times are GMT -5. The time now is 07:41 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration