ESP8266 Developer Zone The Official ESP8266 Forum 2015-06-17T16:01:18+08:00 https://bbs.espressif.com:443/feed.php?f=66&t=607 2015-06-17T16:01:18+08:00 2015-06-17T16:01:18+08:00 https://bbs.espressif.com:443/viewtopic.php?t=607&p=2283#p2283 <![CDATA[Re: Timout immediately reconnects]]>
yes, “AT+CIPMODE=1” enter UART-WiFi passthrough mode,if connection broke,ESP8266 will always retry to connect to TCP server unless using “+++” and “AT+CIPMODE=0” to quit from UART-WiFi passthrough mode.

Thanks for your advice,we will add this description in the documentation.

Statistics: Posted by ESP_Faye — Wed Jun 17, 2015 4:01 pm


]]>
2015-06-17T15:04:57+08:00 2015-06-17T15:04:57+08:00 https://bbs.espressif.com:443/viewtopic.php?t=607&p=2282#p2282 <![CDATA[Re: Timout immediately reconnects]]>

Code:

AT+GMR

AT version:0.25.0.0(Jun  5 2015 16:27:16)
SDK version:1.1.1
compile time:Jun  5 2015 21:03:10

OK
AT+CWSAP_CUR="8266","88888888",5,3


OK
AT+CIPMUX=1


OK
AT+CIPSERVER=1,1112


OK
AT+CIFSR

+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"1a:fe:34:a6:62:d7"
+CIFSR:STAIP,"0.0.0.0"
+CIFSR:STAMAC,"18:fe:34:a6:62:d7"

OK
AT+CIPSTO=10


OK
0,CONNECT

+IPD,0,4:12340,CLOSED
0,CONNECT

+IPD,0,4:ABCD0,CLOSED
0,CONNECT
0,CLOSED
0,CONNECT
0,CLOSED
0,CONNECT
0,CLOSED


Here's a log from the client with your commands, plus a couple of mine at the end

Code:

AT+GMR

AT version:0.25.0.0(Jun  5 2015 16:27:16)
SDK version:1.1.1
compile time:Jun  5 2015 21:03:10

OK
WIFI GOT IP

OK
AT+CIPSTART="TCP","192.168.4.1",1112

CONNECT

OK
AT+CIPSEND=4


OK
>
Recv 4 bytes

SEND OK


ERROR
AT+CIPMODE=1


OK
AT+CIPSTART="TCP","192.168.4.1",1112

CONNECT

OK
AT+CIPSEND


OK

>


So it looks like it's the AT+CIPMODE=1 command that causes the client to immediately reestablish the timed out session with the server. Is that 'as designed'? If so, perhaps it should be documented in the manual?

Statistics: Posted by mvandere — Wed Jun 17, 2015 3:04 pm


]]>
2015-06-16T16:15:01+08:00 2015-06-16T16:15:01+08:00 https://bbs.espressif.com:443/viewtopic.php?t=607&p=2261#p2261 <![CDATA[Re: Timout immediately reconnects]]>
What's the AT version are you using , you can get it by command "AT+GMR"

Are you using our official AT firmware (\esp_iot_sdk_v1.1.1\bin\at) ?http://bbs.espressif.com/viewtopic.php?f=5&t=554

Sorry that I can't duplicate your problem, could you offer your test steps ?
Serial-COM6 is the ESP8266 as softAP and TCP server, Serial-COM7 is another ESP8266 as station and TCP client. Here is my test result, it works fine.

Reconnect_test.png

Statistics: Posted by ESP_Faye — Tue Jun 16, 2015 4:15 pm


]]>
2015-06-16T15:09:23+08:00 2015-06-16T15:09:23+08:00 https://bbs.espressif.com:443/viewtopic.php?t=607&p=2258#p2258 <![CDATA[Re: Timout immediately reconnects]]>
Is that normal for the ESP8266 to try and reconnect?

Is there a way to turn that on and off?

Statistics: Posted by mvandere — Tue Jun 16, 2015 3:09 pm


]]>
2015-06-16T14:10:00+08:00 2015-06-16T14:10:00+08:00 https://bbs.espressif.com:443/viewtopic.php?t=607&p=2250#p2250 <![CDATA[Re: Timout immediately reconnects]]>
It seems that your TCP client is trying to reconnect, not ESP8266.

Please create TCP client with another tool , for example , "NetAssist.exe" or "TCP&UDPDebug" , and try it again.

Thanks for your interest in ESP8266 !

Statistics: Posted by ESP_Faye — Tue Jun 16, 2015 2:10 pm


]]>
2015-06-16T08:59:31+08:00 2015-06-16T08:59:31+08:00 https://bbs.espressif.com:443/viewtopic.php?t=607&p=2245#p2245 <![CDATA[Timout immediately reconnects]]>
I'm using an ESP-12 and AT commands 25 and I am finding that when device is set as a TCP server it reconnects immediately after a timeout disconnection.

Here's a log

Code:

AT+CWMODE_CUR=3


OK
AT+CWSAP_CUR="ESP8266","",5,0


OK
AT+CIFSR

+CIFSR:APIP,"142.255.49.94"
+CIFSR:APMAC,"c5:7c:fe:06:ff:ff"
+CIFSR:STAIP,"0.0.0.0"
+CIFSR:STAMAC,"00:56:52:04:32:20"

OK
AT+CIPMUX=1


OK
AT+CIPSERVER=1,1001


OK
0,CONNECT

+IPD,0,1:s
+IPD,0,1:s
+IPD,0,1:s
+IPD,0,1:s
+IPD,0,1:s0,CLOSED
0,CONNECT
0,CLOSED
0,CONNECT
0,CLOSED
0,CONNECT
0,CLOSED
0,CONNECT


The client (als an ESP-12) connected sent the noted 's' characters and then just sat there sending nothing further. The port 'closed' and immediately reconnected every three minutes (the 180 second default). Shouldn't it have stayed closed?

Thanks.

Statistics: Posted by mvandere — Tue Jun 16, 2015 8:59 am


]]>