4
\$\begingroup\$

I am trying to send over my code to my Arduino Ethernet board via the Adafruit FTDI friend. I am using the 1.0.4 version of the IDE and have the following settings:

Tools -> Board -> Arduino Ethernet Tools -> Serial Port -> COM 3

The sketch is sent over to the board without problems or errors... however I am unable to see the IP of the board when i check my "attached devices" in my routers settings menu.

Here is a snip of the code I used:

  byte ip[] = { 192, 168, 9, 199 };   //Manual setup only
  byte gateway[] = { 192, 168, 9, 1 }; //Manual setup only
  byte subnet[] = { 255, 255, 255, 0 }; //Manual setup only

  // if need to change the MAC address (Very Rare)
  byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

  EthernetServer server = EthernetServer(199); //port 199

void setup(){
  Serial.begin(9600);

  //Pins 10,11,12 & 13 are used by the ethernet shield

  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);

  //Ethernet.begin(mac);
  Ethernet.begin(mac, ip, gateway, subnet); //for manual setup

  server.begin();
  Serial.println(Ethernet.localIP());

}

Here is a screen shot of the router settings:

enter image description here

And this is my Arduino ethernet hookup:

enter image description here

What could I be missing?

\$\endgroup\$
2
  • \$\begingroup\$ I've seen some routers where the attached devices list is only a list of devices that have requested a DHCP address. Does it appear on the list / work if you use the commented out Ethernet.begin(mac) line? \$\endgroup\$
    – PeterJ
    Mar 14 '13 at 1:00
  • \$\begingroup\$ Try pinging the IP you're specifying in your code. Open a command-prompt window, and ping <ip here>. For example: ping 192.168.9.199. \$\endgroup\$ Mar 14 '13 at 7:05
2
\$\begingroup\$

On some routers the attached devices list only contains a list of devices that have requested a DHCP address. Try the following change to go back to using a DHCP address rather than a manual setup:

Ethernet.begin(mac);
//Ethernet.begin(mac, ip, gateway, subnet); //for manual setup
\$\endgroup\$
0
0
\$\begingroup\$

Most routers only show devices that have been granted a DHCP lease and since your Arduino has a static IP-address it won't show. You can see the device on your PC once you have contacted it at least once throught the ARP-table:

Here is an example ARP-table (Linux, but Windows is similar):

€ arp -a
? (192.168.0.170) at c8:60:00:3b:a8:7e [ether] on eth0
? (192.168.0.1) at bc:05:43:e7:36:92 [ether] on eth0
? (192.168.0.143) at 08:00:27:a6:a2:e7 [ether] on eth0
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.