
Re: WIFI disconnecting apparently at random
Heres a bat file that pings and repairs a down WIFI connection.
Only for use on Windows XP, 2000, 2003 server becuase it uses "devcon"
Use Windows scheduler to execute the bat file (e.g. every 5 minutes).
Ping fail / repair incedents are logged to a file.
See remarks for details.
Test results of new driver posted to follow in another post.
REM make the folder "C:\GWR_oXXX\WiFi_Log\%filename%" or edit this file to match your destination log folder
REM this script requires that you download and install devcon on your XP, 2000, 2003 server machine
@echo off
REM Restart Wireless connection to force broadcast IP request.
REM Find Date and set filename format YYMMDD.log
@For /F "tokens=1,2,3,4 delims=/ " %%A in ('Date /t') do @(
Set All=%%D%%B%%C
)
SET filename=%All%.log
REM Test line to file
REM echo %date% - %time% **********---------**********>>"C:\GWR_oXXX\WiFi_Log\%filename%"
REM
REM Ping options
REM option-1; -n = number of times
REM option-2; 1 = number
REM option-3; ip adress
ping -n 1 192.168.1.20
REM Don't restart if ping successful.
if %errorlevel% EQU 0 goto end
REM If no response Log to file
REM a blank line to log file
echo. >>"C:\GWR_oXXX\WiFi_Log\%filename%"
REM Record Time and date to log file
echo **********---------**********>>"C:\GWR_oXXX\WiFi_Log\%filename%"
echo >> %date% - %time%>>"C:\GWR_oXXX\WiFi_Log\%filename%"
REM Record Ping status to log file
ping -n 1 192.168.1.20>>"C:\GWR_oXXX\WiFi_Log\%filename%%"
REM If no response to ping then repair the Wireless connection
REM We use "devcon" command supported only by Windows XP,
REM Windows 2000 and Windows 2003 Server
REM find PCI device idfrom Windows command propt use:
REM C:\Documents and Settings\SG Administrator>devcon find pci\*
REM C:\Documents and Settings\SG Administrator>devcon find pci\*
REM PCI\VEN_10EC&DEV_8168&SUBSYS_816810EC&REV_02\4&672B976&0&00E0:
REM Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethernet NIC
REM PCI\VEN_1814&DEV_3090&SUBSYS_30901814&REV_00\4&3AA0F23C&0&00E1:
REM 802.11n Wireless LAN Card
REM if devcon is not present in your computer, download DEVCON from
REM
http://support.microsoft.com/default.as ... -us;311272REM Also read article about devcon from this site
devcon restart PCI\VEN_1814*
:end