LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Wireless Setup Slack 14.1 Questions (https://www.linuxquestions.org/questions/slackware-14/wireless-setup-slack-14-1-questions-4175527227/)

BAcidEvil 12-05-2014 02:05 PM

Quote:

Originally Posted by bassmadrigal (Post 5280138)
In your case, set your router's SSID to linux and the password to slackwarerules and then use the following entry in your wpa_supplicant.conf file. Then run /etc/rc.d/rc.inet1 restart_wlan0. This should connect. If it doesn't, try that wpa_supplicant command again and post the output.

Code:

network={
        ssid="linux"
        psk="slackwarerules"
}



If that works I am going to pay someone to smack me.

bassmadrigal 12-06-2014 05:07 PM

Any update?

BAcidEvil 12-06-2014 06:57 PM

Quote:

Originally Posted by bassmadrigal (Post 5280604)
Any update?

Last night I got off too late to feel the desire.. I just got home and am attempting now... Update soon

BAcidEvil 12-06-2014 07:16 PM

Well I tried but it still errors out. After making sure no other wlan0 is running, I did the /etc/rc.d/rc.inet1 restart_wlan0 and get this output;

Successfully initialized wpa_supplicant
Polling for DHCP server on interface wlan0:
dhcpcd[2869]: version 6.0.5 starting
dhcpcd[2869]: wlan0: waiting for carrier
dhcpcd[2869]: timed out
dhcpcd[2869]: allowing 8 seconds
dhcpcd[2869]: timed out
dhcpcd[2869]: exited

My inet1.conf included this wlan0 info;

IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]=""
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"

My wpa_supplicant.conf contains this (and only this);

network={
ssid="linux"
psk="slackwarerules"
}


I did indeed verify that my router is broadcasting SSID: linux with PSK: slackwarerules... The encryption is set to AUTOMATIC but can choose TKIP or AES.

allend 12-06-2014 07:40 PM

Silly question, but what is this wireless device? Please post the relevant output of '/sbin/lspci'.
I am wondering whether you have a Broadcom device that requires you to install a driver and firmware.

BAcidEvil 12-06-2014 08:03 PM

Quote:

Originally Posted by allend (Post 5280661)
Silly question, but what is this wireless device? Please post the relevant output of '/sbin/lspci'.
I am wondering whether you have a Broadcom device that requires you to install a driver and firmware.

Atheros Communications Inc. AR9485 Wireless Network Adapter (rev 01)

It does work in XWindows but that is not to say it in itself has drivers whereas the console does not.

Captain Pinkeye 12-06-2014 08:25 PM

Ah, Slackware non-gui wireless! It took me two days to configure it when i did it for the first time, but it was great exercise in manpages and Slackware's documentation overall :) .
Now it takes about two minutes to configure it. And i like its simplicity.

Basically, i do just these three steps:
1: Put something like this into /etc/rc.d/rc.inet1.conf
Code:

IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
WLAN_ESSID[4]=DARKSTAR
WLAN_WPA[4]="wpa_supplicant"

more lines were never needed, but ymmv.

2: Do
Code:

wpa_passphrase ESSID PASSWORD >> /etc/wpa_supplicant.conf
to put the right info there

3: restart the inet1 daemon
Code:

/etc/rc.d/rc.inet1 restart
And it works

Captain Pinkeye 12-06-2014 08:27 PM

Quote:

Originally Posted by BAcidEvil (Post 5280651)
My wpa_supplicant.conf contains this (and only this);

network={
ssid="linux"
psk="slackwarerules"
}

You definitely miss the crazy long psk key there.

BAcidEvil 12-06-2014 08:45 PM

Quote:

Originally Posted by Captain Pinkeye (Post 5280687)
You definitely miss the crazy long psk key there.

The password I want to use (as every other device does) is "slackwarerules". That is what my Router is set for.

Captain Pinkeye 12-06-2014 09:29 PM

Quote:

Originally Posted by BAcidEvil (Post 5280698)
The password I want to use (as every other device does) is "slackwarerules". That is what my Router is set for.

Yep, but psk key is something different. You have to generate it with wpa_passphrase command, and put it into wpa_supplicant.conf as well.

Using
Code:

