Hi,

Does anyone have a solution to this problem?

I have a serial port (connected to a GPS at 4800 baud). I have multiple processes that need to read from that serial port. I need all of the processes to read the same data, essentially creating a one way chat from the serial port to all processes listening in.

I've tried using socat but if I create a socket connection, using, e.g.

socat TCP4-LISTEN:25555,reuseaddr,fork /dev/ttyUSB0,b4800,raw,echo=0

... then have multiple connections in to TCP socket 25555, then each socket connection gets part of the data stream from the serial port.

I've tried setting up a multicast, but because multicast is UDP based I'm seeing occasional packet-out-of-order and packet-dropped issues. Ideally I'd like it to be TCP based -- I have one process that can connect to a TCP socket for its data rather than read from the port, and I can use socat to create PTYs for the other processes that expect a serial port provided the data comes in in the right order.

Yes, I know about gpsd, and one of the processes that needs to read the serial data is gpsd, but I have some processes that need to read the raw data provided by the GPS and not gpsd's output.

Thanx,

--
Del
Babel Com Australia
http://www.babel.com.au/
ph: 02 9966 9476
fax: 02 9906 2864
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to