SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R09

18Internet protocol transport layer
Page 186 of 307
18.7î™–î™–î™–î™–Close Socket +USOCL
+USOCL
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 (except
URC)
+CME Error
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-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.