You are not logged in.

#1 2010-12-18 01:59:36

vostok4
Member
Registered: 2010-12-16
Posts: 70

net-auto-wireless isn't really doing anything

I've got netcfg installed and I'm trying to use it for my wifi configuration on my laptop which has an ath9k wireless chip.

I've got my profiles (WPA personal) setup just fine, when I do netcfg my.profile.name it brings it up and it works. However if my wireless drops for whatever reason, or I come to work, I always have to manually do "netcfg profile".

In my rc.conf I have nothing in INTERFACES (only have wlan0 on this machine), I have WIRELESS_INTERFACE defined as wlan0, I have two profiles in NETWORKS, and I have "syslog-ng hal net-auto-wireless netfs crond" in my DAEMONS list.

Can anyone see anything that I'm doing wrong? How does net-auto-wireless actually work?

Offline

#2 2010-12-18 10:28:49

ichbinesderelch
Member
Registered: 2008-01-17
Posts: 203

Re: net-auto-wireless isn't really doing anything

if you run net-auto-wireless manually, is there any error?

'sudo /etc/rc.d/net-auto-wireless restart'

i remember that you have to install some package that doesn't come with netcfg as a dependency and this will complain about the missing package if it is like that!

Offline

#3 2010-12-18 10:39:15

Nichollan
Member
From: Stavanger, Norway
Registered: 2010-05-18
Posts: 110

Re: net-auto-wireless isn't really doing anything

vostok4 wrote:

I've got my profiles (WPA personal) setup just fine, when I do netcfg my.profile.name it brings it up and it works. However if my wireless drops for whatever reason, or I come to work, I always have to manually do "netcfg profile".

It is my understanding that net-auto-wireless is only called auto because you don't have to specify the network you wish to connect to, because it figures that out by looking at what networks are available. The wiki article on netcfg indicates that they have intentionally left out an auto-reconnect feature.

Offline

#4 2010-12-19 08:40:48

vostok4
Member
Registered: 2010-12-16
Posts: 70

Re: net-auto-wireless isn't really doing anything

There are no errors when I restart net-auto-wireless.

