DIAL-UP OPTION FOR RTES DEVICES DRIVERS
The dial-up option allows to communicate with a device via a dial up modem that accepts the "AT" commands. The modem must be external connected to a COM port or ISA if internal
This option is activated by including in the configuration file PORTn.CNF of RTES device drivers (using serial communication), the definition M=n where n is from 2 to 2042 (for C**** version of RTES) or 2 to 3066 (for L**** version of RTES)
The n parameter defines the first of a block of 5 RTES registers used as follows:
|
HOOK |
You turn this register on to start a dial up sequence. You turn it off to hang up. If the connection fails, this register is turned off by the driver. You may place in the message area of this register, a modem setup string of your choice to be used for dialing. If you leave this message area blank the modem uses the default string: ATEQ&D2L3M1V1DT (tone dialing)Note : for pulse dialing, put the following string at the HOOK register: ATEQ&D2L3M1V1DP |
|
TEL |
You set this register to the register number that contains in the message area the telephone number to be dialled. |
|
TALK |
This register is turned on by the driver when the connection is established. You may place in the message area of this register, a modem setup string of your choice that will be used on startup to place the modem in autoanswer. If you leave this message area blank the modem uses the default string: ATEHS0=1 (answer on first ring)For example : to make HOST answer on the 3rd ring, put the following string at the TALK register: ATEHS0=3 |
|
PASS |
This register contains in the message area the password to be used for a security device. This password is used if the value of PASS is 1 (or odd). |
|
ACTIVE |
This register is set to 1 while the dialer is initializing and when this station has been called and is receiving data. If the station does not receive data for a period of time equal to twice the time out duration (T=) defined in the configuration file, this driver hangs up and turns ACTIVE to 0. |
When HOOK and TALK are both TRUE, then the driver may communicate with its counterpart at the other end of the line.
You may choose any names for the registers. It is their location as dictated by the M parameter in the configuration file that associates them with the dialer. You may have several drivers using the same modem - possiibly using a different set of registers, or you may have several modems, each associated with a different driver.
Example:
The configuration file contains: M=16 (the first register is R0017)
|
NAME |
NAME |
CURRENT |
MESSAGE |
|
R0017 |
HOOK |
0 |
|
Notice that there is no text in front of HOOK, so the dialer will use the default initialization string and that TEL=32 - this indicates that the telephone number to call is in front of R0032.
|
R0032 |
NUMBER |
0 |
555-1212 |
USING MULTIPLE PHONE NUMBERS
Make NUMBER a list and make a rule that makes TEL point to the proper line in the list.
For example:
RULE TEL=32+LOCATION
|
R0031 R0032 R0033 R0034 |
LOCATION |
0 |
Pointer to station telehone mumber |
When you make LOCATION 0,1,2,etc TEL becomes 32, 33, 34, etc and the dialer uses the selected telephone number.
USING THE DIALER TO DISPATCH A MESSAGE TO A PAGER
You may append any string to the telephone number and the dialer sends the whole string.
For instance: 391-2421,,112-ALARM
causes the number 391-2421 to be dialed. There is a pause of 2 beeps (,,) and 112-ALARM is sent.
Depending on the capability of the pager, it may display the numbers only or the alphanumeric string.
TYPICAL APPLICATION
The following RTES task may be used to dial into a series of telephone numbers, retrieve data from each location or dispatch a message. The task may be activated when an alarm occurs (for instance).
TASK DIAL 001 LET LOCATION=0 002 START HOOK 003 IF [TALK'] 3 004 REM START TALKING 005 REM AND DECIDE 006 REM WHEN TO HANG UP 007 STOP HOOK 008 IF [TALK] 008 009 WAIT 1 010 LET LOCATION=LOCATION+1 011 IF [LOCATION<3] 2 012 END
You may write several variations of the above to detect time-out on modem and/or I/O system, initiate specific communication enable' flags in the associated driver, etc. Consult FAI Designs Inc. for assisstance in your specific application.