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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Modem With Script?[blues] 1

Status
Not open for further replies.

mailbox125

Technical User
Apr 1, 2003
44
0
0
US
This what I'm useing to set the modem port and it works the first time through the script however on subsequent passes. And the request to set the terminal type to vt100 is not issued. Any ideas???[blues]


;****************************************************************************
;* *
;* SetModem *
;* The procedure to set the modem to 7,e,1 *
;* *
;* Calls: None *
;* Called by: MAIN *
;* Modifies: Modem Settings *
;* *
;*****************************************************************************

proc SetModem
set port baudrate 2400 ; 2400
set port databits 7 ; 7
set port parity EVEN ; e
set port stopbits 1 ; 1
SET port softflow OFF ;
SET port hardflow OFF ;
SET TERMINAL KEYBOARDFILE "VT100-CUSTOM.KBD" ;OPTIONAL
set duplex full
pause 1


endproc
 
It looks to me like you are setting the keyboard file to a custom VT100keyboard file.
The command to set the terminal type to VT100 would be:

set terminal type VT100

here's a simple test script:

; test Set terminal type
proc main

set quickselect ON ; turn on Quickselect display
set statusline ON ; turn on Stusline display
set terminal type VT102
statmsg "VT102"
pause 10
set terminal type ANSIBBS
statmsg "ANSIBBS"
pause 10
set terminal type VT100
statmsg "VT100"

endproc


The statusline will display what the script has attempted to set and the quickselect line will display the actual procomm setting followed by the transfer protocol such as Z-modem...

Hope this helps... D.T.
 
Help I can't seem to get this to set the modem to 7,e,1 The terminal type is set to VT100 correctly, should I be setting this proc. in the main? it is currently the third proc. in the main. Any suggestions would be great.

proc SetModem
; test Set terminal type


set quickselect ON ; turn on Quickselect display
set statusline ON ; turn on Stusline display
set terminal type VT100
statmsg "VT100"
pause 10
set terminal type vt100
statmsg "ANSIBBS"
pause 10
set terminal type VT100
statmsg "VT100"
set port baudrate 2400 ; 2400
set port databits 7 ; 7
set port parity EVEN ; e
set port stopbits 1 ; 1
SET port softflow OFF ;
SET port hardflow OFF ;
set duplex full
pause 1


endproc
 
Reading the help file, it sounds to me like the various set port commands will fail unless the connectiong is already open (a dial in progress or a connection made I would assume). If all of the systems you are calling use 7E1, then I would configure your modem to have these settings by default. You can do this by selecting the Options | System Options | Modem Connection menu item, select your modem if necessary, click on the Modem Connection Properties button, click on the Connection tab in the resulting dialog, and then change the Connection preferences values to suit. These steps were on a Win98 machine, but should be similar for other flavors of Unix.


aspect@aspectscripting.com
 
Thanks for the tip I read the help file and your right it will not allow me to change the modem /port settings on anything but a direct connection. Thanks for your time.
 
Your right again the script will only change modem settings if your directly connected the system. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top