Wifi Server Delay
Posted: Tue Jul 12, 2016 12:12 am
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:
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();
}
}