SOLVED: Changed router, now ethernet shield not recognized on LAN

Hello,

I've been struggling with this one for a while now and it is time to ask for some help.

The Problem
After changing my router the Arduino Ethernet Shield (mounted on Uno) is no longer able to communicate with the web. Previously it had successfully been running a simple sketch for over a year uploading temperature information to Exosite.
More specifically the Ethernet Shield does not even show up on the router's list of clients. I have tried reserving an local IP address based on the shield's MAC address but that did not help (the sketch code had the same IP address in it).
Note that the Arduino Uno USB connection is just fine --- no problem uploading sketches and running Serial Monitor.

Information on the Network Setup

  1. The previous network (the one that worked) was simple:
    WAN--->ISP Gateway--->Arduino Ethernet Shield

  2. The new network (the one that doesn't work) is also simple:
    WAN--->ISP Gateway--->Asus RT-N66U Router--->Arduino Ethernet Shield
    Note that the ISP Gateway is set to transparent bridge mode so all traffic is handled directly by the Asus Router.
    All other devices on the LAN work just fine under the Asus router.

The Question
Has anyone else experienced something similar? and,
How did you resolve it?

Verno:
Hello,

I've been struggling with this one for a while now and it is time to ask for some help.

The Problem
After changing my router the Arduino Ethernet Shield (mounted on Uno) is no longer able to communicate with the web. Previously it had successfully been running a simple sketch for over a year uploading temperature information to Exosite.
More specifically the Ethernet Shield does not even show up on the router's list of clients. I have tried reserving an local IP address based on the shield's MAC address but that did not help (the sketch code had the same IP address in it).
Note that the Arduino Uno USB connection is just fine --- no problem uploading sketches and running Serial Monitor.

Information on the Network Setup

  1. The previous network (the one that worked) was simple:
    WAN--->ISP Gateway--->Arduino Ethernet Shield

  2. The new network (the one that doesn't work) is also simple:
    WAN--->ISP Gateway--->Asus RT-N66U Router--->Arduino Ethernet Shield
    Note that the ISP Gateway is set to transparent bridge mode so all traffic is handled directly by the Asus Router.
    All other devices on the LAN work just fine under the Asus router.

The Question
Has anyone else experienced something similar? and,
How did you resolve it?

OK always fun trying to run one of these down.

Start with the basics

  1. From the Router - can you ping the IP of the Arduino ?
  2. From any other device on your LAN can you ping the Arduino
  3. Is the Arduino wired directly to the router or do you have a switch in the middle ?
  4. Load up a simple sketch on the Arduino to see if you can ping a number of sites by IP address - start with your Routers Internal IP, then its External IP, then its default gateway. Print out through Serial monitor so you can see what is happening

Report back

Simple client code to test web access.

//zoomkat 9-22-12
//simple client test
//for use with IDE 1.0.1
//with DNS, DHCP, and Host
//open serial monitor and send an e to test
//for use with W5100 based ethernet shields
//remove SD card if inserted

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

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address

char serverName[] = "web.comporium.net"; // zoomkat's test web page server
EthernetClient client;

//////////////////////

void setup(){

  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    while(true);
  }

  Serial.begin(9600); 
  Serial.println("Better client test 9/22/12"); // so I can keep track of what is loaded
  Serial.println("Send an e in serial monitor to test"); // what to do to test
}

void loop(){
  // check for serial input
  if (Serial.available() > 0) //if something in serial buffer
  {
    byte inChar; // sets inChar as a byte
    inChar = Serial.read(); //gets byte from buffer
    if(inChar == 'e') // checks to see byte is an e
    {
      sendGET(); // call sendGET function below when byte is an e
    }
  }  
} 

//////////////////////////

void sendGET() //client function to send/receive GET request data.
{
  if (client.connect(serverName, 80)) {  //starts client connection, checks for connection
    Serial.println("connected");
    client.println("GET /~shb/arduino.txt HTTP/1.0"); //download text
    client.println("Host: web.comporium.net");
    client.println(); //end of get request
  } 
  else {
    Serial.println("connection failed"); //error message if no client connect
    Serial.println();
  }

  while(client.connected() && !client.available()) delay(1); //waits for data
  while (client.connected() || client.available()) { //connected or data available
    char c = client.read(); //gets byte from ethernet buffer
    Serial.print(c); //prints byte to serial monitor 
  }

  Serial.println();
  Serial.println("disconnecting.");
  Serial.println("==================");
  Serial.println();
  client.stop(); //stop client

}

Make sure DHCP is enabled on the new router.

Perhaps your Arduino now is locked into wrong address range?
192.168.0.x instead of 192.168.1.x

Ok, thanks for the responses!

I'll address them one at a time. First to reply to zoomkat:

zoomkat:
Simple client code to test web access.

//zoomkat 9-22-12

//simple client test
//for use with IDE 1.0.1
//with DNS, DHCP, and Host
//open serial monitor and send an e to test
//for use with W5100 based ethernet shields
//remove SD card if inserted

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

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address

char serverName[] = "web.comporium.net"; // zoomkat's test web page server
EthernetClient client;

//////////////////////

void setup(){

if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // no point in carrying on, so do nothing forevermore:
    while(true);
  }

Serial.begin(9600);
  Serial.println("Better client test 9/22/12"); // so I can keep track of what is loaded
  Serial.println("Send an e in serial monitor to test"); // what to do to test
}

void loop(){
  // check for serial input
  if (Serial.available() > 0) //if something in serial buffer
  {
    byte inChar; // sets inChar as a byte
    inChar = Serial.read(); //gets byte from buffer
    if(inChar == 'e') // checks to see byte is an e
    {
      sendGET(); // call sendGET function below when byte is an e
    }
  } 
}

