Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ddb
Beginner
3,960 Views

Using Galileo Linux over Ethernet(Telnet)

Hi Guys,

Here's a cheap/easy way of using Galileo Linux, the only additional cable required is an Ethernet cable.

How to - Use Galileo Linux with only an Ethernet cable directly connected between laptop and Galileo…

  1. Attach the Ethernet cable directly from the Galileo to your Laptop.
  2. Create a new sketch. In the setup function –
    1. Start the telnet server on Galileo (system("telnetd -l /bin/sh");)
    2. Give Galileo eth0 an IP address in the Link Local Address range 169.254.x.x (system("ifconfig eth0 169.254.1.1 netmask 255.255.0.0 up");)
  3. Link Local Automatic addressing will assign your Windows or Mac an IP address, usually taking no longer than a minute. http://en.wikipedia.org/wiki/Link-local_address http://en.wikipedia.org/wiki/Link-local_address .
  4. Use putty or any Telnet client to connect to Galileo using the IP address you assigned to Galileo eth0.

/servlet/JiveServlet/showImage/2-208564-233625/1st.png

How to – Use Galileo Linux using an Ethernet cable and a home network Router(DHCP server)

  1. Attach Galileo to your router(DHCP server) using an Ethernet cable.
  2. Create a new sketch –
    1. In setup function - Start the telnet server on Galileo (system("telnetd -l /bin/sh");)
    2. In Loop - Call ifconfig and redirect the output to ttyGS0 (system("ifconfig eth0 > /dev/ttyGS0");) so you can view Galileo's IP address on the serial Monitor. We call this in the loop function because the serial monitor closes on sketch upload
  3. Use putty or any Telnet client to connect to Galileo using the IP address returned on the Serial Monitor from ifconfig.

 

/servlet/JiveServlet/showImage/2-208564-233626/2nd.png

Tags (1)
31 Replies
Matthew_R_Intel
Employee
158 Views

This process works well; however, it requires you to configure an IPv4 address on the Galileo platform and potentially set a static IPv4 Address on the connecting computer. If you use IPv6 instead, you can avoid this configuration process all together.

 

Both Windows and Linux (including the yocto on the Galileo) are IPv6 enabled. As part of the IPv6 protocol, in the absence of a static or dynamic address from DCHP, it will create its own link local address with the fe80 prefix. So technically, you should only have to plug in a patch cable (most Ethernet adapters perform auto crossover) between the Galileo and the laptop Ethernet adapters allowing the TCP/IP network stacks to automatically assign a link local IPv6 address once the adapter link occurs. After which, just connect to the Galileo over the IPv6 address via a SSH terminal. The /docs/DOC-22226 LINUX_IMAGE_FOR_SD_Intel_Galileo_v1.0.0 has all the component already enabled to make this process work. If you are booting from Galileo SPI flash and want to use IPv6, you will need to load the IPv6 Module; this can be done with the following sketch command... system("modprobe ipv6");.

 

Galileo IPv6 Address

Windows IPv6 Address

To get the IPv6 Address from Galileo, run the following Sketch system command to dump the ifconfig to the serial monitor...

system("ifconfig eth0 > /dev/ttyGS0");

Then just use PuTTY or another terminal program to connect to the IPv6 address via SSH.

This process avoids the whole creating a static IPv4 address on both the Windows and Galileo side or setting up bridging.

--Matt Royer

ESala
New Contributor I
158 Views

Followed this guide but still unable to connect to Galileo over ethernet using PuTTY.

I plugged in the power cable to the board. Insert the USB cable to the USB Client Port. Device manager shows the Galileo board on COM3

Plugged in ethernet cable into the Galileo board and to my PC.

I opened Arduino IDE and upload the sketch, then input the ip address to PuTTY.

Please advise. Thank you.

ESala
New Contributor I
158 Views

Problem solved! Sorry to ask such stupid question. Upon opening PuTTY I did not switch to Telnet.

Issue resolved after I switched to Telnet selection in PuTTY.

Thank you.

PChoo
Novice
158 Views

Hi mak3r,

I'm using the following the same method, upload the sketch (below) thru USB then connect my PC's LAN port to Galileo's LAN port.

Sketch:

void setup()

{

system("telnetd -l /bin/sh");

system("ifconfig eth0 169.254.1.5 netmask 255.255.0.0 up");

}

With this, I still couldn't telnet to my board. When I ping my board, this is what I get:

Reply from 192.168.1.15: Destination host unreachable.

...

Ping statistics for 169.254.1.5:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Is there any step I missed?

My firmware is 1.0.2 (based on Arduino IDE without SD-Card) and I'm booting from SD-Card (LINUX_IMAGE_FOR_SD_Intel_Galileo_v1.0.2).

Thanks!

ESala
New Contributor I
158 Views

Are you using a Windows machine?

After attaching the ethernet cable directly from the Galileo board to your laptop, make sure that your PC was able to detect the Galileo board from your device manager listed under "Ports"

Then, if you are using PuTTY, make sure to select "Telnet" as your connection type. Leave other settings as default

MARC_H_Intel
Employee
158 Views

miroyer even with IPv4 you don't need to configure a static IP address on the PC side - as mentioned in the very first post link local addresses exist for IPv4 too.

MARC_H_Intel
Employee
158 Views

Note: no ssh server fits in the default SPI image. But, in both the tiny SPI image and the bigger SD/USB image an FTP server is available so you can browse and edit files remotely using Windows Explorer or any other FTP client. Scroll down this thread:

DNguy24
Beginner
158 Views

I connected to Galileo over Ethernet using PuttY. Then, i opened Arduino IDE and upload the sketch "Webclient" for testing Connect to Internet, but it didn't succeed.

Have you seen cases like that? normally connected to the network?

PChoo
Novice
158 Views

Hey Marss,

It turns out that my Ethernet port is the problem, maybe my IT had disabled such connection.

Anyway, I'm able to login (both telnet and ssh) using Ethernet port and Wifi on 2 other PCs, so it's not an issue anymore.

Thanks for your reply!

qshah1
New Contributor III
158 Views

i am using the above three commands and i have attached an led on pin 7 but led is not turning on .also how to use the built in led

NDere
Beginner
158 Views

PengWan I had same issue and tried again and again. Then somehow I realize that my telnet was not activated. Following steps below will solve your Problem

http://social.technet.microsoft.com/wiki/contents/articles/910.windows-7-enabling-telnet-client.aspx http://social.technet.microsoft.com/wiki/contents/articles/910.windows-7-enabling-telnet-client.aspx

Edit: Problem was when entering IP addres in Putty "Network error: Connection timed out"

jatti
Novice
158 Views

installer the new version on my sd card but when I connect via telnet I asked user and password I dont know for why

Reply