SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R09

18Internet protocol transport layer
Page 189 of 307
18.10.2î™–î™–î™–î™–Syntax
Type Syntax Response Example
Base syntax
Set AT+USOWR=<socket>,<length>,
<data>
+USOWR: <socket>,<length>
OK
AT+USOWR=3,12,"Hello world!"
+USOWR: 3,12
OK
Binary syntax
Set AT+USOWR=<socket>,<length> @<data>
+USOWR: <socket>,<length>
OK
AT+USOWR=3,16
@16 bytes of data
+USOWR: 3,16
OK
Test AT+USOWR=? +USOWR: (list of supported
<socket>s),(list of supported
<length>s),"HEX data"
+USOWR: (list of supported
<socket>s),(list of supported
<length>s),"data"
+USOWR: (list of supported
<socket>s),(list of supported
<length>s)
OK
+USOWR: (0-6),(0-512),"HEX data"
+USOWR: (0-6),(0-1024),"data"
+USOWR: (0-6),(0-1024)
OK
18.10.3î™–î™–î™–î™–Defined values
Parameter Type Description
<socket> Number Socket identifier. The range goes from 0 to 6.
<length> Number Number of data bytes to write:
• Base syntax normal mode: range 1-1024
• Base syntax HEX mode: range 1-512
• Binary extended syntax: range 1-1024
<data> String Data bytes to be written. Not all of the ASCII charset can be used.
18.10.4î™–î™–î™–î™–Notes
• For base syntax:
o The value of <length> and the actual length of <data> must match
• For base syntax HEX mode:
o Only the ASCII characters 0-9, A-F and a-f are allowed.
o 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 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.