6 Replies Latest reply on Jun 24, 2014 4:07 AM by sunilputtur

    Accessing UART port in intel galileo


      Hey, I would like to know how to access the UART port in intel galileo board.  I had gone through some of the links available on website. But I need some more information in detail as such.

        • 1. Re: Accessing UART port in intel galileo

          Greetings sunilputtur


          You can use the /dev/ttyGS0 for the USB client, you could test it by connecting the USB client to your PC, open the serial monitor and set 9600. Go to the Linux console of the Galileo, and you’ll see that if you type cat /dev/ttyGS0 and you’ll receive what you send over the IDE serial monitor. Also you can use the echo command to send data and it’ll appear on the serial monitor, for example echo “Hello” > /dev/ttyGS0.

          If you want to use the pins 0 and 1 as a serial device you can follow this tutorial http://www.malinov.com/Home/sergey-s-blog/intelgalileo-configuringtheserialportinlinux , if you have a sensor that sends serial data you can test if it’s receiving by typing and using cat /dev/ttyS0. Remember to set the port to the speed the sensor sends the data you can use the command stty -F /dev/ttyS0 57600, to set on 57600. Then if you want to manipulate the data you receive maybe you can use python and download the pyserialRe: Trying to use PySerial to drive a serial lcd (parallax)?. I hope this works for you.



          • 2. Re: Accessing UART port in intel galileo

            Thanks JPMontero_Intel.

                       To type the command which is the terminal that I can make use, for the moment I was using Putty terminal but I m unable to get directories/files/sub-folders on the booted SD Card.

                The only "ls" command works as it lists all the directories. Kindly help.!

            • 3. Re: Accessing UART port in intel galileo



              Actually I use PuTTY and hadn't had any problems so far. Could you attach a screenshot of the error you are getting?  And just in case, remember the speed must be set to 115200, and you log in with root.



              • 4. Re: Accessing UART port in intel galileo



                Here is the screenshot of what I am doing so far. The thing is I want to use  galileo linux over ethernet and type commands on putty. But as of now I am able to get those on serial monitor.

                This is what I m looking for Kindly help.



                • 5. Re: Accessing UART port in intel galileo

                  There are a couple of things confusing you in the terminal window.


                  First you typed cd \ - in linux the '\' means "I'm gonna press return, but it's all one line really" so then when you typed 'ls' it though you had typed:

                  cd ls

                  Which wouldn't do anything except give the error you saw.

                  Secondly, when you did the 'cat' command, you need a space after 'cat' so it thought that cat/dev/ttyGS0 was all one command, which it didn't understand either.


                  So, what you probably wanted was :

                  cd /

                  cat /dev/ttyGS0

                  • 6. Re: Accessing UART port in intel galileo

                    I got all the commands corrected on serial monitor. Now I want to use those commands on Putty as well.

                    I am using Linux_TelnetShell sketch for this the code executes but when i start Putty nothing will be displayed on it. Is that excepted ? Kindly help .


                    Here is the code below.


                    void setup() {



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

                      system("ifconfig eth0 netmask up");

                      //you can now use puTTY or your favourite telnet client

                      //to connect to this IP address






                    void loop() {

                      // put your main code here, to run repeatedly: