Code:B43 Wireless Check

The wireless driver b43 for Broadcom chipset is not very stable at this moment. This driver is used for the Linux 2.6 kernel on OpenWRT for the Linksys WRT54GL.

As a workaround, I made a simple script that checks if the wireless is still up, and if not, restart the wireless interface. I run this script every 5 minutes.

CheckWireless
Here is the script (I saved it as /sbin/checkwireless):

intf="wlan0" scan=`iwlist $intf scanning | grep "No scan results"` if [ -n "$scan" ]; then echo "Interface is down" /sbin/ifconfig $intf up  # optional /sbin/wifi down /sbin/wifi up else echo "Interface is up" fi
 * 1) !/bin/sh
 * 1) echo $?

Cron job
The cronjob to run this script every 5 minutes is set using crontab -e

Add the following lines: 3-58/5 * * * * /sbin/checkwireless
 * 1) check if wireless is still working every 5 minutes