[sane-devel] HP ScanJet 2400

2007-07-17 Thread Pavel Železný
I'm sorry for my bad english.

I test to install the USB scaner HP ScanJet 2400 on my Gentoo notebook with 
latest sane, xsane, etc. applications a lib

When i try scaneimage --device-name genesys:libusb:001:002 --resolution 300 
--format tiif  ./test.tiff, scaner succesfully start (lamp in scanner 
start shinning) a move a little bit (2mm) and it's  all.

About half a minute i get an error:
scanimage: sane_start: Error during device I/O

It's all.

Have a nice day and many thanks for your work.
Pavel ?elezn? - Czech Republic
-- next part --
A non-text attachment was scrubbed...
Name: zelezny.vcf
Type: text/x-vcard
Size: 404 bytes
Desc: not available
Url : 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20070717/d217ee2e/attachment.vcf
 


[sane-devel] HP ScanJet 2400

2007-07-17 Thread David Goodenough
On Tuesday 17 July 2007, Pavel ?elezn? wrote:
 I'm sorry for my bad english.

 I test to install the USB scaner HP ScanJet 2400 on my Gentoo notebook with
 latest sane, xsane, etc. applications a lib

 When i try scaneimage --device-name genesys:libusb:001:002 --resolution
 300 --format tiif  ./test.tiff, scaner succesfully start (lamp in scanner
 start shinning) a move a little bit (2mm) and it's  all.

 About half a minute i get an error:
 scanimage: sane_start: Error during device I/O

 It's all.

 Have a nice day and many thanks for your work.
 Pavel ?elezn? - Czech Republic

This looks like the problem that many are having with Plustek scanners.
Are you using a new kernel?  Is your kernel built with CONFIG_USB_SUSPEND?
If you are using Debian sid then recent kernels certainly are, and the 
same goes for recent Ubuntu kernels.  This requires a fix in libusb (which
is not yet available).  

The only guaranteed cure is to turn off CONFIG_USB_SUSPEND (or use a kernel
before it was introduced), but if you can get a parameter to the usbcore
module (it can be specifed on the linux command line from Lilo or Grub) set
usbcore.autosuspend=0 and this might help. 

David



[sane-devel] SANE 1.0.18 and the NSLU2 running OpenWRT

2007-07-17 Thread David Solomon
OK.  I have it scanning, but it looks as though it is failing to close
the scanner.  Sane completes, but the scanner never ejects the paper
and just freezes.  I need to reset the scanner to scan another image.
Here is the end of the output:

[sanei_usb] sanei_usb_read_bulk: wanted 40800 bytes, got 40800 bytes
[avision] read 40800 bytes

[avision] avision_usb_status: timeout 1, 1 retries
[avision] == (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] : 02

[sanei_usb] sanei_usb_read_bulk: wanted 2 bytes, got 1 bytes
[avision] == (bulk read) got: 1, status: 2
[avision] avision_usb_status: Needs to request sense!
[avision] Error during status read!
[avision] === Try to request sense ===
[avision] try to write 12 bytes
[sanei_usb] sanei_usb_write_bulk: trying to write 12 bytes
[sanei_usb] : 03 00 00 00 16 00 00 00 00 00 00 00


[sanei_usb] sanei_usb_write_bulk: wanted 12 bytes, wrote 12 bytes
[avision] wrote 12 bytes

[avision] try to read 22 bytes sense data
[sanei_usb] sanei_usb_read_bulk: trying to read 22 bytes
[sanei_usb] : FF 00 03 00 00 95 6A 0E 00 00 00 00 80 04 00 00
..j.

[sanei_usb] 0010: 00 00 00 00 00 00


[sanei_usb] sanei_usb_read_bulk: wanted 22 bytes, got 22 bytes
[avision] read 22 bytes sense data

[avision] avision_usb_status: timeout 1, 1 retries
[avision] == (bulk read) going down ...
[sanei_usb] sanei_usb_read_bulk: trying to read 2 bytes
[sanei_usb] : 00

[sanei_usb] sanei_usb_read_bulk: wanted 2 bytes, got 1 bytes
[avision] == (bulk read) got: 1, status: 0

[avision] sense_handler:
[avision] sense_handler: data:
[avision]   [0] b 377o 255d ffx

[avision]   [1] b   0o   0d  0x

[avision]   [2] 0011b   3o   3d  3x

[avision]   [3] b   0o   0d  0x
[avision]   [4] b   0o   0d  0x

[avision]   [5] 10010101b 225o 149d 95x
[avision]   [6] 01101010b 152o 106d 6ax
[avision]   [7] 1110b  16o  14d  ex

