[sane-devel] Umax 2200 (USB) failing

2003-12-31 Thread Henning Meier-Geinitz
Hi,

On Tue, Dec 30, 2003 at 06:10:44PM -0500, Charles Sprickman wrote:
  The UMAX backend has not been converted to sanei_thread yet and fork()
  doesn't work correctly on MacOS X. So you won't have luck with SANE
  10.13. But if you look at our bug-tracking system, there is a patch
  that may work (untested):
 
  https://alioth.debian.org/tracker/index.php?func=detailaid=300397group_id=1308atid=410366
 
 Are there any FAQs floating around on building sane and libusb(?) under
 OS-X?

I don't think that there is a FAQ but at least current README.darwin
files contain some info.

The problem is that MacOS X is not a typical Unix. That means that
the everything is a file view is not correct for MacOS X. So we
can't sue functions like fork() because e.g. USB access permissions
aren't inherited. That breaks all backends which use fork on MacOS X.

The solution is to use threads instead of sub-processes. That's what
the sanei_usb API does. However, all the backends that may be of
interest on MacOS X have to be converted to that API. That's not
trivial in all cases.

  Please tell us about your success/failure on FreeBSD and MacOS X.
 
 So far FreeBSD isn't going very well, but I'd be more than happy to try
 OS-X if the build process is documented somewhere.

README.darwin (+ the general README). If something doesn't work,
please tell us.

Bye,
  Henning



[sane-devel] Umax 2200 (USB) failing

2003-12-31 Thread Henning Meier-Geinitz
Hi,

On Tue, Dec 30, 2003 at 06:02:36PM -0500, Charles Sprickman wrote:
 However on actually trying to scan something it hangs.  Looking at the
 umax.conf file and manpage I don't see any quality calibration options,
 so I have not turned that off.

scanimage --help should print alll options. Or run a frontend like
xsane. If there is an option to disable calibration, it should be
shown.

 The following is the debug output up to the point where the command hangs:
 [umax] do_calibration
 [umax] wait_scanner
 [umax] Sending SCSI cmd 0x00 cdb len 6, param len 0, result len 0
 [umax] error in sanei_pv8630_bulkread (got 02)
 [umax] scanner reports Error during device I/O, waiting ...
 [umax] Sending SCSI cmd 0x00 cdb len 6, param len 0, result len 0

Really looks like a problem with calibration for me.

Bye,
  Henning



[sane-devel] Umax 2200 (USB) failing

2003-12-30 Thread Charles Sprickman
On Mon, 29 Dec 2003, Klaus Dahlke wrote:

 The lesson I learned is: - switch quality calibration off - use only
 libusb, I have deleted scanner.o from /lib/modules or did compile the
 kernel without scanner support for USB at another machine to have
 connection only via libusb.

I just built and booted a kernel without the uscanner driver, and this
takes me a little further.  scanimage -L finds the scanner:

