Socket it still init after connect


#1

Hi,

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.


#2

The interrupt register says that there is a timeout btw.


#3

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?


#4

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.


#5

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


#6

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?


#7

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?


#8

Hi

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.


#9

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


#10

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…


#11

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?


#12

Hi,

You can download code and AX1 at wiznet.co.kr

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.


#13

If status register is ESTABLISHED, your connection is success.


#14

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?


#15

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


#16

Hi,

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.