Your message dated Tue, 22 Feb 2011 22:24:12 +0000
with message-id <[email protected]>
and subject line Bug#614312: fixed in scanbuttond 0.2.3.cvs20090713-4
has caused the Debian Bug report #614312,
regarding scanbuttond: Does not support Fujitsu ScanSnap S1500.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
614312: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614312
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: scanbuttond
Version: 0.2.3.cvs20090713-2
Severity: wishlist
Tags: upstream patch

The scansnap driver does not support the ScanSnap S1500.  Looking at the
source, it looks like the scansnap backend is simply a copy of the Epson
backend and does not actually support Fujitsu scanners.

The attached patch is a crude attempt to add support for the button on the
S1500.  I used usbmon to reverse-engineer the USB protocol.

The patched daemon seems to work but there are a few problems:

>From the kernel log:

usb 6-2: usbfs: process 17746 (scanbuttond) did not claim interface 0 before use
scanbuttond[17627] trap invalid opcode ip:7ffbaf8ac278 sp:7fffb147fb18 error:0 
in libscanbtnd-backend_snapscan.so.1.0.0[7ffbaf8ac000+2000]

>From system log:

scanbuttond: libusbi: could not claim interface for device 006:005. (EBUSY)
scanbuttond: scanbtnd_open failed, error code: -16

I think the second error occurs when a scan is in progress.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-rc4 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages scanbuttond depends on:
ii  libc6                        2.11.2-7    Embedded GNU C Library: Shared lib
ii  libsane                      1.0.21-7    API library for scanners
ii  libusb-0.1-4                 2:0.1.12-16 userspace USB programming library

Versions of packages scanbuttond recommends:
ii  sane-utils                    1.0.21-7   API library for scanners -- utilit

scanbuttond suggests no packages.

-- Configuration Files:
/etc/default/scanbuttond changed [not included]
/etc/scanbuttond/buttonpressed.sh.example [Errno 2] No such file or directory: 
u'/etc/scanbuttond/buttonpressed.sh.example'

-- no debconf information
diff -u -ur scanbuttond-0.2.3.cvs20090713/backends/snapscan.c scanbuttond-0.2.3.cvs20090713.nas/backends/snapscan.c
--- scanbuttond-0.2.3.cvs20090713/backends/snapscan.c	2007-02-11 18:26:45.000000000 -0600
+++ scanbuttond-0.2.3.cvs20090713.nas/backends/snapscan.c	2011-02-20 16:53:17.374669705 -0600
@@ -29,13 +29,14 @@
 
 static char* backend_name = "Snapscan USB";
 
-#define NUM_SUPPORTED_USB_DEVICES 4
+#define NUM_SUPPORTED_USB_DEVICES 5
 
 static int supported_usb_devices[NUM_SUPPORTED_USB_DEVICES][3] = {
 	{ 0x04b8, 0x0121, 4 },	// Epson Perfection 2480
 	{ 0x04b8, 0x011f, 4 },	// Epson Perfection 1670
 	{ 0x04b8, 0x0122, 4 },	// Epson Perfection 3490
-	{ 0x04b8, 0x0120, 4 }   // Epson Perfection 1270
+	{ 0x04b8, 0x0120, 4 },  // Epson Perfection 1270
+	{ 0x04c5, 0x11a2, 1 },
 };
 
 // TODO: check if this backend really works on the Epson 2580 too...
@@ -43,7 +44,8 @@
 	   { "Epson", "Perfection 2480 / 2580" },
 	   { "Epson", "Perfection 1670" },
 	   { "Epson", "Perfection 3490 / 3590" },
-	   { "Epson", "Perfection 1270" }
+	   { "Epson", "Perfection 1270" },
+	   { "Fujitsu", "ScanSnap S1500" },
 };
 
 
@@ -227,7 +229,16 @@
 	}
 }
 
