Search code examples
linuxserial-portpyseriallinux-mint

how do you open FTDI serial ports ttyUSBx such that we can run 2 applications on it?


I am writing a python pyserial app and need to debug it. It is not getting anything on its rx beyond the prompt. I would like to open up a parallel minicom on same tty and be able to see the port rx. Is this possible without hardware logging ? Can I simply use a serial settings to allow 2 apps to run simultaneously on ttyUSB0 ?


Solution

  • Short answer: No, you can't access your serial ports from two processes at the same time.

    There are workarounds that can give you a much cheaper solution than purchasing a hardware sniffer or a scope with serial decoding capabilities though.

    You will have to define a couple of virtual serial ports and use port forwarding. This procedure has been explained here: on Linux and Windows 1, 2.