Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modem Dialing Problems

Status
Not open for further replies.

trolley

Programmer
Jan 29, 2004
62
US
Hi All!

I am trying to use a script for a client to dial a BBS. I developed and tested it on my PC and it works just fine. However, when I go and run on the client PC, it does not dial the modem. If I manually run ProComm Plus and dial the phone number of the BBS, it dials the number. Any thoughts as to why ProComm Plus is not dialing?

The client PC is running Windows XP Pro and the development PCs were Windows XP Pro and Windows 2000.

Any help would be very much appreciated.
 
The first thing I do is initialize the modem

scMODEM (2, 1, 8, 1, 0, "VT-100")

The sub-routine does this:

proc scMODEM

param integer iMBAUD, iMPARITY, iMDATABITS
param integer iMSTOPBITS, iMPROTOCOL
param string sMTTY
;
; Set Baudrate
;
switch iMBAUD

case 1
set port baudrate 9600
endcase

case 2
set port baudrate 19200
endcase

endswitch
;
; Set Parity
;
switch iMPARITY

case 1
set port parity NONE
endcase

case 2
set port parity ODD
endcase

case 3
set port parity EVEN
endcase

case 4
set port parity MARK
endcase

case 5
set port parity SPACE
endcase

endswitch
;
; Set Word Length and Stop Bits
;
set port databits iMDATABITS
set port stopbits iMSTOPBITS
;
; Set Transfer Protocol
;
set protocol iMPROTOCOL
;
; Set Terminal Emulation
;
set terminal type sMTTY
;
; Hangup and Reset Modem
;
pause 1
transmit "ATH^M"

pause 1
transmit "ATZ^M"
;
; Modem Setup and Initialization Complete
;
return

endproc


Then I issue the connect sub-routine passing the telephone number of the BBS.

scCONNECT (sTELNUM)

The sub-routine does this:

proc scCONNECT

param string sMPHONE

string sCALLING, sCALLNUM

sCALLING = "Calling "
strcat sCALLING sMPHONE
sCALLNUM = "ATDT"
strcat sCALLNUM sMPHONE
strcat sCALLNUM "^M"
;
; Call Phone Number
;
transmit sCALLNUM

sTMPSTR1 = "CONNECT"
sTMPSTR2 = $NULLSTR
sTMPSTR3 = $NULLSTR

scSTRWAIT (90, sTMPSTR1, sTMPSTR2, sTMPSTR3)
if iWAITSTAT == 1
return
else
scERROR (1)
endif

return

endproc

 
I was able to resolve this issue. It appears that it was a timing issue between the external modem and ProComm Plus. I added a message box to have the client click "OK" to dial the modem and that fixed the issue.

Strange thing was, I was not able to reproduce the problem in the office.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top