esp8266 Telnet slow performance
Posted: Thu Dec 10, 2015 11:41 am
The project involves a GY-87 navigation pcb MPU6050 HMC5883 and a BMP180 Arduino IDE 1.6.5
It is working ( no FIFO overflows) with an esp8266 115200 Serial >usb>PC serial Comm port connection to a modified Processing teapot app running on a Fast Windows PC.
Mod to teapot code is small it just allows for a heading from magnetometer to be added to the packet and be displayed.
The below code uses telnet. The esp8266 is the server and the teapot app the client.
If this worked well it would allow for a wireless connection.
Well the telnet code works but every other reading from the MPU6050 gets a MPU6050 FIFO overflow error. It makes the teapot animation a bit jerky.
The issue appears to be a speed bottleneck with the esp8266 WIFI.
Can anyone confirm that the esp8266 can't get packets out quickly?
The code below allows for more than one teapot client to receive the data max clients is 3 but the issue occurs with a single client.
The serial print is the the Arduino IDE console and it makes no diference to the issue if it is commented out.
[code]
for(int i = 0; i < MAX_SRV_CLIENTS; i++)
{
if (serverClients[i] && serverClients[i].connected())
{
size_t len=18;
serverClients[i].write((char*) &teapotPacket, len);
//// needs the datastructure and its length (char*) defines the pointer's type for idexing
//// and &teapotPacket is the address
Serial.print("\nClient=");
Serial.print(i);
Serial.print("packet=");
Serial.print(teapotPacket[15]);
}
}
//Serial.write(teapotPacket, 18);
[/code]
It is working ( no FIFO overflows) with an esp8266 115200 Serial >usb>PC serial Comm port connection to a modified Processing teapot app running on a Fast Windows PC.
Mod to teapot code is small it just allows for a heading from magnetometer to be added to the packet and be displayed.
The below code uses telnet. The esp8266 is the server and the teapot app the client.
If this worked well it would allow for a wireless connection.
Well the telnet code works but every other reading from the MPU6050 gets a MPU6050 FIFO overflow error. It makes the teapot animation a bit jerky.
The issue appears to be a speed bottleneck with the esp8266 WIFI.
Can anyone confirm that the esp8266 can't get packets out quickly?
The code below allows for more than one teapot client to receive the data max clients is 3 but the issue occurs with a single client.
The serial print is the the Arduino IDE console and it makes no diference to the issue if it is commented out.
[code]
for(int i = 0; i < MAX_SRV_CLIENTS; i++)
{
if (serverClients[i] && serverClients[i].connected())
{
size_t len=18;
serverClients[i].write((char*) &teapotPacket, len);
//// needs the datastructure and its length (char*) defines the pointer's type for idexing
//// and &teapotPacket is the address
Serial.print("\nClient=");
Serial.print(i);
Serial.print("packet=");
Serial.print(teapotPacket[15]);
}
}
//Serial.write(teapotPacket, 18);
[/code]