User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
19Internet protocol transport layer
Page 216 of 401
For binary syntax:
o After the command is sent, the user waits for the @ prompt. When it appears the stream of bytes
can be provided. After the specified amount of bytes has been sent, the system provides the final
result code. The feed process cannot be interrupted i.e. the return in the command mode can be
effective only when the number of bytes provided is the declared one.
o After the @ prompt reception, wait for a minimum of 50 ms before sending data.
o The binary extended syntax is the only way for the system to accept control characters as data; for
the AT command specifications 3GPP TS 27.005 [15], characters like <CR>, <CTRL-Z>, quotation
marks, etc. have a specific meaning and they cannot be used like data in the command itself. The
command is so extended with a specific acceptance state identified by the @ prompt.
o This feature can be successfully used when there is need to send a byte stream which belongs to a
protocol that has any kind of characters in the ASCII range [0x00,0xFF].
o In binary mode the module does not display the echo of data bytes.
o Binary syntax is not affected by HEX mode option.
For <data> parameter not all of the ASCII charset can be used.
SARA-R4 / SARA-N4
In the information text response to the set command +USOWR: <socket>,<length>, the <length>
parameter may not match with the value of the set command due to data segmentation. In this case, use
the AT+USOCTL=1 command to get the number of bytes that were sent. If not all intended bytes are sent
then send the remaining bytes using the +USOWR AT command.
19.11SendTo command (UDP only) +USOST
+USOST
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No < 10 s +CME Error
19.11.1Description
Writes the specified amount of data to the remote address, like the BSD sendto routine, and returns the
number of bytes of data actually written. It can be applied to UDP sockets only. This command allows the reuse
of the same socket to send data to many different remote hosts.
There are three kinds of syntax:
Base syntax normal: writing simple strings to the socket, there are characters which are forbidden.
Base syntax HEX: writing hexadecimal strings to the socket, the string will be converted in binary data and
sent to the socket. To enable it, see the AT+UDCONF=1 command description.
Binary extended syntax: mandatory for writing any character in the ASCII range [0x00, 0xFF].
It is strongly recommended using this command to send data while using UDP sockets. It is also
recommended avoiding the +USOCO AT command usage with UDP socket.
If no network signal is available, outcoming UDP packet may be lost.
The information text response to the test command provides the information about the bynary extended
syntax only where supported.
19.11.2Syntax
Type Syntax Response Example
Base syntax
Set AT+USOST=<socket>,<remote_
addr>,<remote_port>,<length>,
<data>,[<seq_no>]
+USOST: <socket>,<length>
OK
AT+USOST=3,"151.9.34.66",449,16,
"16 bytes of data"
+USOST: 3,16
OK
Binary syntax
Set AT+USOST=<socket>,<remote_
addr>,<remote_port>,<length>
@<data>
+USOST: <socket>,<length>
AT+USOST=3,"151.9.34.66",449,16
@16 bytes of data