[avision]   [8] b   0o   0d  0x
[avision]   [9] b   0o   0d  0x
[avision]   [10] b   0o   0d  0x
[avision]   [11] b   0o   0d  0x

[avision]   [12] 1000b 200o 128d 80x
[avision]   [13] 0100b   4o   4d  4x

[avision]   [14] b   0o   0d  0x
[avision]   [15] b   0o   0d  0x

[avision]   [16] b   0o   0d  0x
[avision]   [17] b   0o   0d  0x

[avision]   [18] b   0o   0d  0x
[avision]   [19] b   0o   0d  0x

[avision]   [20] b   0o   0d  0x
[avision]   [21] b   0o   0d  0x
[avision] sense_handler: sense code: MEDIUM ERROR (mostly ADF)
[avision] sense_handler: scan has not yet been completed
[avision] sense_handler: correct logical length
[avision] sense_handler: sense code: ADF paper end
[avision] reader_process: read_data failed due to EOF
[avision] reader_process: read_data failed with status: 5
[avision] reader_process: stripe filled: 40800
[avision] reader_process: useful_bytes 40800
[avision] sane_read: got 32768 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 8032 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] reader_process: end of iteration
[avision] reader_process: i/o loop finished
[avision] reader_process: padding with white data
[avision] reader_process: padding line 800 - 2137
[avision] sane_read: got 3825 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 1275 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 3825 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 1275 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 3825 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 1275 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 3825 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 1275 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 3825 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768

[avision] sane_read: got 1275 bytes
[dll] sane_read(handle=0x3d7b8,data=0x40788,maxlen=32768,lenp=0xbef52d60)

[avision] sane_read: max_len: 32768


[sane-devel] SANE 1.0.18 and the NSLU2 running OpenWRT

2007-07-17 Thread David Solomon
Here is my modified avision.h file:

/***
 * SANE - Scanner Access Now Easy.

  avision.h

  This file is part of the SANE package.

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  MA 02111-1307, USA.

  As a special exception, the authors of SANE give permission for
  additional uses of the libraries contained in this release of SANE.

  The exception is that, if you link a SANE library with other files
  to produce an executable, this does not by itself cause the
  resulting executable to be covered by the GNU General Public
  License.  Your use of that executable is in no way restricted on
  account of linking the SANE library code into it.

  This exception does not, however, invalidate any other reasons why
  the executable file might be covered by the GNU General Public
  License.

  If you submit changes to SANE to the maintainers to be included in
  a subsequent release, you agree by submitting the changes that
  those changes may be distributed with this exception intact.

  *

  This backend is based upon the Tamarack backend and adapted to the Avision
  scanners by Renebe and Meino Cramer.

  Check the avision.c file for detailed copyright and change-log
  information.

/

#ifndef avision_h
#define avision_h

#include sys/types.h

#ifndef PATH_MAX
# define PATH_MAX 1024
#endif


#define PACKED8  __attribute__ ((packed,aligned(1)))

#define PACKED16 __attribute__ ((packed,aligned(2)))


typedef enum Avision_ConnectionType {
 AV_SCSI,
 AV_USB
} Avision_ConnectionType;

/* information needed for device access */
typedef struct Avision_Connection {
 Avision_ConnectionType connection_type;
 int scsi_fd;  /* SCSI filedescriptor */
 SANE_Int usb_dn;  /* USB (libusb or scanner.c) device number */
 enum {
   AVISION_USB_UNTESTED_STATUS, /* status type untested */
   AVISION_USB_INT_STATUS,  /* interrupt endp. (USB 1.x device) status */
   AVISION_USB_BULK_STATUS  /* bulk endp. (USB 2.0 device) status */
 } usb_status;

} PACKED8 Avision_Connection;

