4 Replies Latest reply on Oct 6, 2014 10:49 AM by Intel_Alvarado

    Connect Galileo to mac via ethernet

    Silenus

      Hey guys, all the examples I can find for connecting to the Galileo directly through ethernet to the computer involve using a PC. I am trying to access the galileo terminal on a mac via ethernet from the Galileo to a thunderbolt port on my mac. I have uploaded the sketch (attached) to the board in order to start the ethernet, however I am unsure of what to do after this. Could anyone provide me with some assistance? Sorry, I'm still a bit new to networking.

        • 1. Re: Connect Galileo to mac via ethernet
          mhahn

          con't find your sketch attachment. Anyways, what do you try to achieve? If you want to access and work with the native Linux on Galileo I would suggest to connect via ssh to the system.

          If you use e.g. the Yocto* SD card image from https://software.intel.com/en-us/iot you already have a ssh daemon running on the target.

          • 2. Re: Connect Galileo to mac via ethernet
            Silenus

            I have the Yocto 1.6 image on the sd card already. When I connect the ethernet to my mac, I'm assuming I leave it as DHCP? The arduino sketch that i uploaded was:

             

            #include <SPI.h>

            #include <Ethernet.h>

             

            // the media access control (ethernet hardware) address for the Galileo:

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

            //the IP address for the Galileo:

            byte ip[] = { 192, 168, 0, 2 };   

             

            void setup()

            {

                Serial.begin(9600);

                Serial.println("Attempting to start Ethernet");

                if (Ethernet.begin(mac) == 0) {

                    Serial.println("Failed to configure Ethernet using DHCP");

                    Serial.println("Attempting to configure Ethernet using Static IP");

                    Ethernet.begin(mac, ip);

                }

                Serial.print("Your IP address: ");

                Serial.println(Ethernet.localIP());

            }

             

            void loop () {}

             

            If I want to ssh to the Galileo, I bring up terminal and type ssh root@<ip address> but what is the ip address of the board?

            • 3. Re: Connect Galileo to mac via ethernet
              mhahn

              if you plug the system to a DHCP server it will automatically get an IP address.

              In order to ssh into the board you can use:

              • IPv6: you can compute the IPv6 address via the MAC address of your board printed on the eth sticker - there are online MAC -> IPv6 calculators available
              • if your MAC supports avahi (bonjour) which I guess it does you can connect via the avahi name quark<MAC{7..12}>, where <MAC{7..12}> means the last 6 digits of the MAC address printed on the eth plug. e.g. ssh root@quark123456 if the MAC address ends with *123456
              • using a simple Arduino sketch to print the IP address as shown elsewhere in this forum; something like
                delay(2000); // give some time to open up the serial console [CTRL+SHIFT+M] from within Arduino IDE
                system("ip a > /dev/ttyGS0"); // prints all network information including the IP address of
                alternatively something like:
                system("ip a | grep -A 3 "enp.*:" | grep inet"); // print only ipv4 and ipv6 information
              • 4. Re: Connect Galileo to mac via ethernet
                Intel_Alvarado

                Hi Silenus,

                Have you followed mhahn's  reply? I believe the previous suggestion might work to fix your issue. If you still need assistance please reply with your questions.

                Regards

                Sergio