-
+static unsigned char CMD[] = {
+	0x43, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0xc2, 
+	0x00, 0x00, 0x00, 0x00, 
+	0x00, 0x00, 0x00, 0x0a, 
+	0x00, 0x00, 0x00,
+	};
 
 int scanbtnd_get_button(scanner_t* scanner)
 {
@@ -235,59 +246,33 @@
 	int num_bytes;
 	int button = 0;
 
-	bytes[0] = 0x03;
-	bytes[1] = 0x00;
-	bytes[2] = 0x00;
-	bytes[3] = 0x00;
-	bytes[4] = 0x14;
-	bytes[5] = 0x00;
-
 	if (!scanner->is_open)
 		return -EINVAL;
 
-	num_bytes = snapscan_write(scanner, (void*)bytes, 6);
-	if (num_bytes != 6) {
+	num_bytes = snapscan_write(scanner, (void*)CMD, sizeof CMD);
+	if (num_bytes != (sizeof CMD)) {
 		syslog(LOG_WARNING, "snapscan-backend: communication error: "
-			"write length:%d (expected:%d)", num_bytes, 6);
+			"write length:%d (expected:%d)", num_bytes, sizeof CMD);
 		snapscan_flush(scanner);
 		return 0;
 	}
 
-	num_bytes = snapscan_read(scanner, (void*)bytes, 8);
-	if (num_bytes != 8 || bytes[0] != 0xF9) {
+	num_bytes = snapscan_read(scanner, (void*)bytes, 10);
+	if (num_bytes != 10) {
 		syslog(LOG_WARNING, "snapscan-backend: communication error: "
-			"read length:%d (expected:%d), "
-			"byte[0]:%x (expected:%x)", 
-			num_bytes, 8, bytes[0], 0xF9);
+			"read length:%d (expected:%d)",
+			num_bytes, sizeof CMD);
 		snapscan_flush(scanner);
 		return 0;
 	}
-
-	num_bytes = snapscan_read(scanner, (void*)bytes, 20);
-	if (num_bytes != 20 || bytes[0] != 0xF0) {
-		syslog(LOG_WARNING, "snapscan-backend: communication error: "
-			"read length:%d (expected:%d), "
-			"byte[0]:%x (expected:%x)", 
-			num_bytes, 20, bytes[0], 0xF0);
-		snapscan_flush(scanner); 
-		return 0;
-	}
-	if (bytes[2] == 0x06) {
-		switch (bytes[18] & 0xF0) {
-			case 0x10: button = 1; break;
-			case 0x20: button = 2; break;
-			case 0x40: button = 3; break;
-			case 0x80: button = 4; break;
-			default: button = 0; break;
-		}
+	if (bytes[4] == 0x01) {
+		button = 1;
 	}
-
-	num_bytes = snapscan_read(scanner, (void*)bytes, 8);
-	if (num_bytes != 8 || bytes[0] != 0xFB) {
+	num_bytes = snapscan_read(scanner, (void*)bytes, 13);
+	if (num_bytes != 13) {
 		syslog(LOG_WARNING, "snapscan-backend: communication error: "
-			"read length:%d (expected:%d), "
-			"byte[0]:%x (expected:%x)", 
-			num_bytes, 8, bytes[0], 0xFB);
+			"read length:%d (expected:%d)",
+			num_bytes, 13);
 		snapscan_flush(scanner);
 		return 0;
 	}

--- End Message ---
--- Begin Message ---
Source: scanbuttond
Source-Version: 0.2.3.cvs20090713-4

We believe that the bug you reported is fixed in the latest version of
scanbuttond, which is due to be installed in the Debian FTP archive:

scanbuttond_0.2.3.cvs20090713-4.debian.tar.gz
  to main/s/scanbuttond/scanbuttond_0.2.3.cvs20090713-4.debian.tar.gz
scanbuttond_0.2.3.cvs20090713-4.dsc
  to main/s/scanbuttond/scanbuttond_0.2.3.cvs20090713-4.dsc
scanbuttond_0.2.3.cvs20090713-4_amd64.deb
  to main/s/scanbuttond/scanbuttond_0.2.3.cvs20090713-4_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Milan Zamazal <[email protected]> (supplier of updated scanbuttond package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 22 Feb 2011 21:53:06 +0100
Source: scanbuttond
Binary: scanbuttond
Architecture: source amd64
Version: 0.2.3.cvs20090713-4
Distribution: unstable
Urgency: low
Maintainer: Milan Zamazal <[email protected]>
Changed-By: Milan Zamazal <[email protected]>
Description: 
 scanbuttond - Scanner button daemon
Closes: 614312
Changes: 
 scanbuttond (0.2.3.cvs20090713-4) unstable; urgency=low
 .
   * snapscan-s1500.patch by Neil Schemenauer <[email protected]> added;
     closes: #614312.
Checksums-Sha1: 
 7dacd371c3ee3834a19c78f9d42c3744b89d6447 1123 
scanbuttond_0.2.3.cvs20090713-4.dsc
 6a8c15363c02d2d17022e49e6c371ac67bf95c95 8403 
scanbuttond_0.2.3.cvs20090713-4.debian.tar.gz
 daac7a038dc4ecf5023dfc64ced3f6dfaafeac0e 51000 
scanbuttond_0.2.3.cvs20090713-4_amd64.deb
Checksums-Sha256: 
 e94c5768b10142e5662530b24c802ffd1c3713fbf53e1fb69fc644a0bf391734 1123 
scanbuttond_0.2.3.cvs20090713-4.dsc
 fbc6c865ba5ae723488da73b5ca1e3ef39fd6b20acb9e6b08175befe6b4d5bcd 8403 
scanbuttond_0.2.3.cvs20090713-4.debian.tar.gz
 d9fce62f6fe100f006661ee742c1e60c27f8be5014595f63ac8d926ce9dddddc 51000 
scanbuttond_0.2.3.cvs20090713-4_amd64.deb
Files: 
 81408ee3924e12ff1fd11d20e182ecb2 1123 misc extra 
scanbuttond_0.2.3.cvs20090713-4.dsc
 23e6a34ab7bb32df1a39c1f41a56b5ce 8403 misc extra 
scanbuttond_0.2.3.cvs20090713-4.debian.tar.gz
 130553a410c5909c4e8a3bf1c4f90910 51000 misc extra 
scanbuttond_0.2.3.cvs20090713-4_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1kJXsACgkQkSkk/j3Cm0EbOgCcC12vlDt/oaPb7XOrWjD0wHwo
gmAAnjgJcX/9lOiAqFAA1h+UTci29w8N
=EC+H
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to