General Tips and Techniques
The following tips and techniques can help the exchange of information
between the software controller and the modem command processor.
Commands in the command line should be ordered starting with the safest
and ending with the most risky. Risk is defined as the potential to generate
an ERROR result code, causing the remainder of the command line to be ignored.
Any command that may return an ERROR result code should be anticipated.
This or other unexpected results can be ignored unless the command is critical
(configuration or call placement).
Send I0 - Display Product Code or I4 at 1200
bits/s, which is supported by the majority of modem products. A modem reset
(&F or Z) should be performed at 1200 bits/s before sending the identification
commands.
Setup processing can be speeded by sending all but the last D
- Dial Command or S0 - Ring After Which To Answer
command at the highest DTE rate supported by the modem. The last command
must be sent at the speed at which the connection should be made (except
Vseries products which specify this with S37).
Any dependency on proper cabling can be eliminated by avoiding techniques
that depend on RS-232 signals.
Have the software scan for result codes, rather than depending on the condition
of the CD line.
Transparent flow control should be used with Vseries products rather than
with RTS/CTS signals.
The Hayes Patented Escape Sequence with guard time process and Hn
- Control The Switchhook command should hangup instead of terminate
a connection by dropping DTR.
Any unexpected RING result codes may indicate the last command may not have
been processed correctly. The command should be-issued.
The following is a sample Controller/Modem Exchange referenced to a clock.
Clock Controller Speed Modem
(1.2 kbits/s)
00000 ATZ<CR>
00034 ATZ><CR>
00068 (1 s to do reset)
01068 0<CR>(V0 stored as default)
01084 (delay additional 600
ms)
01684
ATEQV1S0=0S12=10S4=3H1<CR>
01884 ATEQV1S0=0S12=10S4=3HI<CR>
(echo)
02084
<CR><LF>960<CR><LF>
02142 <CR><LF>OK<CR><LF>
(19.2 kbits/s)
02192
ATM0X4L1S12=10S2=1&Q5W1S36=7S37=9&K5<CR>
02206 <CR><LF>OK<CR><LF>
02209
ATDT9W14045551212<CR>
38000 <CR><LF>CARRIER
2400<CR><LF>
45000 <CR><LF>PROTOCOL:
NONE<CR><LF>
45010 <CR><LF>CONNECT
2400<CR><LF>
(2.4 kbits/s)
(Connection Established)
(2.4 kbits/s)
00000 (delay 300 ms, need
200, add 100 for safety)
00300 (escape char is ^A,
S2=1)
00313 (waits 200 ms)
00513 <CR><LF>OK<CR><LF>
00538 ATHE1S2=43S12=50W0&Q0<CR>
00630 <CR><LF>OK<CR><LF>
Where to Go from Here
With the information provided here, you should be able to configure
a modem with AT commands for a variety of communication environments. If
you are just starting out with communications programming, this information
should provide you with sufficient tips to use the modem features through
a software program of your own.
If you are, or would like to become, a registered Hayes Software Developer,
you may receive additional technical material on Hayes products. For information
on qualification and registration procedures, contact Hayes Customer Service
at the telephone number and/or address provided with your modem package.
Click here to return to the Contents page.