trouble w. Ethernet shield

i have the w5200 shield; i uploaded the dhcp server example sketch & fixed the subnet mask but none of them worked. i keep getting the same ip address: 123.5.240.26 whether or not my ethernet cable is connected. suggestions?

You don't have to use a subnet. For DHCP use this: Ethernet.begin(mac); The router takes care of everything else.

i have the w5200 shield;

Did you replace the w5100.h and w5100.cpp files with the w5200 versions?

As I recall, you must also make some modifications to the ethernet library.

Did you replace the w5100.h and w5100.cpp files with the w5200 versions?

looking at the code, it seems replacing the files would involve modifying the W5200 codes; the W5200 codes involve calling the W5100.h/.cpp files and then… idk doing extra stuff with it.

can someone tell me what this error means?

C:\Program Files (x86)\Arduino\libraries\EthernetV2_0\EthernetV2_0.cpp:64:39: error: no matching function for call to 'W5100Class::setIPAddress(IPAddress::<anonymous union>&)'
   W5100.setIPAddress(local_ip._address);
                                                            ^

so in my EthernetV2_0.cpp file i have:

#include "W5200.h"

which contains:

class W5100Class {
  public:
    void init();
        inline void setIPAddress(uint8_t * addr);
}

private:
  void W5100Class::setIPAddress(uint8_t *_addr) {
  writeSIPR(_addr);
}

why is it saying no matching function?

Last I checked, the w5200 files were also named w5100.h and w5100.cpp. They will work with the w5100 also, but you must change a define in the w5100.h file.

These were the last changes that needed to be made. You might want to read this issue. https://code.google.com/p/arduino/issues/detail?id=898

just read your reply after i modified my resopnse; i replaced my 5100 files w/ the ones on the website, but i still get the same errors.

frustrating

I see you are using IDE v1.5.8. It has a different w5100.h and w5100.cpp files, along with different ethernet library files, than previous versions. I don't know how those will work in the v1.5.8 environment.

The big difference is the change in the SPI library that allows SPI devices that access the SPI bus in an interrupt to coexist with other SPI devices.

edit: You might change that include.

#include "utility/w5100.h"

i got v1.0.6 and im having other problems; i posted this one as a separate problem at link below, i would appreciate it if you took a look at it

I just purchased an Ethernet shield that has the w5200 as well.

Got similar errors

I went into the file EthernetV2_0.cpp

and updated the line W5100.setIPAddress(local_ip._address);

to

W5100.setIPAddress(local_ip.raw_address());

Had to do that several other places and now the examples compile.

homespeaker: I went into the file EthernetV2_0.cpp

and updated the line W5100.setIPAddress(local_ip._address);

to

W5100.setIPAddress(local_ip.raw_address());

Had to do that several other places and now the examples compile.

If you would have downloaded the current library, those changes have been made. https://github.com/Seeed-Studio/Ethernet_Shield_W5200