Re: Handheld scanners / frontends

Frank Becker (fbecker@nortelnetworks.com)
Fri, 19 Feb 1999 09:49:59 -0800

becka@rz.uni-duesseldorf.de wrote:
>
> Hi !
>
> > > I was wondering if there are any handheld scanners
> > > supported by SANE. The scanner type isn't mentioned on the
> > > backend list on the SANE web site. I suspect that's because
> > > all of them are flatbeds...?
>
> > Nop. It's because nobody has write a backend for them yet. Still there
> > may be other considerations also. Some of them are:
>
> > 1)It's difficult (up to impossible) to get the specs
>
> Yes - you usually got to reverse-engineer the drivers. This was relatively
> simple for the DOS drivers that once came with the Logi Scanman, but with
> Win drivers, that's a bit harder. However wine or bochs might help to
> trace what the drivers try to do.

Yes, I used bochs to get an idea of the sequence of events. After that
I reverse engineered the windows dll with IDA to figure out the
proper AND/OR masks, etc.

>
> > > The reason I'm asking, I wrote a backend for my handheld.
>
> Ah - good. Does it access the HW directly or how does it work ?
Well, I started out with your Scanman driver, but I couldn't get
it to work reliably at higher resolutions (300,400dpi) for my
Scanman Color - so I dunked it... Nonetheless it was extremly
helpful in learning how the scanner works in general. I rewrote
the driver and it works quite well, but only for the SMC.
It's incomplete with respect to other Scanman models :(

>
> > > It sortof works, but I have a few irks with the frontends.
> > > Maybe my backend isn't doing things correctly... On the
> > > windows software you had to tell the software when the
> > > scan was over. The (GUI)frontends only have a cancel button
> > > (maybe rename it to STOP?) which doesn't seem quite right.
> >
> > Well, you have to tell us more. I am not sure what you are saying
> > here...
>
> He's saying, that you can't know when an image is complete with handhelds.
> They usually have some kind of button to start/stop transfer, but it is
> often not queryable, and even then, the common behaviour is to:
>
> Scan while the button is depressed, pause, when it isn't, and stop scanning
> when the user tells the scanning dialog to do so.

Yes, that's what I meant to say :)

>
> This in deed sounds to me like a small deficiency in SANE, as we only know
> how to cancel a scan, but not how to tell the backend to stop acquiring
> now, _without_ discarding already buffered data and such ...

It's not that bad. If I press 'cancel' in xscanimage's preview dialog,
it saves the data (xsane doesn't) and it even gets the row count right.
Sadly it cores after scanning ~300 lines. I haven't taken a closer look
at this, so maybe it's my backend. From a user's point of view it's
confusing, since 'cancel' acts as a "stop and save" rather than
a "cancel and cleanup". If I had my way, I'd have the UI treat
handhelds slightly differently.
I.e.
1. No preview button
2. The 'Scan' button brings up the (what's now known as the)
preview dialog, but with the title renamed to something like
"Do the Scan Man!" and the 'cancel' button renamed to "Stop and
Save".

Just something to think about...

Frank.

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com