ESP8266 Developer Zone The Official ESP8266 Forum 2018-09-03T06:29:06+08:00 https://bbs.espressif.com:443/feed.php?f=16&t=10121 2018-09-03T06:29:06+08:00 2018-09-03T06:29:06+08:00 https://bbs.espressif.com:443/viewtopic.php?t=10121&p=23107#p23107 <![CDATA[Server Closes connection AFter every ATCIPSEND command]]> Statistics: Posted by andreysnug — Mon Sep 03, 2018 6:29 am


]]>
2018-06-05T14:24:11+08:00 2018-06-05T14:24:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=10121&p=20631#p20631 <![CDATA[Re: Server Closes connection AFter every AT+CIPSEND command.]]> Maybe you should ask your company's server engineer, how to make a long connection with your company server.
Hope to be helpful.

Statistics: Posted by Her Mary — Tue Jun 05, 2018 2:24 pm


]]>
2018-06-02T14:47:44+08:00 2018-06-02T14:47:44+08:00 https://bbs.espressif.com:443/viewtopic.php?t=10121&p=20594#p20594 <![CDATA[Server Closes connection AFter every AT+CIPSEND command.]]>
I have a ESP-12f module that I am going to use to download a few hundred small files from our comapnies server. Unfortunately every time I download a single file, the connection is closed and I have to re-establish a new TCP connection. I have tried this on multiple servers and always get the same result. For example, when I issue these commands on Google:

AT+CIPSTART="TCP","google.com",80
AT+CIPSEND=29
GET http://www.google.com

Google sends me the webpage data that finishes with: "CLOSE" . And then I cannot issue any new CIPSEND commands unless I re-establish the connection using AT+CIPSTART="TCP","google.com",80 .

Since a TCP connection takes about 1 second to establish and I need to repeat this hundreds of times, I lose a lot of time when downloading multiple files. I also used the "TCP keep alive" parameter from the datasheet that is explained like this:

[<TCP keep alive>] optional, detection time interval when TCP is kept alive,
this function is closed by default.
0 : disable TCP keep-alive
1 ~ 7200 : detection time interval, unit: second

I used 1 and 1000 like this:

AT+CIPSTART="TCP","google.com",80,1

AT+CIPSTART="TCP","google.com",80,1000

But none of the above seem to be working and the connection is still closed immediately after one file is downloaded.

Is there any way to keep the connection alive until I manually close it myself?

Statistics: Posted by harry123 — Sat Jun 02, 2018 2:47 pm


]]>