I´m trying to do a ping between W5100 and my computer. I use a PIC18F with SPI communication with W5100.
My comunication between PIC and W5100 is right: I send and receive the right values. But, when I connect the plug RJ45 is the same as not plug: nothing happens! The lights not turn on, nothing.
You mean initialization is Sn_CR is OPEN(0x01) or else??
If you set Sn_MR as UDP mode, your Sn_SR = ARP is not correct.
ARP is only in TCP mode connection request or UDP mode send data.
Also, that the status(ARP) is not changed means your network has problem.
Although you don’t set correctly, W5100 should receive ARP reply. But your W5100 send ARP request but don’t receive ARP reply.
Please, check in detail and tell me your condition.
When I do a CONNECT stage, I write the Destination IP Address, but if I read this value, value is zero. Any suggestion? MY function for write the values is correct, because works in previous registers.
It is normal.
Destination information(e.g. dst IP, MAC and etc.) is not changed immediately.
After connection(in TCP mode) or send data(in UDP mode), you can read right value.
What is the symptom.
Please, describe in detail.(your procedure, W5100’s status and etc.)
Best regards.[/quote]
Hi,
In TCP Client mode, after do CONNECT stage, the Sn_CR(0) is equal a SOCK_CLOSED.
I´m writting the IP and other values, and communicate the PC to W5100 between router…
If W5100 didn’t get IP from DHCP server or router which doesn’t support NAT, you cannot connect PC to W5100 between router. Private IP need to change to public IP.
I think you set IP address of W5100 as private IP.
Please, try to ping from PC to W5100. If cannot ping, you need to get public IP or DHCP server or router which support NAT.
Thank you a lot for your attention. My connection works now!
Another questions:
what it the “source_addr” in Sending Process on TCP connection? The transmition data starts in get_start_addres, right? So, I don´t understand what is “source_addr”.
How to check the “LAST-ACK?” ? By Sn_SR = SOCK_CLOSE_WAIT?
How to check the “Disconnect?” ? By Sn_SR = SOCK_CLOSE_WAIT?
Source address is my address. In other word, address of W5100.
And I don’t understand
Please, explain in more detail.
What do you mean LAST-ACK?? SOCK_CLOSE_WAIT is w5100 received connection termination request from peer host.
And if connection is closed, Sn_SR is 0x00(SOCK_CLOSED).
In TCP Client mode, page 48 “5.2.1.2 CLIENT mode” in W5100 datasheet, there is a “LAST-ACK?” after the “Sending Process” and/or “Send DATA?”. So, how do I verify this condition?