wpa_passphrase linux slackwarerules
I got
Code:

network={
        ssid="linux"
        #psk="slackwarerules"
        psk=fe6e4ac80008014235184f6228e189fc7993512fac0db663fabb4b11eab647e0
}

That's the right psk key; your password is supposed to be commented out (or not present at all).

turtleli 12-06-2014 09:55 PM

Quote:

Originally Posted by BAcidEvil (Post 5279813)
bash-4.2# wpa_supplicant -dd -c/etc/wpa_supplicant.conf -Dwext -iwlan0
*Snip*
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0x1f flags 0x0
netlink: Operstate: linkmode=1, operstate=5
wlan0: Own MAC address: 1c:3e:84:b0:5f:05
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
*snip*

Perhaps you should try using the nl80211 driver instead of the wext driver. One of my Slackware installs is unable to connect if I use the wext driver. On that box I can connect manually with
Code:

wpa_supplicant -B -i wlan0 -D nl80211 -c /etc/wpa_supplicant.conf
dhcpcd wlan0

See if something similar works.

BAcidEvil 12-06-2014 10:05 PM

Quote:

Originally Posted by Captain Pinkeye (Post 5280708)
Yep, but psk key is something different. You have to generate it with wpa_passphrase command, and put it into wpa_supplicant.conf as well.

Using
Code:

wpa_passphrase linux slackwarerules
I got
Code:

network={
        ssid="linux"
        #psk="slackwarerules"
        psk=fe6e4ac80008014235184f6228e189fc7993512fac0db663fabb4b11eab647e0
}

That's the right psk key; your password is supposed to be commented out (or not present at all).

But how does my router know what psk=fe6e4ac80008014235184f6228e189fc7993512fac0db663fabb4b11eab647e0 is? It is set for "slackwarerules" and there is no PSK option aside from the password I put.

Alien Bob 12-07-2014 05:19 AM

Quote:

Originally Posted by BAcidEvil (Post 5280717)
But how does my router know what psk=fe6e4ac80008014235184f6228e189fc7993512fac0db663fabb4b11eab647e0 is? It is set for "slackwarerules" and there is no PSK option aside from the password I put.

Juat read the documentation of that router. It should tell you that it wants a 64-character string (in which case it expects a string of exactly 64 hexadecimal characters) or it will want a character string with a length between 8 and 63 characters (note that that is exactly one character less than the HEX character string requires).

I have had routers which needed either of these two alternatives. It just depends on the firmware of your router.

Eric

BAcidEvil 12-07-2014 01:42 PM

Well it seems to be working now, but, for reasons I clearly do not know. When I began this expedition I, for whatever reason, was using 5GHz frequency in which everything worked fine. I tried adding my Slackware to that same SSID/freq/PK but as we no, nothing worked. Just now (using the exact information from the 5GHz) I set up the 2.4 GHz and sure enough, Slackware grabs an IP and connects wireless.

Is it possible my particular card (maybe old firmware?) just does not see/scan 5GHz?

All the of information I initially gathered from various posters was indeed correct and extremely helpful as I learned about wpa_supplicant and HEX etc but the end problem seems to be the Ghz.

bassmadrigal 12-08-2014 09:17 AM

That certainly explains some things... according to this, your wireless card only supports 2.4GHz.

And to try to clear up your confusion between HEX and ASCII, I'll try with my limited (read: possibly wrong) understanding of WPA.

ASCII, aka passphrase, is a plain-text password that you specify for your network. This makes it easier to remember than the old WEP keys which were only HEX based. However, the password is never sent over the network and is instead coverted into a 64 character HEX using the password and SSID with an algorithm. I believe that HEX key is what's sent over the network. I don't think linux wpa_supplicant requires you to specify the HEX PSK, but allows you to do so. This is likely a security thing to prevent requiring your password to be stored in plain text on your computer (similar to how /etc/shadow just displays a hash for the system passwords instead of plain text passwords). If you're the only one using the computer or you don't care if others can find your WPA password, you're able to easily store it in plain text. If you want to hide that password, you're able to store it in HEX form, using wpa_passphrase to obscure it.

Again, I might be wrong on this, but it's how I understand it.


All times are GMT -5. The time now is 11:57 AM.