Subject: Re: DeskWriter daemon - suggestions?
To: Bill Studenmund <wrstuden@loki.Stanford.EDU>
From: Allen Briggs <briggs@puma.bevd.blacksburg.va.us>
List: macbsd-development
Date: 07/02/1995 20:50:48
> 1) How robust is support for the serial port? The DeskWriter runs at
>      57600 bps, hardware handshaking. Any gotcha's other than setting
>      /etc/ttys for 57600 rtscts handshaking? Oh, and no getty.

I don't think the driver handles 57600 well at all.  I certainly
wouldn't expect error-free reception at that speed.  Since you're
mostly sending, though, it might work out.

> 2) The printer sends a status byte every other second describing its
>      state-of-affairs (idle, busy, etc). I'm thinking that it would be
>      nice to have a process capture them and translate them into a
>      readable status. So I (eventually) need to write a daemon. What are
>      good references?

I don't know of any off-hand, but this shouldn't be too hard.  Open a
file to the proper tty and call select to wait for any data to show up.
As long as the lp daemon wasn't also trying to read from the file
descriptor, I think you'll be OK--as long as neither of you open
it/set it for exclusive access.  You could also listen on a socket or
something to wait another process to query the status.  For info on
procfs, try "man mount_procfs."

-allen

-- 
Allen Briggs - end killing - allen.briggs@bev.net ** MacBSD == NetBSD/mac68k **