devd wlan wpa

2013-02-05 Thread CeDeROM
Hello :-)

I want to setup wpa_supplicant to start after wlan0 interface gets up.
The rc.conf ifconfig_wlan0="WPA DHCP" does the job only at boot. When
I get the interface down I need to start everything by hand, which is
a bit annoying when I test a lot and need to switch between Ethernet
and WiFi interfaces very often. I have tried to write devd rule:

notify 0 {
match "system"  "IFNET";
match "subsystem"   "wlan[0-9]+";
match "type""LINK_UP";
media-type  "802.11";
match "device-name" "wlan[0-9]+";
action "/usr/sbin/wpa_supplicant -i $device-name -c
/etc/wpa_supplicant.conf -B";
};

But there goes the chicken-egg problem - I want to run wpa_supplicant
on LINK_UP event that occurs when Media Status is "connected", but to
get that "connected" status I need to run  wpa_supplicant first, so
capabilities of devd are not enough in this case, or I miss something?
Is there any distinction between LINK_UP and IF_UP?

Any hints appreciated :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: devd wlan wpa

2013-02-05 Thread Alexandre
Hi,
There is this entry for the network aggregation in the Handbook
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-aggregation.html
You will be able to switch from wired to wifi card (and vice versa).

Regards,
Alexandre


On Tue, Feb 5, 2013 at 11:14 AM, CeDeROM  wrote:

> Hello :-)
>
> I want to setup wpa_supplicant to start after wlan0 interface gets up.
> The rc.conf ifconfig_wlan0="WPA DHCP" does the job only at boot. When
> I get the interface down I need to start everything by hand, which is
> a bit annoying when I test a lot and need to switch between Ethernet
> and WiFi interfaces very often. I have tried to write devd rule:
>
> notify 0 {
> match "system"  "IFNET";
> match "subsystem"   "wlan[0-9]+";
> match "type""LINK_UP";
> media-type  "802.11";
> match "device-name" "wlan[0-9]+";
> action "/usr/sbin/wpa_supplicant -i $device-name -c
> /etc/wpa_supplicant.conf -B";
> };
>
> But there goes the chicken-egg problem - I want to run wpa_supplicant
> on LINK_UP event that occurs when Media Status is "connected", but to
> get that "connected" status I need to run  wpa_supplicant first, so
> capabilities of devd are not enough in this case, or I miss something?
> Is there any distinction between LINK_UP and IF_UP?
>
> Any hints appreciated :-)
> Tomek
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscr...@freebsd.org"
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: devd wlan wpa

2013-02-05 Thread CeDeROM
On Tue, Feb 5, 2013 at 1:24 PM, Alexandre  wrote:
> There is this entry for the network aggregation in the Handbook

Thank you Alexandre! This is not exactly what I am looking for as I
would like to have wpa running after interface is up, but I will use
provided solution in another place, thank you again :-)

Best regards :-)
Tomek

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: devd wlan wpa

2013-02-05 Thread CeDeROM
On Tue, Feb 5, 2013 at 1:33 PM, CeDeROM  wrote:
> On Tue, Feb 5, 2013 at 1:24 PM, Alexandre  wrote:
>> There is this entry for the network aggregation in the Handbook

Also this failover is also prone to the wlan0+wpa issue, as bringing
up the wlan0 interface does not bring up the link, so I need to have
devd configured anyway... :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"