LCDproc development and user support list

Text archives Help


[lcdproc] Can two programs share a single serial port?


Chronological Thread 
  • From: Steffen.Uhlig AT gmx.net (Steffen Uhlig)
  • Subject: [lcdproc] Can two programs share a single serial port?
  • Date: Wed, 20 Sep 2000 22:57:15 +0200

Hi,

maybe somebody here can answer the question I raised on the IRMP3 mailing
list or give some pointers for further reading:

Is it possible to have LCDproc writing to the same serial port where another
program receives data?

Background: I've been using LCDproc for quite a while with a serial
CrystalFontz display for showing system stats and email status. Recently I
came across the LIRC project [1] which uses a simple infrared receiver
attached to the serial port to receive commands from an infrared remote
control. You can control your MP3 player, shutdown the system and many other
things. There is even a complete solution called IRMP3 [2] which makes use
of LCDproc, LIRC and mpg123 (MP3 player) altogether to get a complete
player.

My problem is: I have only a single serial port left (the other one is taken
up by the modem) and before trying to add an extra serial board I want to
discuss whether it is possible to do both, IR reading and LCDproc sending,
with a single serial port, or, more general:

Is it principally possible to have two programs open the same serial port,
one to read from it and one to write to it?

Electrically it shouldn't be a problem if LCDproc only sends data (no keypad
then, I suppose) and LIRC only receives (LIRC can send IR too, but this can
be disabled). In LCDproc's CVS repository at SourceForge I read about LIRC
support in v0.4-pre10. Does that mean I can get LCDproc and LIRC to share
the same port?

If that fails, I will come up with another idea: Somebody could write a
little program which acquires the serial port and provides two new "pseudo"
devices, one for reading (e.g. ttyS0rx) and one for writing (ttyS0tx). You
would then point LIRC to the read-only device and LCDproc to the write-only
device. Physically everything is routed to and from ttyS0 (this might even
be implemented with two system FIFOs).

Is that possible?

TIA

Steffen

[1] http://fsinfo.cs.uni-sb.de/~columbus/lirc/
[2] http://manhattan.dpotter.com/irmp3/
--
http://steffen-uhlig.de/


-----------------------------------------------------------
To unsubscribe from this list send a blank message to
lcdproc-unsubscribe AT lists.omnipotent.net



  • [lcdproc] Can two programs share a single serial port?, Steffen Uhlig, 09/20/2000

Archive powered by MHonArc 2.6.18.

Top of page