Improve WIFI data transfer speed

I setup a system like yours but with a few modifications:

  • no SD card, fixed String data + a counter (~40 data characters per line)
  • Arduino connected to laptop Windows 10 Mobile Hotspot to route data trough laptop
  • laptop connected to WiFi router
  • Raspberry Pi 4 Apache Server with PHP connect to router trough Ethernet
  • your PHP script converted to English only :slight_smile:
  • Windows 10 Task Manager show network performance for Hotspot
  • sending data while pushing a button to ensure sustained transfer for measurement

I received about 60 lines of data per second (similar to your setup). During that time, the Task Manager showed a received data rate of ~250kBit/s. That means the 24kBytes per second resulted in a raw data transfer rate of 2.4kBytes per second (10%).

I confirmed the data by looking at the network traffic with WireShark and the data file.

WireSharks shows each request is sent in a separate package, there are multiple ACK TCP packages send in between, and the server sends HTTP OK packets back.

Your approach seems to be fundamentally wasting a lot of data rate by sending unnecessary data e.g. GET, recieverdata.php, HTTP/1.0, User-Agent ...

It looks to me like you need another protocol. From what I guess you are basically calling web page links and the server creates a log file of the links you called.

I do not have a solution right now, but I already wanted to give you something to think about and I have a few questions.

  • Is there a reason why you chose the HTTP protocol?
  • Did you investigate other options inside HTTP?
  • Did you consider MQTT, FTP or other protocols?

I will give this some thought and get back to you. Maybe somebody else has a pointer to get you started as well.