Ethernet Client always getting 255.255.255.255 as LocalIP

Hey!

So, I'm using an Arduino Pro Mini 5V/16MHz for a RFID Access Control thing (for further information, check https://github.com/joaohenriquef/rfid-access-control).

At this point, the whole code was working perfectly on an Arduino MEGA 2560 and I decided to migrate to my Pro Mini. The hardware setup's become like this:

  • 1x Arduino Pro Mini 5V/16MHz
  • 2x MFRC522 (for RFID cards, uses SPI interface)
  • 1x W5100 Ethernet Shield (uses SPI interface)
  • Some RGB LEDs, sensors, buzzers... whatever.
  • 1x Arduino MEGA 2560 for powering up the MFRC522 (for testing purposes only) (yes, all GND are common)

So, it took me a while to realize that I would have to, manually, change all the SS pins to LOW/HIGH but, once I realized this, I got both MFRC522 to initialize correctly. The problem is I just can't get my W5100 to work!
I have tried:

  • Wiring the D4 from W5100 to the Pro Mini and setting it as a high output;
  • Using the ICSP pins from the shield;
  • Using the standard SPI pins from the shield;
  • Some delay between stuff;
  • Not to initialize the MFRC522;
  • Setting the standard SS pin on Mini Pro as output;

I don't even know where to look for solutions anymore.

I couldn't paste the whole code here, but you can get it as follows:

That's it guys, hope to get this solved ASAP. Thanks! :slight_smile:

Ethernet shield has 2 SPI devices: Ethernet and SD card reader. SS for Ethernet is on pin 10 of the shield and SS for SD card is pin 4 on the shield.

Yeah, I know that. As I told at the start, I already switched the SD SS pin as a high output. disabling it.

gazolaa:
Yeah, I know that. As I told at the start, I already switched the SD SS pin as a high output. disabling it.

and the Ethernet SS pin? is it connected?

Can you post a photo of the setup?

Yes, it's connected. The pin setup is on GitHub code. I just changed it from standard D10 to D2.

You use the same shield with Wiznet 5100 for Mega and Mini? This error is common for Wiznet 5500 used with Ethernet library instead of Ethernet2