User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
19Internet protocol transport layer
Page 213 of 401
19.7.4Notes
SARA-R404M / SARA-R410M-01B
The <async_close> parameter is not supported.
19.8Get Socket Error +USOER
+USOER
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No - TCP/UDP/IP
Error +CME
Error
19.8.1Description
Retrieves the last error occurred in the last socket operation, stored in the BSD standard variable error.
19.8.2Syntax
Type Syntax Response Example
Action AT+USOER +USOER: <socket_error>
OK
+USOER: 104
OK
19.8.3Defined values
Parameter Type Description
<socket_error> Number Code of the last error occurred in a socket operation. The allowed values are listed in
Appendix A.5
0: no error
19.9Connect Socket +USOCO
+USOCO
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial No No No < 120 s +CME Error
19.9.1Description
Establishes a peer-to-peer connection of the socket to the specified remote host on the given remote port, like
the BSD connect routine. If the socket is a TCP socket, the command will actually perform the TCP negotiation
(3-way handshake) to open a connection. If the socket is a UDP socket, this function will just declare the remote
host address and port for later use with other socket operations (e.g. +USOWR, +USORD). This is important
to note because if <socket> refers to a UDP socket, errors will not be reported prior to an attempt to write or
read data on the socket.
The estimated response time depends also by the DNS resolution. For further details about the estimated
response time related to the DNS resolution, see the +UDNSRN AT command.
19.9.2Syntax
Type Syntax Response Example
AT+USOCO=3,"151.63.16.9",1200
OK
AT+USOCO=2,"151.63.16.9",8200,1
OK
+UUSOCO: 2,0
Set AT+USOCO=<socket>,<remote_
addr>,<remote_port>[,<async_
connect>]
OK
AT+USOCO=2,"151.63.16.9",8230,0
OK