Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication at high data rates takes longer than expected #2

Open
vedranMv opened this issue Oct 1, 2020 · 0 comments
Open

Communication at high data rates takes longer than expected #2

vedranMv opened this issue Oct 1, 2020 · 0 comments
Assignees

Comments

@vedranMv
Copy link
Owner

vedranMv commented Oct 1, 2020

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%
@vedranMv vedranMv self-assigned this Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant