I'm working on a project that needs multiple TX/RX pins, but the Raspberry Pi that I have only has 1 of these pins. Can I use the GPIO pins as TX/RX pins? Or is there an adapter available somewhere?

Specifically, I need the TX/RX pins for a SIM module and a GPS module. Perhaps there are SIM and GPS modules that uses GPIO directly instead? Any links would be helpful


There is a way that is called "Software serial" or "Soft UART".

The project https://github.com/adrianomarto/soft_uart is doing precisely what you are looking for, you can install the soft_uart and use any GPIO as Rx/Tx.

Software-based serial port module for Raspberry Pi.

This module creates a software-based serial port using a configurable pair of GPIO pins. The serial port will appear as /dev/ttySOFT0.


  • Works exactly as a hardware-based serial port.
  • Works with any application, e.g. cat, echo, minicom.
  • Configurable baud rate.
  • TX buffer of 256 bytes.
  • RX buffer managed by the kernel.

You could a USB to serial converter. That would let you connect the USB end to the Pi and the serial TX/RX/Ground end to the serial device.

You can use (my) pigpio to bit bang a serial link on any spare GPIO.

As long as the baud rate is 19k2 or less it should be fine.

For Python the read is straightforward. Writing requires waves and needs more effort.

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.