//////////////////////////

void sendGET() //client function to send/receive GET request data.
{
  if (client.connect(serverName, 80)) {  //starts client connection, checks for connection
    Serial.println("connected");
    client.println("GET /~shb/arduino.txt HTTP/1.0"); //download text
    client.println("Host: web.comporium.net");
    client.println(); //end of get request
  }
  else {
    Serial.println("connection failed"); //error message if no client connect
    Serial.println();
  }

while(client.connected() && !client.available()) delay(1); //waits for data
  while (client.connected() || client.available()) { //connected or data available
    char c = client.read(); //gets byte from ethernet buffer
    Serial.print(c); //prints byte to serial monitor
  }

Serial.println();
  Serial.println("disconnecting.");
  Serial.println("==================");
  Serial.println();
  client.stop(); //stop client

}

I updated this code with my device's MAC address and uploaded it. It worked just fine.
I interpret this to mean that operations as an ethernet client are working.

teddyz:
Perhaps your Arduino now is locked into wrong address range?
192.168.0.x instead of 192.168.1.x

After digging in to it further, and as my previous reply indicates, it actually is working as a client. I'll expand a little more on this further down.

oric_dan:
Make sure DHCP is enabled on the new router.

Yes, DHCP is enabled.

craigcurtin:
OK always fun trying to run one of these down.

Start with the basics

  1. From the Router - can you ping the IP of the Arduino ?
  2. From any other device on your LAN can you ping the Arduino
  3. Is the Arduino wired directly to the router or do you have a switch in the middle ?
  4. Load up a simple sketch on the Arduino to see if you can ping a number of sites by IP address - start with your Routers Internal IP, then its External IP, then its default gateway. Print out through Serial monitor so you can see what is happening

Report back

Ok, thanks craigcurtin. Good thoughts. Here are the results:

  1. From the Router - can you ping the IP of the Arduino ?
  2. From any other device on your LAN can you ping the Arduino

I'm not sure how to ping from the router, but I can ping the Arduino successfully from any other device on the LAN.

  1. Is the Arduino wired directly to the router or do you have a switch in the middle ?

Good question! Yes, there is a switch between the router and the Arduino. It is a TP-LINK (model TL-SF1008D), 8 port 10/100.
Although it appears that the Arduino is able to operate as an ethernet client, any thoughts on how the switch might otherwise complicate the operation?

  1. Load up a simple sketch on the Arduino to see if you can ping a number of sites by IP address - start with your Routers Internal IP, then its External IP, then its default gateway. Print out through Serial monitor so you can see what is happening

I didn't actually do this, I opted to run zoomkat's code instead. Unless I have overlooked something it seems that the client connections works ok.

Additional Information on the Problem
Digging into this a little further I have discovered that the Arduino is unable to discover the DS2482-800, an 8 channel 1-Wire Master, I2C-to-1-Wire bridge device. This device handles all the the temperature probe queries. As a result of not identifying itself to the Arduino all of the temperatures are shown to be loaded to Exosite as a zero value. Curiously the zero data never actually shows up on Exosite, even thought I've proved out the client connection works ok with zoomkat's code.
I have checked all of the 1-Wire connections (it is setup to use the old phone lines in my house), and all communication (I2C) and power (+5VDC, GND) is connected properly, no loose wires, correct voltage etc...
It seems odd that by simply changing the router and adding a switch in between the Arduino and router that I would then induce a problem with the communication between the Arduino and DS2482-800.

I suppose my next step will be to troubleshoot the DS2482-800. I have a Arduino Nano handy so by switching only a few wires I can test the communication with the bridge and at least rule out the possibility that it is an issue with the Arduino Uno. After that I think I will have to swap out the bridge with a spare and see if that improves anything.
Generally the culprit in these issues always turn out to be something terribly simple --- just a matter of persistence!
Thanks for the input. Let me know if you have any other ideas!

I have a Arduino Nano handy so by switching only a few wires I can test the communication with the bridge and at least rule out the possibility that it is an issue with the Arduino Uno.

Well, I did this test and sure enough the Nano had no problem discovering the DS2482. Then, even stranger, as soon as I switched the I2C wires back to the Uno, the Uno could now discover the DS2482 as well. All temperature sensors are registering without a problem. There still appears to be an issue with uploading the information to Exosite so I will have to chase that down.

Well, it seems typical for me with my time spent messing around with electronics --- understanding the real issue is more than half the battle! I expect this had little to do with switching the router and a lot more to do with something happening at the DS2482 interface that is beyond my level of understanding.

Thanks to those who helped out on this, it is very much appreciated.

One final question: is it good practice to updated the title of the thread (if even possible) to reflect the actual issue that was discovered and addressed? or is it acceptable to leave it the way it is?

Verno:

I have a Arduino Nano handy so by switching only a few wires I can test the communication with the bridge and at least rule out the possibility that it is an issue with the Arduino Uno.

Well, I did this test and sure enough the Nano had no problem discovering the DS2482. Then, even stranger, as soon as I switched the I2C wires back to the Uno, the Uno could now discover the DS2482 as well. All temperature sensors are registering without a problem. There still appears to be an issue with uploading the information to Exosite so I will have to chase that down.

Well, it seems typical for me with my time spent messing around with electronics --- understanding the real issue is more than half the battle! I expect this had little to do with switching the router and a lot more to do with something happening at the DS2482 interface that is beyond my level of understanding.

Thanks to those who helped out on this, it is very much appreciated.

One final question: is it good practice to updated the title of the thread (if even possible) to reflect the actual issue that was discovered and addressed? or is it acceptable to leave it the way it is?

Nice practice to add SOLVED to the title

Craig