debug 1

*****************************************************************
*						        	*
* This script file is used to configure the AT&T PARADYNE Modem *
*						        	*
*****************************************************************

set_port 1
set_speed 2400
set_parity NO_PARITY
set_data_bits 8
open_comm
iferror bye_comm
print "Initialization successful "


type "AT",0d,0a
iferror bye_t1
timeout 15
match "OK"
iferror bye_m1

***************************
*			  *
*   Programming modem     *
*			  *
***************************


**********************************
*** Setting Modulation Options ***
**********************************

type "AT&L0S41=11S43=0S76=0S78=0&X0Y0&G0",0d,0a
match "OK"
iferror MODERR


*************************************************************
*** Setting Error Correction and Data Compression Options ***
*************************************************************

type "AT%C0",22
type "H0\X0\T0\Q0\N1",0d,0a
match "OK"
type "AT\K5\G0\D1\C0",0d,0a
match "OK"
iferror EC/DC


**********************************************
*** Set ACU (Automatic Call Unit) settings ***
**********************************************   

type "AT&M1E0Q0V1X7",0d,0a
match "OK"
iferror ATFORM


****************************
*** Set Terminal Options ***
****************************

type "ATM&D1&R0&C1&S1S0=1",0d,0a
match "OK"
iferror TERMERR

* TELCO OPTIONS (SET MODEM SPEAKER ON AND VOLUME MEDIUM)
type "ATL0M1",0d,0a
match "OK"
iferror TELCO


goto bye
:TELCO
print "TELCO ERROR"
goto exit
:bye_t1
print "Error during modem programming. Type failed."
goto exit
:TERMERR
print "ERROR WHILE SETTING TERMINAL OPTIONS"
goto exit
:EC/DC
print "ERROR WHILE SETTING EC/DC OPTIONS"
goto exit
:MODERR
print "ERROR WHILE SETTING MODULATION OPTIONS"
goto exit
:ATFORM
print "ERROR WHILE SETTING ACU OPTIONS"
goto exit

:bye_m1
print "No answer from modem."
goto exit

:bye_comm
print "**** INIT ERROR !!"
goto exit



:bye 
print "Modem programmed successfully"

:exit


