Skip to content

Incorrect TCP packets when using W5500 with ESP32 #106

Open
@jozala

Description

@jozala

While using ESP32 with W5500 it sometimes sends malformed packet. Time periods between malformed packets differs significantly - from few seconds to couple of hours.
I've found this problem when using PubSubClient for MQTT where it caused client to be disconnected from MQTT broker.

To isolate the problem I've prepared very simple TCP server and I've been sending TCP messages to it with ESP32+W5500 in a single connection, continuously. It usually starts failing after few hours, then it breaks from time to time (sometimes within seconds, sometimes works for hours). I do not have this problem with ESP32 WiFi connection.

I've tried with another ESP32 and another W5500 with the same effect.

Please find Wireshark file with section of captured packages attached (packet number 15 is the problematic one).
raw_TCP_incorrect_incoming_packet.zip

Libraries with versions

Hardware used:

DOIT Esp32 DevKit v1
Wiznet W5500

Wiring between ESP32 and W5500

GPIO23 <--> MOSI
GPIO19 <--> MISO
GPIO18 <--> SCLK
GPIO5 <--> SCS
GPIO13 <--> RESET

Additional information

TCP server is set up in local network.
Simple implementation used to reproduce problem: https://github.com/maniekq/ESP32_W5500_TCP/blob/master/src/main.cpp#L73
Simple TCP server implementation: https://github.com/maniekq/servertcp-esp32

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions