Home > other >  ESP8266 four data transmission when a pair of TCP connection drops
ESP8266 four data transmission when a pair of TCP connection drops

Time:11-29

You for the higher-ups ESP8266 module in-depth study, ask a question:
ESP8266 four communication module a pair, a set to AP mode, and set up the Wifi account and password, IP address and port number, and set up more connection and open the server, the other four set to STA model, to join the AP Wifi network mode Settings, and open automatically establish a TCP connection, a pair of four data transmission, data of each node interaction time of 70 ms, a polling cycle four times, to read data, each STA node
In actual application, found that will automatically establish a TCP connection interruption, lead to can't transfer data, AP module can sometimes produce reset mode, lead to need to set up more connections and open server, this kind of problem of TCP connection drops of data transmission, how to solve?

CodePudding user response:

To see why first drops reset
The far distance? Voltage instability?

Can't find the reasons can only set up automatic reconnection and resend many times

CodePudding user response:

Now is the cause of the drop, to be close to the easy to drop, two meters is better, reset is speculation, because after four nodes all lost, will be more than AP node connection and restart the server configuration open, and then automatically connected, the STA node configuration is automatically a TCP connection, power supply is the AMS1117-3.3, TO252 packages of that kind of, the voltage should be no problem, ESP8266 module in AP mode, if failed data sent several times, the connection is not break, and the AP mode, each time the time interval to send data minimum requirements, my actual test, need more than 50 milliseconds, or it has been returned to send failure

CodePudding user response:

To have a heartbeat detection, timely find break line, and automatic reconnection
  • Related