0

I have connected a serial device to my Linux laptop and able to boot into the device as dev/devttyACM0. Everything is fine but I needed to open another terminal as part of a software implementation while something is running in the current terminal. If I open a new terminal and tried to login into the device, it says the device is locked. Is there a way to access the serial device with two terminals parallelly?

The solutions I found for device locked problem is suggesting to kill all the process which would kill the current terminal. Is there a way to access the device by two terminals?

phani
  • 1
  • 3
  • No, serial ports cannot be shared. – Hans Passant Dec 14 '22 at 12:46
  • Hi @HansPassant thanks for the reply. I did not understand what you meant by sharing. I have one x86_64 ubuntu host laptop and I have connected a ARM embedded device through serial port and accessing it through minicom. I am running ROS program in the terminal and it needs to open a new terminal but when I open a new terminal, again I have to login to the device and it says the device is locked. Does opening a new terminal comes under sharing? Is there no other way? – phani Dec 14 '22 at 12:58

1 Answers1

-1

Is there a way to access the serial device with two terminals parallelly?

Yes, there actually is. There is a protocol called 07.10 after its official specification number (although the up to date version number is 27.010) specifically created to support that use case.

I wrote an answer about it in this question. It will most likely require a dedicated device driver, but if your modem supports the AT+CMUX command, then 07.10 is a viable option.

hlovdal
  • 26,565
  • 10
  • 94
  • 165