Skip to main content
replaced http://abyz.co.uk/ with http://abyz.me.uk/
Source Link

There are several ways to monitor the transmitted data.

A logic analyser would let you see the signal and should be able to decode the actual serial data.

piscope will let you see the signal (the pattern of start, stop, and data bits).

piscope serial data

The above shows "hello\n\r" at 9600 bps captured by piscope.

The pigs utility will let you decode the data being transmitted on TXD.

The simplest for your purposes is probably the pigs utility.

The following commands will display the data being transmitted.

$ sudo pigpiod # start daemon

$ pigs slro 14 9600 8 # monitor 14 at 9600 baud 8 data bits

$ echo "hello" >/dev/ttyAMA0

$ pigs slr 14 100
7 104 101 108 108 111 13 10

$ pigs -a slr 14 100
0

$ echo "hello" >/dev/ttyAMA0

$ pigs -a slr 14 100
7 hello\x0d\x0a

There are several ways to monitor the transmitted data.

A logic analyser would let you see the signal and should be able to decode the actual serial data.

piscope will let you see the signal (the pattern of start, stop, and data bits).

piscope serial data

The above shows "hello\n\r" at 9600 bps captured by piscope.

The pigs utility will let you decode the data being transmitted on TXD.

The simplest for your purposes is probably the pigs utility.

The following commands will display the data being transmitted.

$ sudo pigpiod # start daemon

$ pigs slro 14 9600 8 # monitor 14 at 9600 baud 8 data bits

$ echo "hello" >/dev/ttyAMA0

$ pigs slr 14 100
7 104 101 108 108 111 13 10

$ pigs -a slr 14 100
0

$ echo "hello" >/dev/ttyAMA0

$ pigs -a slr 14 100
7 hello\x0d\x0a

There are several ways to monitor the transmitted data.

A logic analyser would let you see the signal and should be able to decode the actual serial data.

piscope will let you see the signal (the pattern of start, stop, and data bits).

piscope serial data

The above shows "hello\n\r" at 9600 bps captured by piscope.

The pigs utility will let you decode the data being transmitted on TXD.

The simplest for your purposes is probably the pigs utility.

The following commands will display the data being transmitted.

$ sudo pigpiod # start daemon

$ pigs slro 14 9600 8 # monitor 14 at 9600 baud 8 data bits

$ echo "hello" >/dev/ttyAMA0

$ pigs slr 14 100
7 104 101 108 108 111 13 10

$ pigs -a slr 14 100
0

$ echo "hello" >/dev/ttyAMA0

$ pigs -a slr 14 100
7 hello\x0d\x0a
Source Link
joan
  • 71.6k
  • 5
  • 74
  • 107

There are several ways to monitor the transmitted data.

A logic analyser would let you see the signal and should be able to decode the actual serial data.

piscope will let you see the signal (the pattern of start, stop, and data bits).

piscope serial data

The above shows "hello\n\r" at 9600 bps captured by piscope.

The pigs utility will let you decode the data being transmitted on TXD.

The simplest for your purposes is probably the pigs utility.

The following commands will display the data being transmitted.

$ sudo pigpiod # start daemon

$ pigs slro 14 9600 8 # monitor 14 at 9600 baud 8 data bits

$ echo "hello" >/dev/ttyAMA0

$ pigs slr 14 100
7 104 101 108 108 111 13 10

$ pigs -a slr 14 100
0

$ echo "hello" >/dev/ttyAMA0

$ pigs -a slr 14 100
7 hello\x0d\x0a