SARA-R4/N4 series - AT Commands Manual
UBX-17003787 - R09
18 Internet protocol transport layer
Page 191 of 307
Parameter
Type
Description
<remote_addr>
String
Remote host IP address or domain name of the remote host. For IP address format
reference see the
.
<remote_port>
Number
Remote host port, in range 1-65535
<length>
Number
Number of data bytes to write
•
Base syntax normal mode: range 1-1024
•
Base syntax HEX mode: range 1-512
•
Binary syntax mode: range 1-1024
<data>
String
Data bytes to be written (not all of the ASCII charset can be used)
18.11.4 Notes
• For base syntax:
o The value of <length> and the actual length of <data> must match
o For base syntax HEX mode, only ASCII characters 0-9, A-F and a-f are allowed. The length of the
<data> parameter must be two times the <length> parameter
• 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 returns with 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 That binary extended syntax is the only way for the system to accept control characters as data; for
the AT command specifications [
], 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
18.12 Read Socket Data +USORD
+USORD
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.12.1 Description
Reads the specified amount of data from the specified socket, like the BSD read routine. This command can
be used to know the total amount of unread data.
For the TCP socket type the URC
+UUSORD: <socket>,<length>
notifies the data bytes available for reading,
either when buffer is empty and new data arrives or after a partial read by the user.
For the UDP socket type the URC
+UUSORD: <socket>,<length>
notifies that a UDP packet has been received,
either when buffer is empty or after a UDP packet has been read and one or more packets are stored in the
buffer.
In case of a partial read of a UDP packet
+UUSORD: <socket>,<length>
will show the remaining number of data
bytes of the packet the user is reading.
(about UDP socket) Due to the UDP specific AT command, it is preferred to use the
to read data from UDP socket.
command does not require the usage of
before reading
data.
When applied to UDP active sockets if the UDP socket is not set in listening mode (see
) it will not
be possible to receive any packet if a previous write operation is not performed.