I’m using W5500 on my designed board, everything is OK, I have dual simultaneously connection, in one my board (contain W5500) is server and in another it is client.
In client mode I use these functions (like Wiznet samples) (simplified codes):
- socket(sn, Sn_MR_TCP, destport, 0x00) --> OK
- connect(sn, destip, destport) --> OK
- send(sn, buf, size) --> OK
- close(sn) / disconnect(sn) --> OK
everything is OK and data is sent to server, but my TCP connection do not close after close or disconnect command. Instead it will close in next data sending in “connect” function, exactly after executing this line:
in one second previous connection closes and new one creating.
I did many things (for ex. re-run close functions in a loop several times), but as my terminal (Hercules) and Windows task manager (TCP connections) said it stay connected until next connect command.