LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware on Toshiba Laptop, No WIFI Scanning Ability (https://www.linuxquestions.org/questions/slackware-14/slackware-on-toshiba-laptop-no-wifi-scanning-ability-4175438465/)

michijo 11-23-2012 02:38 PM

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.

markush 11-23-2012 02:54 PM

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

michijo 11-23-2012 03:12 PM

Quote:

Originally Posted by markush (Post 4835706)
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.

michijo 11-23-2012 04:03 PM

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.

markush 11-23-2012 04:08 PM

Quote:

Originally Posted by michijo (Post 4835743)
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

michijo 11-23-2012 04:20 PM

Quote:

Originally Posted by markush (Post 4835744)
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?

markush 11-23-2012 04:26 PM

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

glorsplitz 11-23-2012 07:43 PM

As root I did

wpa_passphrase <ssid> [passphrase]

paste that output into wpa_supplicant psk="<paste here>"

michijo 11-25-2012 11:16 AM

Quote:

Originally Posted by glorsplitz (Post 4835820)
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.

michijo 11-26-2012 02:55 PM

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.

markush 11-26-2012 03:02 PM

Quote:

Originally Posted by michijo (Post 4837473)
...
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

michijo 11-27-2012 08:51 AM

Quote:

Originally Posted by markush (Post 4837477)
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.

markush 11-27-2012 10:08 AM

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

michijo 11-28-2012 07:57 AM

Quote:

Originally Posted by markush (Post 4838021)
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.


All times are GMT -5. The time now is 01:36 AM.