Skip to content

Communication at high data rates takes longer than expected #2

@vedranMv

Description

@vedranMv

When trying larger amounts of data through (+18kB/s) a socket (_espClient::SendTCP()), sending routine often times out waiting for ESP reply. This is caused by the unexpected reply from the ESP, or wrong logic in the processing function triggered by the ISR.

This bug limits the speed to 4-5kB/s instead.

Steps to reproduce:

  1. Open a socket to TCP server (ESP8266::OpenTCPSock)
  2. Periodically (200Hz) send small chunk of data (100B) using ESP8266::GetClientBySockID()->SendTCP()
  3. Observe the amount of data received on the server side
  4. Observe TX, Rx lines from the ESP with logic analyzer

Expected behavior:
Login analyzer:

  • Timing to send the data fits with the baud rate being used
  • Time between consecutive sends fits with the sending frequency
    TCP server:
  • data arrives at a rate of 19.5kB/s +/-5%

Actual behavior:
Login analyzer:

  • Timing to send the data fits with the baud rate being used
  • Time between consecutive sends is the sending frequency, plus few milliseconds that it takes for watchdog to time out
    TCP server:
  • data arrives at a rate of 4-5kB/s +/-5%

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions