Topic: Falling off the network
Over the years I've noticed both my C1s will sometimes disappear off the network; they won't respond to pings for a while. However if there's any network activity (eg an open ssh session) then they stay alive. After a while they will re-appear; possibly when it's time to do wifi key renegotiation. I've seen this with three different access points (well, 2 APs, 3 different firmware). (I reported this on the old board, but never bothered to chase it up).
So I'm trying an experiment; get the chumby to ping the default gateway once every 30 seconds. I'll see if that's enough to keep it active on the network and not fall off.
Basically:
chumby:~# cat /psp/rfs1/userhook1
#!/bin/sh
/psp/rfs1/network_keepalive.sh
chumby:~# cat /psp/rfs1/network_keepalive.sh
#!/bin/sh
# Send a ping packet every 30 seconds to keep the network up.
# If we don't have a default gateway then sleep and retry.
# If the network goes down then we should lose the gateway...
# And we do it all in the background
while [ 1 ]
do
gw=
while [ -z "$gw" ]
do
gw=`netstat -rn | awk '/^0.0.0.0/ { print $2 }'`
if [ -z "$gw" ]
then
sleep 5
fi
done
ping -c 1 $gw > /dev/null 2>&1
sleep 30
done &
Finger's crossed, maybe this will keep the chumby's remotely accessible :-)