4 Replies Latest reply on Dec 30, 2014 10:41 AM by AlphaCHarly

    Edison Ethernet.localIP() function

    AlphaCHarly

      Folks,

      When I use the function Ethernet.localIP() on the Galileo, it prints properly the IP address, however on the Edison prints 255.255.255.255. I use static addresses in both cases.

       

        Serial.print("\nThe IP addr is:  ");

        Serial.println(Ethernet.localIP());

       

      and ditto for the subnetMask() and gatewayIP()

       

        Serial.println( Ethernet.subnetMask());        

        Serial.println( Ethernet.gatewayIP());         

       

      minor problem, however I wonder why that differences on the implementation ???

      Regards.

      AC/.

        • 1. Re: Edison Ethernet.localIP() function
          DiegoV_Intel

          Hi AlphaCHarly,

           

          I'm assuming that you are using the Ethernet Shield, is that correct?

           

          I've just tested it and I was able to connect the Edison to Ethernet using the Ethernet Shield. I ran the WebClient example without problems. However, there are two types of examples for Ethernet. One type of examples is named as "Ethernet" and the other type is named as "EthernetShield". Make sure you are selecting one example from the "EthernetShield" examples.

           

          Regards,

          Diego.

          • 2. Re: Edison Ethernet.localIP() function
            AlphaCHarly

            Diego,

            I am using the Intel® Edison and Arduino Breakout Kit

            not with the ethernet shield by itself, I am able to access the web server, etc, ... without the need of an ethernet shield. Not needed for Galileo or Edison.

            So I am not using SPI or use the pins 10,11,12,13 at all ???

            For Ethernet/internet access  I am using the WiFi builtin facilities of Edison. Works quite well so far.

            Thanks.

            AC/.

            • 3. Re: Edison Ethernet.localIP() function
              DiegoV_Intel

              Hi AlphaCHarly

               

              I got confused. If you are using the embedded Edison's WiFi, what exactly is the question you have regarding the Ethernet.localIP() function on Edison? If you want to use the embedded Edison's WiFi you should use the WiFi library, but if you want to use the Ethernet library you should attach the Ethernet Shield because the Edison doesn't have an Ethernet port like Galileo has.

               

              Regards,

              Diego.

              • 4. Re: Edison Ethernet.localIP() function
                AlphaCHarly

                Diego,

                i use the std Arduino Ethernet library and it works quite well, that way my sketches work on the Galileos or Edison or UNO (with the Ethernet shield in this case of course) without or with very minor changes. I use the  __X86__  and PLATFORM_NAME to guard those small differences.

                THe TCP/IP stack is set by the operating system and the sketch just use the IP stack In the cases of Galileo and Edisons.

                thanks for the help.

                AC/.