SARA-R4/N4 series - AT Commands Manual
UBX-17003787 - R09
18 Internet protocol transport layer
Page 187 of 307
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
•
0: no error
18.9 Connect USOCO
+USOCO
SARA-R404M SARA-R410M-01B SARA-R410M-02B SARA-R410M-52B SARA-R412M
Modules
SARA-N4
Syntax
PIN required
Settings saved Can be aborted
Response time Error reference
Attributes
partial
No
No
No
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
supported <remote_port>s),(list of
supported <async_connect>s)
OK
+USOCO: (0-6),"remote_host",(1-
65535),(0-1)
OK
URC
+UUSOCO: <socket>,<socket_
error>
+UUSOCO: 2,0
18.9.3 Defined values
Parameter
Type
Description
<socket>
Number
Socket identifier. The range goes from 0 to 6
<remote_addr>
String
Remote host IP address or domain name of the remote host. For IP address format
reference see the
.
<remote_port>
Number
Remote host port, in range 1-65535
<async_connect>
Number
Asynchronous connect flag. The flag has effect for TCP connections only. Allowed
values: