Real-World Example

Fallback to a Secondary Server

Let us say we have a fire detection system in a large building. This system is connected to a remote server (say, at a security company) via a DS. It sends out a heart-beat signal every minute, to report its status.

If the remote server at the security company fails, communication with the fire detection system will be lost, and the security company will not know what's going on in the building (and probably, in many other buildings). This cannot happen.

Thus, modem commands can be used to detect that there is no connection to the remote server, and change the destination address of the DS to a secondary server. Thus, if the primary server fails, the DS falls back to a secondary server, and all works well. Such a communication session will go like this:

Checking -- is there an established data connection?

<STX>X<CR>                                

The 6th char (c) is an asterisk - Data connection currently closed. Proceeding:

<STX>ANS*I**/**<CR>

Establish a connection with the primary server:

<STX>PCE212.68.157.35/1001<CR>        

DS acknowledges command:

<STX>A<CR>

Checking -- is there an established data connection?

<STX>X<CR>                                

The 6th char (c) is O - Data connection being established. We are still not connected:

<STX>ANS*IO*/**<CR>

(After waiting for some time):

Checking -- is there an established data connection?

<STX>X<CR>                                

The 6th char (c) is an asterisk - Data connection is closed. Could not get to server:

<STX>ANS*I**/**<CR>

Falling back to the secondary server -- establish connection with .37:

<STX>PCE212.68.157.37/1001<CR>        

DS acknowledges command:

<STX>A<CR>

Checking -- is there an established data connection?

<STX>X<CR>                                

The 6th char (c) is O - Data connection being established. We are still not connected:

<STX>ANS*IO*/**<CR>

(After waiting for some time):

Checking -- is there an established data connection?

<STX>X<CR>                                

The 6th char (c) is C - Successfully connected to secondary server:

<STX>ANS*IC*/**<CR>

Logging out of programming mode to start communicating:

<STX>O<CR>                                

DS acknowledges command:

<STX>A<CR>