DART 200 CDPD Modem User’s Guide
8 Application Programming
Sierra Wireless, Inc.
8-4
Error recovery
Good application design includes provisions for handling errors. Insert
code to perform the error-handling function after every operation where
an error might occur, such as after every AT command, where the most
likely failure is modem power loss, and after every communications
operation where these five distinct errors are possible:
1.
Loss of modem power.
2.
Loss of radio signal.
3.
Loss of network registration.
4.
Loss of host connection (does not apply to UDP).
5.
Loss of online mode (a power reset has occurred).
Failure of a communications operation (usually send or receive) is
indicated by:
•
Send - A time out or an error response
•
Receive - A time out
If the MAS is capable of sensing signal status over the RS-232 interface
then testing for loss of signal, registration, or connection can be done (if
desired) before attempting the send/receive operation. If it is not (or the
application designer chooses not to sense prior to I/O operations), then
testing follows failures only.
There is no specific test for loss of modem power. If the modem is in
online mode, and the application does not get an
OK
or
0
response to the
escape sequence, then power loss can be assumed. Similarly, if the
modem is in command mode and the application fails to get the expected
response to an
AT command, then power loss can be assumed.
Status information and error codes, to be analyzed to determine
appropriate error recovery actions, can be obtained from the Data Set
Ready (DSR) and Data Carrier Detect (DCD) signals, or from Status
(S-)Registers 56, 57, 62, 63, 101, 102 and 126. The use of DSR and DCD
for basic status sensing is recommended (if the MAS supports it) for both
speed and simplicity. The available information, by source, is
summarized below.
•
DCD - This signal can be set up at modem initialization time to
follow the state of the connection established condition (
&C1
), the
state of the RF in range condition (
&C3
), or the modem’s
registration state (
&C4
). The default is
&C1
•
DSR - This signal can be set up at modem initialization time to
follow the state of the connection established condition (
&S1
), the
state of the RF in range condition (
&S2
), or the modem’s registration
state (
&S3
). The default is
&S0
(always active)
Содержание DART 200
Страница 4: ...DART 200 CDPD Modem User s Guide Sierra Wireless Inc iv...
Страница 18: ...DART 200 CDPD Modem User s Guide About This Guide Sierra Wireless Inc xviii...
Страница 50: ...DART 200 CDPD Modem User s Guide 3 CPDP Security Features Sierra Wireless Inc 3 4...
Страница 86: ...DART 200 CDPD Modem User s Guide 5 DART Supported Protocols Sierra Wireless Inc 5 32...
Страница 90: ...DART 200 CDPD Modem User s Guide 6 Device Attachment Sierra Wireless Inc 6 4...
Страница 94: ...DART 200 CDPD Modem User s Guide 7 Vehicle Installation Considerations Sierra Wireless Inc 7 4...
Страница 120: ...DART 200 CDPD Modem User s Guide 8 Application Programming Sierra Wireless Inc 8 26...
Страница 130: ...DART 200 CDPD Modem User s Guide D SLIP Setup Examples Sierra Wireless Inc D 4...
Страница 144: ...DART 200 CDPD Modem User s Guide E S Registers Sierra Wireless Inc E 14...
Страница 169: ...DART 200 CDPD Modem User s Guide F DART AT Command Set PN1197 00 Revision 1 0 F 25...
Страница 176: ......
Страница 180: ...DART 200 CDPD Modem User s Guide H Problem Sheet Sierra Wireless Inc H 2...
Страница 202: ...DART 200 CDPD Modem User s Guide Index Sierra Wireless Inc Index 10...