Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wpa_supplicant gui - not connecting [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
HungGarTiger
Apprentice
Apprentice


Joined: 04 Feb 2014
Posts: 155
Location: /nz/auckland

PostPosted: Tue Aug 11, 2015 5:17 am    Post subject: wpa_supplicant gui - not connecting [Solved] Reply with quote

Hi guys,

Having some trouble with wpa_gui. I've got it to scan and entered the password but it just doesn't actually connect, hopefully I've just missed one small step! I've been through the wiki, handbook and networking guide.

I have to
Code:
/etc/init.d/wpa_supplicant start
before I can scan for networks

/etc/wpa_supplicant/wpa_supplicant.conf

Code:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
update_config=1

network={
        ssid="vodafoneHJGC"
        psk="**************"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}


etc/conf.d/net
Code:
config_enp1s0="dhcp"
modules_wlp2s0="wpa_supplicant"
config_wlp2s0="dhcp"


User is in the "wheel" group, so it 'works' without needing to run as su.

Any advice in the right direction would be greatly appreciated


Last edited by HungGarTiger on Wed Aug 12, 2015 3:14 am; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Tue Aug 11, 2015 5:36 am    Post subject: Re: wpa_supplicant gui - not connecting Reply with quote

HungGarTiger wrote:
Hi guys,

Having some trouble with wpa_gui. I've got it to scan and entered the password but it just doesn't actually connect, hopefully I've just missed one small step! I've been through the wiki, handbook and networking guide.

I have to
Code:
/etc/init.d/wpa_supplicant start
before I can scan for networks
Did you log out - log in after adding the user to wheel?

And what happens if you try scanning without running that service? What does the wpa_gui Event History (menu File, first item) show?
Back to top
View user's profile Send private message
HungGarTiger
Apprentice
Apprentice


Joined: 04 Feb 2014
Posts: 155
Location: /nz/auckland

PostPosted: Tue Aug 11, 2015 6:51 am    Post subject: Re: wpa_supplicant gui - not connecting Reply with quote

charles17 wrote:
HungGarTiger wrote:
Hi guys,

Having some trouble with wpa_gui. I've got it to scan and entered the password but it just doesn't actually connect, hopefully I've just missed one small step! I've been through the wiki, handbook and networking guide.

I have to
Code:
/etc/init.d/wpa_supplicant start
before I can scan for networks
Did you log out - log in after adding the user to wheel?

And what happens if you try scanning without running that service? What does the wpa_gui Event History (menu File, first item) show?


Yes, user was added to wheel group on creation

Event History shows
Quote:

CTRL-EVENT-SSID-REENABLED id=0 ssid="vodafoneHJGC"
SME: Trying to authenticate with 00:0e:8f:c5:94:34 (SSID='vodafoneHJGC' freq=2462 MHz)
Trying to associate with 00:0e:8f:c5:94:34 (SSID='vodafoneHJGC' freq=2462 MHz)
Associated with 00:0e:8f:c5:94:34
CTRL-EVENT-DISCONNECTED bssid=00:0e:8f:c5:94:34 reason=3 locally_generated=1
CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="vodafoneHJGC" auth_failures=4 duration=60 reason=CONN_FAILED
CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
CTRL-EVENT-SCAN-STARTED
CTRL-EVENT-REGDOM-CHANGE init=BEACON_HINT type=UNKNOWN
CTRL-EVENT-BSS-REMOVED 350 60:a4:4c:ed:16:d8
CTRL-EVENT-BSS-REMOVED 352 00:0e:8f:bc:b9:4a
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-STARTED
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-STARTED
CTRL-EVENT-BSS-REMOVED 354 64:16:f0:eb:2d:6b
CTRL-EVENT-BSS-REMOVED 355 54:a0:50:6e:c8:28
CTRL-EVENT-BSS-REMOVED 349 00:0e:8f:c5:45:ba
CTRL-EVENT-BSS-REMOVED 351 00:0e:8f:c3:3c:8e
CTRL-EVENT-BSS-REMOVED 356 94:4a:0c:f9:43:90
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-STARTED
CTRL-EVENT-BSS-ADDED 359 54:a0:50:6e:c8:28
CTRL-EVENT-BSS-ADDED 360 94:4a:0c:f9:43:90
CTRL-EVENT-BSS-ADDED 361 64:16:f0:eb:2d:6b
CTRL-EVENT-BSS-ADDED 362 00:8e:f2:7d:b1:36
CTRL-EVENT-BSS-REMOVED 358 58:98:35:96:6e:e5
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-STARTED
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Tue Aug 11, 2015 8:38 am    Post subject: Re: wpa_supplicant gui - not connecting Reply with quote

Remove all but the first two lines from /etc/wpa_supplicant/wpa_supplicant.conf and try again.

And, unless you really have demand for netifrc, try the dhcpcd method. It's much easier.

In case it doesn't work, running wpa_supplicant in debug mode might give you more information about your problem.

BTW: Your output of ifconfig -a would be helpful.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3648
Location: Hamburg

PostPosted: Tue Aug 11, 2015 9:46 am    Post subject: Re: wpa_supplicant gui - not connecting Reply with quote

HungGarTiger wrote:
Code:
        psk="FTDLERR8ULFVHS"
BTW choose a new psk before your neighbor read this thread ...
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Aug 11, 2015 1:43 pm    Post subject: Re: wpa_supplicant gui - not connecting Reply with quote

HungGarTiger wrote:
Code:
CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="vodafoneHJGC" auth_failures=4 duration=60 reason=CONN_FAILED

HungGarTiger ... that is an authentication failure, the reason is probably one of following: the password provided is incorrect, or the AP doesn't support the cipher (CCMP) you're requesting. If the later, you can do as Charles17 suggests and omit these parameters from the config, or you can scan the AP, see what it supports, and adjust the config to reflect that fact.

Code:
# awk '{RS="Cell"}/vodafoneHJGC/' <(iwlist wlp2s0 scan)

You will see something like:

WPA: Version: 1
Group cipher: TKIP
Pairwise ciphers: TKIP
Authentication suites: PSK

or Group cipher: CCMP, etc ...

This would then be translated into the following:

/etc/wpa_supplicant/wpa_supplicant.conf
Code:
network={
    ssid="vodafoneHJGC"
    proto=RSN
    auth_alg=OPEN
    key_mgmt=WPA-PSK
    group=TKIP
    pairwise=TKIP
    psk="password"
}

Note that by starting wpa_supplicant as a service its not controlled by netifrc ... and so any configuration in /etc/conf.d/net is superfluous. I'd generally use net.* to start wireless, but you could do as Charles17 suggests and use dhcpcd to manage such things.

Charles17 wrote:
And, unless you really have demand for netifrc, try the dhcpcd method. It's much easier.

You should say, "much less powerful" ;) Yes, it can do as advertised, but it quickly becomes tiresome when something more flexible is needed.

