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,