Nichollan, what exactly is "auto" about it then? I'm just speaking of the use case where I take my laptop outside. WIFI is enabled, however there is no signal so its not connected to any AP since there are no APs that it knows. If I come back inside, I would expect net-auto-wireless to reconnect it to my home profile since that network appears, and its in my NETWORKS list. I'm not looking for it to reconnect (I've learned my dropped connection issue is another problem), I'm just looking for it to connect to profiles it already knows.

Offline

#5 2010-12-19 11:45:37

Nichollan
Member
From: Stavanger, Norway
Registered: 2010-05-18
Posts: 110

Re: net-auto-wireless isn't really doing anything

As I already said, I believe it is called auto because you don't have to specify the network you wish to connect to when the script is executed. It will connect to a present wireless network for which you have created a profile (in /etc/network.d/). With for instance net-profiles you have to specify the profile you wish to use to connect. The wiki article that I linked to encourages people who want different behaviour to write their own tools that interface with netcfg.

Offline

#6 2010-12-19 12:32:28

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: net-auto-wireless isn't really doing anything

net-auto-wireless has indeed roaming support:
http://www.archlinux.org/news/netcfg-v2 … ss-config/

Do you have wpa-actiond installed and all profiles converted to wpa-configsection? You can restart the daemon like this to see debug info:

NETCFG_DEBUG="yes" /etc/rc.d/net-auto-wireless restart

Offline

#7 2010-12-19 14:18:13

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: net-auto-wireless isn't really doing anything

Firstly make sure wpa_actiond is installed (note the underscore, not hyphen).

Next delete all your /etc/network.d/* profiles (or move them away). Errors in one profile can make net-auto-wireless stop working because it keeps choking when it gets to that one. I can't remember the particular error, but I think it had to do with security=none or something like that.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2010-12-19 17:50:51

vostok4
Member
Registered: 2010-12-16
Posts: 70

Re: net-auto-wireless isn't really doing anything

Hey guys I did have wpa_actiond (and only two profiles), however due to a different problem with my ath9k driver. I can just go to terminal and force a connect each time, it isn't that bad.

Thanks for the note on the netcfg_debug info hokasch, it'll help if I ever kick back into this smile

Offline

#9 2011-01-27 13:33:18

xCrucialDudex
Member
Registered: 2007-08-19
Posts: 144

Re: net-auto-wireless isn't really doing anything

Okay I can't get it to automatically connect neither to wired no wireless network.

ifplugd at least is trying to connect to networks, I can see in /var/log/everything that but wpa_actiond simply sits there silently and does nothing.

When run manually, either via rc.d/net-auto-wireless or directly, it connects to a wireless access point immediately. No problem here.

So, basically I had gone through the following scenario today. Went to work office, plugged in ethernet cable, ifplugd tried to connect to any of the networks specified in the profiles but failed to for whatever reason. No meaningful explanation. All it said was this:

Jan 27 09:44:57 localhost ifplugd(eth0)[27597]: ifplugd 0.28 initializing.
Jan 27 09:44:57 localhost ifplugd(eth0)[27597]: Using interface eth0/00:13:77:49:00:BE with driver <8139too> (version: 0.9.28)
Jan 27 09:44:57 localhost ifplugd(eth0)[27597]: Using detection mode: SIOCETHTOOL
Jan 27 09:44:57 localhost ifplugd(eth0)[27597]: Initialization complete, link beat detected.
Jan 27 09:44:57 localhost ifplugd(eth0)[27597]: Executing '/etc/ifplugd/netcfg.action eth0 up'.
Jan 27 09:44:57 localhost ifplugd(eth0)[27597]: client: up
Jan 27 09:44:57 localhost ifplugd(eth0)[27597]: client: loadin ho-eth
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: :: ho-eth up    [BUSY]  > DHCP IP lease attempt failed. 
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client:    [FAIL] 
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: loadin pdp-wifi
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: loadin st-mt
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: loadin home-wifi
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: loadin sc-eth
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: loadin st-eth
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: loadin st-wifi
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: loadin uncle-wifi
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: Program execution failed, return value is 1.
Jan 27 09:47:39 localhost ifplugd(eth0)[27597]: Executing '/etc/ifplugd/netcfg.action eth0 down'.
Jan 27 09:47:39 localhost ifplugd(eth0)[27597]: Program execution failed, return value is 1.
Jan 27 09:47:39 localhost ifplugd(eth0)[27597]: Exiting.

So, I had to do netcfg -u $PROFILE to set up network connection manually. Then I went back home, where I use wireless ap to connect to the home LAN, I saw ifplugd detect that ethernet had been down so it properly unconfigured eth0, again /var/log/everything clearly stated that

Jan 27 14:03:00 localhost ifplugd(eth0)[28240]: Link beat lost.
Jan 27 14:03:11 localhost ifplugd(eth0)[28240]: Executing '/etc/ifplugd/netcfg.action eth0 down'.
Jan 27 14:03:11 localhost ifplugd(eth0)[28240]: Program execution failed, return value is 1.

but nothing was happening for wireless interface at all. This was registered in the log when I got bored with netcfg/wpa_actiond not doing my job for me so I ran /etc/rc.d/net-auto-wireless restart which configured wireless network connection:

Jan 27 14:12:59 localhost wpa_actiond[4401]: Starting wpa_actiond session for interface 'wlan0'
Jan 27 14:13:00 localhost wpa_actiond[4401]: Interface 'wlan0' connected to network '$ESSID'

I think my configuration is correct but well I could've missed something of course. So, to save us time:

- all profiles are in /etc/network.d/. one of these looks like this:

% cat /etc/network.d/home-wifi 
CONNECTION='wireless'
DESCRIPTION='A simple WPA encrypted wireless connection using a static IP'
INTERFACE='wlan0'
SECURITY='wpa'
ESSID='$ESSID'
KEY='$KEY'
IP='static'
IPCFG=('addr add dev wlan0 $CIDR/IP brd +' 'route add default via $IP')
DNS=('$IP')
POST_UP="sh /home/$USER/scripts/netcfg-home-post"

- /etc/rc.conf:

...
#
# net-auto-wireless support 
WIRELESS_INTERFACE="wlan0"
WIRED_INTERFACE="eth0"
...
DAEMONS=(... !network @net-profiles net-auto-wireless net-auto-wired ...)

no ROUTES, no INTERFACES. Clean and neat. No syntax errors.

Software installed:
ifplugd 0.28-7
wpa_actiond 1.1-1
netcfg 2.5.4-1

So far the problem is that ifplugd can't connect to a wired network, but at least it attempts to, while wpa_actiond does nothing at all.

I really want my laptop to do this automatically. It's like... you know... 2011 already! Computers must do this stuff xD

Offline

#10 2011-01-27 15:20:53

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: net-auto-wireless isn't really doing anything

If you want your computer to do everything for you, go buy a Mac.

If you want to use netcfg, then first remove all your profiles (back them up, of course) and try if auto-connect works with just ONE profile. I recall problems with security=none which would cause it to choke, don't think that's been fixed yet.

Of course, if you're really too lazy to do that just don't use netcfg, there's other solutions which aren't as KISS but are more automatic.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#11 2011-02-17 09:52:22

xCrucialDudex
Member
Registered: 2007-08-19
Posts: 144

Re: net-auto-wireless isn't really doing anything

ngoonee wrote:

If you want your computer to do everything for you, go buy a Mac.

That is retarded comment. Really, with that kind of thinking you should go back to early linux days and happily do everything yourself. After all, you don't want your computer do everything for you, do you?

ngoonee wrote:

If you want to use netcfg, then first remove all your profiles (back them up, of course) and try if auto-connect works with just ONE profile. I recall problems with security=none which would cause it to choke, don't think that's been fixed yet.

Now this is some important information. I'll try that.

ngoonee wrote:

Of course, if you're really too lazy to do that just don't use netcfg, there's other solutions which aren't as KISS but are more automatic.

Of course, if you think being smartass helps solve problems and build good relationships with people you're plain stupid. However, if you want to participate in a constructive discussion, please, refer me to these other solutions that you mentioned.

Thank you.

Offline

#12 2011-02-18 16:00:27

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: net-auto-wireless isn't really doing anything

xCrucialDudex wrote:
ngoonee wrote:

If you want your computer to do everything for you, go buy a Mac.

That is retarded comment. Really, with that kind of thinking you should go back to early linux days and happily do everything yourself. After all, you don't want your computer do everything for you, do you?

Apparently, you've never used a Mac...

xCrucialDudex wrote:
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client: :: ho-eth up    [BUSY]  > DHCP IP lease attempt failed. 
Jan 27 09:45:09 localhost ifplugd(eth0)[27597]: client:    [FAIL] 

I would say, there is some problem with the profile, which ifplugd quits upon...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

Board footer

Powered by FluxBB