Ethernet shield - how to know if rj45 is connected

Hi !

Fist excuse me for my english Wink

I am using ethernet shield with library.

I am looking for a way to know in the skecth if the RJ45 jack is connected to the board.

How can I know if it is connected ?

Thanks !

The W5100 chip used on the Ethernet shield doesn't expose the link status in a register that can be read from the chip. The only way to find this would be to rewire the output pin from the W5100 that is used to light the link established LED and feed that into an input on the Arduino; from looking at the schematic, the signal doesn't go anywhere but to the LED which is then connected to ground through a resistor.

Or for a super low tech hack, wire a photoresistor right at the link led. That way theres no surface mount soldering/desoldering.

Thank you very much for these informaions !

there is no way to send a simple data and if no reception of data from the network=> it means RJ45 is not connected ?


You can try pinging your gateway or another ip ;) Also try with Client.available()!