TCP client mode - auto re-connect ?

nccchirag
Posts: 7
Joined: Mon Mar 23, 2015 7:26 pm

TCP client mode - auto re-connect ?

Postby nccchirag » Sat Apr 11, 2015 9:06 pm

ESP - TCP Client
Embedded Linux Server - TCP Server

if the tcp client on ESP is disconnected from server, how to enable auto reconnect ?

kindly guide

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: TCP client mode - auto re-connect ?

Postby ESP_Faye » Mon Apr 13, 2015 2:43 pm

Hi,

So sorry that there is no auto reconncet.

You could call espconn_connect in espconn_disconnect_callback(normal disconnect) or espconn_reconnect_callback(abnormal disconnect) to reconnect TCP server.

Thanks for your interest in ESP8266 !

nccchirag
Posts: 7
Joined: Mon Mar 23, 2015 7:26 pm

Re: TCP client mode - auto re-connect ?

Postby nccchirag » Mon Apr 13, 2015 3:27 pm

this would require a custom firmware compilation (based on 0.9.5) rt ?

ESP_Faye
Posts: 1646
Joined: Mon Oct 27, 2014 11:08 am

Re: TCP client mode - auto re-connect ?

Postby ESP_Faye » Mon Apr 20, 2015 2:13 pm

Yes, do you mean using AT commands ?

Call AT+CIPSTART to create a TCP connection again, if message about disconnection is received.

nccchirag
Posts: 7
Joined: Mon Mar 23, 2015 7:26 pm

Re: TCP client mode - auto re-connect ?

Postby nccchirag » Mon May 04, 2015 10:40 pm

with AT commands, AT+CIPSTART would have to be issued by the MCU
can the SDK take care of the auto re-connection ... ?
eg. firmware would autoconnect to wireless router if it is rebooted .. but the TCP connection would have to be manually initiated from the MCU via AT command

Who is online

Users browsing this forum: No registered users and 188 guests