RJ45 and W5100


#1

Hi,

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.

Any suggestion? My plug is connected how this document: wiznet.co.kr/UpLoad_Files/Re … otcamp.pdf

Thank you!


#2

Hi Beirao.

I want to receive your own schematic.
When you connect cable to RJ45, link led should be turned on although communication doesn’t work.

Best regards.


#3

[quote=“hjjeon0608”]Hi Beirao.

I want to receive your own schematic.
When you connect cable to RJ45, link led should be turned on although communication doesn’t work.

Best regards.[/quote]

Hi,

Thank you for your answer. My plug connections is: dl.dropboxusercontent.com/u/796 … c_RJ45.jpg

I send values of common registers, and the values read is correct; but, I don´t can do ping…

After, if I don´t can socket initialization, because condition Sn_SR(0) != SOCK_UDP is true.

Any suggestion? Thank you.


#4

I had a problem in components: I used a 16MHz crystal, and not a 25 MHz. With this alteration, I can do ping!

But, can´t initialize socket yet…

In this momment, when I initialize the socket (UDP), the register Sn_SR is always 0x01 (SOC_ARP). Why? :wink:


#5

Hi, beirao.

Let me know your whole procedures.

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.

Best regards.


#6

Hi,

the problem is my laptop. Now, I conect a router and works!

Thank you!


#7

Hi,

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.


#8

Hi, beirao.

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.

Try to check after connection.

Best regards.


#9

Hi,

Thanks for your answer :wink:


#10

Hi,

The connection does not stabilize (after connection stage). My configurations, in Laptop, are:
dl.dropboxusercontent.com/u/796 … 20Copy.jpg

I have any configuration wrong?


#11

Hi, beirao

What is the symptom.
Please, describe in detail.(your procedure, W5100’s status and etc.)

Best regards.


#12

[quote=“hjjeon0608”]Hi, beirao

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…


#13

Hi, beirao.

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.

Best regards.


#14

Thank you a lot for your attention. My connection works now! :wink:

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?

Both conditions are not in datasheet.

Thank you!


#15

Hi, beirao.

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).

Best regards.


#16

Hi,

Thanks for your answer.

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?

Thank you.


#17

Hi, beirao.

The picture is hardware flow.
And ‘LAST-ACK’ is ack about sending FIN packet.

  1. Server : sending FIN.
  2. Client : receiving FIN and sending ACK, FIN
  3. Server : receiving ACK/FIN, sending ACK
  4. Client : receiving ACK. <----------- this is LAST-ACK.

The number 1, 2, 3 are hidden in the flow chart.
And this stage is to check receiving close request.

This is managing automatically inside W5100, so you don’t have to check receiving LAST-ACK.

Best regards.


#18

Hi,

Thanks for your answer.

So, in my firmware (for CLIENT MODE) after the “Sending Process” stage, what I should do? Disconnect or wait for timeout?

Thank you very much!


#19

Hi, beirao.

You need to design your own application.

Application is very variable. So, we cannot define.

We provide just example code such as loopback to user to use our chip easily.

Best regards.