Hi,
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?
Server Closes connection AFter every AT+CIPSEND command.
Re: Server Closes connection AFter every AT+CIPSEND command.
Postby Her Mary » Tue Jun 05, 2018 2:24 pm
The port 80 is usually for short connection.
Maybe you should ask your company's server engineer, how to make a long connection with your company server.
Hope to be helpful.
Maybe you should ask your company's server engineer, how to make a long connection with your company server.
Hope to be helpful.
-
- Posts: 21
- Joined: Wed May 16, 2018 12:33 pm
Server Closes connection AFter every ATCIPSEND command
Postby andreysnug » Mon Sep 03, 2018 6:29 am
No matter how big my files are, after upload of just one the connection always terminates. It propably is an issue of the right settings in ftpcafe, since on the PC with Filezilla I do not have any problems. What could be the problem?
Who is online
Users browsing this forum: No registered users and 137 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.