User Manual

Table Of Contents
SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R11
18Internet protocol transport layer
Page 188 of 308
18.8Get Socket Error +USOER
+USOER
SARA-R404M SARA-R410M-01B SARA-R410M-02B SARA-R410M-52B SARA-R412MModules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No - TCP/UDP/IP
Error +CME
Error
18.8.1Description
Retrieves the last error occurred in the last socket operation, stored in the BSD standard variable error.
18.8.2Syntax
Type Syntax Response Example
Action AT+USOER +USOER: <socket_error>
OK
+USOER: 104
OK
18.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
18.9Connect Socket +USOCO
+USOCO
SARA-R404M SARA-R410M-01B SARA-R410M-02B SARA-R410M-52B SARA-R412MModules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial No No No < 120 s TCP/UDP/IP
Error +CME
Error
18.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.
18.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
Test AT+USOCO=? +USOCO: (list of supported
<socket>s),"remote_host",(list of
+USOCO: (0-6),"remote_host",(1-
65535),(0-1)
OK