User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
19Internet protocol transport layer
Page 212 of 401
Parameter Type Description
- 0 (default value): disabled
o 128: linger on close if data present
<opt_val>: numeric parameter, it sets on/off the "linger" option.
- 0 (default value): disabled
- 1: enabled
<opt_val2>: signed 16 bit numeric value, linger time, the range goes from 0 to
32767 in milliseconds. The default value is 0.
o 512: local address and port re-use
<opt_val>: numeric parameter, it enables/disables "local address and port re-
use":
- 0 (default value): disabled
- 1: enabled
19.6.4Notes
SARA-R4 / SARA-N4
The setting <level>= 6 (TCP protocol) and <opt_name>= 2 (keepidle option) is not supported.
19.7Close Socket +USOCL
+USOCL
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial No No No < 120 s (except
URC)
+CME Error
19.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.
19.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
19.7.3Defined values
Parameter Type Description
<socket> Number Socket identifier.
SARA-R4 / SARA-N4 - 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.