Download Multitech MultiModem Cell MTCBA-C1 User guide

Transcript
Chapter 17 – TCP APP AT Commands
Optnum
8
Value
Format
0-255
9
0-255
Description
UDP
Time-to-live for IP packets
default: 64
Type of Service
default: 0
RW
RW
TCP
TCP
Client Server
RW
RW
RW
RW
Notes:
•
•
The +WIPOPT command will return ERROR if the socket is not active.
Option 3 is used to check whether an UDP socket is bound to any other UDP socket or not.
When the UDP socket is created without specifying the IP address of the peer, then option 3
will be read as 0 ( FALSE). This is because there is no destination IP address to
communicate with. If the UDP socket is created by specifying the peer IP address, the option
will be read as 1 (TRUE). This is because the peer IP address will be resolved by the DNS
and the socket is said to be bounded to the peer socket. Hence this option will be read as
TRUE.
Closing a Service +WIPCLOSE
Description:
Syntax:
Values:
The +WIPCLOSE command is used to close a socket session. AT+WIPCLOSE closes the local
socket at which point the index can be re-used. When AT+WIPCLOSE is used to close a TCP
socket, a TCP FIN is sent to the peer socket notifying the peer the local socket has closed.
When a TCP socket session is closed by its peer, an unsolicited event is generated
(+WIPPEERCLOSE). However, the local socket must still be closed using AT+WIPCLOSE.
Command syntax: AT+WIPCLOSE=<protocol>,<index> Command Possible responses
Command
AT+WIPCLOSE=<protocol>,<index>
AT+WIPCLOSE=?
AT+WIPCLOSE?
<protocol>
1
UDP
2
TCP client
3
TCP server
<index>
1-8 Socket or session identifier
Possible Responses
OK
OK
AT+WIPDATA=<protocol>,<index>
Close Service Status +WIPPEERCLOSE
Description:
This unsolicited response indicates the local socket was closed by the peer. This response will
only be output for connected TCP sockets.
Syntax:
Response syntax: AT+WIPPEERCLOSE=<protocol>,<index>
Possible Responses
+WIPPEERCLOSE: 2,3
Note: TCP socket index 3 is closed
Response Values:
<protocol>
2
TCP Client
<index>
1-8 Socket or session identifier
Multi-Tech Systems, Inc. CDMA C1 AT Commands Reference Guide (PN S000478C)
106