Linux Command Reference

Using stty to view RS232 input from a simple command

Command Description:

The following command displays the input from /dev/ttyS0 in stdout. Ctrl-c to stop.

# stty -F /dev/ttyS0 ispeed 9600 && cat
Permissions: #
Flags:
-F Device, ispeed Device speed
Command Output:

$GPRMC,221023.00,A,5054.42566,N,00120.95687,W,0.058,,120514,,,D*68
$GPVTG,,T,,M,0.058,N,0.107,K,D*2D
$GPGGA,221023.00,5054.42566,N,00120.95687,W,2,11,1.02,48.7,M,47.0,M,,0000*77
$GPGSA,A,3,27,03,19,16,22,18,21,07,08,09,11,,1.66,1.02,1.30*07
$GPGSV,5,1,17,01,02,242,16,03,75,285,27,07,17,287,31,08,18,315,32*79
$GPGSV,5,2,17,09,12,324,27,11,20,257,34,15,07,030,,16,41,181,42*7B
$GPGSV,5,3,17,18,38,063,29,19,60,292,32,21,18,065,17,22,52,117,42*7A
$GPGSV,5,4,17,26,00,358,,27,83,097,29,30,15,314,31,33,30,197,37*74
$GPGSV,5,5,17,39,27,147,*42
$GPGLL,5054.42566,N,00120.95687,W,221023.00,A,D*7F
$GPRMC,221024.00,A,5054.42564,N,00120.95690,W,0.049,,120514,,,D*6B
$GPVTG,,T,,M,0.049,N,0.090,K,D*22
$GPGGA,221024.00,5054.42564,N,00120.95690,W,2,11,1.02,48.6,M,47.0,M,,0000*75
$GPGSA,A,3,27,03,19,16,22,18,21,07,08,09,11,,1.66,1.02,1.30*07
$GPGSV,5,1,17,01,02,242,17,03,75,285,28,07,17,287,31,08,18,315,32*77
$GPGSV,5,2,17,09,12,324,27,11,20,257,34,15,07,030,,16,41,181,43*7A
$GPGSV,5,3,17,18,38,063,29,19,60,292,32,21,18,065,17,22,52,117,41*79
$GPGSV,5,4,17,26,00,358,,27,83,097,30,30,15,314,31,33,30,197,37*7C
$GPGSV,5,5,17,39,27,147,*42
$GPGLL,5054.42564,N,00120.95690,W,221024.00,A,D*7C
$GPRMC,221025.00,A,5054.42562,N,00120.95693,W,0.040,,120514,,,D*66
$GPVTG,,T,,M,0.040,N,0.075,K,D*20
$GPGGA,221025.00,5054.42562,N,00120.95693,W,2,11,1.02,48.6,M,47.0,M,,0000*71

 

Tags: stty