in reply to serial port bridge (virtual)

Faking a serial port like that would be tricky in any language, but particularly tricky for a scripting language that isn't designed to run in driver space. Depending on the degree of control you have over the applications you may be able to write a Perl daemon that connects to the GPS serial port and provides pre-digested GPS information to applications.

True laziness is hard work

Replies are listed 'Best First'.
Re^2: serial port bridge (virtual)
by steve_thorley (Initiate) on Feb 21, 2011 at 02:45 UTC

    I have found a solution all be it not very elegant.

    I'm not using perl at all.

    I used mkfifo to create two files

    then "cat /dev/ttya | tee /fifo.file1 | cat > /fifo.file2 &"
       cat /dev/ttya | tee /fifo.file1 | cat > /fifo.file2 &

      You can most likely get rid of the second cat, because '| cat >' is the same as '>', wrt functionality:

      $ echo foo | cat > myfile $ cat myfile foo $ echo foo > myfile $ cat myfile foo