Help with ethernet GW



  • I just switched from a serial gateway to an ethernet gateway but I can not get the ethernet gateway to connect to my network.
    I have an Arduino UNO R3 and an ethernetshield (W5100) with and SD card holder on it. Compile the code with SOFT SPI and I get "Gateway startup complete" in the terminal monitor (and I recieve data from my sensors) but when I go to connect to my IP network I get nothing. My switch does not se the mac-address of the shield and I can not connect to or ping the shield. I added:

    Serial.print("server is at ");
    Serial.println(Ethernet.localIP());

    to the sketch and the IP address that shows is 255.255.255.255. I believe something goes wrong setting the IP and/or mac address. Anyone have some good ideas how to fix this issue? This is my first time using an arduino with ethernet.

    /Carl



  • Tried some other exemple sketches and I can't get either static or dhcp to work. I se both to and RX lights on the shield flash but my switch say that no input is ever received. Thinking my shield is broken and will go get it replaced tomorrow and try again...

    /C



  • It will not work with this IP address, and you have to put an IP address in manual in your sketch (DHCP does not work)
    The Ethernet sketch example shows at lines 64 to 69:

    IPAddress myIp (192, 168, 178, 66);  // Configure your static ip-address here    COMPILE ERROR HERE? Use Arduino IDE 1.5.7 or later!
    
    // The MAC address can be anything you want but should be unique on your network.
    // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
    // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
    byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };  // DEAD BEEF FEED
    

    So IP: 192.168.178.66
    MAC : DEAD BEEF FEED"

    Did you use this sketch or can you try this one and post your results ?



  • The DHCP example was with a different sketch. I had the Ethernet shield replaced and now both the DHCP sketch and the gateway sketch work! 🙂 (I had no packets coming from the broken shield at all when connecting it through a sniffer)

    /Carl


Log in to reply
 

Suggested Topics

  • 3
  • 6
  • 5
  • 2
  • 1
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts