Hello,
I am trying to use a MKR Zero with an Ethernet shield to emulate a device in a local network. It should then be able to respond to pings when using the simulated device's IP and MAC address. Of course, the Arduino and the device are not connected to the network at the same time.
To test my configuration, I just want to connect the Arduino to a Windows computer, and ping the IP address set in the code. However, I tried every Ethernet examples and even a few from this forum, but I never succeeded in getting a working response.
For example, the DhcpAddressPrinter example prints "Failed to configure Ethernet using DHCP"
I also tried the WebServer example, which prints "server is at 0.0.0.0". I am not sure that means some hardware is broken, because the LinkStatus example works.
The Arduino is powered via USB, nothing is plugged in apart from the Ethernet cable and the shield itself. I also added two lines to set pin 4 to high to deactivate the SD card, and uncommented the line related to the MKR ETH Shield.
As I have a hard time understanding network-related things, here are some questions:
- Is it possible to set the IP address of the Arduino to any random sequence, as long as the format is correct ?
- What information is required in the code (IP address, MAC address, gateway, subnet) and how to know the values that should work ?
Could you provide me with the most basic program to try to get a response from the Arduino to my ping ?