[sane-devel] ECP Command sending

Matthew Duggan stauff@guarana.org
Mon, 22 Sep 2003 15:56:22 +1000


G'day John,

On Mon, Sep 22, 2003 at 02:10:34AM -0300, John Coppens wrote:
> Hi all.
> 
> I've been bravely trying to guess how the Alaris parallel port webcam is
> working, and I wanted to do some testing. After a study of Parport
> documents, I have written a small proggie that reads from the ECP port
> fine, and even get the manufacturers and other data from the cam.
> 
> I do not seem to find anywhere how to use the parport calls to send (or
> receive for that matter) Commands on the ECP bus. I am guessing all
> transactions are done in Forward (or Reverse) Data Mode. Does anyone know
> how to generate Commands (Fwd and Rev)? Short of writing manually to the
> base + 0xA00 addresses?
> 
> Thanks,
> John


I'd recommend using libieee1284 for this sort of thing.  It nicely
encapsulates all the ECP/EPP/BIDIR/etc modes in a mostly-cross-platform
way.  It is my long-term ambition to add sanei_parport calls which use
libieee1284, then finally get the parport backends to be portable and 
not all do their own crazy thing.

See:
http://cyberelk.net/tim/libieee1284/index.html

Regards,

Matthew Duggan.