I’m having some issues trying to use W5500 as TCP client. I cannot seem to be able to properly set the Destination IP and Port. As previously mentioned, reading them after setting returns zero by design. The problem is that W5500 does not send the SYN packet. Using Wireshark I can see an ARP packet sent by W5500 asking about IP 0.0.0.0, after issuing the CONNECT comand. This seems like an indication that the destination IP address is not properly set.
I’m not using your library but developing my own version for a specific project by necessity. I can connect well when in TCP server mode using Hercules on Windows 10. I can also do it on Linux Mint.
Is there any particular moment to set the destination IP or port, before the CONNECT command is issued? On a previous post it was mentioned that we should do it before OPEN but still it has no effect. My code verifies the PHY status, waits for Sn_CR register to return to zero, and checks for status until timeout. There does not seem to be any issues with timings. I tried setting up extra delays between various operations.
Please, can you give me some hint on what to check? Is it mandatory to configure the following registers: Sn_MSSR, Sn_TOS, Sn_TTL, Sn_FRAG or Sn_KPALVTR, before trying to establish a TCP connection? I’m keeping them at default values. I’m also not setting Sn_DHAR since it seems to be only important for MACRAW and UDP modes.