[sane-devel] CX5200 problem ...[debianbugs@saahbs.net: recompiled libsane with debugging symbols and stepped through the code...]

Michal Sabala debianbugs at saahbs.net
Tue Dec 19 17:14:27 CET 2006


Hello Sane-devel,

I have an Epson CX5200 MFP. Upon upgrading to libsane 1.0.18 and libusb
0.1.12, I cannot use the scanner.

I traced the problem to epson.c's get_identity2_information() where it
fails due to an "incorrect" value in the return buffer. My cx5200, along
other users cx5200s, has 0xb0 (176) in buf[0] which has the most
significant bit (0x80) set.

Since this scanner worked with libsane 1.0.17 and libusb 0.1.10, and the
check for the most significant bit was always done, I suspect that
libusb now handles MFP devices differently. Attached email has a simple
patch which allows CX5200 to work without problems.

Patched libsane works correctly and with the same extents, color depths
and dpi options which were available with libsane 1.0.17 and libusb
0.1.10.

Attached is a full debug output of scanimage -L with the following env:
  SANE_DEBUG_DLL=256
  SANE_DEBUG_SANEI_USB=256
  SANE_DEBUG_EPSON=256

Please note that the first byte of the 88 byte buffer contains (0xb0)
which was rejected by get_identity2_information() without my patch.

Thanks, Michal

-- 
Michal "Saahbs" Sabala
-------------- next part --------------
An embedded message was scrubbed...
From: Michal Sabala <debianbugs at saahbs.net>
Subject: recompiled libsane with debugging symbols and stepped through the
	code...
Date: Mon, 18 Dec 2006 12:16:26 -0600
Size: 3087
Url: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20061219/64e5933f/attachment.mht
-------------- next part --------------
An embedded message was scrubbed...
From: Michal Sabala <debianbugs at saahbs.net>
Subject: Re: Bug#399119: recompiled libsane with debugging symbols and stepped
	through the code...
Date: Tue, 19 Dec 2006 09:08:52 -0600
Size: 2926
Url: http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20061219/64e5933f/attachment-0001.mht
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patched-libsane-full-debug.log.gz
Type: application/octet-stream
Size: 3345 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20061219/64e5933f/patched-libsane-full-debug.log.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sane-backends-1.0.18-epson_cx5200.patch
Type: text/x-diff
Size: 564 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20061219/64e5933f/sane-backends-1.0.18-epson_cx5200.bin


More information about the sane-devel mailing list