reading mac address from wiznet chip

hi,

how can i readout the mac address and/or the ip address from the w5100 chip? is this possible?

You set the IP and MAC addresses in the arduino sketch. They are whatever you set them to.

Lifted from the webserver example in the IDE :

/*
  Web  Server
 
 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield. 
 
 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)
 
 created 18 Dec 2009
 by David A. Mellis
 modified 4 Sep 2010
 by Tom Igoe
 
 */

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168,1, 177 };

// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
Server server(80);

void setup()
{
  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
}

i have initialized the ethernet, but i'm not able to ping my shield and so i want to readout the addresses to have a look if they are correct.

You've set the IP address in the same subnet as the rest of your network ?

In my experience it sets the IP address exactly as you tell it to, whether that is sane is a different matter.....

Logically, if you can't trust what you tell it to set it to, how can you trust what it tells you ?

the ip is set in the same subnet...

but i don't know if something has really changed and so i want to readout the address before and after the initialization.

Do you have another machine, you can set up as a server to check your wiring and understanding of TCP/IP ?

Are you using the example web server sketch (which is known working code) rather than your own sketch to test everything with ?

i use the simple webserver example...

Do you have Link / 100 / FULLO lights when you plug the ethernet cable in ?

yes, these leds flash. also rx and tx flash sometimes.

If its an old type shield, you might need to press the reset after programming or powering up to get it to go, especially if you use external power. If you are using external power it needs to be capable of providing smooth power at ideally no more than 9V and at least 200 mA, from experience the ethernet shield takes a dim view of power with a ripple on it. Other than that it pretty much just works with the example sketches, I have one set up and running in front of me now. this one :

http://majestic81.plus.com/

has been running around 18 months pretty much without incident.

it's a new one (with the mac address on the back)

i test it with:

  • only usb
  • only external power
  • usb + external power

but every time the same problem.

Mac address on the back is a new one on me, mine take the address I give them - old type. I can't suggest anything further other than maybe find someone local who has one and compare notes / swap bits.