POMdev wrote:
> If SqueesePlay restarts wpa_cli, I guess it is safe to do so in the
> script...??? What about restarting wpa_supplicant (thinking about that
> as a next script step)?
The following sequence of events seems to work. One point is that, in
-wpa_supplicant.conf-, the current network is not "disabled", so, on
restarting, -wpa_supplicant- will automatically attempt to reconnect. I
think that's how it is, anyway.
-wpa_cli- will not run without -wpa_supplicant- running, basically (I
think) because the control socket (-/var/run/wpa_supplicant/eth1-) is
not present. Latest source code seems to add an --r- option to keep it
running regardless.
SqueezePlay appears to be unfazed, it seems to re-establish its
connection to the control socket when -wpa_supplicant- is restarted.
(See -/tmp- for extant sockets created by -wpa_cli- and SqueezePlay).
But I don't know how robust it all is...
Sourcing this script:
Code:
--------------------
killall wpa_cli
killall wpa_supplicant
# Note - udhcpc is left running
/usr/sbin/wpa_supplicant -B -Dwext -ieth1 -c/etc/wpa_supplicant.conf -t
/usr/sbin/wpa_cli -B -a/etc/network/wpa_action
# I don't seem to need this, because it takes about 10 seconds
# for a reconnection to occur. So wpa_cli is already running
# by the time a "CONNECT" message is generated, and it will
# trigger wpa_action to do this.
#kill -usr1 `cat /var/run/udhcpc.eth1.pid`
--------------------
Gives this log output:
Code:
--------------------
Mar 27 13:25:46 kernel: [62748.835724] eth1 (WE) : Wireless Event too big (33)
Mar 27 13:25:46 kernel: [62748.848882] AR6000 disconnected from
xx:xx:xx:xx:xx:xx
Mar 27 13:25:46 kernel: [62748.977828] eth1 (WE) : Wireless Event too big (33)
Mar 27 13:25:46 kernel: [62748.983375] AR6000 disconnected
Mar 27 13:25:46 kernel: [62749.544881] eth1 (WE) : Wireless Event too big (33)
Mar 27 13:25:46 kernel: [62749.549242] AR6000 disconnected
Mar 27 13:25:56 kernel: [62759.564458] AR6000 disconnected
Mar 27 13:25:57 kernel: [62759.823446] channel hint set to 2437
Mar 27 13:25:57 kernel: [62759.843344] AR6000 disconnected
Mar 27 13:25:57 kernel: [62759.903100] AR6000 connected event on freq 2437
with bssid xx:xx:xx:xx:xx:xx listenInterval=100, beaconInterval = 100,
beaconIeLen = 22 assocReqLen=62 assocRespLen =76
Mar 27 13:25:57 kernel: [62759.918990] Network: Infrastructure
Mar 27 13:25:57 root: wpa_action eth1 DISCONNECTED
Mar 27 13:25:57 root: wpa_action eth1 CONNECTED
Mar 27 13:25:57 udhcpc[7967]: Performing a DHCP renew
Mar 27 13:25:57 udhcpc[7967]: Sending renew...
--------------------
------------------------------------------------------------------------
mrw's Profile: http://forums.slimdevices.com/member.php?userid=38299
View this thread: http://forums.slimdevices.com/showthread.php?t=111663
_______________________________________________
Radio mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/radio