You are not logged in.

#1 2013-04-11 11:35:48

adirat
Member
Registered: 2012-11-03
Posts: 27

netctl auto setting wlan0 essid

I'm using the following profile with netctl

Description='Home network'
Interface=wlan0
Connection=wireless
Security=wpa
IP=dhcp
ESSID=net
Key=\"5f6e1ebcedsdtn...

It works only after the essid is manually set on wlan0

# iwconfig wlan0 essid net

After which I can enable the connection with "netctl start home".
If iwconfig was not run before it, netcl produces the following output

Job for netctl@home.service failed. See 'systemctl status netctl@home.service' and 'journalctl -xn' for details. 
# systemctl status netctl@home.service
netctl@home.service - Home network
	  Loaded: loaded (/etc/systemd/system/netctl@home.service; static)
	  Active: failed (Result: exit-code) since Thu 2013-04-11 13:36:23 EEST; 11s ago
	    Docs: man:netctl.profile(5)
	 Process: 4026 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)

Apr 11 13:36:07 adiPc systemd[1]: Starting Home network...
Apr 11 13:36:07 adiPc network[4026]: Starting network profile 'home'...
Apr 11 13:36:23 adiPc network[4026]: WPA association/authentication failed for interface 'wlan0'
Apr 11 13:36:23 adiPc network[4026]: Failed to bring the network up for profile 'home'
Apr 11 13:36:23 adiPc systemd[1]: netctl@home.service: main process exited, code=exited, status=1/FAILURE
Apr 11 13:36:23 adiPc systemd[1]: Failed to start Home network.
Apr 11 13:36:23 adiPc systemd[1]: Unit netctl@home.service entered failed state
# dmesg
[ 2857.256393] wlan0: authenticate with 68:7f:74:4c:76:8b
[ 2857.259465] wlan0: direct probe to 68:7f:74:4c:76:8b (try 1/3)
[ 2857.462240] wlan0: direct probe to 68:7f:74:4c:76:8b (try 2/3)
[ 2857.665208] wlan0: direct probe to 68:7f:74:4c:76:8b (try 3/3)
[ 2857.868192] wlan0: authentication with 68:7f:74:4c:76:8b timed out

I could't find a method to eliminate the step of setting the essid manually with iwconfig. Can someone please help me with this?

Offline

#2 2013-04-11 15:15:20

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: netctl auto setting wlan0 essid

I believe I had the same problem yesterday when installing netctl on my netbook.  You might be missing a step.  I had to do

# netctl enable mynetwork

first before I could start it with

# netctl start mynetwork

otherwise I got the same error as you did.


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#3 2013-04-11 20:52:45

adirat
Member
Registered: 2012-11-03
Posts: 27

Re: netctl auto setting wlan0 essid

After running as root "netctl enable home" the network connection is up and working automatically after a reboot.

But if I try to run "netctl start home" after the enable command I always get the OP error. Also if I do "netctl stop home", the connection goes down, but when I try to bring it up with "netctl start home" I always get the OP error

So if I "netctl enable" any network and reboot the computer, that network connection will work; if I stop it, there is no way to restart the connection, even with the iwconfig tampering mentioned in the OP.. The only way is to reboot or "netctl disable home" and use the OP method..

Maybe I'm missing something here?

Last edited by adirat (2013-04-11 20:56:40)

Offline

#4 2013-04-12 04:15:19

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: netctl auto setting wlan0 essid

Uhmmm...I'm not sure what you're trying to do.  When you start your computer, the network connection is established.  Why are you trying to stop and start your connection?  If you are losing your connection and trying to restart and it doesn't work, maybe netctl has a legitimate bug.  Maybe file a bug report?


Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

#5 2013-04-12 04:52:51

adirat
Member
Registered: 2012-11-03
Posts: 27

Re: netctl auto setting wlan0 essid

Yes, I will do that. Thank you for your help!

Offline

Board footer

Powered by FluxBB