D T 5 0 - M C O M M A N D R E F E R E N C E G U I D E 1 . 1 P a g e
28 | 38
+UUDCP:1,1,1,04D3B0285423p,1011
We try to read 5 bytes before something has been sent from remote side and see that we get +UDATR
response that 0 bytes where read followed by +UUDATA event that tells us that 0 bytes are in the
incoming buffer.
+UDATR:0
OK
+UUDATA:1,0
Now the remote side send 9 bytes of data and we get an event to indicate that there are 9 bytes to be
read.
+UUDATA:1,9
Now we read 5 bytes of data in binary format
AT+UDATR=1,2,5
+UDATR:5 12345
OK
We get an event that indicates that 4 bytes are still left in buffer to be read.
+UUDATA:1,4
Now we try to read 5 bytes of data in hex format, but only receive 4 bytes since buffer is empty after
that.
AT+UDATR=1,1,5
+UDATR:4,36373839
OK Now we get event that indicate that there are no more bytes to read.
+UUDATA:1,0
7.1.13 Write Data in AT Command Mode +UDATW
Generic write command that can be used for any peer connection created with a url-scheme starting
with “at
-
” (see +UDCP)
AT Command
Description
AT+UDATW=<peer_handle>, <data_format>,<data>
Send data o peer, where
data_format is 0 or 1 (string or
hexidecimal)
AT+UDATW=<peer_handle>,<data_format>,<data_length>
Send data to peer, where
data_format is 2 (binary). The
command response is first a data