2

I am testing a python application on the pi that uses a serial connection via usb to serial adapter. At the moment, I can't use the actual physical device its communicating with.

So, does anyone know a way I can make a virtual serial port on the raspberry pi whose ports are bridged, so I can see the output and control the input on the other side. So that I can test my application before it gets attached to the main hardware unit.

user3346931
  • 277
  • 2
  • 6
  • 13

1 Answers1

1

There are terminal programs such as picocom, minocom etc. which are used for serial communication. If you connect TX of RPi to RX of RPi(or if you connect two pins and set one as TX and RX), then the data you transmit through the selected pin(TX) will be received by yourself via the other selected pin(RX).

Avoid connecting pins directly to ground or power carelessly for not frying the board. GPIO Safety

Information about terminals: Picocom , Minicom

Relevant question: Testing serial

Also there are other options for checking serial connection, if you have an Arduino board you can try communicating with it(there are thousands of tutorials), or if you can try it with a Windows machine Windows to RPI Serial Com.

Also this link includes everything you need, and a little more : http://elinux.org/RPi_Serial_Connection

Tolga Varol
  • 589
  • 6
  • 17