"Non-atomic" +CIPSEND bug

Rst7
Posts: 1
Joined: Thu Oct 27, 2016 8:37 pm

"Non-atomic" +CIPSEND bug

Postby Rst7 » Thu Oct 27, 2016 8:54 pm

I have a problem with reopen socket until data transfer performed.

For example:

Send to ESP: AT+CIPSEND=1,xxx\r\n
Receive from ESP: OK\r\n
Receive from ESP: >
Send to ESP: ...some...data... (first portion of data)
Receive from ESP: 1,CLOSED\r\n (remote client close connection when data transfered to internal buffer of ESP)
Send to ESP: ...some...data... (next portion of data)
Receive from ESP: 1,CONNECTED\r\n (remote client open new connection when data transfered)
Send to ESP ...some...data... (last portion of data, all data sended)
Receive from ESP: OK\r\n
Receive from ESP: SEND OK\r\n
...

In this case all data for the old connection sent in new connection.

What can I do with this?

Thank you.

Her Majesty
Posts: 155
Joined: Mon Oct 27, 2014 11:09 am

Re: "Non-atomic" +CIPSEND bug

Postby Her Majesty » Fri Mar 24, 2017 2:19 pm

Message "CLOSE" means the connection is closed, you should stop sending data.
Detect message "CONNECTED" to start a new transmission.

Who is online

Users browsing this forum: No registered users and 1 guest