User Manual

Table Of Contents
SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R11
18Internet protocol transport layer
Page 191 of 308
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 [16], 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.
18.11SendTo command (UDP only) +USOST
+USOST
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 < 10 s TCP/UDP/IP
Error +CME
Error
18.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
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 +USOCO usage with UDP socket.
(about UDP socket): if no network signal is available, outcoming UDP packet may be lost.
To enable the base syntax HEX mode, see the AT+UDCONF=1 command description.
18.11.2Syntax
Type Syntax Response Example
Base syntax
Set AT+USOST=<socket>,<remote_
addr>,<remote_port>,<length>,
<data>
+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>
After the"@" prompt <length> bytes
of data are entered
@<data>
+USOST: <socket>,<length>
OK
AT+USOST=3,"151.9.34.66",449,16
@16 bytes of data
+USOST: 3,16
OK
Test AT+USOST=? +USOST: (list of supported
<socket>s),"remote_host",(list of
+USOST: (0-6),"remote_host",(1-
65535),(0-512),"HEX data"