Showing posts with label ttyS0. Show all posts
Showing posts with label ttyS0. Show all posts
Sunday, September 22, 2013
Read and Write to ttyS0 serial ports in Linux
Two ways to interface to the ttyS0 serial port:
1) via terminal command line:
echo "ABCDEF" > /dev/ttyS0
cat /dev/ttyS0
To configure the port:
stty -F /dev/ttyS0 speed 9600 cs8
stty -F /dev/ttyS0 speed 9600 cs8 -cstopb -parenb
2) via C Program: minicom
sudo apt-get install minicom
when done use
sudo minicom -s
3) By writing your own app in C++ or C# or any other preferred Programming language:
I will have some sample working programs here soon.
Subscribe to:
Posts (Atom)