
SARA-R4/N4 series - AT Commands Manual
UBX-17003787 - R09
18 Internet protocol transport layer
Page 186 of 307
18.7 Close USOCL
+USOCL
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.7.1 Description
Closes the specified socket, like the BSD close routine. In case of remote socket closure the user is notified
via the URC.
By default the command blocks the AT command interface until the the completion of the socket close
operation. By enabling the <async_close> flag, the final result code is sent immediately. The following
+UUSOCL URC will indicate the closure of the specified socket.
18.7.2 Syntax
Type
Syntax
Response
Example
Set
AT+USOCL=<socket>[,<async_
close>]
OK
AT+USOCL=2
OK
Test
AT+USOCL=?
+USOCL: (list of supported
<socket>s)
OK
+USOCL: (0-6),(0-1)
OK
URC
+UUSOCL: <socket>
+UUSOCL: 2
18.7.3 Defined values
Parameter
Type
Description
<socket>
Number
Socket identifier. The range goes from 0 to 6
<async_close>
Number
Asynchronous close flag. The flag has effect for TCP connections only. Allowed
values:
•
0 (default value): the operation result is returned only once the result of the TCP
close becomes available, locking the AT interface until the connection closes.
•
1: the final result code is returned immediately unlocking the AT interface and
making it available for the execution of other AT commands. Once the result of TCP
close becomes available, it is notified to the AT interface through the +UUSOCL
URC.
18.7.4 Notes
SARA-R404M / SARA-R410M-01B
• The <async_connect> parameter is not supported.
18.8 Get Socket Error +USOER
+USOER
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
full
No
No
No
-
18.8.1 Description
Retrieves the last error occurred in the last socket operation, stored in the BSD standard variable error.