[edit] Reason is hw problem with the shield
Hello,
My boards are mega2560 with enet wisnet 5100 r3
To avoid IP conflicts in 'dev' board and 'field' board I read the ls IP digit from eeprom
so if the field board address should be a.b.c.124 and the dev one a.b.c.123; 124 and 123 are read for respective boards eeprom
I have at global scope
byte mac[] = {0x00, 0xaa, 0xbb, 0xcc, 0xde, 0x02};
IPAddress myIP (192, 168, 002, EEPROM.read(loIPlocation));
IPAddress netDNS (192, 168, 002, 001);
IPAddress gateway(192, 168, 002, 001);
IPAddress subnet (255, 255, 255, 000);
IPAddress smsServer(192, 168, 2, 224);
and during setup a call to enetStart();
defined by
void enetStart() {
report(F("enet start-> starting Ethernet\r\n"), MI_VERB);
Ethernet.begin(mac, myIP, netDNS, gateway, subnet);
report(F("My ip is "), MI_VERB); Serial.println(Ethernet.localIP());
I run this code w/o the ethernet cable.
what I see since this is implemented is that the printed Ethernet.localIP() is many things, ranging from 0.0.0.0 to the correct IP. Furtheremore I have a hard time to have a wrong IP again once it's shown the correct one, even after cycling the power.
I have conscience that mac should differ too and will implement it likewise.
Can someone please suggest what is wrong?
Thanks for your help