Socket it still init after connect


I’m trying to set up a TCP connection from a w5500 to a local server. The socket seems to initialise fine, but when I issue the command to connect, the status register still says INIT. What does this mean? I would either expect it to closed or be established, based on the documentation.

The interrupt register says that there is a timeout btw.

Looks like it may have been some IP address issues. Seems to be working now. Does anyone know if there are any detailed and accurate schematics for the w5500io board?

On a similar note ( I found the schematic I was after :slight_smile: ), does anyone know where I might be able to get a datasheet for the magjack used on the w5500io. The part num on the schematic is J1B1211CCD, but I can’t find anything on it on the internet. Want to compare it with a UDE magjack I’m using to make sure I’ve wired it up right to a w5500 chip.

The following can be used with the W5500.
RB1-1D5B8K1A(287-00).pdf (472 KB)
J1B121ZCCD-V0-101115.pdf (149 KB)

I’ve got a UDE magjack with part no. RB1-125BAG1A, which shows the CT lines connected together within the transformer, so based on the schematics for the w5500io which shows them seperate and the TCT line pulled high, how would I go about connecting up the UDE magjack I have which has only the one CT line coming out?

Ok, I’ve made some changes to my circuit and i now have it working with my UDE magjack :slight_smile: Hehe, but now I have another question/problem. I’m using the chip to establish a TCP connection to an FTP server. I’ve managed to establish the connection, and so would be expecting the server to send me back some sign-on banner of sorts. I’ve verified that the server does in fact do this using telnet, but for some reason, when I go to check my RX_RSR register, it says there is 0 bytes in my buffer instead of the 60 odd I’m expecting. Is there anything I need to do in between connecting and checking the register to make sure the chip is ready to receive the banner?


Is status register(Sn_SR) SOCK_ESTABLISHED ??

If then, I recommend to test loopback from WIZnet reference code and AX1(PC program).

There are so many causes that you cannot receive any packet.

Best regards.

Yes it says SOCK_ESTABLISHED. Where do I get the reference code and AX1 you mentioned?

Is there any kind of write protect on the rx_rd and rx_wr registers? When I read from them, they return a value of 0, and if I write a value to them and try to then read it again, it still returns with a value of 0…

Can you also confirm that I am doing things right? I am setting up socket 0 as a tcp socket on port 4001. I’m then setting up the destination ip address and connecting to it. All this seems to work right as I can see the server receiving the connect request and responding. Is there anything else I need to do between connecting and looking in the RX buffer for a response?


You can download code and AX1 at

There are all reference code each models, and search ax1 then you can download.

And I recommend to read W5500 datasheet, it is very helpful to you.

RX_RD pointer is updated after you do RECV command, RX_WR is increased automatically by data received.

If status register is ESTABLISHED, your connection is success.

Discovered what my receive problem was. Turns out the way I had configured my code, it wasn’t sending the right values when I was setting up my buffers. Now works fine. Got another question now though with regards to using 2 sockets at the same time. I’ve got one socket configured as an ftp ctrl socket, and it works fine sending and receiving commands. When I try to open up another socket to use as a data socket, it opens up fine, connects to my ftp server fine, but if I then try to go back to my ctrl socket, it sends the message to my server but doesn’t get anything in response to my command. Is there anything that could be going on with the chip or is this maybe an ftp server issue?

I suggest that you investigate the message exchange on the Ethernet by run Wireshark or Tcpdump, either on your ftp server or on a third box connected to a port mirroring switch. This way at least you know if something was received by the W5500.

Kind regards, Sebastian


I agree.

I want to know what packets are exchanged.
So, try to capture packets.

Then we could know W5500 has problem or server has problem or network has problem.

Best regards.