2

Is there any way to communicate serially from two applications( running on same device) to one serial port of another device at a time? My requirement is to communicate over serial port to one device from two applications at a time, applications are running in Linux system.

I found something here Share Serial Port on Linux but this is not helping me.

Guys please hands up if more clarification is needed.

Community
  • 1
  • 1
µtex
  • 900
  • 5
  • 12
  • 1
    Just open device file in non-blocking mode and use some type of locking. But how will you detect, which device should take an answer? The best way is to use daemon that will organize communication with MCU and other software by something like queues. – Eddy_Em Sep 12 '14 at 07:29
  • Thanks @Eddy_Em..... I'm not sure how should I detect... can you please suggest anything... May be continuously checking/reading in both applications if anything comes from 2nd device. – µtex Sep 12 '14 at 18:40
  • Anyway you will have problem with incoming data. Any portion of this data could be read by any process. So, the simplest way is to run daemon that will manage with any number of processes that needs communication with serial port. – Eddy_Em Sep 13 '14 at 06:20

0 Answers0