I measured the ESP32's tcp socket communication maximum throughput, the maximum speed I achieved is 10Mbit/sec only.
I hope that ESP32's tcp socket is more faster than 10Mbps.
above 10Mbps available in ESP32? If then, please help how can I speed up.
Testing Environment and testing procedures and codes
ESP32 module A : Wifi Station. 802.11.bgn supporting , TCP Socket Client. 240MHz CPU Clock.
ESP32 module B : WiFi Access Point.802.11.bgn supporting, TCP Socket Server.240MHz CPU Clock.
the photo can seen here : http://cfile24.uf.tistory.com/image/263 ... 598A18B56C
the distance between module A and B : 10cm.
module A is WiFi connected to moulde B and then Socket connecting to module B's Tcp Socket Server,
and then modul A send data continuously to module B.
and then I measured the time interval during 10Mbytes sending complete.
the measured time interval is 8~10sec per 10Mbytes sending complete.
module A's codes of sending data
Code: Select all
uint8_t data_send[1000];
while(1){
rs = write(sock,data_send,1000); // 1kbyte sending.
if(rs <0){
printf("Send retv < 0");
}
else if(rs == 0){
printf("Send retv = 0");
}
else if(rs>0)
{
count_send++;
if(count_send == 10000){ // 10Mbytes((1kbyte * 10000)) sending
global_cnt++;
printf("Sended bytes = 10 Mbytes, count=%d \n",global_cnt);
count_send = 0;
data_send[0] = (uint8_t)global_cnt;
}
}
}
Code: Select all
while(1){
ssize_t sizeRead = read(clientSock, data_read, 1000);
if(sizeRead < 0)
{
printf("error recv: %d %s", sizeRead, strerror(errno));
}
else if(sizeRead == 0)
{
printf("recv retv = 0");
}
else if(sizeRead > 0)
{
accum_readbyte += sizeRead;
if(accum_readbyte > 10000000) // 10Mbytes
{
global_cnt++;
printf("Data Received 10 Mbytes. count=%d\n",global_cnt);
accum_readbyte = 0;
}
}
}