This section describes the pseudopermanent connection feature supported by the router using dial-up synchronous modems. The dial-up synchronous connection is established automatically by the modems when the routers at both ends are turned on. The connection is terminated when either of the two routers is turned off or otherwise stopped.
The pseudopermanent link is a dial-up link established over the Public Switched Telephone Network (PSTN) using a pair of synchronous modems. By its very nature, this connection is asymmetrical because one modem originates the call and the other modem answers the call. Therefore, the calling end needs to be programmed to automatically dial the stored telephone number of the remote modem, and the remote modem needs to be programmed to automatically answer the incoming call.
When the routers are turned off, the Data Terminal Ready (DTR) signal is set low, thereby prohibiting any connection between the modems. When the router at the calling end is turned on, it turns on the DTR, triggering the modem to automatically dial and establish a connection. When the calling modem detects the DTR off-to-on transition, it goes off-hook, dials the remote modem, and waits for the connection to occur. If, after a certain programmed period (in units of number of rings), the connection fails to materialize, the modem goes on-hook and terminates the connection. If the connection does occur (that is, the remote end answers), the modem turns on the carrier, exchanges a training sequence, and reaches a ready state. These events are indicated by the modem turning on the Data Set Ready (DSR), Data Carrier Detect (DCD), and Clear-to-Send (CTS) signals, in that order.
The answering modem waits for an incoming call and answers it, if the local router has set the DTR signal high. Here again, the modem turns on DSR, DCD, and CTS signals to indicate call connection, carrier detect, and ready state.
Call disconnection can occur because of telephone line failure, because one of the routers was turned off or was taken down, or because of a power failure. Each modem detects the call disconnection by the absence of the carrier. Following this detection, the modem disconnects the call and turns off the DSR, DCD, and CTS signals.
The modem signals DSR, DCD, and CTS are tracked by the router, and the router, in turn, turns off the DTR when any of these signals are off. The router keeps the DTR low for a few seconds to allow the modem to complete the actions needed for terminating the call, and raises the DTR to trigger redialing. When the modem detects the DTR off-to-on transition, it goes through the procedure for reconnection; on successful reconnection, the modem raises the DSR, DCD, and CTS signals. Should the reconnection attempt fail, the modem resets any signals it might have raised during the reconnection.
Even when the reconnection attempt fails, the router has the DTR on for approximately two minutes before taking it down. This delay spaces the reattempts to connect two minutes apart, preventing excessive telephone traffic. If the connection does occur, the DTR remains on indefinitely, and the dialed connection then simulates a permanent connection.
The router actions remain the same, whether the router is connected to a calling modem or an answering modem. Hence, the router code is unaware of the asymmetry in the dialed connection.
Note that although the preceding description is based on the experience gained from using Hayes* smart modems, it is valid for a wide variety of compatible modems.
Following are the dial-up synchronous modem requirements:
The following example illustrates the programming needed to set the Hayes ULTRA* 14,400-bps modem for dialed synchronous operation. To do this, connect the modem to a terminal device or PC with a terminal emulation program. The router provides a method of addressing the modem through the CPECFG program (refer to "Configuring Modems and DTR-Controlled Devices” for information about using CPECFG).
The left dip switch (sw 1, seen when the front cover is removed) has the following settings:
This switch is set to DOWN after the modem is configured for autodial/ autoanswer. This prevents the synchronous data from accidentally being interpreted as commands (for example, when the DTR is turned off).
AT&F; &F - Recall Factory settings AT&Z0=<dest tel no>; &Z0 - store no to be called AT&Q2&C1&D2; &Q2 - Stored No redial on DTR OFF -> ON; &C1 - Track status of DCD ; &D2 - Track DTR, DTR ON -> OFF go to cmd state ATS37=11 S37=11 - Connect to remote modem at 14400bps speed ATE0Q1&Y0&W0 E0 - Disable character echoing ; Q1 - DO not return result codes ; &Y0 - Select profile `0' as power on config ; &W0 - store as profile `0'
AT&F; &F - Recall Factory settings AT&Q1&C1&D2S0=2; &Q1 - Sync mode 1 (async to sync on connect) ; &C1 - Track status of DCD (don't ignore); &D2 - Monitor DTR, DTR ON -> OFF enter cmd stateCall automatically answered only if DTR is ON ; S0=2 Auto Answer after 2 ringsATS37=11; S37=11 - Connect to remote modem at 14400bps speed ATE0Q1&Y0&W0; E0 - Disable character echoing ; Q1 - DO not return result codes; &Y0 - Select profile `0' as power on config ; &W0 - store as profile `0'
Should the need arise to reprogram the modem (for example, to change the destination telephone number), the following procedure should be adopted. Because character echoing and result code returns have been disabled, the modem does not respond to a user's attempt to communicate with it (in asynchronous mode). To reprogram the modem, complete the following steps:
Turn off the modem.
Set dip switch 1 to the UP (smart mode) position.
Turn on the modem.
Enter the following modem command:
ATE1Q0; E1 - Enable character echoing; Q0 - Enable returning of result codes