Information Technology Reference
In-Depth Information
mand state, characters sent to the modem are interpreted as commands. Once a command is
interpreted, the modem goes into the normal mode. Any characters sent to the modem are
then sent along the line. To interrupt the modem so that it goes back into command mode,
three consecutive ' + ' characters are sent, i.e. ' +++ '.
After the modem has received an AT command it responds with a return code. Some re-
turn codes are given in Table 15.2 (a complete set is defined in Appendix C). For example, if
a modem calls another which is busy then the return code is 7. A modem dialing another
modem returns the codes for OK (when the ATDT command is received), CONNECT (when
it connects to the remote modem) and CONNECT 1200 (when it detects the speed of the
remote modem). Note that the return code from the modem can be suppressed by sending the
AT command ' ATQ1 '. The AT code for it to return the code is ' ATQ0 '; normally this is the
default condition
Table 15.2
Example return codes
Message
Digit
Description
OK
0
Command executed without errors
CONNECT
1
A connection has been made
RING
2
An incoming call has been detected
NO CARRIER
3
No carrier detected
ERROR
4
Invalid command
CONNECT 1200
5
Connected to a 1200 bps modem
NO DIALTONE
6
Dial-tone not detected
BUSY
7
Remote line is busy
NO ANSWER
8
No answer from remote line
CONNECT 600
9
Connected to a 600 bps modem
CONNECT 2400
10
Connected to a 2400 bps modem
CONNECT 4800
11
Connected to a 4800 bps modem
CONNECT 9600
13
Connected to a 9600 bps modem
CONNECT 14400
15
Connected to a 14 400 bps modem
CONNECT 19200
61
Connected to a 19 200 bps modem
CONNECT 28800
65
Connected to a 28 800 bps modem
CONNECT 1200/75
48
Connected to a 1200/75 bps modem
Figure 15.3 shows an example session when connecting one modem to another. Initially the
modem is set up to receive commands from the computer. When the computer is ready to
make a connection it sends the command ' ATDH 54321 ' which makes a connection with tele-
phone number 54321 using tone dialing. The modem then replies with an OK response (a 0
value) and the modem tries to make a connection with the remote modem. If it cannot make
the connection it returns back a response of NO CARRIER (3), BUSY (7), NO DIALTONE
(6) or NO ANSWER (8). If it does connect to the remote modem then it returns a connect
response, such as CONNECT 9600 (13). The data can then be transmitted between the mo-
dem at the assigned rate (in this case 9600 bps). When the modem wants to end the connec-
tion it gets the modem's attention by sending it three '+' characters ('+++'). The modem will
then wait for a command from the host computer. In this case the command is hang-up the
connection (ATH). The modem will then return an OK response when it has successfully
cleared the connection.
 
Search WWH ::




Custom Search