[sane-devel] rts8891: Umax Astra 4450 does not work
Ondrej Zary
linux at rainbow-software.org
Mon Jun 8 21:06:55 UTC 2015
On Saturday 30 May 2015 23:54:28 Ondrej Zary wrote:
> On Friday 29 May 2015 23:02:38 Ondrej Zary wrote:
> > On Monday 11 May 2015 22:05:33 Stef wrote:
> > > On 09/05/2015 00:32, Ondrej Zary wrote:
> > > > On Friday 08 May 2015 21:46:36 Ondrej Zary wrote:
> > > >> On Friday 08 May 2015 16:17:53 Ondrej Zary wrote:
> > > >>> On Thursday 07 May 2015 23:32:28 Ondrej Zary wrote:
> > > >>>> Hello,
> > > >>>> I just got Umax Astra 4450 (same as 4400 except with UTA?) for a
> > > >>>> while and tested it with SANE. Unfortunately, it does not work.
> > > >>>> The lamp turns on and the head moves a bit, then goes back (two
> > > >>>> times) and the scan ends with these errors:
> > > >>>>
> > > >>>> [rts8891] simple_scan: failed to wait for data
> > > >>>> [rts8891] gain_calibration: failed scan data
> > > >>>> [rts8891] sane_start: failed to do gain calibration!
> > > >>>> scanimage: sane_start: Error during device I/O
> > > >>>
> > > >>> I've modified sane_start() in rts8891.c to not fail if
> > > >>> gain_calibration() returns error. It now scans the complete area
> > > >>> and the output resembles what's in the scanner (black template for
> > > >>> UTA use with green text) but it's blurry, shifted horizontally (and
> > > >>> the gain is wrong, of course):
> > > >>> http://www.rainbow-software.org/linux_files/umax_astra_4450/no_gain
> > > >>>_c al ib ra tion.ppm.gz
> > > >>> http://www.rainbow-software.org/linux_files/umax_astra_4450/no_gain
> > > >>>_c al ib ra tion.log
> > > >>>
> > > >>> Looks like there's a problem with the sensor type?
> > > >
> > > > Gain calibration fails because dev->left_offset (and thus xstart) is
> > > > negative. If I set xstart to 4, gain calibration passes (although
> > > > it's wrong: ends after first pass with 0x1f,0x1f,0x1f).
> > > >
> > > > So find_margin() does not work...
> > >
> > > Hello,
> > >
> > > you could try to hardcode gain values at the end of gain
> > > calibration to see if scan is close to be correct.
> >
> > The dumps from Windows are very different. I've transferred the register
> > settings to sane-rts8891 but with only partial success. 150dpi and 300dpi
> > seems to work if I don't touch 0x7a register. 75dpi, 600dpi and 1200dpi
> > are broken no matter what I tried.
> >
> > The experimental patch is available at
> > http://www.rainbow-software.org/linux_files/umax_astra_4450/umax_astra445
> >0- test.diff
>
> Found a bug causing 600dpi scans to return only solid color area. It was a
> problem with 0xaa "escaping" - I misread the dump because of that and used
> wrong registers. After fixing, it didn't work at all - because the original
> sane-rts8891 code does not "escape" 0xaa values in registers above 0xb3.
>
> After fixing that, 600dpi is still broken but at least some real data is
> coming from the scanner now.
>
> New patch:
> http://www.rainbow-software.org/linux_files/umax_astra_4450/umax_astra4450-
>test2.diff
Here's a new, more polished patch:
http://www.rainbow-software.org/linux_files/umax_astra_4450/umax_astra4450-test3.diff
- buttons now work
- lamps work correctly (main lamp turns off at close, UTA lamp always off)
- xsane now works for scanning at 150 or 300 dpi
- preview (75dpi) is broken as well as 75dpi, 600dpi and 1200dpi
--
Ondrej Zary
More information about the sane-devel
mailing list