You are not logged in.

#1 2013-06-04 00:32:33

muon
Member
Registered: 2013-03-20
Posts: 26

[SOLVED] netctl fails; wpa_supplicant works

Hi,

I ran into something, and managed to get it working, but I'm curious about something that happened in the process.

I couldn't connect to a local home network using netctl (with wifi-menu), but I can connect using wpa_supplicant/dhcpcd and also using a wpa_configsection profile for netctl. I think the /etc/netctl/wlan0-CourseX file is okay (passwords changed below).
wlan0-CourseX profile:

Description='Automatically generated profile by wifi-menu'
Interface=wlan0
Connection=wireless
Security=wpa
ESSID=CourseX
IP=dhcp
Key=Password

When I do "sudo netctl start wlan0-CourseX", I get

Job for netctl@wlan0\x2dCourseX.service failed. See 'systemctl status netctl@wlan0\x2dCourseX.service' and 'journalctl -xn' for details.

which produces

-- Logs begin at Sat 2013-01-12 17:21:33 EST, end at Mon 2013-06-03 19:41:37 EDT. --
Jun 03 19:39:31 arch network[5665]: Failed to bring the network up for profile 'wlan0-CourseX'
Jun 03 19:39:31 arch systemd[1]: netctl@wlan0\x2dCourseX.service: main process exited, code=exited, status=1/FAILURE
Jun 03 19:39:31 arch systemd[1]: Failed to start Networking for netctl profile wlan0-CourseX.
-- Subject: Unit netctl@wlan0\x2dCourseX.service has failed
-- Defined-By: systemd
-- Support: [url]http://lists.freedesktop.org/mailman/listinfo/systemd-devel[/url]
-- Documentation: [url]http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d[/url]
--
-- Unit netctl@wlan0\x2dCourseX.service has failed.
--
-- The result is failed.
Jun 03 19:39:31 arch systemd[1]: Unit netctl@wlan0\x2dCourseX.service entered failed state.
Jun 03 19:39:31 arch sudo[5658]: pam_unix(sudo:session): session closed for user root
Jun 03 19:39:32 arch sudo[5856]: raymond : TTY=pts/0 ; PWD=/etc/netctl/examples ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Jun 03 19:39:32 arch sudo[5856]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jun 03 19:41:17 arch sudo[5856]: pam_unix(sudo:session): session closed for user root
Jun 03 19:41:37 arch sudo[5861]: raymond : TTY=pts/0 ; PWD=/etc/netctl/examples ; USER=root ; COMMAND=/usr/bin/journalctl -xn
Jun 03 19:41:37 arch sudo[5861]: pam_unix(sudo:session): session opened for user root by (uid=0)

However, when I use wpa_supplicant:

# wpa_supplicant -Dwext -B -i wlan0 -c /etc/wpa_supplicant.conf 
Successfully initialized wpa_supplicant
# dhcpcd
dhcpcd[5918]: version 5.6.8 starting
dhcpcd[5918]: wlan0: sending IPv6 Router Solicitation
dhcpcd[5918]: wlan0: rebinding lease of 18.189.107.167
dhcpcd[5918]: eth0: waiting for carrier
dhcpcd[5918]: wlan0: reject NAK via 192.168.1.1
dhcpcd[5918]: wlan0: reject NAK via 192.168.1.1
dhcpcd[5918]: wlan0: sending IPv6 Router Solicitation
dhcpcd[5918]: wlan0: broadcasting for a lease
dhcpcd[5918]: wlan0: offered 192.168.1.2 from 192.168.1.1
dhcpcd[5918]: wlan0: sending IPv6 Router Solicitation
dhcpcd[5918]: wlan0: acknowledged 192.168.1.2 from 192.168.1.1
dhcpcd[5918]: wlan0: checking for 192.168.1.2
dhcpcd[5918]: wlan0: sending IPv6 Router Solicitation
dhcpcd[5918]: wlan0: no IPv6 Routers available
dhcpcd[5918]: wlan0: leased 192.168.1.2 for 86400 seconds
dhcpcd[5918]: forked to background, child pid 6065

with the file
/etc/wpa_supplicant.conf:

 network={
    ssid="CourseX"
    psk="Password"
    pairwise=TKIP
    group=TKIP
    priority=20
}

everything works.

Because wpa_supplicant works, I thought netctl might if I use a configsection (looks more like wpa_supplicant file I referenced?) With this file for netctl,
wlan0-CourseX_cnfgsec profile:

Description='A configuration for WPA2 with PEAP'
Interface=wlan0
Connection=wireless
Security=wpa-configsection
IP=dhcp
WPAConfigSection=(
    'ssid="CourseX"'
    'group=TKIP'
    'pairwise=TKIP'
    'psk="Password"'
    'priority=20'
)

the connection works fine with "sudo netctl start wlan0-CourseX_cnfgsec".

So, I'm curious why the wifi-menu generated profile wouldn't work, but one with a configsection works fine.

Thanks!

Last edited by muon (2013-06-04 17:33:07)

Offline

#2 2013-06-04 02:43:50

luisgmarine
Member
Registered: 2013-03-31
Posts: 18

Re: [SOLVED] netctl fails; wpa_supplicant works

The only difference that I see between your config file and mine, is the fact that the ESSID name has single quotes around it. So it should read something like: ESSID='CourseX'
The same rule applies to your password. :\

Offline

#3 2013-06-04 03:08:53

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [SOLVED] netctl fails; wpa_supplicant works

It might be that the autodetection of wpa_supplicant does not work with the information your router sends.
This is what netctl creates:

network={
proto=RSN WPA
psk=$KEY
ssid=$ESSID
}

Last edited by progandy (2013-06-04 03:09:44)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#4 2013-06-04 17:30:41

muon
Member
Registered: 2013-03-20
Posts: 26

Re: [SOLVED] netctl fails; wpa_supplicant works

@luisgmarine, I have tried it with and without the single quotes -- no difference. Thanks for the idea though.
@progandy, Interesting. I'm not sure how to figure out if it's an issue with the router communication or not, though.

Anyway, thanks for the ideas and thoughts. I'll mark this as solved, because it is working; I was just curious to see if there was an apparent explanation.

Offline

Board footer

Powered by FluxBB