This is my first post. I'm using a PCH A-110 with a WN-100, connected to my wireless network (provided by a Zyxel 802.11g router).
About every day, my PCH was disconnecting from the wireless network, and switching to wired mode. I don't have an Ethernet cable plugged in, so I had to switch on the TV, go to the Setup page (using the remote control) and put the network mode to Wi-Fi again. Angry
My 802.11g router is reliable and doesn't crash/disconnect my other Wi-Fi devices, so I had to find a good way for the PCH to reconnect without user intervention, until the issue gets fixed in later firmwares Wink
Good news: it seems to work great ! Cool
To use the script on your PCH, first set it to Wireless mode, then add a line to /share/start_app.sh as follows:
#M_A_R_K_E_R_do_not_remove_me
/bin/nice -n-20 /share/net_watchdog.sh &
exit 0
Now type this into a file called /share/net_watchdog.sh:
#!/bin/sh
STARTUP_DELAY="300"
INTERVAL="20"
IF_CONF="/etc/network/interfaces"
WPA_CONF="/opt/wifi/config/wpa_supplicant.conf"
IFACE=`sed -n 's|^iface \(.*\) inet static$|\1|p' $IF_CONF`
MY_IP=`sed -n 's|^\taddress \(.*\)$|\1|p' $IF_CONF`
NETMASK=`sed -n 's|^\tnetmask \(.*\)$|\1|p' $IF_CONF`
GATEWAY_IP=`sed -n 's|^\tgateway \(.*\)$|\1|p' $IF_CONF`
GATEWAY_ESSID=`sed -n 's|^\tssid="\(.*\)"$|\1|p' $WPA_CONF`
/bin/sleep ${STARTUP_DELAY}
while [ 0 ]; do /bin/sleep ${INTERVAL}; /bin/ping -c1 ${GATEWAY_IP} 1>/dev/null 2>/dev/null || ( /sbin/ifconfig ${IFACE} down; /usr/bin/killall -9 wpa_supplicant; /sbin/ifconfig ${IFACE} ${MY_IP} netmask ${NETMASK}; /opt/wifi/bin/wpa_supplicant -B -Dotus -iwlan0 -c${WPA_CONF}; /opt/wifi/bin/iwconfig ${IFACE} essid ${GATEWAY_ESSID}; /sbin/route add default gw ${GATEWAY_IP} ); done
Now type:
chmod +x /share/net_watchdog.sh
Now reboot or run the script manually (by typing the same command as in /share/start_app.sh).
Note that the script will first wait 300 seconds (5 minutes) before doing anything, so in case of problems, you have 5 minutes to kill it and to remove it from your startup script Cool