LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-18-2017, 09:16 AM   #1
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Rep: Reputation: 153Reputation: 153
wireless and wpa_supplicant


I'm trying to establish a wifi connection on wlan1.

I've made the appropriate changes to /etc/wpa_supplicant

Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root

network={ 
    ssid="TP-LINK_E71180"
    psk="My ESSID password" 
    id_str="Downstairs" 
}

also added these changes to /etc/rc.d/rc.inet1.conf


Code:
IFNAME[4]="wlan1"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
WLAN_ESSID[4]="TP-LINK_E71180"
WLAN_WPA[4]="wpa_supplicant"
when I try

Code:
/etc/rc.d/rc.inet1 wlan1_restart

I can't get wireless connection - it times out. Even if I do a full reboot.

Quote:
Polling for DHCP server on interface wlan1:
dhcpcd[2582]: version 6.0.5 starting
dhcpcd[2582]: wlan1: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
dhcpcd[2582]: wlan1: waiting for carrier
dhcpcd[2582]: timed out
dhcpcd[2582]: allowing 8 seconds for IPv4LL timeout
dhcpcd[2582]: timed out
dhcpcd[2582]: exited
However, if in another terminal I do this

Code:
wpa_supplicant -d -c/etc/wpa_supplicant.conf -Dwext -iwlan1
and then try and get a wireless connection it works!

Quote:
Polling for DHCP server on interface wlan1:
dhcpcd[2778]: version 6.0.5 starting
dhcpcd[2778]: wlan1: soliciting an IPv6 router
dhcpcd[2778]: wlan1: soliciting a DHCP lease
dhcpcd[2778]: wlan1: offered 192.168.1.100 from 192.168.1.1
dhcpcd[2778]: wlan1: leased 192.168.1.100 for 86400 seconds
dhcpcd[2778]: wlan1: adding host route to 192.168.1.100 via 127.0.0.1
dhcpcd[2778]: wlan1: adding route to 192.168.1.0/24
dhcpcd[2778]: wlan1: adding default route via 192.168.1.1
dhcpcd[2778]: forked to background, child pid 2833
According to this document

http://www.slackware.com/~alien/slac...ADME.slackware

Quote:
To get your network device up and running, execute:

### /usr/sbin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -iath0 -Dmadwifi ###
### you don't have to run the above command by hand, because it will ###
### be executed by the rc.inet1 command that you run: ###

/etc/rc.d/rc.inet1 ath0_start
What step have I omitted?

Alex
 
Old 11-18-2017, 10:55 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Not sure. I've never been comfortable with Slackware's stock inet1/wireless scripts. I use this modified inet1 instead.

/etc/rc.d/rc.inet1:
Code:
#!/bin/sh

case "${1:-start}" in
        start)  ip -batch - <<-EOF
                        address flush dev lo
                        address add 127.0.0.1 dev lo
                        link set lo up
                EOF

                if [ ! -e /var/run/wpa_supplicant/wlan0 ]; then
                        iw reg set GB
                        wpa_supplicant -B -c /etc/wpa_supplicant/wlan0.conf -i wlan0 >/dev/null
                fi
                dhcpcd -q -b -L -M wlan0
                ;;
        stop)   dhcpcd -q -k
                ip link set wlan0 down
                if [ -e /var/run/wpa_supplicant/wlan0 ]; then 
                        wpa_cli -i wlan0 terminate >/dev/null
                fi
                ;;
esac
Much simpler and does the job for me. You're welcome to modify it for your system and give it a go if you wish.
 
3 members found this post helpful.
Old 11-18-2017, 11:16 AM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Do this
Code:
 wpa_passphrase [ ssid ] [ passphrase ] >> /etc/wpa_supplicant.conf
