connection reset / dropped connections over wifi
Posted: Sat Jan 23, 2016 12:46 pm
Hello.
i'm working on a little project for the esp8266 (adafruit huzza board) and i have run into a problem.
my code works fine for the most part but after a sending data to the esp over a tcp connection something goes horribly wrong and the connection resets.
i have been using wireshark to see whats happening and it looks like if i sent data too fast or possibly too much at a time something in the tcp stack on the esp gets screwed up.
it looks like the esp looses data and then the connection goes out of sync resulting in the windows computer sending data trying to retransmit the same data.
the esp also tries to retransmit a few times but after a few seconds the esp sends a rest and a short while later the windows computer also resets the tcp connection.
have anyone seen this behavior before?
do i have to spend less time in loop() for some reason?
is there any known issues with the esps tcp stack?
is the esp using a lower mtu so i need to make sure i send less data at a time or possibly rate limit it even more?
it is very annoying and a deal breaker with unstable connections.
also something else i have seen is that if you have an ongoing connection to the esp and you reset it, the other end of the tcp connection (for example a windows computer) doesnt realize it lost the connection even when you send data.
so i suspect the esp after a reset does not sent a tcp reset as normal computers do in response to packets from known connections (previously established but not valid any more due to the reset)
i'm working on a little project for the esp8266 (adafruit huzza board) and i have run into a problem.
my code works fine for the most part but after a sending data to the esp over a tcp connection something goes horribly wrong and the connection resets.
i have been using wireshark to see whats happening and it looks like if i sent data too fast or possibly too much at a time something in the tcp stack on the esp gets screwed up.
it looks like the esp looses data and then the connection goes out of sync resulting in the windows computer sending data trying to retransmit the same data.
the esp also tries to retransmit a few times but after a few seconds the esp sends a rest and a short while later the windows computer also resets the tcp connection.
have anyone seen this behavior before?
do i have to spend less time in loop() for some reason?
is there any known issues with the esps tcp stack?
is the esp using a lower mtu so i need to make sure i send less data at a time or possibly rate limit it even more?
it is very annoying and a deal breaker with unstable connections.
also something else i have seen is that if you have an ongoing connection to the esp and you reset it, the other end of the tcp connection (for example a windows computer) doesnt realize it lost the connection even when you send data.
so i suspect the esp after a reset does not sent a tcp reset as normal computers do in response to packets from known connections (previously established but not valid any more due to the reset)