typedef struct Avision_HWEntry {
 const char* scsi_mfg;
 const char* scsi_model;

 int   usb_vendor;
 int   usb_product;

 const char* real_mfg;
 const char* real_model;

 /* feature overwrites */
 enum {
   /* force no calibration */
   AV_NO_CALIB = (1),

   /* force all in one command calibration */
   AV_ONE_CALIB_CMD = (11),

   /* no gamma table */
   AV_NO_GAMMA = (12),

   /* light check is bogus */
   AV_LIGHT_CHECK_BOGUS = (13),

   /* do not use line packing even if line_difference */
   AV_NO_LINE_DIFFERENCE = (14),

   /* if the scan area needs to be forced to A3 */
   AV_FORCE_A3 = (15),

   /* if the scan area and resolution needs to be forced for films */
   AV_FORCE_FILM = (16),

   /* some (?) USB devices like firmware */
   AV_FIRMWARE = (17),

   /* is film scanner - no detection yet */
   AV_FILMSCANNER = (18),

   /* fujitsu adaption */
   AV_FUJITSU = (19),

   /* gray calibration data has to be uploaded on the blue channel ... ? */
   AV_GRAY_CALIB_BLUE = (110),

   /* Interrupt endpoint button readout (so far AV220) */
   AV_INT_BUTTON = (111),

   /* send acceleration table ... */
   AV_ACCEL_TABLE = (112),

   /* non-interlaced scanns up to 300 dpi (AV32xx / AV83xx) */
   AV_NON_INTERLACED_DUPLEX_300 = (113),

   /* do not send 3x3 matrix */
   AV_NO_MATRIX = (114),

   /* force channel-by-channel calibration */
   AV_MULTI_CALIB_CMD = (115),

   /* non color scans are faster with a filter applied (AV32xx) */
   AV_FASTER_WITH_FILTER = (116),

   /* interlaced data with 1 line distance */
   AV_2ND_LINE_INTERLACED = (117),

   /* does not keep the window though it advertices so */
   AV_DOES_NOT_KEEP_WINDOW = (118),

   /* advertises ADF is BGR order, but isn't (or vice versa) */
   AV_ADF_BGR_ORDER_INVERT = (118)

   /* maybe more ...*/
 } feature_type;

} PACKED16 Avision_HWEntry;

typedef enum {
 AV_ASIC_Cx = 0,
 AV_ASIC_C1 = 1,
 AV_ASIC_W1 = 2,
 AV_ASIC_C2 = 3,
 AV_ASIC_C5 = 5,
 AV_ASIC_C6 = 6,
 AV_ASIC_OA980 = 128,
 AV_ASIC_OA982 = 129
} asic_type;

typedef enum {
 AV_THRESHOLDED,
 AV_DITHERED,
 AV_GRAYSCALE,   /* all gray needs to be 

[sane-devel] SANE 1.0.18 and the NSLU2 running OpenWRT

2007-07-17 Thread David Solomon
I got it working.  I needed to use PACKED8 on the structures in the
avision.c file also.  Moved all of the Avision device structures to
PACKED16.

David Solomon

On 7/16/07, m. allan noah kitno455 at gmail.com wrote:
 this webpage is all i know about it (but google will give more):

 http://sig9.com/articles/gcc-packed-structures

 allan

 On 7/16/07, David Solomon lorddavon at gmail.com wrote:
  Allan,
 
  Do I add them to all of the command structs or just the Avision_Connection?
 
  David Solomon
 
  On 7/16/07, m. allan noah kitno455 at gmail.com wrote:
   On 7/16/07, David Solomon lorddavon at gmail.com wrote:
I think you are right.  I am trying some pragma pack statments to see
if they will help.  I looked at some of the plustek_usb header changes
and found that they used: #define PACKED8  __attribute__
((packed,aligned(1))) and #define PACKED16 __attribute__
((packed,aligned(2))) statements to pack the structures.  I may have
to use these myself, but I am unsure where to add (possible in the
sanei_usb_write_bulk?).
   
Thank you for the help.  I am going to get up-to-my-elbows in code now. 
 ;-)
   
  
   no- you want to add them to the command structs in avision.h
  
   allan
  
   --
   The truth is an offense, but not a sin
  
 


 --
 The truth is an offense, but not a sin




[sane-devel] HP ScanJet 2400

2007-07-17 Thread Gerald Murray
Known problem, same result.  The genesys646 backend has never been working
as far as I know.  This backend should be considered experimental for  
the gl646
scanner.

Gerald





[sane-devel] Epson CX6600

2007-07-17 Thread russbucket
On Tuesday July 17 2007 16:33, Harry Mills wrote:
 Hi

 On the SANE website the CX6600 is listed on
 http://www.sane-project.org/sane-backends.html#S-EPSON with the
 incorrect USB ID of 0x04b8/0x0805 which is the USB ID for the CX6400.
 The correct USB ID is 0x04b8/0x0813 according to my CX6600.

 This error is also causing problems with udev scripts as udev (on Ubuntu
 at least) does not recognise the CX6600 unless you manually add an entry
 for it with the correct Product ID (0x0813). Is it possible to correct
 this or do I need to contact the udev group or even just the Ubuntu
 maintainers for the udev packages?

 --
 Regards,
 Harry Mills

 http://hjmills.co.uk
  _
 / Repartee is something we think of   \

 | twenty-four hours too late. -- Mark |

 \ Twain   /
  -
 \   ^__^
  \  (oo)\___
 (__)\   )\/\

 ||w |
There are apparently two versions of the CX6600. I have one with the 813 also. 
Gutenprint has PPDs for both. Sane has also been updated to handle both. You 
don't say which OS version. Which Sane version.
-- 
Russ
Linux register user 441463