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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.