put your real ssid (for example "my_wifi") of you wifi network and passphrase (eg. "my_password), (access pasword). Now at the end of wpa_supplicant.conf
you should have
Code:
 network={
        ssid="my_wifi"  
         proto=WPA RSN
        key_mgmt=WPA-PSK WPA-EAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        #psk="my_password"
        psk= here is 256 bit long sequence in hex digits
}
Now it should work. Oh, one thing open wpa_supplicant.conf and comment out your previous settings for this particular network. If this trick won't work it will be easily to reverse wpa_supplicant.conf to its previous state. This why actually adding network setting at the end of wpa_supplicant.conf with double ">>" redirection.
 
1 members found this post helpful.
Old 11-19-2017, 05:31 AM   #4
aikempshall
Member
 
Registered: Nov 2003
Location: Bristol, Britain
Distribution: Slackware
Posts: 900

Original Poster
Rep: Reputation: 153Reputation: 153
Thanks for your suggestions


Running

Code:
wpa_passphrase [ ssid ] [ passphrase ] >> /etc/wpa_supplicant.conf
made no difference.

What did make a difference was to stop and disable the rc.wicd daemon and enable and start the rc.wireless daemon. Now I get a Wan1 connection

Quote:
/etc/rc.d/rc.inet1: wlan1 information: 'Any ESSID'
Error for wireless request "Set Nickname" (8B1C) :
SET failed on device wlan1 ; Operation not supported.
Successfully initialized wpa_supplicant
Polling for DHCP server on interface wlan1:
dhcpcd[3036]: version 6.0.5 starting
dhcpcd[3036]: wlan1: soliciting an IPv6 router
dhcpcd[3036]: wlan1: soliciting a DHCP lease
dhcpcd[3036]: wlan1: offered 192.168.1.100 from 192.168.1.1
dhcpcd[3036]: wlan1: leased 192.168.1.100 for 86400 seconds
dhcpcd[3036]: wlan1: adding host route to 192.168.1.100 via 127.0.0.1
dhcpcd[3036]: wlan1: adding route to 192.168.1.0/24
dhcpcd[3036]: wlan1: adding default route via 192.168.1.1
dhcpcd[3036]: forked to background, child pid 3075
Now I have to work out in the above output whether

Quote:
Error for wireless request "Set Nickname" (8B1C) :
SET failed on device wlan1 ; Operation not supported.
is important and if so how to fix it.

Alex
 
Old 11-19-2017, 06:52 AM   #5
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
I had the same time-out problem with wifi. So I resigned completely from using startup scripts. For desktops sometimes wicd (run manually) or NetworkManager (from rc.networmanager) are enough, but well I am doing this
Code:
# rfkill unblock 0
# wpa_supplicant -Dwext -i wlan3 -c /etc/wpa_supplicant.conf &
# dhcpcd wlan3
I mean why to bother to build machinery for the price to save three lines of code?
 
Old 11-19-2017, 09:24 AM   #6
navigium
Member
 
Registered: Aug 2014
Location: Switzerland
Distribution: Slackware, FreeBSD
Posts: 119

Rep: Reputation: 58
I don't know whether this fixes the problem, but I just checked my working rc.inet1.conf file. I have a lot of lines commented out that you still include. Try replacing the content with:

Code:
IFNAME[4]="wlan1"
#IPADDR[4]=""
#NETMASK[4]=""
USE_DHCP[4]="yes"
#WLAN_ESSID[4]=""
WLAN_WPA[4]="wpa_supplicant"
wpa_supplicant will choose the essid if on from the wpa_supplicant.conf file is available. Maybe this solves the problem.
 
Old 11-19-2017, 02:26 PM   #7
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 973

Rep: Reputation: 238Reputation: 238Reputation: 238
Quote:
Originally Posted by aikempshall View Post

What did make a difference was to stop and disable the rc.wicd daemon and enable and start the rc.wireless daemon. Now I get a Wan1 connection
This suggests that you had both rc.wicd and rc.inet1 running. It is "either/or" here: make rc.wicd permanently non-executable (chmod a-x rc.wicd) if you want to use rc.inet1.conf for setting up internet-connections.

Like networkmanager, wicd needs sole control of internet connections that also can be set up with rc.inet1 via rc.inet1.conf. The remedy is using only one of these three connection methods: when using rc.inet1.conf make rc.networkmanager and rc.wicd non-executable; when bypassing rc.inet1.conf (when using wicd or nm) make sure that all options are empty or commented out.

hth

Last edited by brobr; 11-19-2017 at 02:28 PM.
 
  


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
[SOLVED] wireless on Slackware (Linksys, wpa_supplicant) dchmelik Slackware 15 12-17-2020 06:17 PM
Wireless with WPA2 and without WPA_supplicant Walzing Linux - Wireless Networking 6 08-16-2011 08:14 AM
wireless problems with 2.6.24 (ndiswrapper, wpa_supplicant) BCarey Slackware 10 03-27-2008 01:39 PM
set up a wireless card and wpa_supplicant mariogarcia Linux - Wireless Networking 1 12-14-2007 10:00 AM
wireless issues with ndiswrapper and wpa_supplicant 1337ln Slackware 2 10-04-2007 03:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:01 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration