User’s Guide | UDP/TCP Service |
PAD is ready and you may start assembling data into a packet while the registration process proceeds in parallel. The modem will buffer the data until the modem registers.
CAUTION
If +WS179=0 is used for immediate UDP connection, a failure to register is not reported to the host, and the packet can be lost.
If the Registration Wait Status register (+WS179) is set to 1, then the modem will not respond to the dial command until the registration process terminates. If the modem is registered, it will respond immediately. The response can be one of the following:
CONNECT | The modem has successfully registered and you can communicate with |
| the network. DCD will become active when this response is issued. |
NO CARRIER | The modem failed to register with the network within the time allowed |
| by +WS198. |
ERROR | An invalid IP or port number was specified or there was some other |
| error in the Dial command syntax. |
It is important to understand that CONNECT does not mean that you have established a communication link with the destination. UDP is “connectionless”, meaning that you only have a connection to the network. Data packets are not guaranteed to reach their destination using UDP.
If the Registration Wait Status is set to 1 and the modem is taking an unexpectedly long time to connect, the host can issue <ESC> (0x1B) to abort the dial process. The modem will respond with NO CARRIER.
TCP Client Connection
Note that two timers are used for the TCP connection process. +WS198 (Registration Wait Time) is used to timeout the network registration process. The default is 30 seconds. A second timer at S7 (TCP PAD Timeout) is used to time the TCP connection handshake. This timer defaults to 30 seconds as well. The TCP PAD Timeout starts when the Dial command is issued. If the modem was not already registered, then network registration will consume time from the handshake timer as well. In other words, the TCP PAD Timeout can run concurrently with the Registration Wait Timer.
The response to the Dial command when TCP is enabled does not depend on the setting of register +WS179 (Registration Wait Status). The CONNECT code is only returned on the successful network registration and TCP negotiation with the destination. A failure to register or negotiate the TCP connection is reported to the host by either a NO CARRIER or NO ANSWER result code. The response can be one of the following:
CONNECT | The modem has successfully registered and established the TCP |
| connection. You can now communicate with your destination. |
NO CARRIER | The modem failed to register with the network within the time allowed |
| by +WS198. |
NO ANSWER | The modem could register with the network but could not negotiate the |
| TCP handshake with your destination within the time allowed by |
| register S7. |
ERROR | An invalid IP or port number was specified or there was some other |
| error in the Dial command syntax. |
PAD ERROR | An internal modem error has occurred in the TCP stack. The modem |
| will have to be reset by issuing +WVRESET. |
Unlike UDP, a CONNECT message in TCP service does mean that you have established a communication link with the destination.
2110212 Rev 1.0 | Page 71 |