I am currently facing an issue with Ethernet communication on our custom board using the W5500 Ethernet controller and would appreciate your assistance in diagnosing the problem.
We performed several tests to isolate the issue:
Hardware & SPI Verification
We ran a low-level SPI test by reading the W5500 version register and received 0x04, confirming that:
The W5500 chip is powered and functional
SPI communication between the MCU and W5500 is working correctly
Ethernet Initialization
We configured a static IP (192.168.1.177) .The Ethernet stack initializes successfully, and the IP is printed correctly over Serial.
Server Test
A simple HTTP server was implemented on port 80. The firmware runs without errors and reports the correct IP address.
Network Issue Observed
However, when attempting to ping the device from the PC, we receive:
Reply from cmd: Destination host unreachable
indicating that the device is not reachable over the network.
Additional Observations
DHCP attempts fail consistently
The ACT LED and FDXLED does not indicate activity
The Ethernet hardware is detected at SPI level but not reachable over the network
The PC and device are in the same IP range
Could you please guide us on what additional checks or configurations we should perform to resolve this issue? I have attached the schematic.
I moved your topic to an appropriate forum category @nbabu_2023.
In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
That must be the connection between your custom R4 MCU and the W5500 board. I was interested in knowing if the RJ45 port of the W5500 is connected directly to your PC or to a switch/router. Maybe it’s an issue with the network topology.. Your example is pretty simple and I don’t see any issues with it. You could connect the W5500 to the PC and see if you detect any packets with Wireshark coming from W5500..
You could also try an example that is already tested and proven to work. Go to https://mongoose.ws/wizard/#/output?board=arduino&ide=Arduino&rtos=baremetal and it will open a web-server project running on any Arduino board with W5500. Then, to download it locally, go to the Settings tab and choose your local directory and click the blue ‘Generate C/C++’ button at the top of the screen to save the project. You can then import it in Arduino IDE, build it and run it (don’t forget to change the SS_PIN in wizard.ino). It should start by acquiring the IP via DHCP, you can see the logs with the status and the acquired IP address.
If that doesn’t work, then check again if you wired the W5500 correctly to your Arduino, perhaps the pins are incorrect.
Okay, but the question @tcplord2418 made also included how you connect it to your network: directly to one of the router's local ports, via a switch (connected to the network), directly to your PC, or something else? And could you post a link to the exact W5500 board you're using? Is it a shield or a single "standalone" module (and if so, how did you connect it to Arduino?)
That's not what I see in the attached code "ethernet test.txt" (why don't you put it as *.ino, or, better yet, why don't you put it in the body of the message, enclosed in "code" tags?) where you defined it as 192.168.1.70. What's that 1.177?
You're using a static IP address, what does DHCP have to do with it?
First, I hope you know that the "ping" protocol is different from the HTTP protocol (ICMP vs. TCP), and that there are some considerations to keep in mind to ensure a "ping" packet actually reaches its destination and that the response is sent back to the sender and received. Without knowing your network topology (as explained in previous questions), it's difficult to tell you why.
Also, a question: are you trying to ping because HTTP access isn't working (i.e., the browser tells you no one is responding)? You can also use Telnet to test the reachability of an HTTP server (e.g., "telnet 192.168.1.70 80").
But are you really sure you're using the correct Arduino IP address?
PS: What do you mean with "custom built Arduino R4"?
@docdoc I’m connecting an RJ45 port to a network switch using a custom-built ethernet board that I designed. The board is similar to an Arduino Ethernet Shield, and the main controller is comparable to the Arduino R4 Minima.
Ok, got it.
Your question is whether your custom board with the W5500 is working properly or not, or whether the problem lies with the custom UNO as well. It's hard to say, at least remotely for me, but to start (aside from the IP address issue I mentioned above), I'd recommend trying a "standard" UNO R4 Minima. If that doesn't work either, it's highly likely a problem with the "similar" W5500 shield/board. Otherwise, it could be a problem with the custom Arduino or the code used.
I'm sorry, but I can't tell you more about this and the advice of @tcplord2418 .
The custom board, based on the Arduino R4 Minima, is controlling temperature sensors, a display, and power sensors. All of these components are working correctly. However, the W5500 Ethernet module is not functioning. Have you reviewed my Ethernet schematic? Could this be a design issue?
I don't know, sorry, I used both W5100 and W5500 shields and standalone boards but I've never checked their schematics because I don't need to do so. And no, I haven't reviewed your schematics for the same reason so I'm sorry if I can't help you much.
The pulldown resistors on the RXN & RXP (To pin 5 of the RJ45) are 82R in my schematic (compared to the 49R in yours)
The pullup on pin 4 is 10R in my schematic (again yours is 49R)
I am not sure of the pinout of your RJ45 but it does not match mine and the symbol is not clarifying anything nor does a google for the part nr (which i have found) pinout.
I assume that the connection to the pinout is correct, but i guess a verification of that would confirm that.
TXN to RJ45 1
TXP to RJ45 2
RXP to RJ45 3
RXN to RJ45 6
GND via 10nF Cap to RJ45 5
3.3v via 10R to RJ45 4 & to GND via 22nF cap
RJ45 is left open
RJ45 to GND via 1nF cap.
If pin 1 - 8 actually are pins 1 - 8 on the RJ45, (which is what your link suggests) then you have completely messed up the connections.
The RJ45 connects to 4x a twisted pair. 1 & 2, 3 & 6, 4 & 5 and 7 & 8.
the RD+ & - and the TD+ & - connect to a pair each. One pair is more or less unconnected. You would have both TD & RD split over different pairs.
There is a good chance that the pin nrs do not correspond, so i suggest you confirm the pinout using a DMM.
For the rest the chances i have pointed out before, although the design recommendations have changed several times over the past year and a half (and probably will change more over time) but my schematic works !