View Single Post
Old 9th February 2015
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by daemonfowl View Post
Hi all !
Frequently enough , wpi gets down after a while and I have to ifconfig it up and netstart .
Why does it occur ? is there any solution to this ?
I have a similar problem on an old Thinkpad.

$ uname -rv
5.5 GENERIC.MP#0

$ dmesg | grep wpi
wpi0 at pci3 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi, MoW1, address 00:19:d2:07:a7:57

The Interface State daemon ifstated(8) might be useful in working around the hinky hardware/driver. My /etc/ifstated.conf looks like this:

Code:
init-state auto

net_check = '( "ping -q -c 1 -i 2 -w 1 www.google.com > /dev/null" every 120 )'

state auto {
        if $net_check {
              set-state if_online
        }
        if ! $net_check {
              set-state if_offline
        }
}

state if_online {
        if ! $net_check {
              set-state if_offline
        }
}

state if_offline {
        init {
             run "sh /etc/netstart wpi0"
         }
        if $net_check {
             set-state if_online
        }
}
To make ifstated start on reboot, edit your /etc/rc.conf.local and add the line
Code:
ifstated_flags=""
Google is ping'ed every two minutes; if/when the ping fails, the interface is restarted.
Reply With Quote