@echo off

rem Change ETH_IF if the modem is connected to a different interface than the default one.
set ETH_IF="Local Area Connection"

echo BlueTree Advance Firmware Update ...
echo ====================================
echo 1) Please save and close any network files you may currently have open.
echo 2) With a cross-wired cable, connect your modem directly to the computer.
pause
echo Saving current IP settings ...
netsh -c interface dump > orig_ip_settings.txt
echo Setting static IPs required for advanced upgrade ...
netsh interface ip set address name=%ETH_IF% static 192.168.222.180 255.255.255.0
netsh interface ip add address name=%ETH_IF% 192.168.88.180 255.255.255.0
netsh interface ip add address name=%ETH_IF% 192.168.222.167 255.255.255.0
netsh interface ip add address name=%ETH_IF% 192.168.222.168 255.255.255.0
netsh interface ip add address name=%ETH_IF% 192.168.222.178 255.255.255.0
cd Images
bttftpsrv -v
cd ..
echo Restoring original IP settings ...
netsh -f orig_ip_settings.txt