root@green[/home/spork]# scanimage -L
device `umax:libusb:/dev/usb0:/dev/ugen0' is a UMAX Astra 2200
flatbed scanner

However on actually trying to scan something it hangs.  Looking at the
umax.conf file and manpage I don't see any quality calibration options,
so I have not turned that off.

The following is the debug output up to the point where the command hangs:

root@green[/home/spork]# scanimage -d umax:libusb:/dev/usb0:/dev/ugen0
--format tiff  test.tiff
[sanei_debug] Setting debug level of umax to 255.
[umax] sane_init
[umax] This is sane-umax version 1.0 build 40
[umax] compiled with USB support for Astra 2200
[umax] (C) 1997-2002 by Oliver Rauch
[umax] EMAIL: oliver.ra...@rauch-domain.de
[umax] reading configure file umax.conf
[umax] option handle-bad-sense-error = 3
[umax] option connection-type = 2
[umax] sanei_usb_attach_matching_devices(usb 0x1606 0x0230)
[umax] attach_scanner: libusb:/dev/usb0:/dev/ugen0, connection_type 2
[umax] attach_scanner: opening usb device libusb:/dev/usb0:/dev/ugen0
[umax] Initializing the PV8630
[umax] PV8630 initialized
[umax] attach_scanner: allocating SCSI buffer[0]
[umax] init
[umax] setting request_scsi_maxqueue = 1 for USB connection
[umax] request_scsi_maxqueue  = 1
[umax] request_preview_lines  = 10
[umax] request_scan_lines = 40
[umax] handle_bad_sense_error = 3
[umax] execute_request_sense  = 0
[umax] scsi_buffer_size_min   = 32768
[umax] scsi_buffer_size_max   = 131072
[umax] force_preview_bit_rgb  = 0
[umax] slow   = -1
[umax] smear  = -1
[umax] calibration_area   = -1
[umax] calibration_width_offset   = -9
[umax] calibration_width_offset_batch = -9
[umax] calibration_bytespp= -1
[umax] exposure_time_rgb_bind = -1
[umax] invert_shading_data= -1
[umax] lamp_control_available = 0
[umax] backend runs on little endian machine
[umax] variable scsi buffer size (usage of sanei_scsi_open_extended)
[umax] initialize_values
[umax] identify_scanner
[umax] do_inquiry
[umax] Sending SCSI cmd 0x12 cdb len 6, param len 0, result len 5
[umax]   SCSI cmd returned 5 bytes
[umax]   SCSI command successfully executed
[umax] Sending SCSI cmd 0x12 cdb len 6, param len 0, result len 160
[umax]   SCSI cmd returned 160 bytes
[umax]   SCSI command successfully executed
[umax] Found UMAX  scanner Astra 2200 version V2.1 on device
libusb:/dev/usb0:/dev/ugen0
[umax] umax_correct_inquiry(UMAX  Astra 2200  V2.1)
[umax] setting up special options for Astra 2200
[umax]  - lamp control enabled
[umax]  - calibration by driver is done for each CCD pixel
[umax]  - setting calibration_bytespp = 2
[umax]  - common x and y resolution
[umax] get_inquiry_values
[umax] INQUIRY:
[umax] 
[umax]
[umax] vendor: 'UMAX'
[umax] product...: 'Astra 2200  '
[umax] version...: 'V2.1'
[umax] peripheral qualifier..: 0
[umax] peripheral device type: 6
[umax]
[umax] CBHS value range..: 0-255
[umax] scanmode..: flatbed (FB)
[umax] UTA (transparency): available
[umax] UTA lamp status ..: on
[umax]
[umax] inquiry block length..: 160 bytes
[umax]
[umax] ISO  Version (reserved)...: 0
[umax] ECMA Version (reserved)...: 0
[umax] ANSI Version .: 2
[umax]
[umax] reserved byte 0x05 = 0
[umax] reserved byte 0x06 = 0
[umax]
[umax] scsi features (00):
[umax] ---
[umax]
[umax] f/w support function:
[umax] -
[umax]  - quality calibration
[umax]  - fast preview function
[umax]
[umax] reserved byte 0x36 = 0
[umax] reserved byte 0x37 = 0
[umax]
[umax] scan modes (76):
[umax] 
[umax]  - single pass color mode
[umax]  - lineart mode
[umax]  - gray mode
[umax]  - color mode
[umax]  - transparency (UTA)
[umax]
[umax] scanner capability (be, 00, 00):
[umax] 
[umax]  - send high byte first
[umax]  - bi-level image reverse
[umax]  - multi-level image reverse
[umax]  - paper length can reach to 14 inch
[umax]
[umax] gamma download available
[umax] gamma download type 2
[umax] lines of gamma curve: one line (gray), three lines (color) download
[umax] gamma input   8 bits/pixel support
[umax] gamma input  12 bits/pixel support
[umax] gamma output  8 bits/pixel support
[umax] gamma output 12 bits/pixel support
[umax]
[umax] reserved byte 0x65 = 0
[umax] reserved byte 0x67 = 0
[umax]
[umax] 

[sane-devel] Umax 2200 (USB) failing

2003-12-29 Thread Charles Sprickman
Hi,

I just installed Sane 1.0.13 on FreeBSD 5.1.  I have a Umax Astra 2200-US
scanner (scsi and usb), but only have a USB interface on my workstation.

The OS detects that there's a scanner plugged in:

uscanner0: UMAX Data Systems Astra 2200U Scanner, rev 1.00/1.00, addr 2

sane-find-scanner also sees something there:

root@green[/usr/local/etc/sane.d]# sane-find-scanner

  # No SCSI scanners found. If you expected something different, make sure
that
  # you have loaded a SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x1606, product=0x0230) at /dev/uscanner0
  # Your USB scanner was detected. It may or may not be supported by
  # SANE. Try scanimage -L and read the backend's manpage.

However running a test with scanimage (specifying the device/driver
directly) just hangs.  Enabling debug output shows the following:

root@green[/usr/local/etc/sane.d]# scanimage -d umax:/dev/uscanner0 -T
[sanei_debug] Setting debug level of umax to 255.
[umax] sane_init
[umax] This is sane-umax version 1.0 build 40
[umax] compiled with USB support for Astra 2200
[umax] (C) 1997-2002 by Oliver Rauch
[umax] EMAIL: oliver.ra...@rauch-domain.de
[umax] reading configure file umax.conf
[umax] option handle-bad-sense-error = 3
[umax] option connection-type = 2
[umax] sanei_usb_attach_matching_devices(usb 0x1606 0x0230)
[umax] attach_scanner: /dev/uscanner0, connection_type 2
[umax] attach_scanner: opening usb device /dev/uscanner0
[umax] Initializing the PV8630
[umax] PV8630 initialized
[umax] attach_scanner: allocating SCSI buffer[0]
[umax] init
[umax] setting request_scsi_maxqueue = 1 for USB connection
[umax] request_scsi_maxqueue  = 1
[umax] request_preview_lines  = 10
[umax] request_scan_lines = 40
[umax] handle_bad_sense_error = 3
[umax] execute_request_sense  = 0
[umax] scsi_buffer_size_min   = 32768
[umax] scsi_buffer_size_max   = 131072
[umax] force_preview_bit_rgb  = 0
[umax] slow   = -1
[umax] smear  = -1
[umax] calibration_area   = -1
[umax] calibration_width_offset   = -9
[umax] calibration_width_offset_batch = -9
[umax] calibration_bytespp= -1
[umax] exposure_time_rgb_bind = -1
[umax] invert_shading_data= -1
[umax] lamp_control_available = 0
[umax] backend runs on little endian machine
[umax] variable scsi buffer size (usage of sanei_scsi_open_extended)
[umax] initialize_values
[umax] identify_scanner
[umax] do_inquiry
[umax] Sending SCSI cmd 0x12 cdb len 6, param len 0, result len 5

And there it sits, for hours...

First of all, is this an officially supported scanner?  Looking at the
mailing lists it seems others have it working.

Secondly, is there any other information I can provide to debug this?

And lastly, I also have an iBook running OS-X 10.3.2.  Is this scanner
known to work under OS-X and Sane (Umax abandoned all support for these
older models for OS-X)?

Thanks!

Charles



[sane-devel] Umax 2200 (USB) failing

2003-12-29 Thread Henning Meier-Geinitz
Hi,

On Mon, Dec 29, 2003 at 04:37:42AM -0500, Charles Sprickman wrote:
 I just installed Sane 1.0.13 on FreeBSD 5.1.  I have a Umax Astra 2200-US
 scanner (scsi and usb), but only have a USB interface on my workstation.
 
 The OS detects that there's a scanner plugged in:
 
 uscanner0: UMAX Data Systems Astra 2200U Scanner, rev 1.00/1.00, addr 2

Last time i looked at FreeBSD, the uscanner driver still didn't
support USB control messages. I don't have this scanner, but our lists
tell us: 

Astra 2200 (SU) USB OK, needs USB control messages

It should work if you use libusb (generic USB access) instead of the
uscanner driver. I guess you must tell the uscanner driver not to
detect your scanner. Disabling that driver should work, but maybe
there is a more intelligent method.

SANE itsself must be linked against libusb. This is the deafult if
libusb is found during build.

 First of all, is this an officially supported scanner?  Looking at the
 mailing lists it seems others have it working.

I think so. Well, the lists say it's SU, not US.

 And lastly, I also have an iBook running OS-X 10.3.2.  Is this scanner
 known to work under OS-X and Sane (Umax abandoned all support for these
 older models for OS-X)?

The UMAX backend has not been converted to sanei_thread yet and fork()
doesn't work correctly on MacOS X. So you won't have luck with SANE
10.13. But if you look at our bug-tracking system, there is a patch
that may work (untested):

https://alioth.debian.org/tracker/index.php?func=detailaid=300397group_id=1308atid=410366

Please tell us about your success/failure on FreeBSD and MacOS X.

Bye,
  Henning



[sane-devel] Umax 2200 (USB) failing

2003-12-29 Thread Klaus Dahlke
On Mon, 29 Dec 2003 04:37:42 -0500 (EST)
Charles Sprickman sp...@fasttrackmonkey.com wrote:

 Hi,
 
 I just installed Sane 1.0.13 on FreeBSD 5.1.  I have a Umax Astra 2200-US
 scanner (scsi and usb), but only have a USB interface on my workstation.
 
 The OS detects that there's a scanner plugged in:
 
 uscanner0: UMAX Data Systems Astra 2200U Scanner, rev 1.00/1.00, addr 2
 
 sane-find-scanner also sees something there:
 
 root@green[/usr/local/etc/sane.d]# sane-find-scanner
 
   # No SCSI scanners found. If you expected something different, make sure
 that
   # you have loaded a SCSI driver for your SCSI adapter.
 
 found USB scanner (vendor=0x1606, product=0x0230) at /dev/uscanner0
   # Your USB scanner was detected. It may or may not be supported by
   # SANE. Try scanimage -L and read the backend's manpage.
 
 However running a test with scanimage (specifying the device/driver
 directly) just hangs.  Enabling debug output shows the following:
 

Hi Charles,
I operate the same type of scanner. Honestly, scsi interface works better with 
Linux (sane/xsane) as the USB interface. But due to comfort reasons I operate 
the scanner connected via USB (easier connect/disconnect) whithout real impact 
on functionality. The lesson I learned is:
- switch quality calibration off
- use only libusb, I have deleted scanner.o from /lib/modules or did compile 
the kernel without scanner support for USB at another machine to have 
connection only via libusb.

Cheers,
Klaus