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!

Procomm Plus Script and bothersome modem

Status
Not open for further replies.

kevin906

MIS
Aug 4, 2006
167
US

I am attempting to write a script to force a connection at 2400 7E1 without any error checking as the far end device will attempt to train up to a higher speed than the serial port it's connected to. I can go to modem command mode and submit the commands every time manually but would like to utilize the dialing directory since I am too lazy to type the number each time. I have written this script:

proc main

commandmode on
pause 1

set terminal type VT100
set port parity even
set port databits 7
set port baudrate 2400
pause 1

Transmit "at+ms=v22b^m"
waitfor "OK"


dial data $dialentry

when TARGET 0 "USERNAME" call login
while 1
endwhile
endproc

proc login

transmit "^c"
waitfor "USERNAME"
transmit $userid
transmit "^m"
waitfor "PASSWORD"
transmit $password
transmit "^m"
endproc

I have Procomm set to Start the script before attempting to connect. The problem:even though the proper AT command is submitted to the modem in the script the initialization strings still get sent to the modem before dialing the directory entry. This of course overrides the AT command I am trying to use and the far end connects at a higher speed than 2400.

Any ideas?

Thanks,
 
I think the fastest way to do this would be to replace the dial data command with ATDT<phone number> and dial the number in that manner. In other words, cut out the Connection Directory completely. I don't believe there is a way to keep Procomm from initializing the modem before dialing from there.

 
Thanks that's working except I have created an endless while loop. I have tried several ways to stop it but the script won't execute past the dialing string. I know there's an easier way to do this...
 
proc main
integer Counter = 0
commandmode on
pause 1

set terminal type VT100
set port parity even
set port databits 7
set port baudrate 2400
pause 1

Transmit "at+ms=v22b^m"
waitfor "OK"


transmit "atdt1xxxxxxxxxx^m"

when TARGET 0 "USERNAME" call login
while 1
endwhile
endproc

proc login
pause 2
transmit "^a"
waitfor "USERNAME"
transmit $userid
transmit "^m"
waitfor "PASSWORD"
transmit $password
transmit "^m"
endproc
--------------------------------------------

Once it starts proc login it just loops it over and over.
Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top