I would like to know how to open the serial port on the Galileo Gen 2. I have an external device which is currently sending serial data with a baud rate of 115200 connected to the the Galileo on pins 0 and 1. I would like to be able to view this data on the terminal. I have configured the serial port by doing the following:
#unexport to allow modification
root@clanton:~# echo -n "4" > /sys/class/gpio/unexport
root@clanton:~# echo -n "40" > /sys/class/gpio/unexport
root@clanton:~# echo -n "41" > /sys/class/gpio/unexport
#setup the port
root@clanton:~# echo -n "4" > /sys/class/gpio/export
root@clanton:~# echo -n "40" > /sys/class/gpio/export
root@clanton:~# echo -n "41" > /sys/class/gpio/export
root@clanton:~# echo -n "out" > /sys/class/gpio/gpio4/direction
root@clanton:~# echo -n "out" > /sys/class/gpio/gpio40/direction
root@clanton:~# echo -n "out" > /sys/class/gpio/gpio41/direction
root@clanton:~# echo -n "strong" > /sys/class/gpio/gpio40/drive
root@clanton:~# echo -n "strong" > /sys/class/gpio/gpio41/drive
root@clanton:~# echo -n "1" > /sys/class/gpio/gpio4/value
root@clanton:~# echo -n "0" > /sys/class/gpio/gpio40/value
root@clanton:~# echo -n "0" > /sys/class/gpio/gpio41/value
#set port to correct baud rate
root@clanton:~# stty -F /dev/ttyS0 115200
#open the port?
root@clanton:~# cat /dev/ttyS0
What is needed in order to be able to view the data that my external device is sending?
Extra: I have verified that my device is correctly sending serial data by attaching it to pins 0, and 1 of an Ardunio Uno and used the serial monitor to see the data.