esp8266 / esp8266/Arduino

ESP8266 Very Slow TCP Socket Transfer Speed

Open
#5,918 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to send data from ESP8266 to a smartphone via TCP sockets.
Hardware: NodeMCU with ESP8266MOD, various Android and iOS phones

I'm sending 1000 blocks of 1024bytes from ESP8266 to the smartphone and can achieve data rates around 1Mbit/s which I find extremely slow. Using the exact same ESP8266 firmware but a Windows10 PC or Raspberry Pi as receiver, I see data rates of 2 Mbit/s. Still not fast, but at least twice the speed I get if the receiver is a smartphone. Oddly enough the data rate is the same for iOS and Android phones.

I've tried already different buffer sizes (below and above the MTU of 1460), WiFi channels, WiFi output power without any significant change in the overal data rate.
I'd be glad if somebody could have a look at the Arduino- and Android-project to tell me if I'm doing something wrong and how to achieve faster transfer speed: https://www.dropbox.com/s/iu8egzqqskcfdy7/TCPsocketDemo.zip?dl=0

I have decided to setup the smartphone as a hotspot, to rule out the WiFi router as bottleneck.
(Using the WiFi router actually reduced the speed a little bit)
If you want to try the project, please setup the Android phone as hotspot and enter the hotspot credentials in the Arduino project:
const char* ssid = "??????????";
const char* password = "??????";
const char* host = "192.168.43.1"; // please enter here the IP address of the hotspot

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.