best ... khay
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Tue Aug 11, 2015 1:52 pm    Post subject: Re: wpa_supplicant gui - not connecting Reply with quote

khayyam wrote:
Charles17 wrote:
And, unless you really have demand for netifrc, try the dhcpcd method. It's much easier.

You should say, "much less powerful" ;) Yes, it can do as advertised, but it quickly becomes tiresome when something more flexible is needed.
ACK. For advanced requirements of course, netifrc along with netplug/ifplug has its merits. But I'd never recommend it on a simple end user client computer.
Back to top
View user's profile Send private message
HungGarTiger
Apprentice
Apprentice


Joined: 04 Feb 2014
Posts: 155
Location: /nz/auckland

PostPosted: Tue Aug 11, 2015 7:02 pm    Post subject: Reply with quote

When I try to start dhcpcd I just get the error

Quote:
* start-stop-daemon: failed to start `/usr/sbin/dhcpd' [ !! ]
* ERROR: dhcpd failed to start


same when running this command

Quote:
awk '{RS="Cell"}/vodafoneHJGC/' <(iwlist wlp2s0 scan)

it complains about not finding "`/dev/fd/63'" this file.

I also have NetworkManager starting in run-level 3, I don't know if this is affecting anything but I think this is running my wired connection at this stage.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Tue Aug 11, 2015 7:57 pm    Post subject: Reply with quote

Quote:
start-stop-daemon: failed to start `/usr/sbin/dhcpd' [ !! ]
are you sure you're trying to run dhcpcd?
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Tue Aug 11, 2015 8:03 pm    Post subject: Reply with quote

I think you should stop the network-manager process
Code:
 rc-service NetworkManager stop
( or is it lowercase? I can't remember...), and remove it from that runlevel
Code:
rc-update del NetworkManager

so it wont start at boot.

You're trying to use wpa_supplicant to handle your networks, so no need for NetworkManager. nm is probably running wpa_supplicant for you and conflicting with whatever you're trying to do directly with wpa_supplicant.
Back to top
View user's profile Send private message
HungGarTiger
Apprentice
Apprentice


Joined: 04 Feb 2014
Posts: 155
Location: /nz/auckland

PostPosted: Wed Aug 12, 2015 12:41 am    Post subject: Reply with quote

genoobish wrote:
You're trying to use wpa_supplicant to handle your networks, so no need for NetworkManager. nm is probably running wpa_supplicant for you and conflicting with whatever you're trying to do directly with wpa_supplicant.


Ok, I've done this and added dhpcd to runlevel 3 so that seems to handling my wired network. It does through up and error after this and I assume that is the wireless connection.

Quote:
* start-stop-daemon: failed to start `/usr/sbin/dhcpd' [ !! ]
* ERROR: dhcpd failed to start


No more progress with wpa_gui, still the same situation...
Back to top
View user's profile Send private message
genoobish
n00b
n00b


Joined: 18 Feb 2015
Posts: 73

PostPosted: Wed Aug 12, 2015 2:04 am    Post subject: Reply with quote

I think it's dhcpcd as stazox pointed out.

and you should start it with the init script,
Code:
rc-service dhcpcd start
or
Code:
/etc/init.d/dhcpcd start
Back to top
View user's profile Send private message
HungGarTiger
Apprentice
Apprentice


Joined: 04 Feb 2014
Posts: 155
Location: /nz/auckland

PostPosted: Wed Aug 12, 2015 3:13 am    Post subject: Reply with quote

genoobish wrote:
I think it's dhcpcd as stazox pointed out.

and you should start it with the init script,
Code:
rc-service dhcpcd start
or
Code:
/etc/init.d/dhcpcd start


I did this and magically it works!

I'll make sure to be using dhcpcd in future.

Thanks everybody for all the help! :lol:
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Wed Aug 12, 2015 5:35 pm    Post subject: Reply with quote

I'd say that was a "very near" miss. Dhcpd is a dhcp server that allows other machines in LAN obtain segment's configuration.
Dhcpcd is dhcp client, which allows your machine obtain network's segment configutation from a dhcp server - pretty often dhcpd (but not necessarily)

So, they both have their uses, and they both work in the area you needed, but you tried to use one of those at the wrong end of your link. Well, yes, those names are similar and it is confusing.
Glad you got it sorted
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum