Re: [sane-devel] [umax_pp] Fix unused-but-set-parameter compiler warning

2016-09-04 Thread Stef

On 30/08/2016 14:21, Olaf Meeuwissen wrote:

Stef writes:


On 28/08/2016 08:57, Olaf Meeuwissen wrote:

Hi Stef,

The umax_pp_low.c file's offsetCalibration1220p() defines and optionally
modifies the opsc10 variable but that variable isn't used anywhere else.
Is there any particular reason to do so?  Like, maybe, it should have
been used in that function for something?  If not, I'll go ahead and
remove it.

Hope this helps,

Hello,

it is used via the macro `CMDSETGET (1, 0x08, opsc10);` line 12624.

That's in coarseGainCalibration1220p().  The one I'm talking about is
defined at line 11902 and optionally modified at lines 11929-11932 in
offsetCalibration1220p().  That function ends at line 12073.

Sorry for not being clear.


Hello,

sorry for the delay. Yes that one can be removed. It is an unused 
duplicate of opsc04 in coarseGainCalibration().


Regards,

Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [umax_pp] Fix unused-but-set-parameter compiler warning

2016-08-29 Thread Stef

On 28/08/2016 08:57, Olaf Meeuwissen wrote:

Hi Stef,

The umax_pp_low.c file's offsetCalibration1220p() defines and optionally
modifies the opsc10 variable but that variable isn't used anywhere else.
Is there any particular reason to do so?  Like, maybe, it should have
been used in that function for something?  If not, I'll go ahead and
remove it.

Hope this helps,


Hello,

it is used via the macro `CMDSETGET (1, 0x08, opsc10);` line 12624.

the backend needs it.


Regards,

Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon Lide scanners stopped working in Ubuntu 16.04

2016-06-23 Thread Stef

On 23/06/2016 15:39, Dmitry B wrote:

Hi, Allan. I am afraid I won't be able do that in the next month. Another
problem is that a working setup with Lide 110/220 is a remote setup, and I
cannot debug it directly. Who can help us with debugging and fixing the
issue? Possibly we may try to send Lide 110/220 to a SANE developer to help
him to debug and fix the issue.

2016-06-22 1:44 GMT+03:00 m. allan noah <kitno...@gmail.com>:


Hello,

could you get debug log first ? Reproduce your problem with 'scanimage', 
and run it after raising debug level with:

export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL124=255
scanimage -d genesys --resolution 75 --preview --mode Color 2>debug.log 
>debug.pnm


then send us the debug.log file (compressed due to file size limits on 
the list).


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Fwd: Canon LiDE 220

2016-04-25 Thread Stef

On 25/04/2016 16:24, Сергей Шевченко wrote:

Hi
here https://www.mail-archive.com/sane-devel@lists.alioth.debian.org/msg31893.html Stef 
wrote about GL848 : "it is a new genesys chip revision. Not datasheet known for this 
one. This work would be complicated"

DataSheet is available here - 
http://www.alldatasheet.com/datasheet-pdf/pdf/267066/GENESYS/GL848.html
or here - http://www.digchip.com/datasheets/parts/datasheet/589/GL848.php

Can You make Sane-driver for Canon Lide 220 ?

--
Sergey


Hello,

the Canon LiDE 220 is supported by latest git version.


Regards,

Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon LiDE 220 - 4800 dpi scan has duplicated pixels in X direction

2016-03-22 Thread Stef

On 17/03/2016 08:56, Jonathan Liu wrote:

Hi,

I have opened the following ticket for 4800 dpi scanning on Canon LiDE 220:
https://alioth.debian.org/tracker/index.php?func=detail=315339_id=30186=410366

I just want to confirm, does this scanner support 4800 dpi x 4800 dpi
scanning as indicated in the manufacturer specification? I was
checking 4800 dpi scan in GIMP and I see blocks of 2 duplicated pixels
in the X direction when scanned using SANE but not when using Canon
ScanGear on Windows.

Regards,
Jonathan

Hello,

the backend has only 2400 optical dpi x 4800 motor dpi. Pixels are 
'doubled' to get proper aspect ratio for the result.
I'll try to find some time  to do a wrireshark recording of a 
4800x4800 scan to check if it's possible to implement it in the genesys 
backend.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scanner Lide 210 working with old and bleeding edge distro, but not with current stable distro

2016-03-02 Thread Stef

On 02/03/2016 18:46, Sebastian Weber wrote:

Hello!


I have to apologize...

Though I reinstalled all sane components and also the Kernel and other
components, I didn't manage to get my scanner working.

As a last resort, I did a clean re-installation of the entire operating
system. My scanner worked out of the box...

Thanks for your help!

Sebastian



Hello

thank you for the report. All is working including 600 dpi color 
scans ?


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Producing some results! (SANE and Canon Scan Lide 120)

2016-02-23 Thread Stef

On 23/02/2016 16:37, Pavel Sayekat wrote:

Hey Boss ( Stef )
(though I know he wouldn't hire me!),
The scans now producing some distorted pic of the originals I think, you
can check out the results
https://drive.google.com/open?id=0BxPYgHFVQ6LsZmhPdk1pMVdZNUk

On 02/21/2016 08:38 PM, Pavel Sayekat wrote:

Thanks in advance, I wasn't really doing much about it like "doing it
all by myself", I was still waiting for someone (specially you) to do
it. So lets see & wish you luck.

regards
Pavel

On 02/21/2016 12:11 PM, stef-22 [via SANE] wrote:

On 19/02/2016 21:07, Pavel Sayekat wrote:

If I send you the USB dump file during scanning, can you do

something what is

called reverse engineering?



--
View this message in context:

http://sane.10972.n7.nabble.com/SANE-and-Canon-Scan-Lide-120-tp19708p20640.html

Sent from the SANE - Dev mailing list archive at Nabble.com.


  Hello,

  thanks to an hardware donation from Luc Verhaegen, I have a LiDE
120 and I have started to work on it. So I don't need USB logs for this
model.

  I have created feature request #315312
(https://alioth.debian.org/tracker/index.php?func=detail=315312_id=30186=410369)

so anyone interested can be informed.

Regards,
  Stef

--
sane-devel mailing list: [hidden email]

http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
  to [hidden email]




If you reply to this email, your message will be added to the
discussion below:
http://sane.10972.n7.nabble.com/SANE-and-Canon-Scan-Lide-120-tp19708p20643.html

To unsubscribe from SANE and Canon Scan Lide 120, click here
<http://sane.10972.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=19708=cGF2ZWxzYXlla2F0QGdtYWlsLmNvbXwxOTcwOHwtMTU2MzQwOTQ4NQ==>.
NAML
<http://sane.10972.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




Hello,

 I have just pushed a version with 75 to 300 dpi scan mode working. 
See feature request.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] SANE and Canon Scan Lide 120

2016-02-20 Thread Stef

On 19/02/2016 21:07, Pavel Sayekat wrote:

If I send you the USB dump file during scanning, can you do something what is
called reverse engineering?



--
View this message in context: 
http://sane.10972.n7.nabble.com/SANE-and-Canon-Scan-Lide-120-tp19708p20640.html
Sent from the SANE - Dev mailing list archive at Nabble.com.


Hello,

thanks to an hardware donation from Luc Verhaegen, I have a LiDE 
120 and I have started to work on it. So I don't need USB logs for this 
model.


I have created feature request #315312 
(https://alioth.debian.org/tracker/index.php?func=detail=315312_id=30186=410369) 
so anyone interested can be informed.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 700f-Yellow shadow on white areas since 1.0.25

2016-01-25 Thread stef

On 24/01/2016 15:04, Andreas Linz wrote:

Has anybody found the change between 1.0.24-25 that causes this issue?

--
Spreadshirt
Andreas Linz
IT (Student)
a...@spreadshirt.net

http://www.spreadshirt.com

sprd.net AG
Gießerstraße 27
D-04229 Leipzig

Fon: +49 341 594 00 - 5900
Fax: +49 341 594 00 - 5149

Vorstand/executive board: Philip Rooke (Vorsitzender/CEO), Tobias Schaugg
Aufsichtsratsvorsitzender/chairman of the supervisory board: Lukasz Gadowski
Handelsregister/trade register: Amtsgericht Leipzig, HRB 22478
Umsatzsteuer-IdentNummer/VAT-ID: DE 8138 7149 4

Hello,

scans of white areas with my LiDE 700F are OK. To rule out the 
problem may come from simplescan, could you run the appended script and 
check the sc300.pnm picture ? Copy it in an empty directory and run it 
from the command line so all the debug files will be in one place.
 If it is still affected by the problem, please send me the 
sc300.log file and all *.pnm files created during calibration so I can 
analyze what could be going on.


Regards,
Stef


#!/bin/bash
export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL847=255
scanimage -d genesys --clear-calibration --height 20.0 --resolution 300 --mode 
Color 2>$0.log >$0.pnm
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon LiDE 700F with genesys, impossible to scan with higher resolution than 1200 DPI

2016-01-25 Thread stef

On 21/01/2016 21:01, Jan Beranek wrote:

Hi Stef,
in xsane set 8bit colors, but no chance.

See the attachment please - the result is exactly the same.

Kind Regards

Jan.


Hello,

I have undusted my LiDE 700F, and it scans flawlessly. One thing we 
could try is to test SANE 1.0.25 on your machine. Last log you sent is 
from 1.0.24.
You could even clone the sources and compiled latest version, then 
run it without installing it with the appended script which cans 1 cm 
full width at 4800 dpi 16bpp color.


Regards,
Stef

#!/bin/bash
export SANE_SRC=/home/stefdev/git/sane-backends
export BIN_DIR=$SANE_SRC/frontend
export SO_DIR=$SANE_SRC/backend/.libs
export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL646=255
export SANE_DEBUG_GENESYS_GL841=255
export SANE_DEBUG_GENESYS_GL843=255
export SANE_DEBUG_GENESYS_GL847=255
export SANE_DEBUG_GENESYS_GL124=255
export LD_PRELOAD=$SO_DIR/libsane-genesys.so
rm -f *.pnm *.log
$BIN_DIR/scanimage -d genesys --clear-calibration --depth 16 --height 10.0 
--resolution 4800 --mode Color 2>$0.pnm >$0.pnm
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon LiDE 700f-Yellow shadow on white areas since 1.0.25

2016-01-18 Thread stef

On 18/01/2016 16:29, Andreas Linz wrote:

Hello,

there are *yellow shadows* on every scanned page (mostly on white areas)
since the 1.0.25 release.
I've attached two scans, the first one created with `1.0.24` and the
other one with the latest `1.0.25` release.
Both scans were made with default settings using `simple scan`
(https://www.archlinux.org/packages/community/x86_64/simple-scan/) and
show a blank sheet of paper.
The yellow areas look like `overdrive/clipping`, don't know what the
right term is.
Downgrading to 1.0.24 fixes the problem.
I'm using Arch Linux (x64).

best Andreas




Hello,

could you enable debug log for genesys backend with both version 
and send them. Or if too big a link to somewehre they are ?


Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon LiDE 700F with genesys, impossible to scan with higher resolution than 1200 DPI

2016-01-18 Thread stef

On 17/01/2016 20:18, Jan Beranek wrote:

Hi Stef,
your command gave me a nice gray scan after like a 7 minutes. Not bad.
Tried the same in xsane after, but there is it not working...

In rar archive are both logs, any idea what can be wrong with xsane?
In scan.xsane.log is one try of register reading repearting forewer...

Regards

Jan.




Hello,

xsane's scan is done at 16 bit per pixel. Try with 8 bpp to see 
what happens.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 700F with genesys, impossible to scan with higher resolution than 1200 DPI

2016-01-15 Thread Stef

On 14/01/2016 08:51, Jan Beranek wrote:

Hello,
so I tried to be very patient, the scanner was running over night, like 8 hours.

So far nothing, scanner did some sound only in the beginning, later
nothing. I already had to disconnect the scanner, I will try it again
over this night - but honestly, how long this calibration take? It is
really more than 8 hours?

(I've not taken debug.log as this would be too huge)

Kind Regards

Jan.


Hello,

it is a matter of minutes not hours. Something isn't going right. 
Could you send the debug log a small gray scan with the following commands:

export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL847=255
export SANE_DEBUG_GENESYS_GL124=255
scanimage -d genesys --clear-calibration --width 50.0 --height 50.0 
--mode Gray --resolution 2400  2>scan.log >scan.pnm


Regards,
    Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 700F with genesys, impossible to scan with higher resolution than 1200 DPI

2016-01-13 Thread Stef

On 11/01/2016 17:32, Jan Beranek wrote:

Hello,
thank you for a great support and working scanner in Linux.

Everything works fine in resolution 1200 DPI, with resolution 2400 DPI
which I need for small photos is the scanner not scanning - it make a
"sound" like try to move but actually does not move a bit.

In the attachment is zipped log taken like this:

export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL847=255

xsane 2>debug.log

Can you please have a look at this?

Regards

Jan.



Hello,

at resolution starting at 2400, the scanner take a _very_ long time 
to calibrate the first time. Try again and let it work.


Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] sane-genesys - Extension for CanoScan Lide 70

2016-01-03 Thread Stef

On 01/01/2016 12:34, Andreas Nicolai wrote:

Hi there,

I'd like to add support for the CanoScan Lide 70 scanner to the genesys
backend, if possible.


Output from lsusb:

Bus 003 Device 004: ID 04a9:2225 Canon, Inc. CanoScan LiDE 70

I extended /etc/sane.d/genesys.conf  to contain:

# Canon LiDE 70
usb 0x04a9 0x2225

and /lib/udev/rules.d/40-libsane.rules to contain:

# Canon CanoScan LiDE 70
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="2225", ENV{libsane_matched}="yes"


Output from sane-find-scanner:
...
found USB scanner (vendor=0x04a9 [Canon], product=0x2225 [CanoScan]) at
libusb:003:004
...


scanimage -L -v

delivers only an error message.


What can I do to get the scanner supported by one of the backends?

Thanks,
Andreas

PS: I wouldn't mind compiling the genesys backend in debug mode and see what
chipset there is or what error messages appear, but maybe someone has a
quicker solution...




Hello,

the scanner search engine 
http://www.sane-project.org/cgi-bin/driver.pl is the first thing to try.


Its data is based on the sane-backends/doc/desc files where you can 
find in unsupported.desc :


:model "CanoScan LiDE 70"
:url "http://www.juergen-ernst.de/info_sane.html;
:interface "USB"
:usbid "0x04a9" "0x2225"
:status :unsupported
:comment "Philips chip. Backend started, see link"


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Some weirdness with a Canon LiDE 220

2015-12-16 Thread Stef

On 17/12/2015 04:41, Scott Alfter wrote:

On 2015-12-16 19:18, m. allan noah wrote:

You found the patch. If removing that fixes the issue, then our
workaround is causing problems with current linux kernels. I suppose
we will have to make the workaround controlled by an environment
variable in that case.


It didn't fix it when using gentoo-sources (kernel) 4.1.12, but in 
combination with gentoo-sources 4.3.3, I have only had one failure to 
scan, and that was when I told it to try scanning at 4800 dpi. At 
normal settings (600 dpi and below), I suspect it'll scan all day.  It 
even completed a scan at 2400 dpi after a bit of a delay.


I then put the patch back in (or, more precisely, didn't patch it 
out), recompiled, and tried again under the newer kernel.  It seems to 
be running about the same with the workaround as without: an "invalid 
argument" error at 4800 dpi, but it works at 2400 dpi and below.


The patch doesn't appear to be making much of a difference one way or 
the other.  Instead, it would appear the kernel developers may have 
fixed whatever was broken with USB 3.0 support somewhere between 
4.1.12 and 4.3.3.



Hello,

before scanning, the scanner calibrates itself. The higher the 
resolution, the longer the calibration takes. The calibration data is 
then cached , and subsequent scans are faster. That explains the delay 
you saw at 2400 dpi.

For the 4800 dpi scan, what is the scan area used (width, height) ?

Regards,
Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] 1.0.25 is out, now what?

2015-10-29 Thread Stef

On 28/10/2015 12:18, Olaf Meeuwissen wrote:

Sorry for the belated response.

Johannes Meixner writes:


Hello Olaf,

first and foremost many thanks for all your
"SANE Project Janitor" work.

On Oct 19 22:20 Olaf Meeuwissen wrote (excerpt):

... unofficial ... goals for sane-backends-1.0.26.

Feedback and suggestions are welcome.


Suggestion for an additional goal for sane-backends-1.0.26:

- drop support for parallel port scanners

Hello,

rather than dropping support for working hardware (and which 
doesn't require any work), I'd prefer an option to optionally compile 
them in (or out). That would give the package builder the final choice 
and keep support for them for those who still use them (still got 2 of 
them).


Regards,
Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 210, suspend ./. standby

2015-10-26 Thread Stef

On 26/10/2015 13:59, M G Berberich wrote:

Hello,

Canon datasheets say, the Canon LiDE 210 has 2.5 W max power in work,
1.4 W in standby and 11 mW in suspend.

Is there any way to determine (via sane) if it is in standby or
suspend? Can it be switched between standy and suspend?

MfG
bmg


Hello,

SANE doesn't provide an interface for such information. You should 
look into libusb for this.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] genesys 600 dpi Gray and Lineart distorted by factor 1.5 in y-direction

2015-10-12 Thread Stef

On 11/10/2015 19:43, Yury Tarasievich wrote:
I might be talking completely off-point, but scanning at 600dpi b/w 
takes 2+ minutes on canon lide 25 (IIRC this is an older genesys chip).


Yury


Hello,

this is not the case for LiDE 100/200/110/210. They are faster, and 
the windows driver always scan at least at 300 dpi color, which resolves 
to 900 dpi motor speed or 600 dpi for grayscale.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] genesys 600 dpi Gray and Lineart distorted by factor 1.5 in y-direction

2015-10-07 Thread Stef

On 07/10/2015 22:51, M G Berberich wrote:
I’m a bit puzzled. The old code (bd0f989 and befor) did 
600dpi-gray/lineart-scans with correct aspect-ration. How did it do 
it? MfG bmg 

Hello,

old code was scanning at higher vertical resolution and getting 
more lines, then dropped lines to match the desired resolution. There 
was no line averaging.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] genesys 600 dpi Gray and Lineart distorted by factor 1.5 in y-direction

2015-09-26 Thread Stef

On 21/09/2015 21:04, M G Berberich wrote:

Hello,

Am Mittwoch, den 16. September schrieb Stef:

On 15/09/2015 15:57, M G Berberich wrote:

on a Canon LiDE 210, the 600 dpi Gray and Lineart scans are distorted
by a factor of 1.5 in y-direction (the scanner seems to scans with
600×900 dpi).

Example:
The image at http://m-berberich.de/Diverses/genesys-600dpi-Gray.png
shows a 600 dpi Gray scan from a 5×5mm grid-paper, done with

   scanimage -l 20mm -t 20mm -x 45mm -y 45mm --resolution 600 --mode Gray

 it is a known bug, see
https://alioth.debian.org/tracker/index.php?group_id=30186=410366 .

The bug must have been introduced between 2013-07-02 (bd0f989) and
2013-07-17 (1c3ec28) probably in commit

define specific LIDE210 sensor and motor instead of using LIDE110
ones

from 2013-07-04 (730a2ba and 599f3ed).

Anybody able to (re)fix this?

MfG
bmg


Hello,

previous code did gave the right number of lines. But those were of 
a higher resolution, giving improper aspect ratio. It cannot be fixed by 
reverted some changes.


There are 3 options:
- don't pretend the backend can do scan at these low resolution, 
and set 600 dpi as the lowest resolution in color, and 900 in gray, and 
let the user crop the picture.
- do a 900x600 dpi scan (don't set yres = xres), which frontends 
rarely (if any) handle correctly
- introduce yet another transformation stage in scan and do 
cropping into the backend.


I personally consider the latter. However the "data pipeline" from 
raw data to sane compliant data has grown to the point it deserves some 
rewrite. This will take time.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] manual "exposure time" in Genesys Backend

2015-09-26 Thread Stef

On 21/09/2015 22:01, Alexander Hofmann wrote:

Hi,

I'm currently playing around with the genesys backend, trying to force
the scanner to over-/underexpose the image. The backend already has the
option to switch the lamp off; I'd like to use that feature to scan
arbitrary translucent/projected images - but I would have to control the
exposure time.

I'm a bit confused of the various calculation steps needed to calculate
the "exposure"; if I simple overwrite the exposure_time calculated
during scaning to a custom value, the head moves slowly but scans only a
small portion of the image.

I looked into the datasheet of the Genesys GL841 chip; I guess the "line
peroid" setting is the right thing to change, but it seems this is also
linked to the motor driving unit?

I realize this is probably a silly question and an absolutely
non-standard usecase, but maybe someone on the list can still help?

Anyway..

thanks in advance,

Alexander


Hello,

have you tried to tweak genesys frontend's analog gain ? Exposure 
is also related to motor speed, and will be really complicated to set up.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] [sane-Bugs][315170] pieusb breaks Ubuntu ppa

2015-09-16 Thread Stef

On 16/09/2015 09:38, Rolf Bensch wrote:

Hi Stef,

I can confirm that your "patch" is working with my ppa.

@Klaus: Please patch pieusb.c.

Many thanks for your help.

Cheers,
Rolf

Hello,

I have pushed this one liner to git.

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] genesys 600 dpi Gray and Lineart distorted by factor 1.5 in y-direction

2015-09-16 Thread Stef

On 15/09/2015 15:57, M G Berberich wrote:

Hello,

on a Canon LiDE 210, the 600 dpi Gray and Lineart scans are distorted
by a factor of 1.5 in y-direction (the scanner seems to scans with
600×900 dpi).

Example:
The image at http://m-berberich.de/Diverses/genesys-600dpi-Gray.png
shows a 600 dpi Gray scan from a 5×5mm grid-paper, done with

   scanimage -l 20mm -t 20mm -x 45mm -y 45mm --resolution 600 --mode Gray

MfG
bmg


Hello,

it is a known bug, see 
https://alioth.debian.org/tracker/index.php?group_id=30186=410366 .


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Proposed Upgrade (pu) branches on GitLab

2015-09-16 Thread Stef

On 16/09/2015 13:07, Olaf Meeuwissen wrote:

Hi devs,

I've been mail bombing the list, going through unassigned open tickets
and pushing pu/* branches to my clone of sane-backends at GitLab[1].

  [1] https://gitlab.com/sane-project/backends/branches

There are ten pu/* branches there as of writing and I have another five
or so in the pipeline.  And I still have about 50 unassigned tickets to
look at so there's probably more to come ;-)

I would appreciate it if some of you could take a look at these branches
and merge them to Alioth's master.

There is one must-have: pu/fix-make-dist-targets.  Without it you won't
be able to roll a tarball.  It also fixes `make distcheck` so you can do
builds outside of the top-level source directory.

There are two no-brainers: pu/fix-*.  The numbers refer to the associated
bug reports.  I'll close those after I see the respective merges of these
branches.

In the "IMNSHO-should-have" category:
  - pu/epson-epson2-usb-split because the epson backend doesn't claim to
support *all* the scanners epson2 does --> @alessandro
  - pu/magicolor-4690MF-support because it adds support for a new scanner
--> @reinhold
  - pu/protect-niash-option-access-315132 because it fixes a slightly far
fetched security issue --> @stef

For MIPS/musl portability, there's:
  - pu/dont-detach-after-join
  - pu/fix-musl-inb-outb-detection-on-mips
and there may be another fix coming for u_char/u_long issues.

Finally, there's:
  - pu/bit-depth-reporting-fix which fixes a corner case in scanimage's
output
  - pu/install-umax-pp-tools which addresses something Johannes pointed
out on the list.

I've tried to attribute all the patches to their respective authors and
timestamp them to match the first appearance that I am aware of.  While
waiting for some/most/all of these to get merged, I'm off peering over
unassigned tickets again.

Hope this helps,


Hello,

pu/protect-niash-option-access-315132 
<https://gitlab.com/sane-project/backends/tree/pu/protect-niash-option-access-315132>is 
merged, and while I was at it, I ifdef'ed the code that was hidden since 
2004.


Regards,
Stef

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] [sane-Bugs][315170] pieusb breaks Ubuntu ppa

2015-09-14 Thread Stef

On 15/09/2015 04:08, m. allan noah wrote:

Looks like the pieusb backend needs an update, strdup is not ansi C, AFAIK.

allan


Hello,

we need to do this include _first_ to get the correct 'magic':

#include "../include/sane/config.h"

with that pieusb.c compiles with strdup like other backends.

Regards,
Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Debian Stretch, canon lide 110 doesn't work

2015-09-13 Thread Stef

On 13/09/2015 11:34, Renato Pontefice wrote:

Hi,
I use Sane (or, better Xsane) on my Debian Stretch with a canon Lide 
110 scanner on GIMP program.

I've used it, for a long time with same configuration, but Debian Jessie.

Now, I try to scan document,

The scanner start to scann (I hear some rumor)but when the program 
returns the image, it is just a no image. I mean: it is a black and 
white points images, but nothing of the real image. I thought that the 
prob is on the scanner. But today I've proof it with a Win pc, and it 
works good.


Can someone tell me somethings?

TIA



Hello,

can you provide some information so that we can help you ? For 
instance which version on sane is installed on your system ? And what 
the version that worked ?



Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon Lide 120 produces all black scans

2015-09-08 Thread Stef

On 09/09/2015 06:26, Paradox wrote:
I am trying to get a Canon Lide 120 scanner working. I am using Arch, 
kernel is 4.1.6-1-ARCH.  Using the latest sane package from AUR 
(sane-git) the scanner is recognized by scanimage.  According to the 
genesys man page the scanner is supported by sane-genesys. Everything 
seems to be OK but when I run a scan I get a pure black image.  The 
light comes on in the scanner, the scan bar moves, etc. but the image 
is just blackness.


Is there a fix for this?

Thanks in advance for any assitance.

thomas


Hello,

this is a mistake in the man page that I'll fix. LIDE 120 is not 
supported. It needs some serious reverse engineering before being usable.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LIDE 220

2015-08-31 Thread Stef

On 31/08/2015 17:38, Ron Bean wrote:

John S. Weber writes:


I am having one issue which seems like a driver bug. Using Xsane
through gimp, set to grayscale 300 and 1200 dpi, the scan is fine. At
600dpi the pixel dimension of the scan is correct, but the lengthwise
aspect ratio is stretched so that only maybe 2/3 of a letter size is
actually scanned and it's stretched to letter size. The scanner head
only moves across the top ~2/3 of the scanned page.

I've seen this also, let me just add that 600dpi-color works fine, it's
only 600dpi-grayscale that doesn't work properly.



Hello,

this is 
https://alioth.debian.org/tracker/index.php?func=detail=315050_id=30186=410366


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Announce: Driver for Pacific Image Electronics and Reflecta USB scanners

2015-08-30 Thread Stef

On 24/08/2015 16:12, Klaus Kaempf wrote:

* Stef stef@free.fr [Aug 19. 2015 22:18]:

 Hello,

 I have reviewed latest changes, and I consider that the pieusb
backend is ready for inclusion since commit
e6294630553b5bcb2671537786c5107e3393ac9f on the pieusb branch of
g...@github.com:kkaempf/sane-backends.git .

Great, many thanks for your work !


 I suppose you'll create an account on alioth
(https://alioth.debian.org/account/register.php) so that Allan can
add you to the project.

My account is 'kkaempf-guest' (User id 232710)


 I would be really great if you could extract the buffer bits in
a sanei_buffer, it would be an added bonus for the project. But it
is a separate issue from backend inclusion.

I'd like to track this as a separate issue.


 Many thanks for this nice work.

Kudos to Jan Vleeshouwers and Michael Rickmann !

Thanks,

Klaus

Hello,

I have squashed commits into one, and prepared a patch to apply on 
master. I can't attach it because it is too big even compressed.

Allan is it OK to apply it ?

Regards,
Stef



--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] DocketPORT 487: scanimage: sane_start: Error during device I/O

2015-08-19 Thread Stef

On 19/08/2015 02:11, Robert Fleming wrote:

Greetings,

Having trouble getting a DocketPORT 487 going:

# env SANE_DEBUG_DLL=255 scanimage --resolution 75 output
[sanei_debug] Setting debug level of dll to 255.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.25git

[dll] sane_open: trying to open `genesys:libusb:002:086'
[genesys] WARNING: Your scanner is not fully supported or at least
[genesys]  had only limited testing. Please be careful and
[genesys]  report any failure/success to
[genesys]  sane-devel@lists.alioth.debian.org. Please provide as many
[genesys]  details as possible, e.g. the exact name of your
[genesys]  scanner and what does (not) work.
[dll] sane_open: open successful
[dll] sane_get_option_descriptor(handle=0x8af33d8,option=0)
[dll] 
sane_control_option(handle=0x8af33d8,option=0,action=0,value=0xffc481d4,info=(nil))


scanimage: sane_start: Error during device I/O
[dll] sane_cancel(handle=0x8af33d8)
[dll] sane_close(handle=0x8af33d8)
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `genesys's exit function
[dll] sane_exit: finished

Same problem with versions 1.0.23-3ubuntu3.1 and
1.0.25-git20150811-trusty0 of the SANE packages.

I do have the scanner working correctly in Windows (in VirtualBox)
with the vendor drivers.

Any ideas? Is there anything else I can do to debug it? Would it be
helpful to get a USB trace (of the Linux and/or Windows cases)?

Thanks,
Robert


Hello,

it is slow and difficult to add support for a scanner just by 
exchanging USB log. However, having a log could give us an estimate of 
the work to do:
see https://github.com/stefdev49/syseneg/analyze/README.md for a 
start. Then post the pcap file in some place where I can grab it.


Regards,
Ste


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] DocketPORT 487: scanimage: sane_start: Error during device I/O

2015-08-19 Thread Stef

On 20/08/2015 00:01, Robert Fleming wrote:

Here's the dump: https://www.dropbox.com/s/xse1hscuitb8pbm/ds487.pcap

Let me know if there's anything else I can do.

Thanks,
Robert

On Wed, Aug 19, 2015 at 1:26 PM, Stef stef@free.fr 
mailto:stef@free.fr wrote:


On 19/08/2015 02:11, Robert Fleming wrote:

Greetings,

Having trouble getting a DocketPORT 487 going:

# env SANE_DEBUG_DLL=255 scanimage --resolution 75 output
[sanei_debug] Setting debug level of dll to 255.
[dll] sane_init: SANE dll backend version 1.0.13 from
sane-backends 1.0.25git

[dll] sane_open: trying to open `genesys:libusb:002:086'
[genesys] WARNING: Your scanner is not fully supported or at least
[genesys]  had only limited testing. Please be careful and
[genesys]  report any failure/success to
[genesys] sane-devel@lists.alioth.debian.org
mailto:sane-devel@lists.alioth.debian.org. Please provide as
many
[genesys]  details as possible, e.g. the exact name of
your
[genesys]  scanner and what does (not) work.
[dll] sane_open: open successful
[dll] sane_get_option_descriptor(handle=0x8af33d8,option=0)
[dll]

sane_control_option(handle=0x8af33d8,option=0,action=0,value=0xffc481d4,info=(nil))


scanimage: sane_start: Error during device I/O
[dll] sane_cancel(handle=0x8af33d8)
[dll] sane_close(handle=0x8af33d8)
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `genesys's exit function
[dll] sane_exit: finished

Same problem with versions 1.0.23-3ubuntu3.1 and
1.0.25-git20150811-trusty0 of the SANE packages.

I do have the scanner working correctly in Windows (in VirtualBox)
with the vendor drivers.

Any ideas? Is there anything else I can do to debug it? Would
it be
helpful to get a USB trace (of the Linux and/or Windows cases)?

Thanks,
Robert

Hello,

it is slow and difficult to add support for a scanner just by
exchanging USB log. However, having a log could give us an
estimate of the work to do:
see https://github.com/stefdev49/syseneg/analyze/README.md for
a start. Then post the pcap file in some place where I can grab it.

Regards,
Ste



Hello,

thanks for the data. I have to update my decoding scripts to handle 
GL841 USB protocol before I can analyze the log. I'll let you know when 
it is done.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Announce: Driver for Pacific Image Electronics and Reflecta USB scanners

2015-08-13 Thread Stef

On 11/08/2015 01:00, Olaf Meeuwissen wrote:

Klaus Kaempf writes:


Hi Stef,

* Stef stef@free.fr [Aug 07. 2015 09:13]:

 I have starting to review the backend's code.

thanks a lot !

[...]

 Second, mmap is used. Are we sure it is available on all the
platforms where SANE is compiled ?

Uhm, I have no idea, sorry.

Add a check for mmap availability to configure.ac and disable the
backend if mmap cannot be found.

Hope this helps,
After some (little) research, I came to the conclusion that among 
the platforms where SANE is compiled, only beos and os/2 are lacking 
mmap(). On these platforms, configuring with BACKEND= . without 
the pieusb backend should be enough to take care of the problem.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] fixes for genesys backend

2015-08-07 Thread Stef

On 06/08/2015 22:16, Michael Thayer wrote:

Hello Stef,

Stef stef.dev at free.fr writes:

On 05/08/2015 10:27, Michael Thayer wrote:

Stef stef.dev at free.fr writes:

   in genesys backend build 2508 (commit
4eea901305c9cb66428023c93cbd1a63af8c5fba) I have just pushed fixes for
several opened issues in the bug tracker:

[...]

Sorry to say this, but the issue which I reported previously with the LIDE
210 is not fixed when I apply 09daef4 locally.  When I move the usleep() up
to the top of sanei_genesys_test_buffer_empty() however my scanner works

again.
[...]

  and when you have an usleep at both places, how does it behave ?

Yes, that works too.  Seems slightly hacky.  I wonder whether a general
delay, e.g. after writing to a register on a non-super-speed device on a
super-speed port, might be what is needed?

Regards,

Michael



Hello,

thanks for the test report.

Yes this this a hack : one usleep() for your GL847 device, and 
another for a GL124 (or USB3?). Since we don't have the timing 
requirements of the ASIC, the only thing we can do is trial an error. 
Both delays don't add up much when checking for data being available. We 
could even wait more between each check.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Announce: Driver for Pacific Image Electronics and Reflecta USB scanners

2015-08-07 Thread Stef

On 21/02/2015 14:39, Klaus Kaempf wrote:

Hi,

more than 2 years ago earlier versions of this driver were already
discussed on this mailing list.

Meanwhile I refactored the code, fixed most bugs, and successfully
scanned more than 10.000 slides.

It's now about time to get it included into sane-backends. And I'm
willing to take up this challenge ;-)

Supported scanners:

   PIE PowerSlide 3600
   PIE PowerSlide 3650
   PIE PowerSlide 5000
   Reflecta CrystalScan 7200
   Reflecta ProScan 4000
   Reflecta ProScan 7200
   Reflecta DigitDia 4000
   Reflecta DigitDia 5000
   Reflecta DigitDia 6000

Code:
   https://github.com/kkaempf/sane-backends/tree/pieusb

Enjoy,

Klaus

Hello,

I have starting to review the backend's code. The bug tracker has 
all the details, but there are a couple of things that are worth 
discussing here.


First sane/sanei_ir.h is used. I don't find it in the pieusb 
branch, and this is not part of current SANE's sources. Where does it 
come from ?


Second, mmap is used. Are we sure it is available on all the 
platforms where SANE is compiled ?


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Preparing for a sane-backends release

2015-08-06 Thread Stef

On 03/08/2015 20:08, m. allan noah wrote:

It's been a long time since we have done a sane-backends release, and
much code has changed. I propose to do a release sometime in mid
September.

Unfortunately, there have been a number of patches posted to this
mailing list or the bug tracker, which have not been applied. In
particular, I know that Gentoo has some systemd compilation fixes. We
also have a large number of open bug reports- sometimes waiting years
for reporter responses.

1. Is there someone willing to volunteer to find some of the patches
we missed, and investigate their suitability?
2. Are backend authors able to investigate and close some tickets?

If we can clean some of these things up, I will pick a date, and do the release.

allan

Hello,

I'm already currently working on closing as much tickets I can on 
the backends I maintain.


I think we shouldn't do a release without the new pie backend (see 
https://alioth.debian.org/tracker/?func=detailatid=410366aid=315085group_id=30186). 
I planned to have a look at it once I have done fixing bugs in genesys 
backend.



And I'd rather not close any ticket because it is too old. I have 
seen that process to many times at work:
1 - don't answer the bug reports because your are busy adding more 
features

2 - wait for too long
3 - close them because they are too old when management get scared 
of the tickets stock pile


Bug reports are accumulating because we need more developers.

Regards,
Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] fixes for genesys backend

2015-08-06 Thread Stef

On 05/08/2015 10:27, Michael Thayer wrote:

Stef stef.dev at free.fr writes:

  in genesys backend build 2508 (commit
4eea901305c9cb66428023c93cbd1a63af8c5fba) I have just pushed fixes for
several opened issues in the bug tracker:

  - #315104 [...]
  - #315105 [...]

  Thanks to the work of John S.  Weber jweber53 at gmail.com, a timing
issue on USB3 hardware has been tracked and fixed.  Could also close
#313887 [...].

This is also a possible fix to #314832 [...]
which I couldn't never reproduced but has a little chance to be related.

Sorry to say this, but the issue which I reported previously with the LIDE
210 is not fixed when I apply 09daef4 locally.  When I move the usleep() up
to the top of sanei_genesys_test_buffer_empty() however my scanner works again.

Regards,

Michael





Hello,

and when you have an usleep at both places, how does it behave ?

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canoscan LIDE 35 not working: open of device failed - invalid argument

2015-08-06 Thread Stef

On 11/12/2014 08:12, Rolf Leggewie wrote:

On 04.10.2014 16:23, Marc Stürmer wrote:

Am 02.10.2014 um 20:36 schrieb Marc Stürmer:

I am trying to get my CanoSCAN LIDE 35 under Gentoo Linux up and
running, so far with no success.

The scanner itself is working and not broken.

Kernel is 3.14.19, sane-backends is version 1.0.24.

I did some research myself, the results are:

backends 1.0.23 does work
backends 1.0.24 does not
backends 1.0.25 from git does not

I have the same scanner and 1.0.23 works for me as well.  Not sure about
the other releases.



Hello,

I think I have fixed this regression (GPIO setup was wrongly 
modified). Would you please test latest git SANE's source tree to check 
it is really working for you ?


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] fixes for genesys backend

2015-07-31 Thread Stef

Hello,

in genesys backend build 2508 (commit 
4eea901305c9cb66428023c93cbd1a63af8c5fba) I have just pushed fixes for 
several opened issues in the bug tracker:


- #315104 
(https://alioth.debian.org/tracker/?func=detailatid=410366aid=315104group_id=30186)
- #315105 
(https://alioth.debian.org/tracker/?func=detailatid=410366aid=315105group_id=30186)


Thanks to the work of John S.  Weber jwebe...@gmail.com, a timing 
issue on USB3 hardware has been tracked and fixed.  Could also close 
#313887 
(https://alioth.debian.org/tracker/index.php?func=detailaid=313887group_id=30186atid=410366). 
This is also a possible fix to #314832 
(https://alioth.debian.org/tracker/?func=detailatid=410366aid=314832group_id=30186) 
which I couldn't never reproduced but has a little chance to be related.


I have improved tstbackend to provides a -s option that trigger 
scan during open/close tests so issues with resource allocation are 
better detected (such as #315104).


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 120 Black Image

2015-07-03 Thread Stef

On 02/07/2015 17:16, martin.galle...@free.fr wrote:

Hello,

I tested the latest build (SANE Genesys backend version 1.0 build 2507 from 
sane-backends 1.0.25 git) on my LIDE 120. Scanner is recognized, stepper motor 
are moving but the scan image is 'all black'.

I have set the debug level of Genesys to 255

Any idea what I am doing wrong ?

Thanks,

Martin




Hello,

this model needs more work to really work. It is currently unsupported.

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LIDE 220

2015-07-01 Thread stef

On 01/07/2015 19:23, John Weber wrote:



On 06/29/2015 01:57 PM, Stef wrote:


 Hello,

 I was expecting something like that.

 All DBG_io2 a mere traces, and I don't see how much they slow down
things. Since I don't have this kind of problem on my hardware, I need
your help. I don't see no other approach than trial and error.

 1 - compile sources
 2 - set logs to 7
 3 - check that scanner is working with compiled sources and the log
level
 4 - change a line where there is DBG_io2 level in DBG_data so it
isn't traced any more, write down the line number
 5 - compile and run, if it is still working, go to step 4 and
change one more debug trace
 6 - since it isn't working anymore, you have find where a pause
must be set, please send it to me


Hi Stef,

Your more precise instructions including the runit script got me 
through step 3. I confirmed that it's broken with logs at 6 and works 
with logs at 7. Now I'm stuck at step 4. What file contains the lines 
to be changed? I grepped and found several files that contain these 
strings. I guess I need more precise instructions, but I'm confident I 
can follow them.


jweber@Dindi:sane-backends$ egrep -rl DBG_data|DBG_io2 *
backend/p5.c
backend/genesys_gl846.c
backend/genesys_low.c
backend/rts88xx_lib.h
backend/genesys_gl843.c
backend/genesys_conv.c
backend/genesys_gl646.c
backend/rts8891_low.c
backend/genesys_low.h
backend/genesys_gl841.c
backend/genesys_gl124.c
backend/rts8891_low.h
backend/rts8891.c
backend/genesys.c
backend/p5_device.c
backend/genesys_gl847.c
backend/p5_device.h
backend/rts88xx_lib.c

Thanks,
John


Hello,

the file to modify is backend/genesys_low.c

For instance, line 251 turn :
DBG( DBG_io2, sanei_genesys_read_hregister(0x%02x)=0x%02x\n,reg,*val);

into:
DBG( DBG_data, sanei_genesys_read_hregister(0x%02x)=0x%02x\n,reg,*val);



Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LIDE 220

2015-06-30 Thread Stef

On 30/06/2015 19:06, John Weber wrote:
I did 'make'. I wouldn't have backend/.libs/libsane-genesys.so 
otherwise, right?

$ ls -l backend/.libs/libsane-genesys.so
lrwxrwxrwx 1 jweber jweber 25 Jun 30 08:25 
backend/.libs/libsane-genesys.so - libsane-genesys.so.1.0.25*

$ ls -l backend/.libs/libsane-genesys.so.1.0.25
-rwxrwxr-x 1 jweber jweber 1446816 Jun 30 08:25 
backend/.libs/libsane-genesys.so.1.0.25*


John

On 06/30/2015 10:44 AM, m. allan noah wrote:

You still have to 'make'.

allan

On Tue, Jun 30, 2015 at 11:03 AM, John Weber jwebe...@gmail.com wrote:



On 06/29/2015 01:57 PM, Stef wrote:


On 23/06/2015 16:08, John Weber wrote:




On 06/22/2015 10:40 PM, Stef wrote:
Hi Stef,


Debug levels are defined like this for genesys_low:

genesys_low.h:#define DBG_io  6/* io functions */
genesys_low.h:#define DBG_io2 7/* io functions that are
called very often */
genesys_low.h:#define DBG_data8/* log image data */

  So if you get the problem at log level below seven, we must 
look at
DBG_data usage in genesys_low.c . But here isn't on. So try 7 and 
6 as
debug levels. Once we know the exact kind of logging level that 
fix this
timing issue, the next step is to remove this messages one by on 
until
you find the one that makes difference. I haven't seen nothing 
obvious,

so experimenting/testing is needed.

  sanei_genesys_wait_for_home(), 
sanei_genesys_set_buffer_address()

and sanei_genesys_write_ahb functions() are printing messages in the
middle of the code and are first candidates to try, in this order.



It works at debug level 7, but not 6. I'm not sure from the rest of
your answer if there's testing you want me to do, or if it's just
informational. I'm a retired sys admin/engineer but not much of a
programmer. I'm willing to test more, but I'll need more detailed
instructions.

Thanks,

John


  Hello,

  I was expecting something like that.

  All DBG_io2 a mere traces, and I don't see how much they slow 
down

things. Since I don't have this kind of problem on my hardware, I need
your help. I don't see no other approach than trial and error.

  1 - compile sources
  2 - set logs to 7
  3 - check that scanner is working with compiled sources and 
the log

level
  4 - change a line where there is DBG_io2 level in DBG_data so it
isn't traced any more, write down the line number
  5 - compile and run, if it is still working, go to step 4 and
change one more debug trace
  6 - since it isn't working anymore, you have find where a pause
must be set, please send it to me

  There are tutorials to build SANE from sources, one thing I 
like to

do is to run the freshly compiled version without doing make install,
when running scanimage from top source directory:

export LD_PRELOAD=backends/.libs/libsane-genesys.so





Hi Stef,

I followed the first part of instructions at
https://help.ubuntu.com/community/CompileSaneFromSource just to get the
source and dependencies. Since I didn't plan on doing make install, 
per your

suggestion, I only used

./configure --enable-avahi

and it ran with exit code 0.

After setting
export LD_PRELOAD=backend/.libs/libsane-genesys.so

Now both

./frontend/scanimage -L
/usr/bin/scanimage -L

report no scanners found. In another shell without LD_PRELOAD set,
/usr/bin/scanimage -L reports
device `genesys:libusb:001:020' is a Canon LiDE 220 flatbed scanner
as usual. ./frontend/scanimage -L still says no scanners found. I 
tried all

scanimage -L tests also with sudo, but it made no difference.

Should I use other configure options? Testing by trial and error 
won't be

too bad. It only took 80 secs to compile.

--
John Weber
jwebe...@gmail.com


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org







Hello,

to be precise, i ran tests from another directory with this kind of 
script attached. You need dll.conf and genesys.conf to be present in 
this test directory. You'll have to tweak the source path in it.


Regards,
Stef


#!/bin/bash
#==
export SANE_DIR=/home/stefdev/git/sane-backends
export BIN_DIR=$SANE_DIR/frontend
export SO_DIR=$SANE_DIR/backend/.libs
#export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=7
#export SANE_DEBUG_GENESYS_GL646=255
#export SANE_DEBUG_GENESYS_GL841=255
#export SANE_DEBUG_GENESYS_GL843=255
#export SANE_DEBUG_GENESYS_GL847=255
#export SANE_DEBUG_GENESYS_GL124=255
#export SANE_DEBUG_SANEI_USB=255
#export SANE_DEBUG_SANEI_MAGIC=255
export LD_PRELOAD=$SO_DIR/libsane-genesys.so
$BIN_DIR/scanimage -d genesys --resolution 75 --preview --mode Color 2rl.log 
rl.pnm
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel

Re: [sane-devel] rts8891: Umax Astra 4450 does not work

2015-06-29 Thread Stef

On 15/06/2015 23:25, Ondrej Zary wrote:

On Monday 15 June 2015 22:19:14 Stef wrote:

On 12/06/2015 23:45, Ondrej Zary wrote:

On Monday 08 June 2015 23:06:55 Ondrej Zary wrote:

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_ga
in _c al ib ra tion.ppm.gz
http://www.rainbow-software.org/linux_files/umax_astra_4450/no_ga
in _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_astra
4 45 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_astra4
45 0- test2.diff

Here's a new, more polished patch:
http://www.rainbow-software.org/linux_files/umax_astra_4450/umax_astra44
50- 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

Found out that the Windows driver lies about resolution. It claims to
support 75, 100, 150, 200, 300, 400, 600, 800 and 1200 dpi but the
reality is different:
  driver dpi  real dpi
  -
  75 (+preview)   200x100 very fast
  100 200x100 very fast
  150 150x150
  200 200x200
  300 300x300
  400 600x400
  600 600x600
  800 1200x1200
  12001200x1200

So there's no real 75 dpi support - removed it and introduced emulated
100dpi mode so xsane will choose it for preview (without that, xsane
prefers slower 150dpi). So preview now works, although it's too dark.

New patch available at:
http://www.rainbow-software.org/linux_files/umax_astra_4450/umax_astra445
0-test4.diff

  Hello,

  nice work.

  Here are my remarks:
  - your patch applies with some fuzz, is it based on latest git ?

I'm working on Debian stable (1.0.24). Instead of compiling and installing
complete custom sane-backends, I just made a symlink from
/usr/lib/i386-linux-gnu/sane/libsane-rts8891.so.1.0.24 to
/usr/src/sane-backends-1.0.24/backend/.libs/libsane-rts8891.so.1.0.24

If it compiles, I can test it right away without any additional steps.


  - please include a signed-by and add your name to the copyright
notice in rts8891.c file
  - no // comments this breaks C compile

Will fix that when the patch will be ready for merging.


  - why does the code bail out early in set_lamp_brigthness() ? You
added code handling the SENSOR_TYPE_UMAX in it.

I added the code probably by a mistake and forgot to remove it later. The lamp
control seems to be completely different from HP scanners and the lamp
functions turn on the UTA lamp instead.


  - what the LAMP_REG value should be for your

Re: [sane-devel] Canon LIDE 220

2015-06-29 Thread Stef

On 23/06/2015 16:08, John Weber wrote:



On 06/22/2015 10:40 PM, Stef wrote:
Hi Stef,


Debug levels are defined like this for genesys_low:

genesys_low.h:#define DBG_io  6/* io functions */
genesys_low.h:#define DBG_io2 7/* io functions that are
called very often */
genesys_low.h:#define DBG_data8/* log image data */

 So if you get the problem at log level below seven, we must look at
DBG_data usage in genesys_low.c . But here isn't on. So try 7 and 6 as
debug levels. Once we know the exact kind of logging level that fix this
timing issue, the next step is to remove this messages one by on until
you find the one that makes difference. I haven't seen nothing obvious,
so experimenting/testing is needed.

 sanei_genesys_wait_for_home(), sanei_genesys_set_buffer_address()
and sanei_genesys_write_ahb functions() are printing messages in the
middle of the code and are first candidates to try, in this order.



It works at debug level 7, but not 6. I'm not sure from the rest of 
your answer if there's testing you want me to do, or if it's just 
informational. I'm a retired sys admin/engineer but not much of a 
programmer. I'm willing to test more, but I'll need more detailed 
instructions.


Thanks,

John


Hello,

I was expecting something like that.

All DBG_io2 a mere traces, and I don't see how much they slow down 
things. Since I don't have this kind of problem on my hardware, I need 
your help. I don't see no other approach than trial and error.


1 - compile sources
2 - set logs to 7
3 - check that scanner is working with compiled sources and the log 
level
4 - change a line where there is DBG_io2 level in DBG_data so it 
isn't traced any more, write down the line number
5 - compile and run, if it is still working, go to step 4 and 
change one more debug trace
6 - since it isn't working anymore, you have find where a pause 
must be set, please send it to me


There are tutorials to build SANE from sources, one thing I like to 
do is to run the freshly compiled version without doing make install, 
when running scanimage from top source directory:


export LD_PRELOAD=backends/.libs/libsane-genesys.so




--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LIDE 220

2015-06-22 Thread Stef

On 21/06/2015 23:04, John S. Weber wrote:

Hi,

I recently purchased a Canon LIDE 220 as it was claimed to be support 
by sane. I put the USB code (04a9:190f) into the Scanner Search 
Engine at the sane.org http://sane.org and it yielded this page 
which says support is complete.


http://www.sane-project.org/cgi-bin/driver.pl?manu=model=bus=anyv=04a9p=190f

It was not found by the sane shipped with Ubuntu 15.04, so I installed 
this ppa:


ppa:rolfbensch/sane-git

And updated. The scanned was then recognized by the xsane, et al. It 
mostly gave errors alluding to an invalid device. When it did try to 
scan, the head would go to the far end and required unplugging the USB 
cable to get it to stop banging at the end. Sometimes, not often, it 
would work fine. I did a bunch of reading and I was able to fix things 
by setting sane debug variables. One site suggested this and it worked:


export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL124=255
scanimage -d genesys -l 0.0 -t 0.0 -x 90 -y 140 --resolution 1200 
 --mode Color scan.pnm 2scan.log


I've narrowed it down to just

export SANE_DEBUG_GENESYS_LOW=8

From my reading, I believe there is a race condition more exposed by 
faster hardware. I have new, fast hardware. My libsane version 
is 1.0.25-git20150612-vivid0 on Ubuntu 15.04.



Debug levels are defined like this for genesys_low:

genesys_low.h:#define DBG_io  6/* io functions */
genesys_low.h:#define DBG_io2 7/* io functions that are 
called very often */

genesys_low.h:#define DBG_data8/* log image data */

So if you get the problem at log level below seven, we must look at 
DBG_data usage in genesys_low.c . But here isn't on. So try 7 and 6 as 
debug levels. Once we know the exact kind of logging level that fix this 
timing issue, the next step is to remove this messages one by on until 
you find the one that makes difference. I haven't seen nothing obvious, 
so experimenting/testing is needed.


sanei_genesys_wait_for_home(), sanei_genesys_set_buffer_address() 
and sanei_genesys_write_ahb functions() are printing messages in the 
middle of the code and are first candidates to try, in this order.



At this point the scanner is working reliably with no bad behavior.

I am having one issue which seems like a driver bug. Using Xsane 
through gimp, set to grayscale 300 and 1200 dpi, the scan is fine. At 
600dpi the pixel dimension of the scan is correct, but the lengthwise 
aspect ratio is stretched so that only maybe 2/3 of a letter size is 
actually scanned and it's stretched to letter size. The scanner head 
only moves across the top ~2/3 of the scanned page.




There is a flaw in the backend design regarding both gl124 an gl847 
support. The supported models have a maximum motor speed higher (900 
dpi) than the lowest optical resolution. I need to redesign things to 
work around that. The less complicated would be to scan several lines at 
900 dpi then crop down data. This involves quite some work.


Let me know what other info I can provide, or if there's already an 
answer that I've missed, I'll be glad to be pointed in the right 
direction.


Thanks,
John






Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] rts8891: Umax Astra 4450 does not work

2015-06-15 Thread Stef

On 12/06/2015 23:45, Ondrej Zary wrote:

On Monday 08 June 2015 23:06:55 Ondrej Zary wrote:

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_ga
in _c al ib ra tion.ppm.gz
http://www.rainbow-software.org/linux_files/umax_astra_4450/no_ga
in _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_astra4
45 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_astra445
0- 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

Found out that the Windows driver lies about resolution. It claims to support
75, 100, 150, 200, 300, 400, 600, 800 and 1200 dpi but the reality is
different:
 driver dpi  real dpi
 -
 75 (+preview)   200x100 very fast
 100 200x100 very fast
 150 150x150
 200 200x200
 300 300x300
 400 600x400
 600 600x600
 800 1200x1200
 12001200x1200

So there's no real 75 dpi support - removed it and introduced emulated 100dpi
mode so xsane will choose it for preview (without that, xsane prefers slower
150dpi). So preview now works, although it's too dark.

New patch available at:
http://www.rainbow-software.org/linux_files/umax_astra_4450/umax_astra4450-test4.diff



Hello,

nice work.

Here are my remarks:
- your patch applies with some fuzz, is it based on latest git ?
- please include a signed-by and add your name to the copyright 
notice in rts8891.c file

- no // comments this breaks C compile
- why does the code bail out early in set_lamp_brigthness() ? You 
added code handling the SENSOR_TYPE_UMAX in it.

- what the LAMP_REG value should be for your scanner. I see several :
-  dev-regs[LAMP_REG] = 0x8d;
-  sanei_rts88xx_write_reg (dev-devnum, LAMP_REG,
+  if (dev-sensor != SENSOR_TYPE_UMAX)
+{
+  dev-regs[LAMP_REG] = 0x8d;
+  sanei_rts88xx_write_reg (dev-devnum, LAMP_REG,
(dev-regs[LAMP_REG]));
+}

So 0x8d doesn't seem working for you, what should it be ?

- the margin_level value of 32 in find_margin() is surely a sign 
that the scanner is either no set up correctly, or the inner image 
pattern is different. Could you send the find_margin.pnm file to compare 
with my scanner ?


   - what do you mean by no 75 dpi ? In windows or in backend ? I don't

Re: [sane-devel] [sane-commit] [sane-backends] 01/01: epson2: fix compilation error

2015-06-11 Thread Stef

On 15/05/2015 20:01, Alessandro Zummo wrote:

This is an automated email from the git hooks/post-receive script.

azummo-guest pushed a commit to branch master
in repository sane-backends.

commit 980b4f6b065a411faf7eb538b3928bdc3308f2ca
Author: Alessandro Zummo a.zu...@towertech.it
Date:   Fri May 15 20:01:32 2015 +0200

 epson2: fix compilation error
---

Hello,

I don't see your changes in the Changelog file. Do you plan to 
update it?


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] LiDE 120, small changes pushed in git

2015-06-11 Thread Stef

Hello,

I have pushed some small changes that should improve support for 
the LiDE 120 for resolutions up to 600 dpi. Please test this build 2507 
of the geneys backend (check this version number in debug logs when 
testing).
Working with some logs sent, then throwing back some code to 
someone else to test isn't practical. I don't feel like going on that 
way. So people interested by adding support for this model (or another 
one) should clone SANE's git tree and syseneg project (which provides a 
tool to analyze pcap usb logs), and start hacking it.
I'd be happy to improve genesys backend's doc to help, and will 
gladly apply patches.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] CanoScan LiDE 120 Untested?

2015-05-11 Thread Stef

On 10/05/2015 02:31, Simon May wrote:

Hi,

I've recently bought a Canon LiDE 120. I got my hopes up because on
http://sane-project.org/lists/sane-mfgs-cvs.html#Z-CANON
the LiDE 100, 110, 200, 210 and 220 were all listed as completely
supported and the LiDE 120 is at least marked untested. However, now
that I've tried to get it to work and after digging some more, it seems
the 120 (and perhaps the 220 as well?) is not quite ready yet.

Is there a chance that the LiDE 120 will work soon? Is there any way I
can help? Or should I return the scanner and get a CanoScan LiDE 220
instead? Perhaps any suggestions for a similarly cheap, but
Linux-friendly scanner?

Best wishes,
Simon May



Hello,

   from the windows logs I got, the LiDE 120 is enough different from 
LiDE 110 and 220 to require quite some work to get supported. Even if 
someone was working on it, it would take time to complete the work.

The 220 is fully supported (thanks for an hardware donation).

Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] rts8891: Umax Astra 4450 does not work

2015-05-11 Thread Stef

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_calib
ra tion.ppm.gz
http://www.rainbow-software.org/linux_files/umax_astra_4450/no_gain_calib
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.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Scanner is not fully supported

2015-05-11 Thread Stef

On 11/05/2015 14:50, Antoine Affouard wrote:

Hi,

I'm a french developer.
I try to acquire images from HP Scanjet G2410 (current status : Basic).

The first run works fine, but i need to restart the scanner to do more 
runs.

If i don't restart it : sane_read: Error during device I/O.

There is a second problem.
Images are black and white only.

Best regards

Antoine.A



Hello,

could tell us the version of SANE you are running, and if the USB 
port whezre you plug the scanner is USB3 ?


Having a debug log would help a lot to figure out your problem.

Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] CanoScan LiDE 220 works, but only with debug enabled

2015-04-06 Thread Stef

On 04/04/2015 18:44, m...@fastmail.com wrote:

Greetings:

Using current code from github, I am trying out a new scanner. It works
without arguments, but only in the lowest quality. If I add arguments
(it doesn't seem to matter which ones) I get this error (the same every
time):

$ local/bin/scanimage --device 'genesys:libusb:003:039' --mode lineart
--resolution 300  /tmp/first.pnm
scanimage: sane_start: Invalid argument

I tried turning on debug to find out what is happening and found that
everything works perfectly if I enable massive debugging:

$ SANE_DEBUG_GENESYS=255 SANE_DEBUG_GENESYS_LOW=255 \
local/bin/scanimage --device 'genesys:libusb:003:039' --mode lineart
--resolution 300  /tmp/first.pnm 2/tmp/debug

This gives me a decent quality scan and a 700k debug file. Can anyone
suggest how to specify arguments without debug?

Thanks,
-- Mark


Hello,

I have ran about the same command without any problem on my 
computer. Since the usual way to find out bug is to enable debug traces, 
it is going to be difficult to solve your problem. Does xsane exhibit 
the same behavior ?

What is your hardware ? Motherboard/CPU, USB3 ?
I'm developing on a Asrock 960GM-GS3 FX, with a AMD Phenom(tm) II X2 545 
Processor and no USB3.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 120 git commit 128c8931b3

2015-04-03 Thread Stef

On 30/03/2015 23:37, Steven Honeyman wrote:

Hi,

I noticed the commit for supporting this scanner appear a couple of
weeks ago, and I recompiled and tested it today. Unfortunately it
doesn't work.

It's detected correctly. (the following is all using xsane, just using
preview button)

At 75dpi default, preview button does nothing - generic error message
300dpi, the scanner flashes for a while but doesn't move, then generic
error message.
300dpi again (just in case it was warming up the first time) and it
moves! and keeps moving, and keeps moving, until it gets to the end
and is still moving (making a horrible noise)

I pulled the USB, reconnected to a Windows PC and luckily it still
works OK. The driver needs some adjustment though for sure!


Thanks,
Steven.

Hello,

I haven't been able to generate a scan log with my LiDE 110 close 
enough to the 120 logs sent to me. So currently I don't know how much 
code is needed to bring support for this model, since I don't have 
similar scans to compare.
I really need a log done with the WIA driver (NOT the shipped 
scanning suite) at 150 dpi.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Lexmark X1185 printer not detected

2015-03-25 Thread Stef

On 25/03/2015 13:36, Kurt wrote:

Lexmark X1185
Someone sent they thought it was a permissions problem and to run from 
root.


When you run XSane from root you get this message:
   You try to run XSane as root, that really is DANGEROUS!

I selected:
Continue at your own risk

The next screen is:
no device available

I selected Help:

It lists 6 items.
Entry #4 is, I Think, where my problem lies.

It is:
4)  The backend is not loaded by SANE (man sane-dll)

Doing  apropos sane does not show a sane-dll.
I have no idea for fixing that.
thanks


Kurt Barbee sharpsbar...@emypeople.net

  I am seeking help in getting my Lexmark X1185 scanner working.
I do not need the printer part at this time.
 When I run sane-find-scanner I do get the vendor= 0x043d product= 
0x07c @ libusb:001:006.

Running scanimage -L reports no scanner found.
I have on my system VM box with windows XP installed.
Installing the Lexmark windows driver for the scanner I can scan items.
When running xsane from root or the graphic interface I get the same 
message.

1  Really no device.   not true
2  Device busy not true
3  No permission   not true  Get the same results 
in root
4  Backend not loaded  by sane can't find sane-dll or man 
sane-dll
5  Backend not confg correctly ?? how do I know this  I have 
sane-lexmark file
   in etc/sane.d/lexmark.confg as 
follows:

  # X11xx series
  usb 0x043d 0x007c
  # X12xx series
  usb 0x043d 0x007d
  # Dell A920
  usb 0x413c 0x5105
  # X74
  usb 0x43d 0x0060
6  More than one sane version installed?? how would I find this out?

If you can help me I would appreciate it very much.
Thank You
Kurt


Hello,

could you test wtih the scanimage program as root, with debug traces 
enabled ?


In a shell type:
export SANE_DEBUG_LEXMARK=255
export SANE_DEBUG_SANEI_USB=255
sudo scanimage -L 2probe.log

This will create a probe.log file with all the traces. Send it (zipped) 
to the list. We may find an explanation in these.


BTW, since is is a multi function device, maybe some printing service is 
blocking scanning access.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 220 unexpected success

2015-03-15 Thread Stef

On 14/03/2015 18:12, Jochen wrote:

Hi Stef, I understand you're asking for a log from somebody with a LiDE
120 doing a preview. Me, I'd be happy to see my LiDE 120 supported by
SANE. So if you tell me what to do and how to even make my LiDE 120 do
anything loggable, I'll see if I can provide that. Unfortunately, I am
not much of a Linux crack, but I managed to compile and install sane-1.0.25.

Regards,
Jo

---
Hello,



Hello,

what is needed is a log recorded when doing a preview when running 
windows O/S. The log tool to use is usbpcap http://desowin.org/usbpcap/ .


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 120 preview log

2015-03-15 Thread Stef

On 15/03/2015 12:23, Mr. Kraus wrote:

Hello,

what is needed is a log recorded when doing a preview when running
windows O/S. The log tool to use is usbpcap http://desowin.org/usbpcap/ .

Regards,
Stef

Hi, here you go! To be complete, I added the log of an actual scan, as well:

http://weshare.me/5c5cfb7b52a8ab9d/lide120_preview.pcap
http://weshare.me/5c5cfb7b52a8ab9d/lide120_scan.pcap

Thanx for your efforts, looking forward to your feedback.

Enjoy!
Jo

Hello,

thanks for the data. It seems that both posted logs are the same, 
and are the one of a scan. A preview should be less big. Could you retry 
it ? What was the resolution used for the scan, 600 dpi ?


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] help compiling sane

2015-03-14 Thread Stef

On 13/03/2015 10:48, Rafe DiDomenico wrote:

Thank you, everyone!

You guys are an awesome community. Special thanks to Stef and Paul. 
The scanner is up and running. It was those libsane.s files. Somehow I 
missed the info about searching them all down and removing them. So, 
after fixing some permission issues (sane and xsane) it looks pretty 
good. Stef, what is the maximum resolution you have successfully 
scanned in? I tried with 4800 as a test and xsane locked up. It could 
be my weak office computer, however.


Thanks again for all the help.

Rafe

Hello,

yes, 4800 DPI works. Be aware that the motor is real slow in this 
resolution, and you may have the feeling it isn't doing anything. It 
also generates a bunch of data that takes take to be transferred over 
USB, 1x1 cm color scan is slightly more than 10MB.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] help compiling sane

2015-03-12 Thread Stef

On 10/03/2015 21:51, Stef wrote:

On 10/03/2015 09:26, Rafe DiDomenico wrote:


Thanks again, all, for trying to help me with this.

I started fresh with sane by uninstalling the packages and cleaning out
the sane locations in /usr/lib and /etc. I can confirm that the backend
is 1.0.25git. I checked the genesys.conf and the LIDE 220 is there. I
also made an entry for the udev rules for it to match the product ID.

I am attaching a log gathered while root. Without still
shows some permission problems I haven't straightened out yet, but 
the end result is no different with

root.


The log show that the executed version is 1.0.24:

.
[sanei_debug] Setting debug level of genesys to 255.
[genesys] SANE Genesys backend version 1.0 build 2411 from 
sane-backends 1.0.24

[genesys] SANE Genesys backend built with libusb-1.0
[genesys] sane_init: authorize != null
...

I think you still have an installation problem.

Regards,
Stef


Hello,

I see that you have already searched for libsane.s* files, have you 
removed them all, then reinstalled ?

Is your scanimage statically linked ?

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] help compiling sane

2015-03-10 Thread Stef

On 10/03/2015 09:26, Rafe DiDomenico wrote:


Thanks again, all, for trying to help me with this.

I started fresh with sane by uninstalling the packages and cleaning out
the sane locations in /usr/lib and /etc. I can confirm that the backend
is 1.0.25git. I checked the genesys.conf and the LIDE 220 is there. I
also made an entry for the udev rules for it to match the product ID.

I am attaching a log gathered while root. Without still
shows some permission problems I haven't straightened out yet, but the 
end result is no different with

root.


The log show that the executed version is 1.0.24:

.
[sanei_debug] Setting debug level of genesys to 255.
[genesys] SANE Genesys backend version 1.0 build 2411 from sane-backends 
1.0.24

[genesys] SANE Genesys backend built with libusb-1.0
[genesys] sane_init: authorize != null
...

I think you still have an installation problem.

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Bypassing calibration in Casoncan LIDE 210

2015-03-09 Thread Stef

On 09/03/2015 18:11, hugo roglan wrote:

I found a post that explains how to avoid calibration process in a scanner 
CanoScan LIDE 20.
The scanner I have is the CanoScan LiDE 210.
The driver used is genesys_gl124.c.
Is it possible to make the same changes in my scanner?

Thanks/.
/

http://lists.alioth.debian.org/pipermail/sane-devel/2008-December/023403.html




Hello,

 you can disable calibration on any genesys backend scanner by 
adding the flag GENESYS_FLAG_NO_CALIBRATION in the genesys_devices.c 
file an recompile. Be aware that it disables also shading calibration 
and you'll have to correct the scanned data for variation across the 
sensor to get usable scanned data.


Regards,
Stef



-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] CanoScan LiDE 220 is working now (but not perfectly)

2015-03-09 Thread Stef

On 09/03/2015 13:20, Pierre-Alain Tercier wrote:

Dears,

(sane-backends git version from yesterday)

I'm able to scan (and preview) at 300dpi a full page
But not at 600dpi and not if I restrict the area to a smaller part!

I will try to follow the situation.
At the mmoment on my debian-jessie I had to manually moves all the 
libsane stuff from


/usr/lib/sane

to
/usr/lib/x86_64-linux-gnu/sane

otherwise the librairies used were always the old ones.

Bye
Pat



Hello,

can provide me with a test case with scanimage parameters? Any scan 
(color, gray or lineart modes) is working at 600 dpi. Something like:


export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL124=255

scanimage -d genesys -l 21.4 -t 79.7 -x 148.7 -y 138.9 --resolution 600 
--mode Color scan.pnm 2scan.log


The export  are there to activate debug traces, they are sent to 
scan.log


Regards,
Stef



--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] help compiling sane

2015-03-08 Thread Stef

On 08/03/2015 11:36, Rafe DiDomenico wrote:
So, I did dump all the conf files in a folder and reinstalled. The 
genesys.conf does have a 220 entry now, but I still can't get any 
further:


scanimage (sane-backends) 1.0.25git; backend version 1.0.25

found USB scanner (vendor=0x04a9, product=0x190f, chip=GL848+?) at 
libusb:002:002
  # Your USB scanner was (probably) detected. It may or may not be 
supported by


No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate).



Hello,

are your udev rules updated ? I had to manually update 
80-libsane.rules to have this new scanner handled by udev. You could try 
to run scanimage -L as root to check if it is permission problem.
If not, run scanimage -L with debug traces by exporting the 
following environment variables:


export SANE_DEBUG_SANEI_USB=255
export SANE_DEBUG_GENESYS=255
scanimage -L 2probe.log


And send us the probe.log file.

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] sane to work with USB 3.0

2015-03-04 Thread Stef

On 03/03/2015 16:32, m. allan noah wrote:

Stef actually made some commits for the LiDE 210 last night- are you
running those?

allan



Hello,

 unfortunately I don't have an usable USB3 port. However it might 
be interesting to send me a log (with USBPCAP, see 
http://desowin.org/usbpcap/tour.html Step 2 ) of the replugging of the 
scanner on a USB3 port under windows. I'd like to have a look at it.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 220 unexpected success

2015-02-28 Thread Stef

On 28/02/2015 17:00, Rafe DiDomenico wrote:

That is amazing. You're awesome.

So, since this is my first scanner with linux, I have to ask a stupid 
question: Is there a development repo or do I need to use git to get a 
sane version with these updates (when they're ready of course)?


On 02/26/2015 09:35 PM, Stef wrote:

Hello,

while comparing logs between LiDE 210 and LiDE 220, I noticed 
they were only differing by the ck1map value. After changing this 
value I had color scan mode working from 75 to 4800 dpi.
I'm going to add this model properly, and fix some LiDE 110 
related bugs.


But complete support for LiDE 220 can be expected real soon (1 or 
2 weeks).


Regards,
Stef





Hello,

support for LiDE 220 has already been committed to SANE's git tree 
(see http://www.sane-project.org/cvs.html).
However the scanarea geometry needs fixing, head is bump at end while 
trying to go too far. This will be fixed by Monday.


Regarding LiDE 120 support, I'd need a log recorded with usbpcap of 
a preview (and only the preview) to check is like older models, this one 
is close to the 220, and possibly figure out hos to add support for it.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Canon LiDE 220 unexpected success

2015-02-26 Thread Stef

Hello,

while comparing logs between LiDE 210 and LiDE 220, I noticed they 
were only differing by the ck1map value. After changing this value I had 
color scan mode working from 75 to 4800 dpi.
I'm going to add this model properly, and fix some LiDE 110 related 
bugs.


But complete support for LiDE 220 can be expected real soon (1 or 2 
weeks).


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] Fwd: Re: Canon LiDE 120 scanner support

2015-02-24 Thread Stef


Resending since moderated because of too many recipients.

 Forwarded Message 
Subject:Re: Canon LiDE 120 scanner support
Date:   Tue, 24 Feb 2015 21:22:51 +0100
From:   Stef stef@free.fr
To: brian.bloni...@gmail.com
CC: 	sba...@catern.com, hginsb...@worcester.edu, willismon...@gmail.com, 
webma...@hblok.net, Martin Heitmann heitm...@strategie.tu-berlin.de, 
sane Development sane-devel@lists.alioth.debian.org




On 24/02/2015 19:56, brian.bloni...@gmail.com wrote:

Hi Mr. Voltz,

I read on sane-devel that the LiDE 120 scanner has a new chip from Genesys and 
might
require a little reverse-engineering to make work.

Since you know the backend well, I was wondering if you'd be willing to look at 
it?
I'm wondering if I can help by donating the scanner or some development funds.

I've CC:d the other people who had asked on-list about LiDE120 support in case 
there's
any interest. (I had a brief look on my own -- I copy-pasted the LiDE 110 
Genesys_Model
with the VID/PID from the 120. That makes the LED light up and stepper motor 
move, but
not in the right direction -- I'm sure it won't be that simple!).

Thanks and kind regards,
Brian Bloniarz

Hello,

I have setup a small project on github
(https://github.com/stefdev49/syseneg) where you can find my current
work on analyzing the LiDE 220 protocol.
Since I am working from recorded USB logs, only the hardware modes
used by driver will be known. So the final backend will not be as
complete as the genesys backend. For instance scan below 300 dpi are
always done at 300 dpi for LiDE 110 and 210, if the 220 does the same,
it will be highly unlikely I can have lower resolutions work since we
don't have the datasheet. The same goes for hardware lineart.
At the end we can expect a backend that works correctly by
mimicking what can be found in USB logs. That will at least take me a
couple of months.
We can expect to make the LiDE 120 work once the LiDE 220 works, if
they are as close as the LiDE 110 and 210 were (differing only by the
highest sensor resolution).

Regards,
Stef



-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] canon lide 220

2015-02-12 Thread Stef

On 12/02/2015 19:18, Martin Heitmann wrote:

Dear Stef

It is so great to here that you are working on the lide 220. Have the 
same problem. Bought it without checking first the availability of 
sane backend drivers :(


You said that it will take quite some time. Please don't get this 
wrong, I am just asking out of curiosity and because I have not your 
experience: Do you mean like a month or perhaps 3 months or even a 
year? The last thing I want to do is rush you, it is just that I have 
to consider for work reasons in how far it is feasible for me to wait 
for a solution or if should sell the device again and buy another one. 
Again, please don't take this as a kind of pressure, but only as a 
question out of curiosity.


And I have another question. Do you feel certain that it will work in 
the end? (at least the main functionality)


Beyond that I can only offer to help to the best of my abilities if I 
should do any tests with my Ubuntu 12.04. But I would need your 
instructions for that.


Best regards

Martin

Hello,

yes it will surely work, and I think it will take at least 2 or 3 
months due to the time I have to work on it.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] canon lide 220

2015-02-11 Thread Stef

On 09/02/2015 12:04, Rafe DiDomenico wrote:

Hi all,

So I sort of messed up and picked up this scanner. Now I#m debating 
whether to return it or not. If there's hope for support in the (not 
so distant) future, I'll hold off and wait. I'm just touching base to 
see what sort of prospects there are since this model isn't even 
listed as unsupported on the website.


Anyway, if anyone needs any info on it this was SANE gave me:

device descriptor of 0x04a9/0x190f at 002:002 (Canon CanoScan)
bLength   18
bDescriptorType   1
bcdUSB2.00
bDeviceClass  255
bDeviceSubClass   255
bDeviceProtocol   255
bMaxPacketSize0   64
idVendor  0x04A9
idProduct 0x190F
bcdDevice 7.04
iManufacturer 1 (Canon)
iProduct  2 (CanoScan)
iSerialNumber 0 ()
bNumConfigurations1
 configuration 0
 bLength  9
 bDescriptorType  2
 wTotalLength 39
 bNumInterfaces   1
 bConfigurationValue  1
 iConfiguration   0 ()
 bmAttributes 160 (Remote Wakeup)
 MaxPower 500 mA
  interface 0
   altsetting 0
   bLength9
   bDescriptorType4
   bInterfaceNumber   0
   bAlternateSetting  0
   bNumEndpoints  3
   bInterfaceClass255
   bInterfaceSubClass 255
   bInterfaceProtocol 255
   iInterface 0 ()
endpoint 0
bLength   7
bDescriptorType   5
bEndpointAddress  0x81 (in 0x01)
bmAttributes  2 (bulk)
wMaxPacketSize512
bInterval 0 ms
bRefresh  0
bSynchAddress 0
endpoint 1
bLength   7
bDescriptorType   5
bEndpointAddress  0x02 (out 0x02)
bmAttributes  2 (bulk)
wMaxPacketSize512
bInterval 0 ms
bRefresh  0
bSynchAddress 0
endpoint 2
bLength   7
bDescriptorType   5
bEndpointAddress  0x83 (in 0x03)
bmAttributes  3 (interrupt)
wMaxPacketSize1
bInterval 8 ms
bRefresh  0
bSynchAddress 0

trying to find out which USB chip is used
checking for GT-6801 ...
this is not a GT-6801 (bcdUSB = 0x200)
checking for GT-6816 ...
this is not a GT-6816 (bDeviceClass = 255, bInterfaceClass = 255)
checking for GLxxx ...
this is not a GL646 (bDeviceClass = 255, bInterfaceClass = 255)
This USB chip looks like a GL848+ (result from sane-backends 1.0.24)

found USB scanner (vendor=0x04a9 [Canon], product=0x190f [CanoScan], 
chip=GL848+) at libusb:002:002




Hello,

I have just received a Canon LiDE 220 donated by Dany Qumsiyeh. 
Many thanks to him. Now I'm able to start working on this scanner.


First tests show that this model operates like previous LiDE 2[01]0 
models, on an undocumented (maybe gl127) ASIC.


Since I now only have Windows 7 machines, I can't use usnsniff, and 
must adapt my decoding scripts to wireshark USB recording.


I am going to build some sample tests programs based on log 
sniffing, without public datasheet this will be surely more complicated 
and longer than working with previous genesys ASIC. Once simple 
operations worked out, I'll turned it into a backend.


This is going to take quite some time.

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canoscan 8400F

2014-11-16 Thread Stef

On 01/11/2014 22:15, Myroslav Kavatsyuk wrote:

#define BACKEND_NAME genesys


Hello,

this is because of this define, which should only used by the 
backend. Try somezthing like

#define BACKEND_NAME genesys_test

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canoscan 8400F

2014-11-01 Thread Stef

On 31/10/2014 22:02, Myroslav Kavatsyuk wrote:

Dear Stef,

The SANE was configured with the proper CFLAGS shell variables:

export CFLAGS=-DUNIT_TESTING=1
export LDFLAGS=-DUNIT_TESTING=1
export CPPFLAGS=-DUNIT_TESTING=1
export BACKENDS=genesys
export PRELOADABLE_BACKENDS=genesys

./configure --prefix=/home/xxx/4_pwork/SANE/local/

I have checked, during the compilation process definition statements 
were passed to compiler:


/bin/bash ../libtool --silent  --tag=CC   --mode=compile gcc 
-DHAVE_CONFIG_H -I. -I../include/sane -I/usr/local/include -I. -I. 
-I../include -I../include 
-DLIBDIR=/home/xxx/4_pwork/SANE/local/lib/sane 
-DBACKEND_NAME=genesys -DUNIT_TESTING=1 -D_REENTRANT 
-DPATH_SANE_CONFIG_DIR=/home/xxx/4_pwork/SANE/local/etc/sane.d 
-DPATH_SANE_DATA_DIR=/home/xxx/4_pwork/SANE/local/share 
-DPATH_SANE_LOCK_DIR=/home/xxx/4_pwork/SANE/local/var/lock/sane 
-DV_MAJOR=1 -DV_MINOR=0  -DUNIT_TESTING=1 -W -Wall -Wcast-align 
-Wcast-qual -Wmissing-declarations -Wmissing-prototypes 
-Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedantic -ansi -MT 
libgenesys_la-genesys_gl843.lo -MD -MP -MF 
.deps/libgenesys_la-genesys_gl843.Tpo -c -o 
libgenesys_la-genesys_gl843.lo `test -f 'genesys_gl843.c'


But the resulting library does not make functions public.

Best regards,
Myroslav


**

Hello,

I configure with:
CFLAGS=-DUNIT_TESTING -ggdb ./configure

then unit testing progs are link with:

gcc -ggdb -o gl646 gl646.o 
../sane-backends/backend/.libs/sane_strstatus.o 
-I../sane-backends/include -L../sane-backends/backend/.libs 
-L../sane-backends/sanei/.libs -L../sane-backends/lib/.libs -lgenesys 
-lsanei -llib -lusb-1.0 -lpthread -lrt -lreadline -lncurses -lm


Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canoscan 8400F

2014-10-30 Thread Stef

On 29/10/2014 12:18, Myroslav Kavatsyuk wrote:

Dear Stef,

Thanks a lot for a provided example. From your code I have made a 
program (see attachment) which
compiles. However, I can not link it with the libsane-genesys. 
apparently I miss something.


I have compiled SANE libraries as following:
 export BACKENDS=genesys
 export CFLAGS=-D UNIT_TESTING
 ./configure --prefix=.

The program compiles perfectly as:
 gcc -I ./compile/include/ -I ./compile/backend/ -c tst_scan.c

But when trying to link against libsane-genesys library gcc complains:
 gcc -I ./compile/include/ -I ./compile/backend/ -L ./local/lib/sane/ 
-l sane-genesys tst_scan.c -o tst_scan

/tmp/cc958m4x.o: In function `sanei_debug_genesys_call':
tst_scan.c:(.text+0xad): undefined reference to `sanei_debug_msg'
/tmp/cc958m4x.o: In function `main':
tst_scan.c:(.text+0xcd): undefined reference to `sanei_init_debug'
tst_scan.c:(.text+0xe0): undefined reference to `sane_genesys_init'
tst_scan.c:(.text+0xf3): undefined reference to `sane_strstatus'
tst_scan.c:(.text+0x120): undefined reference to `sane_genesys_open'
tst_scan.c:(.text+0x133): undefined reference to `sane_strstatus'
tst_scan.c:(.text+0x14a): undefined reference to `sane_genesys_exit'
tst_scan.c:(.text+0x188): undefined reference to 
`sanei_genesys_compute_dpihw'

tst_scan.c:(.text+0x2b0): undefined reference to `gl843_init_scan_regs'
tst_scan.c:(.text+0x2ec): undefined reference to `sane_strstatus'
tst_scan.c:(.text+0x32c): undefined reference to `gl843_begin_scan'
tst_scan.c:(.text+0x33f): undefined reference to `sane_strstatus'
tst_scan.c:(.text+0x3b8): undefined reference to 
`sanei_genesys_read_data_from_scanner'

tst_scan.c:(.text+0x3d4): undefined reference to `gl843_end_scan'
tst_scan.c:(.text+0x3e7): undefined reference to `sane_strstatus'
tst_scan.c:(.text+0x42b): undefined reference to 
`sanei_genesys_write_pnm_file'

tst_scan.c:(.text+0x45b): undefined reference to `sane_genesys_close'
tst_scan.c:(.text+0x460): undefined reference to `sane_genesys_exit'

If I try to use libtool, it complains that I am linking against 
loadable module


Apparently I am doing something wrong.
Please let me know what is the proper way of compiling a unit testing 
program.


Thanks a lot,
Myroslav


Hello,

is the libsane-genesys also built with -DUNIT_TESTING ? These 
private symbols aren't made public until UNIT_TESTING is defined.


Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] sane backends patches part 3

2014-10-29 Thread Stef

On 27/10/2014 12:36, Jörg Frings-Fürst wrote:

Hello again,

I have found some more out-of-bounds

- out_of_bounds.patch:
   prevent multiple out-of-bounds
   Severity: grave
   Debian bug: none

This patch is including niash_c-array-bounds.patch


CU
Jörg




Hello,

I don't understand the genesys patch part. On master branch 
MAX_SCANNERS is defined as


#define MAX_SCANNERS (sizeof(genesys_usb_device_list) / \
sizeof(genesys_usb_device_list[0]))

so no out of bounds condition can arise.

   What are the context and purpose of these patches ?

Regards,
Stef


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] [genesys] Crash with arithmetic exception with Canon LiDE 110

2014-10-22 Thread Stef

On 22/10/2014 23:47, Paul Menzel wrote:

Dear SANE developers,


using Debian Sid/unstable with libsane 1.0.24-3, XSane and Simple Scan
both crash with a arithmetic exception when doing a preview scan or
scan.

 Program received signal SIGFPE, Arithmetic exception.
 0xb552ae6c in gl124_led_calibration (dev=0x8207a08) at 
genesys_gl124.c:3143
 3143   genesys_gl124.c: Datei oder Verzeichnis nicht gefunden.

Please find the backtrace pasted at the end.


Thanks,

Paul



Hello,

if all calibration scans are black, there could be a division by 
zero. Could you provide log and debug files (several *.pnm files) 
created when backend is ran with debug traces by exporting these 
environment variables:

export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL124=255

Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] CANOSCAN 8400F

2014-10-22 Thread Stef

On 30/09/2014 12:05, Myroslav Kavatsyuk wrote:

Dear Stef,

After a summer brake I got again some time to work on the driver for 
canoscan 8400F. In order to simplify my task I have disconnected 
transparency

unit while taking logs. This made logs more clear. Here are my findings:

1) Sensor profiles: For all scan modes only two different sensor 
profiles are used:

/* scan 1600, 1200 dpi, average_bit=0, DPISET=4800
CKSEL=1 for all modes */
{CCD_CS8400F, 1600, 14400, 0x1ff, 0x0, 0x24924, 5168, 
0,0x2a,0x0,0x0,0x0,0x,0x00,0x01,0x,0x,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x11, 0x2a, 
0x30, 0x00, 0x00, 0x84},

{0x0b,0x0e,0x11,0x02,0x05,0x08,0x63,0x00,0x40,0x00,0x00,0x,0x82},
},
 /* scan 800, 600 dpi, average_bit=0, DPISET=4800
 scan 300 dpi, average_bit=1, DPISET=2400
 scan 100, 75 dpi, average_bit=1, DPISET=1200
 CKSEL=3 for all modes*/
{CCD_CS8400F,  800, 7200,  0xe3f, 0x0, 0x1b6db, 5168, 
0,0x2a,0x0,0x0,0x0,0x,0x01,0x02,0x,0x,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x13, 0x2a, 
0x30, 0x00, 0x00, 0x84},

{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x00,0x40,0x00,0x00,0x,0x85},
 },
Inside the comments you will find values of relevant registers 
(DPIHW=4800 for all modes). When I tried to use SANE to make a scan at 
100 dpi, the actual
scan was performed with ~ 70 dpi. According to the SANE logs, SANE was 
using dpiset=400 while the canon driver uses DPISET=1200, average_bit=1...

To be honest I am sucked with this puzzle.

2) Motor tables:
   I found that for each movement scanner uses two tables. In most 
cases one table is short, 512 bytes, another is long 2024 bytes. 
During the test scans the scan head was making three types of movements:

  I) from parking position to the beginning of the scan
  II) scanning
  III) return to parking position
 I have identified all tables for all modes. I will not send them in 
this mail since they are large.  Here is the summary:
* Tables of type III are same same for all modes: 75-100, 300, 
600-800, 1200-1600 dpi

* Tables of type II are same for 600-800, 1200 dpi
* All tables same for:  75 and 100 dpi; 600 and  800 dpi; 1200 and 
1600 dpi.
* For resolutions of 75 and 100 dpi all tables of type I and II 
are short (512 bytes)
The interesting finding is that the tables for different movements are 
written to different addresses:

* Type I:
genesys_write_register(0x5b,0x40)length 2048
 genesys_write_register(0x5c,0x00)
   genesys_write_register(0x5b,0x50) length 512
 genesys_write_register(0x5c,0x00)
* Type II
genesys_write_register(0x5b,0x48)   length 2048
 genesys_write_register(0x5c,0x00)

genesys_write_register(0x5b,0x58)length 512
 genesys_write_register(0x5c,0x00)

Type III
genesys_write_register(0x5b,0x58)   length  2048
 genesys_write_register(0x5c,0x00)

genesys_write_register(0x5b,0x40)  length 512
 genesys_write_register(0x5c,0x00)

At this point I have collected some information but it is not clear 
how to implement it into the genesys backend. How to implement 
different motor
tables for two-table movement? I see implementation for the g4050. 
There are few tables defined for it. But it is not clear which of them 
will be

selected for each movement...

Please provide me more information or help me with the implementation.

Thank you in advance,
Best regards,
Myroslav

*From:* Stef stef@free.fr
*To:* Myroslav Kavatsyuk m.kavats...@yahoo.com; 
sane-devel@lists.alioth.debian.org sane-devel@lists.alioth.debian.org

*Sent:* Wednesday, June 25, 2014 6:41 AM
*Subject:* Re: CANOSCAN 8400F

On 23/06/2014 15:51, Myroslav Kavatsyuk wrote:

Dear Stef,

Thanks a lot for your suggestions. I have studied genesys 
documentation, and indeed it is helpful :)


I have collected usblogs for all useful scan modes. In case you would 
like to look at them, you can
download processed (with your script) logs at: CS8400F 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa




image 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa



CS8400F 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa

Shared with Dropbox

View on www.dropbox.com 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa


Preview by Yahoo

I made summary of all possible sensor profiles. For each profile I 
wrote at which dpi setting of windows driver
it is used, value of the DPISET register, value of the AVEENB bit 
(average over few pixels or drop pixels):

 /*
{CCD_CS8400F, dpi, 22000, 0x0, 0xff, 0x0, 5168, 0,0x2a,0x 0, 
0x 0, 0x 0, -1, 0x07, 0x08, -1, -1,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x0c, 0x10, 0x2a, 
0x30, 0x00, 0x00, 0x9a},
{0x01, 0x04, 0x07, 0x0a, 0x0d, 0x10, 0x1b, 0x00, 0x40, 0x00, 
0x00, -1

Re: [sane-devel] Canon CanoScan Lide120

2014-10-22 Thread Stef

On 17/10/2014 11:34, Hayder Aziz wrote:




   bcdDevice 7.04 signals a genesys chip newer than the GL124 (which 
has7.01). Since GL128 is 7.05, we could bet on a GL126 (there is also 
a GL125), or like the GL8417 and GL124, another one specially 
taylored for Canon, a GL127? . Anyway, I don't know any public 
datasheet for these ASICs, which complicates the work for supporting 
it. One would have to guess what registers are used for.


Regards,
Stef



Hi.

Thanks for the reply.

Should I give up and return this scanner, or is there a way I can help 
build a driver for it? (if its not too complex!).




Hello,

the C code in the genesys backend isn't that complicated. What 
takes time is the guess work on the ASIC behavior and tests involved. 
The guess work will even be bigger without a datasheet. Have a look at 
the rts8891 backend sources to have an idea of this work.


Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon CanoScan Lide120

2014-10-16 Thread Stef

On 16/10/2014 18:01, Hayder Aziz wrote:

and here's the LSUSB dump. in case its of any help.

I'm willing to help hack a solution for this, since this new model of 
the canon lide series is bound to become popular over the next weeks / 
months (its not a niche model).


Bus 002 Device 004: ID 04a9:190e Canon, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  255 Vendor Specific Class
  bDeviceSubClass   255 Vendor Specific Subclass
  bDeviceProtocol   255 Vendor Specific Protocol
  bMaxPacketSize064
  idVendor   0x04a9 Canon, Inc.
  idProduct  0x190e
  bcdDevice7.04
  iManufacturer   1
  iProduct2
  iSerial 0
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   39
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0
bmAttributes 0xa0
  (Bus Powered)
  Remote Wakeup
MaxPower  500mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   3
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass255 Vendor Specific Subclass
  bInterfaceProtocol255 Vendor Specific Protocol
  iInterface  0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83  EP 3 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0001  1x 1 bytes
bInterval   8




Hello,

   bcdDevice 7.04 signals a genesys chip newer than the GL124 (which 
has7.01). Since GL128 is 7.05, we could bet on a GL126 (there is also a 
GL125), or like the GL8417 and GL124, another one specially taylored for 
Canon, a GL127? . Anyway, I don't know any public datasheet for these 
ASICs, which complicates the work for supporting it. One would have to 
guess what registers are used for.


Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon LiDE 220

2014-09-22 Thread Stef

On 22/09/2014 15:51, Alex wrote:

Hi Stef,

i have bought the same scanner (lide 220) by mistake, have now ordered the
20 because i need a working one quick, however im going to keep the
lide 220 as well, so i can help to get it working.

it seems to have the GL848 chip..


what does 'sane-find-scanner' reports ? You could also send data form
lsusb.

sane-find-scanner reports:

found USB scanner (vendor=0x04a9 [Canon], product=0x190f [CanoScan],
chip=GL848+) at libusb:001:008


and lsusb says:

Bus 001 Device 008: ID 04a9:190f Canon, Inc.


greetings,
Alex


Hello,

was 'sane-find-scanner' from SANE 1.0.23 ? Detection has been 
improved since. Could you send the output

of lsusb -v -d 04a9:190f ?

Regards,
Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 220

2014-09-22 Thread Stef

On 22/09/2014 19:35, Andreas Schneider wrote:

On 21.09.2014 21:28, Stef wrote:
what does 'sane-find-scanner' reports ? You could also send data form 
lsusb. 
Apart from what Alex already wrote (Chip GL848+), I tried a naive 
approach of duplicating the Genesys_Model canon_lide_200_model and 
registering it according to the device ID. It was just a stab in the 
dark, since the 200 used the same chip (apparently). Unfortunately, 
some control sequences must have changed, because:


 scanimage
scanimage: open of device genesys:libusb:001:004 failed: Error
during device I/O


(I don't have a full development environment for SANE; I just changed 
the source, rebuilt the package and installed it. Full debugging is 
therefore not easily possible for me.)


Is there an easy way to capture device IO on Windows? (... where the 
scanner works)
That way I could give you a dump of the traffic that you can look at 
(I guess you have a practiced eye for the control data :-))


Best regards,
Andreas 

Hello,

you can try wireshark and export USB dump to text. I'll try to do 
something of it. On Windows XP i used usbsnoop for USB recording.


Regards,
Stef


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon LiDE 220

2014-09-22 Thread Stef

On 23/09/2014 02:58, Alex wrote:

On Mon, Sep 22, 2014 at 09:15:30PM +0200, Stef wrote:

Hello,

re,


was 'sane-find-scanner' from SANE 1.0.23 ? Detection has been improved since.

1.0.24 actually.. (was the same output on arch and debian)


Could you send the output
of lsusb -v -d 04a9:190f ?

Regards,
 Stef



   bcdDevice7.04

.

Hello,

it is a new genesys chip revision. Not datasheet known for this 
one. This work would be complicated.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon LiDE 220

2014-09-21 Thread Stef

On 20/09/2014 19:57, Andreas Schneider wrote:

Hello,

I just bought a Canon LiDE 220 not fully realizing, that it is so new,
that SANE currently doesn't support it.

What would (most likely) be needed, to add support? Is there any
information I can provide?

Thanks and best regards,
Andreas


Hello,

what does 'sane-find-scanner' reports ? You could also send data 
form lsusb.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] genesys Canon Lide 210 aspect-ratio-problem at 600 dpi

2014-07-28 Thread Stef
Hello,

I'm currently on travel. I'll look at this next week.

Regards,
Stef

M G Berberich s...@oss.m-berberich.de a écrit :

Am Mittwoch, den 04. Juni schrieb M G Berberich:
 Hello,
 
 Am Montag, den 02. Juni schrieb Stef:
  I have fixed the issue of distorted pictures in grey mode for DPI = 
  600
  dpi. I have also fixed 600 dpi accurracy problem. All these fixes are
  available in SANE's git source tree, with genesys backend internal build
  version 2504.
 
 600 dpi lineart and gray scans work fine now. 
 Thanks a lot.

The y-Axis seems to be streched by 0.2%. While doing a full DIN A4
scan, the carriage seems to collide at the end. You can hear this in
this recording:

  https://m-berberich.de/sane/Scanner.ogg

at 10,7 s – 11 s collision at the „bottom“ of the scan.

   MfG
   bmg

-- 
„Des is völlig wurscht, was heut beschlos- | M G Berberich
 sen wird: I bin sowieso dagegn!“  | berbe...@fmi.uni-passau.de
(SPD-Stadtrat Kurt Schindler; Regensburg)  | www.fmi.uni-passau.de/~berberic

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] Canoscan Lide 210 - Green Bands on the left margin

2014-07-09 Thread Stef

On 09/07/2014 06:59, Toni LDG wrote:

Hi Stef

in order to notice tne lines let me describe them a little more.

the green lines are very very light,  mostly seen in white/clear zones 
of the image, not on dark ones. and are always on the left side of the 
image, at about 1 cm from the left margin. they go from top to bottom 
of the scan,


At least this is how i see them :-P (hope is not only a paranoia of 
mine :-D )




i've enabled debugging as instructed and created 5 new scans with the 
command posted. Some of the scans, (number 2 and 4) are mostly white, 
in order to see the issue in more detail.




Hello,

beside log file, there are also other *.pnm files created during 
calibration (in the working directory where the scanimage command is 
ran). Can you send them ? What I suspect is that there could be some 
color pattern (some kind of notch) in a area expected to be white. So 
shading calibration is wrong and leads to the artifact on the scanned 
picture.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] Canoscan Lide 210 - Green Bands on the left margin

2014-07-08 Thread Stef

On 08/07/2014 22:07, Toni LDG wrote:

Hi all.

I just received a Canoscan LiDE 210 and just try to get it working 
properly.


Just noticed that when using it in Linux, the results of any kind of 
scan shows a couple of small green bands on the left side, vertical 
and about 1 cm width.


The strange thing is that those bands are Not shown when scanning from 
Micrososft Windows with the Canon suplied driver.

There image there is perfect. It seems to only affect Sane.

I've tried both on Debian unstable and on Ubuntu 14.04 but same results.

Also tried re-calibrating the scanner from Windows several times, but 
same issue.

Removing the calibration file and again.

Also from different front-ends (xsane and skanlite) same results.

The fact that only affects Linux makes me wonder if is some kind of 
software issue or is a faulty hardware.
I am in time to return it but just wanna know first if i am doing 
something wrong, or is a software issue.


Have some samples to check the issue if desired.

Thanks in advance for the help and also for the great job you all do 
to get scanners working.





   Hello,

maybe an upload error, I'm not seeing any green band on the linux scan.
However, you can send an another one directly to me, with debug 
traces log generated by running scanimage with debug by executing these 
commands:

xport SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL646=255
export SANE_DEBUG_GENESYS_GL841=255
export SANE_DEBUG_GENESYS_GL843=255
export SANE_DEBUG_GENESYS_GL847=255
export SANE_DEBUG_GENESYS_GL124=255
scanimage -d genesys --clear-calibration --resolution 300 --mode Color 
2debug.log scan.pnm


Maybe the internal geometry of your scanner model is slightly 
different, and calibration happens on an unexpected black area.


Regards,
Stef
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

[sane-devel] ScanJet 3670c calibration

2014-06-29 Thread Stef

Hello,

I have eventually found how to fix the coarse gain calibration bug 
on the HP3670c. You can pull the latest SANE's git version to use it.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] CANOSCAN 8400F

2014-06-24 Thread Stef

On 23/06/2014 15:51, Myroslav Kavatsyuk wrote:

Dear Stef,

Thanks a lot for your suggestions. I have studied genesys 
documentation, and indeed it is helpful :)


I have collected usblogs for all useful scan modes. In case you would 
like to look at them, you can
download processed (with your script) logs at: CS8400F 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa




image 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa



CS8400F 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa

Shared with Dropbox

View on www.dropbox.com 
https://www.dropbox.com/sh/6je6fz2tsjy0r6x/AAA1yr9P6RrlEWaqk5lWjLNSa


Preview by Yahoo

I made summary of all possible sensor profiles. For each profile I 
wrote at which dpi setting of windows driver
it is used, value of the DPISET register, value of the AVEENB bit 
(average over few pixels or drop pixels):

 /*
{CCD_CS8400F, dpi, 22000, 0x0, 0xff, 0x0, 5168, 0,0x2a,0x 0, 
0x 0, 0x 0, -1, 0x07, 0x08, -1, -1,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x0c, 0x10, 0x2a, 
0x30, 0x00, 0x00, 0x9a},
{0x01, 0x04, 0x07, 0x0a, 0x0d, 0x10, 0x1b, 0x00, 0x40, 0x00, 
0x00, -1, 0x88},

}, // Scanner init, DPISET=600; AVEENB=1
{CCD_CS8400F, dpi, 10800, 0xe3f, 0x0, 0x1b6db, 5168, 0,0x2a,0x 
0, 0x 0, 0x 0, -1, 0x01, 0x02, -1, -1,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x13, 0x2a, 
0x30, 0x00, 0x00, 0x84, },

{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x00,0x40,0x00,0x00,-1,0x88,},
}, // Scanner init DPISET=2400, most probably TPU, AVEENB=1
{CCD_CS8400F, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 
0,-1,0xfeff, 0xfeff, 0xfeff, -1, 
0x01, 0x02, -1, -1,
{-1, -1, -1, -1, -1, -1, 0x33, 0x0c, 0x13, -1, 0x30, -1, 0x00, 
0x84},

{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,-1,0x40,0x00,0x00,-1,0x88},
}, // 600 dpi DPISET=4800 (last value 0x88 - 0x85); 400,300 
dpi DPISET=2400, last number 0x85; 100 dpi DPISET=1200
{CCD_CS8400F, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 0,0x2a,0x 
0, 0x 0, 0x 0, -1, 0x01, 0x02, -1, -1,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x13, 0x2a, 
0x30, 0x00, 0x00, 0x84},
{0x0d, 0x10, 0x01, 0x04, 0x07, 0x0a, 0x6b, 0x00, 0x40, 0x00, 
0x00,   -1, 0x85},

}, // 800 dpi, DPISET=4800
{CCD_CS8400F, dpi, 14400, 0x1ff, 0x0, 0x24924, 5168, 0,0x2a,0x 
0, 0x 0, 0x 0, -1, 0x00, 0x01, -1, -1,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x11, 0x2a, 
0x30, 0x00, 0x00, 0x84},
{0x0b, 0x0e, 0x11, 0x02, 0x05, 0x08, 0x63, 0x00, 0x40, 0x00, 
0x00,   -1, 0x82},

}, // 1200, 1600 dpi; DPISET=4800
{CCD_CS8400F, dpi, 28800,   0x0, 0x0, 0x24924, 5168, 0,0x2a,0x 
0, 0x 0, 0x 0, -1, 0x09, 0x0a, -1, -1,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x10, 0x2a, 
0x30, 0x00, 0x20, 0x84, },
{0x02, 0x05, 0x08, 0x0b, 0x0e, 0x11, 0x1b, 0x00, 0x40, 0x00, 
0x00,   -1, 0x88},

}, // 3200,2400 scan; DPISET=4800 (last value can be 0x88 - 0x81)
//
// AVEENB=1 for dpi from 100-400 range; AVEENB=0 for dpi 
600-3200 range

 */
   This values are almost ready to be plugged into the code. I have to 
replace at some places -1 values. What is strange for me
   that DPISET values are very high with respect to dpi setting 
reported by driver.


My questions are:
1) what does the second field (dpi) means in the scanner profile? Is 
this value of the DPISET register?
2) I did not manage to follow where actually sane decides which 
profile to use, which DPISET value to select?
   In other words how to make sure that the correct combination will 
be selected for scan if I pass resolution of dpi to scanimage.
3) From the logs I do not see how to extract motor tables (like one in 
the genesys_gl843.h at line 678). In the logs
I have seen setting up of the MTRTBL bit for downloading table 
(genesys_write_register(0x5b,0x01)genesys_write_register(0x5c,0x00))

This statements are followed by data. Is that data a motor table?

Best regards,
Myroslav

Hello,

1) the dpi value is the effective maximum dpi for the scan. Scan's 
dpi is the result of DPISET, DPIHW and CKSET. In the simplest case it is 
the hardware DPI set for the recorded scan.


2) for a given target resolution, exposure is chosen first 
(gl843_compute_exposure which uses get_sensor_profile) by selecting the 
sensor profile which has the lowest dpi value above or equal to the 
target dpi.


3) data can be written to the GL843 by many slightly different ways 
that the decoding scripts may not handle, so look for bulk writes mostly 
shorter than 2048 bytes, which turned (little-endian) to 16 bit values 
give a decreasing slope with end values becoming closer. In such a 
situation, I look at semi-processed log generated by the 'partial.sh' 
script. After writes to 5b/5c registers like you noticed.


Example from a 4400F log

Re: [sane-devel] genesys Canon Lide 210 aspect-ratio-problem at 600 dpi

2014-06-10 Thread Stef

On 04/06/2014 22:48, M G Berberich wrote:

Hello,

Am Montag, den 02. Juni schrieb Stef:

 I have fixed the issue of distorted pictures in grey mode for DPI = 600
dpi. I have also fixed 600 dpi accurracy problem. All these fixes are
available in SANE's git source tree, with genesys backend internal build
version 2504.

600 dpi lineart and gray scans work fine now.
Thanks a lot.

Am Sonntag, den 11. Mai schrieb Andrew Kanaber:

Am Montag, den 05. Mai schrieb Stef:

M G Berberich wrote:

2400 dpi and 4800 dpi do not work at all, but never did.

2400 and 4800 dpi scans works on my LiDE 210. So I'd need some logs or
better information on what is not working for you.

For what it's worth I also see 2400dpi and 4800dpi working fine on
my LiDE 110, and producing correct (undistorted) aspect ratio.

2400 dpi and 4800 dpi still do not work at all on my LiDE 210.

MfG
bmg


Hello,

could you send me a test case where 2400 dpi scan doesn't work as a 
scanimage command ? For instance something like:

export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL124=255
scanimage -d genesys --clear-calibration --width 50.0 --height 50.0 
--resolution 2400 --mode Gray 2scan.log scan.pnm



changing scan parameters an color mode. Then send me the scan.log and 
scan.pnm files, and scan parameters son I can try to run the same in my 
dev environment and have a chance to reproduce it?


Regards,
Stef


--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] CANOSCAN 8400F

2014-06-10 Thread Stef

On 04/06/2014 12:22, Myroslav Kavatsyuk wrote:


Dear Stef,

thanks a lot for your suggestions and scripts. The more I dig into the 
source code, the more

questions I have. Here they are:

1) file genesys_devices.c, definition of  Genesys_Model 
canon_8400f_model (line 1691). I realized that the dpi list does not 
correspond to the model (CS8400F has maximum resolution of 3200dpi).
- Shell I change the array with values available in the windows driver 
of the scanner? Is the length of the array fixed?
You may do such. But be aware that the resolution advertised by the 
windows driver GUI are usually different from the DPI used to do the 
scan. It is safer to work with resolution you find in USB log, or 
resolution derived for other working ones. Try to do USB log of 
resolution matching physical hardware, or divided by a round factor.

The length is fixed, and has a MAX_RESOLUTIONS size.

- Are the other values extracted from some logs, or shell I 
disassemble unit to measure all constants (position of white strip)?
Tune scanarea geometry only when you have made scan working. No 
need to dismantle your scanner, change all offsets to be zero (in 
genesys_device.c), and it will scan itself where you cannot see.


- I have performed test scan with resolution of 100dpi of size 10x10 
cm (specified with -x -y option). The resulting image had proper 
number of lines/rows (393), proper aspect ratio. However, the scan are 
was about 15x15 cm. I assume this has something to do with wrong array 
with dpi setting...
BTW, you can find GL843 datasheet on internet, it will help you 
understand what all the registers are for. Real dpi is a combination of 
sensor DPISET, deletion factor and exposure.




2) genesys_gl843.h, There is definition of the Sensor_Profile sensors. 
For the CS8400F there is defined array (line 666). I logged several 
scans with different dpi settings using usbsnoop. After processing 
logs with your script I found that there are different possible values 
reported for the sensor_profile and motor_profile. This profiles do 
not coincide with the one in the genesys_gl843.h. Here are ones, 
extracted from the logs:


sensor_profile { sensor_id, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 
0,0x,
0xfeff, 0xfeff, 0xfeff, 
0x, 0x01, 0x02, 0x, 0x,
{0x, 0x, 0x, 
0x, 0x, 0x, 0x33, 
0x0c, 0x13, 0x, 0x30, 0x, 0x00, 0x84, },

{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x,0x40,0x00,0x00,0x,0x85,},
}
sensor_profile { sensor_id, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 
0,0x,
0xfeff, 0xfeff, 0xfeff, 
0x, 0x01, 0x02, 0x, 0x,
{0x, 0x, 0x, 
0x, 0x, 0x, 0x33, 
0x0c, 0x13, 0x, 0x30, 0x, 0x00, 0x84, },

{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x,0x40,0x00,0x00,0x,0x88,},
},
sensor_profile { sensor_id, dpi, 22000, 0x0, 0xff, 0x0, 5168, 0,0x2a,
0x 0, 0x 0, 0x 0, 0x, 0x07, 0x08, 0x, 
0x,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0x0c, 0x10, 0x2a, 0x30, 
0x00, 0x00, 0x9a, },

{0x01,0x04,0x07,0x0a,0x0d,0x10,0x1b,0x00,0x40,0x00,0x00,0x,0x88,},
},
sensor_profile { sensor_id, dpi, 10800, 0xe3f, 0x0, 0x1b6db, 5168, 0,0x2a,
0x 0, 0x 0, 0x 0, 0x, 0x01, 0x02, 0x, 
0x,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x13, 0x2a, 0x30, 
0x00, 0x00, 0x84, },

{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x00,0x40,0x00,0x00,0x,0x88,},
},
sensor_profile { sensor_id, dpi, 14400, 0x1ff, 0x0, 0x24924, 5168, 0,0x2a,
0x 0, 0x 0, 0x 0, 0x, 0x00, 0x01, 0x, 
0x,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x11, 0x2a, 0x30, 
0x00, 0x00, 0x84, },

{0x0b,0x0e,0x11,0x02,0x05,0x08,0x63,0x00,0x40,0x00,0x00,0x,0x88,},
},
sensor_profile { sensor_id, dpi, 7200, 0xe3f, 0x0, 0x1b6db, 5168, 0,0x2a,
0x 0, 0x 0, 0x 0, 0x, 0x01, 0x02, 0x, 
0x,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x0c, 0x13, 0x2a, 0x30, 
0x00, 0x00, 0x84, },

{0x0d,0x10,0x01,0x04,0x07,0x0a,0x6b,0x00,0x40,0x00,0x00,0x,0x85,},
}

They are all different. Do you have any suggestions what to do with 
this? For each sensor_profile there is a motor_profile. They have the 
following structure:
motor_profile={id,7200,2, {0, 0, ..} all skipped numbers are zeros 
(in contrast to one in the genesys_gl843.h, line 677). The second 
number coincides with the first number reported in the sensor_profile.


I would appreciate you suggestions

Re: [sane-devel] CANOSCAN 8400F

2014-06-02 Thread Stef

On 01/06/2014 14:19, Myroslav Kavatsyuk wrote:

Dear Stef,

Finally I managed to test the CS8400F. In the git version of SANE there is
some implementation of the scanner. After adding proper line to 
genesys.conf

I managed to make first scan with the CS8400F. Scanning was invoked using
scanimage. Here are my observations:
* If I do not specify size of a document to scan (no -x and -y 
options), the scanner

  head bumps into movement limiter (goes too far)
* Scanner does not perform calibration and does not warm-up the lamp.
   It starts scanning immediately after the scanimage command. Once I 
limited
   scanning region with -x and -y options, I got image with vertical 
stripes (luck

   of CCD gain calibration?)

I am ready to work on the backend to make it usable. However, I need 
your help.
In the SANE digest (vol 74, issue 19) you wrote: Adding support for 
the Canoscan
8400F will be a matter of tuning the settings structures in 
genesys_devices.c and
genesys_gl843.h. Then maybe adapt the code in genesys_gl843.c to 
support the

possible differences for this model.
Can you give me more specific hints, where should I add calibration, 
warming up?
I have running WindowsXP in the virtualbox with the usbsnoop, so I can 
get any

required usb logs.

Thank you in advance,
Best regards,
Myroslav




Hello,

calibration is currently desactived because of the 
GENESYS_FLAG_NO_CALIBRATION . Remove it to activate calibration. Since 
there are already 2 CCD scanners supported (KV-SS080 and HP G4050), 
you'll have to setup entries in data tables held in genesys_gl843:

- Sensor_Profile sensors[]
- Motor_Profile gl843_motors[]
- slope table such a uint32_t kvss080[]

Data will have to be extracted from usb logs.  The dev cycle is run the 
backend with your changes, compare with usb logs, change code again to 
fix differences  until it works.


Sometimes you'll may have to add specific behavior for your scanner in 
genesys_gl843.c see the use of CCD_G4050, CCD_KVSS080, etc...


running 'doxygen genesys-doxygen.conf' in the doc/ sub dir will 
generate doxygen info for all the backend.


Regards,
Stef

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] CANON canoscan 8400F

2014-06-02 Thread Stef

Hello,

I use the appended scripts to process usb logs in a form close to 
the debug traces from the genesys backend.


Regards,
Stef


gl843-scripts.tar.gz
Description: GNU Zip compressed data
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] HP Scanjet 3670 bad colors

2014-06-02 Thread Stef

On 27/05/2014 18:13, Octavio Alvarez wrote:

On 05/24/2014 08:25 AM, Octavio Alvarez wrote:

On 05/23/2014 10:58 PM, Stef wrote:

 target_code is giving the desired target value for white. Once this
value is correct : not too low, and not too high to avoid
solarization, you should turn to tuning gamma values. They are defined
in genesys_devices.c for the CCD_HP3670. Currently it is 1.0 for each
color channels, and this need to be adjusted. This will improve the
histogram.

For some reason I haven't been able to find out yet, changing gamma
values on genesys_devices.c:350 doesn't seem to change anything, no
matter if I set them to 1.5, 2, 3, 10 or 0.5, 0.2, etc.

Changing target_code makes a difference (just to make sure my
compilation environment is correct).

Hello again.

Considering I wasn't able to play with gamma values in code, I took
sample scan images with a calibration sheet for all combinations of:

target_code = { 0x, 0x1000, 0x2000, ..., 0xe000, 0xf000 } in
descending order
resolution = { 75, 100, 150, 300 }

I uploaded the images to the following URL:

http://blog.alvarezp.org/files/scan-hp3670/calibration/

The 300 dpi scans are bigger, of course, but I found different scan
results for different dpi. I wonder if this is just a cheap scanner.

Anyway, I find 0x4000 to have the best value to have no solarization but
the higher the dpi, the darker the images.

While trying to fix the images in Gimp with the Levels and Curves tool I
find that green is more sensible to low light so its 0 point should be
moved to about 15/255 to prevent the shadows to come out greenish. Also
it needs a gamma of about 1.20 to balance the midtones out.

Blue needs a gamma of about 0.80. Red is ok.

Hope this helps.

Hello,

many thanks for your work. Once I fixed an intermittent issue in 
LiDE 210 head parking, I'll use all these information to improve HP3670 
color scan quality.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] genesys Canon Lide 210 aspect-ratio-problem at 600 dpi

2014-06-01 Thread Stef

Hello,

I have fixed the issue of distorted pictures in grey mode for DPI 
= 600 dpi. I have also fixed 600 dpi accurracy problem. All these 
fixes are available in SANE's git source tree, with genesys backend 
internal build version 2504.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] HP Scanjet 3670 bad colors

2014-05-23 Thread Stef

On 20/05/2014 18:42, Octavio Alvarez wrote:

On 05/20/2014 12:27 AM, Octavio Alvarez wrote:

So far, I have repeated some of the tests with scanimage only and
target_code seems to be too high for my taste. 0x8000 seems like a lot
better value. I'm still testing though.

Hi, Stef. I have made some tests using scanimage only. I, effectively,
don't get the artifacts anymore. Thanks a lot! However, you were right,
the image quality has problems.

Using target_code = 0xe000, the currently coded value, I get a bluish
and saturated image. I tried lowering target_code across multiple values
down to 0x4000. The lower the value, the better the quality but the
darker the image.

At 0xb000, the horizontal extremes of the image are white balanced but
it is still noticeably bluish towards the center. This is, two small
vertical correctly white-balanced sections are noticed at the left and
right extremes.

For example, at 0x8000, the image is not saturated anymore, and the
image is way better white-balanced overall. However, the image is
noticeably darker image (75% of the histogram with typical white at 55%
luminosity). There is still a noticeably vertical stripe towards the
blue, a bit off the center towards the right.

At 0x4000, I don't get bluish stripes and perfect white-balance, but it
results in only half of the histogram.

I tried tweaking the o value (offset?) but I didn't seem to find any
kind of pattern, except that if I set it too high I get badly colored
stripes, so I just left them at their original values.

Thanks again.

Hello,

the offset shouldn't be touched. For some undocumented reason the 
ASIC needs it to have the shading coefficients match the right pixels.


target_code is giving the desired target value for white. Once this 
value is correct : not too low, and not too high to avoid 
solarization, you should turn to tuning gamma values. They are defined 
in genesys_devices.c for the CCD_HP3670. Currently it is 1.0 for each 
color channels, and this need to be adjusted. This will improve the 
histogram.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] HP Scanjet 3670 bad colors

2014-05-20 Thread Stef
Hello, 

Could you run a preview with debug traces enabled like you already done? Since 
the fix works great here, I'd like to check what is going wrong.

Regards,
Stef

Octavio Alvarez alvar...@alvarezp.ods.org a écrit :

On 05/12/2014 09:40 PM, Stef wrote:
 On 05/04/2014 03:10, Octavio Alvarez wrote:
 On 03/04/14 12:20, Stef wrote:
 On 01/04/2014 05:42, Octavio Alvarez wrote:
 On 03/31/2014 08:37 PM, Stef wrote:
   thanks for all the data. It'll take me a couple of days to
 analyze
 them and compare with the results of my hp3670.
 If you also have one and works then we may have different versions of
 the 3670. Mine has regulatory model GRLYB-0306.

  Hello,

  I have reproduced the bug with my scanner. The calibration needs to
 be tuned or reworked. I'll have a fixed version in a few days.
 Great to know! Thanks in advance.

 Octavio.

 Hello,
 
 I have just pushed the fix in git. However I have some doubt about
 scan quality. And I'm afraid that my HP3670 is failing. Please let me
 know if scan quality is OK.

Hi, Stef.

I appreciate you working on this. I just tested the latest commit. I'm
sorry to say that changes in genesys files sources did not improve scan
results. Color is still incorrect in the same way as before.

I made sure I used the most recent commit isolated from the install from
my system. I used xscanimage under ~/sane-install/bin.

[Mon May 19 21:38:31 -0700 -- alvarezp@laptop:~/sane-install]
$ ls -l $(find -iname '*genesys*')
-rw-r--r-- 1 alvarezp alvarezp1937 Mar 30 15:03
./etc/sane.d/genesys.conf
-rwxr-xr-x 1 alvarezp alvarezp 991 May 19 21:31
./lib/sane/libsane-genesys.la
lrwxrwxrwx 1 alvarezp alvarezp  25 May 19 21:31
./lib/sane/libsane-genesys.so - libsane-genesys.so.1.0.25
lrwxrwxrwx 1 alvarezp alvarezp  25 May 19 21:31
./lib/sane/libsane-genesys.so.1 - libsane-genesys.so.1.0.25
-rwxr-xr-x 1 alvarezp alvarezp 1123367 Mar 30 21:13
./lib/sane/libsane-genesys.so.1.0.23
-rwxr-xr-x 1 alvarezp alvarezp 1325444 May 19 21:31
./lib/sane/libsane-genesys.so.1.0.25
-rw-r--r-- 1 alvarezp alvarezp   10854 May 19 21:31
./share/man/man5/sane-genesys.5

[Mon May 19 21:38:35 -0700 -- alvarezp@laptop:~/sane-install]
$ cd ../src/sane/sane-backends/

[Mon May 19 21:39:33 -0700 -- alvarezp@laptop:~/src/sane/sane-backends
(master)]
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean

[Mon May 19 21:40:18 -0700 -- alvarezp@laptop:~/src/sane/sane-backends
(master)]
$ git log HEAD^..HEAD
commit 18de732bbf80e35ad9247f5668da84e14e76fa8e
Author: Rolf Bensch roben-gu...@alioth.debian.org
Date:   Fri May 16 15:41:18 2014 +0200

changelog for recent work


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] HP Scanjet 3670 bad colors

2014-05-12 Thread Stef

On 05/04/2014 03:10, Octavio Alvarez wrote:

On 03/04/14 12:20, Stef wrote:

On 01/04/2014 05:42, Octavio Alvarez wrote:

On 03/31/2014 08:37 PM, Stef wrote:

  thanks for all the data. It'll take me a couple of days to analyze
them and compare with the results of my hp3670.

If you also have one and works then we may have different versions of
the 3670. Mine has regulatory model GRLYB-0306.


 Hello,

 I have reproduced the bug with my scanner. The calibration needs to
be tuned or reworked. I'll have a fixed version in a few days.

Great to know! Thanks in advance.

Octavio.


Hello,

I have just pushed the fix in git. However I have some doubt about 
scan quality. And I'm afraid that my HP3670 is failing. Please let me 
know if scan quality is OK.


Regards,
Stef

--
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] genesys Canon Lide 210 aspect-ratio-problem at 600 dpi

2014-05-05 Thread Stef
On 25/04/2014 02:55, Andrew Kanaber wrote:
 I hit the same problem with a Canon LiDE 110. I tried measuring the distortion
 by scanning a sheet of graph paper in various modes.

 With sane 1.0.24 in 600dpi lineart and gray modes the scan is stretched
 vertically by about 30%. Color mode scans are actually also stretched at
 600dpi, but much less noticeably by about 2%. The stretching is still visible
 though if you compare the scanned images side-by-side. With version 1.0.22 the
 lineart and gray scans are correct at 600dpi but the 2%-ish stretching is
 still present in 600dpi color mode.

 In case it helps I've put some of the scans up at
 http://www.chiark.greenend.org.uk/~akanaber/lide110/

 Let me know if there's something else I can do that might help,

 Andrew

 M G Berberich wrote:
 Hello,

 Canon LiDE 210 with sane-backends 1.0.24 (libsane:amd64 1.0.24-1.1+b1
 from debian testing) has problems with 600 dpi gray and lineart.

 In 600 dpi gray and lineart the scan is partial and aspect-ratio is
 not correct. Vertically only about ? of the area is scanned and then
 scaled to the area, horizontally all is fine. (So probably the driver
 sets the wrong scanline-skip (to small)).

 This worked in older versions, at least 1.0.22.

 600 dpi Color-scanning works fine, so do preview, 300dpi and 1200 dpi
 in all modes.

 2400 dpi and 4800 dpi do not work at all, but never did.

  MfG
  bmg
 Hello,

 the vertical resolution is given by the motor speed which is 
eventually an int. So rounding errors may give ~2% distortion:
 target=((exposure * dpi) / base_dpi)step_type;
 Maybe by decreasing or increasing slightly exposure time rounding 
errors could be mitigated, but changing exposure may raise other 
problems. If the windows driver can do it, I'll manage to find something.

 I'll check how the gray scan beahves. The change between 1.022 and 
1.0.24 is to use the LINESEL function when we try to scan below the 
minimal scanning speed of the motor. This should affect scans below 600 
dpi, but not 600 dpi which is the minimal scanning speed.

 2400 and 4800 dpi scans works on my LiDE 210. So I'd need some logs 
or better information on what is not working for you.

 I'm currently working on shading calibration problems for gl646 
based scanners (HP2400 and HP3670). I'll look into this issues when I 
have finished it. If you have time for it, you can open a bug in the bug 
tracker (https://alioth.debian.org/tracker/?group_id=30186) and assigned 
it to me.

Regards,
 Stef




[sane-devel] Medion Scanner MD5345 under Ubuntu 14.04. LTS 64 bit

2014-05-05 Thread Stef
On 05/05/2014 10:58, Galliano wrote:
 Hello,

 I hope you can help me, I already posted my issue at 
 http://forum.ubuntuusers.de/topic/medion-scanner-md-5345-mit-ubuntu-14-04-64-bit/
  
 , but unfortunately nobody seems to be able to helpI hope you can.

 I installed Xsane on my pc, I can start the scan application, but when 
 I click preview or scan the application closes/crashes.

 When I enter lsusb in Terminal I get this list and I understand from 
 line 5 that the scanner is recognised:
 Bus 001 Device 003: ID 0bda:8172 Realtek Semiconductor Corp.
   RTL8191SU 802.11n WLAN Adapter
 Bus 001 Device 004: ID 04e8:3296 Samsung Electronics Co., Ltd ML-2580N Mono 
 Laser Printer
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
 Bus 002 Device 003: ID 0461:0377 Primax Electronics, Ltd Medion MD 5345 
 Scanner
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

 Thank you very much in advance for any support.







 Hello,

 please provide a debug log. For instance run xsane with the 
following commands:
export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL646=255
xsane xl.log 21

then send the xl.log file that will be created (zipped if is too big). 
Please also check machine logs with the 'demesg' command.

Regards,
  Stef
-- next part --
An HTML attachment was scrubbed...
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20140505/1d37c7a4/attachment.html


[sane-devel] HP Scanjet 3670 bad colors

2014-04-03 Thread Stef
On 01/04/2014 05:42, Octavio Alvarez wrote:
 On 03/31/2014 08:37 PM, Stef wrote:
  thanks for all the data. It'll take me a couple of days to analyze
 them and compare with the results of my hp3670.
 If you also have one and works then we may have different versions of
 the 3670. Mine has regulatory model GRLYB-0306.

 Hello,

 I have reproduced the bug with my scanner. The calibration needs to 
be tuned or reworked. I'll have a fixed version in a few days.

Regards,
 Stef



[sane-devel] Header files required to build backends

2014-04-03 Thread Stef
On 03/04/2014 14:27, m. allan noah wrote:
 On Thu, Apr 3, 2014 at 8:10 AM, John Paul Adrian Glaubitz
 glaubitz at physik.fu-berlin.de wrote:
 On 04/03/2014 01:59 PM, John Paul Adrian Glaubitz wrote:
 On 04/03/2014 01:23 PM, m. allan noah wrote:
 Which header files do they need?

 Excerpt from the source code [1]:

 Ok, I figured out that sane-backends has these additional headers
 in EXTRA_DIST in include/Makefile.am.

 Does this mean that sane-backends is not designed to allow backends
 to be built externally? Thus, if I want to build the Canon drivers,
 I will have to have the full sources of sane-backends at hand?

 That is exactly what it means. Those interfaces are not stable and not
 considered part of the 'interface' of sane. In my opinion, backends
 that use them but include closed source components are skirting the
 edges of their legal rights, by denying you yours.

 allan

 Hello,

 I second that. There is a different copyright notice for the public 
API and for the private internal includes.

Regards,
 Stef



[sane-devel] HP Scanjet 3670 bad colors

2014-04-01 Thread Stef
On 31/03/2014 18:14, Octavio Alvarez wrote:
 On 03/31/2014 07:34 AM, Stef wrote:
  the problem is coming from incorrect calibration by the backend.
 Gain is too high. Could you please run SANE 1.0.24 backend version with
 traces enabled, and send me log file and *.pnm files created during
 calibration ?
 In a command shell type:
 export SANE_DEBUG_GENESYS=255
 export SANE_DEBUG_GENESYS_LOW=255
 export SANE_DEBUG_GENESYS_GL646=255
 export SANE_DEBUG_GENESYS_GL841=255
 scanimage -d genesys --resolution 75 --preview --mode Color
 2preview.log preview.pnm

 I took some samples, even one with --resolution 150 and uploaded them here:

 http://blog.alvarezp.org/files/scan-hp3670/hp-sj3670-samples-1.tar.gz

 Some of those came out ok, some didn't. Only --resolution 150 threw out
 a full set of pnm calibration files. --resolution 175 only threw out
 warmup*.pnm files.



 Hello,

 thanks for all the data. It'll take me a couple of days to analyze 
them and compare with the results of my hp3670.

Regards,
 Stef



[sane-devel] HP Scanjet 3670 bad colors

2014-03-31 Thread Stef
On 31/03/2014 15:51, Octavio Alvarez wrote:
 Hi.

 I'm trying to get my HP Scanjet 3670 under Linux. The scanner works (it
 scans and all) but the scan has some color distortion.

 I confirmed the scanner works: here is a comparison of a section of a
 scanned image in both, Windows and Linux:

 http://blog.alvarezp.org/files/scan-hp3670/scan-hp3670-win7.jpg
 http://blog.alvarezp.org/files/scan-hp3670/scan-hp3670-linux.png

 The scan is a black and white section of a creased document.

 Even the problem itself is very unstable. Sometimes the whole page is
 distorted, sometimes only gray shades are. *Once* in my 40-like attempts
 the output was acceptable but I could not reproduce this success case. I
 noticed, though that solid strong colors are usually not distorted.

 I wanted to find out if this was an introduced bug, but I could only
 compile as back as 1.0.22 + 2 commits and it failed too. Before that,
 there is a V4L compilation blocker that prevented me from going further
 back.

 I tried looking at the code but I realized I understand very little
 (near to nothing) about how a scanner works.

 Is this a SANE bug? What can be done to make it properly work?

 Thanks.

 Hello,

 the problem is coming from incorrect calibration by the backend.  
Gain is too high. Could you please run SANE 1.0.24 backend version with 
traces enabled, and send me log file and *.pnm files created during 
calibration ?
In a command shell type:
export SANE_DEBUG_GENESYS=255
export SANE_DEBUG_GENESYS_LOW=255
export SANE_DEBUG_GENESYS_GL646=255
export SANE_DEBUG_GENESYS_GL841=255
scanimage -d genesys --resolution 75 --preview --mode Color 
2preview.log preview.pnm


Regards,
 Stef






  1   2   3   4   5   6   7   8   9   10   >