Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By skinman777
#50623 Hi Guys,
I am trying to connect an Android app to the ESP8266 and am seeing so significant delays in the transfer of data. I am using the WiFiServer to connect. I setup a WiFi server and connect my Android to it just fine, however, when I try to send packets of data I get significant delays. Sometimes in the 3-4 second range. I have tried using the 2.3.0 ver of the ESP libraries in Arduino IDE 1.6.8 but can't seem to figure out why the delay. I did connect the android app to my internal router and then send to the PC with no issues. However it doesn't seem to work with the ESP. I feel like I am missing something so I thought I would ask here.
Any help would be greatly appreciated.
Let me know if I need to elaborate on anything.

Thanks,
Ed

Code Below:

Code: Select all
WiFiServer server(2390); // TCP/IP
SoftwareSerial mySerial( 4, 5);    // RX, TX
void setup( )
{
  Serial.begin( 115200 );
   WiFi.mode(WIFI_STA);
   WiFi.softAP( "mySSID", "myPASS");

   server.begin();// START TCP/IP SERVER
}
WiFiClient client;
void loop( )
{
  //WiFiClient client = server.available();

  if (client)
  {
    while (client.connected())
    {
        if (client.available())
        {
           char command = client.read();
          Serial.println(itoa(command,buffer,10));
        }
     }
  }
  else
  {
    client = server.available();
  }
}
User avatar
By rudy
#50659 This is not much of an answer but maybe it would be helpful if you had a program like Wireshark that can log the transfers with a time stamp. If you can see the time sequence maybe that would give some clues as to why.
User avatar
By skinman777
#51228 Thanks for the thoughts. I have looked and it appears to be ESP closing the connection... Any other thoughts on this I am still kinda stuck.
Thanks for your assistance in advance!!!