@echo off
rem Freeware Dialer Package for use with Bobcat  
rem Example batch file for Dos 5 or later. 
cls

setscrn
echo.
echo             ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo             º          Bobcat Dialup          º
echo             ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
echo.

echo.
echo          Automated Session starting
echo.
echo          Dialing ....
echo.

:DIAL
rem dial up the ISP
NETDIAL BASE 0xMYBASE IRQ MYIRQ MYSPEED
rem        :    :
rem        :  speed - must be the same for this line and the packet driver.
rem        :
rem      comport - must be the same for both
rem                netdial lines and the packet driver lines ( hangup too) 
rem  if com card has non standard interrupts see .\dialdoc\netdial.doc 
rem for setup information. Also readme.doc. 
IF ERRORLEVEL 1 GOTO BUSY
goto PKTDRVR

:BUSY
setscrn
echo.
echo             ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo             º          Bobcat Redial          º
echo             ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ¼
echo.
	echo No Response.. will redial automatically ...Esc to quit
	echo.
	Holdit  20 > nul
	if errorlevel 200 goto END
	if errorlevel 0 goto DIAL
	setscrn
	goto DIAL

:PKTDRVR
rem logged in, so start the Packet driver 
rem in this example  we have used EPPPD
rem see below for slip/cslip  examples

epppd base 0xMYBASE irq MYIRQ pktvec 0xMYVEC MYSPEED asyncmap 0 crtscts 
call IP-UP.bat
rem set GATEWAY=%REMIP%
echo my_ip=%MYIP% > path.cfg
echo gateway=%remip% >> path.cfg
echo netmask=%netmask% >> path.cfg
echo nameserver=MYDNS1 >> path.cfg
:MYREM echo nameserver=MYDNS2 >> path.cfg
echo Ip address set to %MYIP%

:SLIP
rem example for manual setup only
rem ALTERNATE PACKET DRIVERS
rem slipper base=0xMYBASE irq=MYIRQ vec=MYVEC speed=MYSPEED
rem          :               :            :        :
rem       comport address    :            :      speed
rem                    comport interrupt  :
rem                        vector - must be the same for the termin line

:CSLIP
rem example for manual setup only

rem cslipper base=0xMYBASE irq=MYIRQ vec=MYVEC speed=MYSPEED
rem if errorlevel 1 goto END

rem If using slip/cslip and server does not have bootp use the following
rem Get ipread from the site on the helper page (inside file ipcfg010.zip)

:BOBCAT
rem packet driver loaded, so ready to start Bobcat
rem change to the Bobcat directory

cd .\bobcat
if exist history.htm del history.htm >nul
lynx -show_cursor -cache=5

rem change back to the  Dialer directory
cd ..

:END


rem  remove the packet driver and hang up the phone
termin 0xMYVEC 
rem      :
rem    vector should be same as used when loading Packet driver 

netdial BASE 0xMYBASE IRQ MYIRQ hangup
rem        :
rem     comport should be the same as 2 other places in batch file
