
!
5. TCP/IP-Related AT Commands
5.2.8. AT+CIPBUFRESET—Resets the Segment ID Count
Response
<current segment ID>,<segment ID of which sent successfully>
OK
>
•
Wrap return
>
begins receiving serial data; when the length of data defined by the parameter
<length>
is met, the data is sent; if the data length over the value of
<length>
, the data will be discarded, and
the command returns
busy
.
•
If the connection cannot be established, or if it is not a TCP connection, or if the buffer is full, or some
other error occurs, the command returns
ERROR
•
If data is transmitted successfully,
‣
for single connection, the response is:
<segment ID>,SEND OK
‣
for multiple connections, the response is:
<link ID>,<segment ID>,SEND OK
Parameters
•
<link ID>
: ID of the connection (0~4), for multiple connections.
•
<segment ID>
: uint32; the ID assigned to each data packet, starting from 1; the ID number increases
by 1 every time a data packet is written into the buffer.
•
<length>
: data length; MAX: 2048 bytes.
Notes
•
This command only writes data into the TCP-send-buffer, so it can be called continually, and the user
need not wait for
SEND OK
; if a TCP segment is sent successfully, it will return
<segment ID>,SEND OK
.
•
Before data length reaches the value defined by
<length>
, input
+++
can switch back from data mode
to command mode, and discard the data received before.
•
This command can NOT be used for SSL connections.
Set
Command
1. Single connection: (
+CIPMUX=0
)
AT+CIPBUFRESET
2. Multiple connections: (
+CIPMUX=1
)
AT+CIPBUFRESET=<link ID>
Response
OK
If the connection is not established or there is still TCP data waiting to be sent, the response will be:
ERROR
Parameter
<link ID>
: ID of the connection (0~4), for multiple connections.
Note
This command can only be used when
AT+CIPSENDBUF
is used.
Espressif
!
/
!
47 58
2017.05