Here we can all chat about fixing the AT+ command structure and the associated responses.

User avatar
By saper_2
#3287
GregorPa wrote:Hello Sapper,

I think you mean me: saper_2 ...
GregorPa wrote:See first example.

Where, what? - sorry don't know what example.
GregorPa wrote:Channel 0 automaticly close afer i think 10 s.

I think no, I even waited about 40min then sent another data, result: next context-id assigned.
Take a good look: I connect (+CIPACCEPT), send data (+CIPDR), and disconnect (CIPDISCONNECT) right on - this all is done in less than 1sec, I do not keep open connection.
Then I read data from connection buffer by CIPRD=[id] but, with new connection there is created new context-connection (new id is assigned up to 4) every time I connect and send data (and finally disconnect). Connection context are not released. If I call CIPCLOSE=context-id to release one, then when I try send data to module, the esp get wdt_reset.
GregorPa wrote:Tray example with send commad without pause. :mrgreen:

I don't know exactly what you mean... I create tcp server on ESP and send data to him from PC, for now I do not test TCP client mode.
User avatar
By igrr
#3292 @saper_2
Thanks for reporting this, i'll take a look. Something has probably changed in SDK 0.9.3, because CIPCLOSE used to work before I have updated.
Additionally there is an issue spotted by scargill that seems to be related.
User avatar
By saper_2
#3306 If I remember correctly this happened in previous fw (from 2014-11-18 - don't know commit no.) too, the problem with releasing buffer/connection-contex in tcp server mode.
Also I have "feature" request (which connects to this bug) :) , AT+CIPRD=xxx could close and release connection-contex after spilling out data from buffer. That's way programmer can save few cpu clock for sending CIPCLOSE=xxx :) , but I'm lazy programmer ;) so this is only my idea.

Of course the problem concerns +CIPLISTEN - The TCP server .
I just tested client mode, there is no problem with sending data from esp, so the problem apply only for tcp server mode. If you need some more info (in my abilities) feel free to ask, I'm happy to help with tcp server :) .