[sane-devel] avision: troubleshooting Lexmark X340 support on OSX

Paul te Bokkel paul at tebokkel.com
Fri Jun 26 14:51:26 UTC 2009


Hi all,

I have the latest SDK's for SANE installed on OSX (10.5.7, Intel).  
Added the USB-ID's for the Lexmark X340 (as a copy of the Avision  
MF3000 - AIO with ADF) to the Avision-backend, build, installed and  
tried to scan.

Somehow the USB-chip on the printer seems to stall when scanning.  
After it's stalled, only a power cycle from the printer seems to help.
Running scanimage -L repeatedly is not a problem (logging below). Sane- 
find-scanner is also not a problem.

Running a scanimage gives up with an "pipe is stalled" error. I never  
seem to get output files bigger than about 60800 bytes (or less if  
scan area is limited). Essentials of logging (all full logging also  
attached):

(...)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 15170 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] No data arrived.
(...)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 7266 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] No data arrived.
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.


Is this an libusb error or avision driver problem?
Or is anything wrong or missing for the avision settings?
I recompiled the avision backend with AV_NO_64BYTE_ALIGN. Didn't  
change a thing.


Paul


All logging run with SANE_DEBUG=255 USB_DEBUG=255 SANE_DEBUG_AVISION=7

=========================================
output of scanimage -B > output.pnm
(logging starts after warming up)
=========================================
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] wait_4_light: command is 0. Result is on
[avision] set_window:
[avision] set_window: base_dpi_abs: 1200, base_dpi_rel: 1200
[avision] set_window: base paralen: 7
[avision] set_window: final paralen: 20
[avision] set_window: transferlen: 70
[avision] set_window: large data-transfer support (>16bit)!
[avision] set_window: source mode 0 source mode dim 0
[avision] window_data_header:
[avision]   [0] 00000000b   0o   0d  0x
[avision]   [1] 00000000b   0o   0d  0x
[avision]   [2] 00000000b   0o   0d  0x
[avision]   [3] 00000000b   0o   0d  0x
[avision]   [4] 00000000b   0o   0d  0x
[avision]   [5] 00000000b   0o   0d  0x
[avision]   [6] 00000000b   0o   0d  0x
[avision]   [7] 00111110b  76o  62d 3ex
[avision] window_descriptor:
[avision]   [0] 00000000b   0o   0d  0x
[avision]   [1] 00000000b   0o   0d  0x
[avision]   [2] 00000000b   0o   0d  0x
[avision]   [3] 10010110b 226o 150d 96x
[avision]   [4] 00000000b   0o   0d  0x
[avision]   [5] 10010110b 226o 150d 96x
[avision]   [6] 00000000b   0o   0d  0x
[avision]   [7] 00000000b   0o   0d  0x
[avision]   [8] 00000000b   0o   0d  0x
[avision]   [9] 00000000b   0o   0d  0x
[avision]   [10] 00000000b   0o   0d  0x
[avision]   [11] 00000000b   0o   0d  0x
[avision]   [12] 00000000b   0o   0d  0x
[avision]   [13] 00000000b   0o   0d  0x
[avision]   [14] 00000000b   0o   0d  0x
[avision]   [15] 00000000b   0o   0d  0x
[avision]   [16] 00100111b  47o  39d 27x
[avision]   [17] 10000001b 201o 129d 81x
[avision]   [18] 00000000b   0o   0d  0x
[avision]   [19] 00000000b   0o   0d  0x
[avision]   [20] 01000001b 101o  65d 41x
[avision]   [21] 10000001b 201o 129d 81x
[avision]   [22] 10000000b 200o 128d 80x
[avision]   [23] 10000000b 200o 128d 80x
[avision]   [24] 10000000b 200o 128d 80x
[avision]   [25] 00000101b   5o   5d  5x
[avision]   [26] 00001000b  10o   8d  8x
[avision]   [27] 00000000b   0o   0d  0x
[avision]   [28] 00000000b   0o   0d  0x
[avision]   [29] 00000011b   3o   3d  3x
[avision]   [30] 00000000b   0o   0d  0x
[avision]   [31] 00000000b   0o   0d  0x
[avision]   [32] 00000000b   0o   0d  0x
[avision]   [33] 00000000b   0o   0d  0x
[avision]   [34] 00000000b   0o   0d  0x
[avision]   [35] 00000000b   0o   0d  0x
[avision]   [36] 00000000b   0o   0d  0x
[avision]   [37] 00000000b   0o   0d  0x
[avision]   [38] 00000000b   0o   0d  0x
[avision]   [39] 00000000b   0o   0d  0x
[avision]   [40] 11111111b 377o 255d ffx
[avision]   [41] 00010100b  24o  20d 14x
[avision]   [42] 01100000b 140o  96d 60x
[avision]   [43] 11111111b 377o 255d ffx
[avision]   [44] 00000000b   0o   0d  0x
[avision]   [45] 00001110b  16o  14d  ex
[avision]   [46] 11010000b 320o 208d d0x
[avision]   [47] 00001000b  10o   8d  8x
[avision]   [48] 00110000b  60o  48d 30x
[avision]   [49] 00010000b  20o  16d 10x
[avision]   [50] 00000000b   0o   0d  0x
[avision]   [51] 00000000b   0o   0d  0x
[avision]   [52] 00000000b   0o   0d  0x
[avision]   [53] 00000000b   0o   0d  0x
[avision]   [54] 00000000b   0o   0d  0x
[avision]   [55] 00000000b   0o   0d  0x
[avision]   [56] 00000000b   0o   0d  0x
[avision]   [57] 00000000b   0o   0d  0x
[avision]   [58] 00000000b   0o   0d  0x
[avision]   [59] 00000000b   0o   0d  0x
[avision]   [60] 00000000b   0o   0d  0x
[avision]   [61] 00000000b   0o   0d  0x
[avision]   [62] 00000000b   0o   0d  0x
[avision]   [63] 00000000b   0o   0d  0x
[avision] set_window: [0]     window_id: 0
[avision] set_window: [2-3]   x-axis res: 150
[avision] set_window: [4-5]   y-axis res: 150
[avision] set_window: [6-9]   x-axis upper left: 0
[avision] set_window: [10-13] y-axis upper left: 0
[avision] set_window: [14-17] window width: 10113
[avision] set_window: [18-21] window length: 16769
[avision] set_window: [22]    brightness: 128
[avision] set_window: [23]    threshold: 128
[avision] set_window: [24]    contrast: 128
[avision] set_window: [25]    image composition: 5
[avision] set_window: [26]    bits per channel: 8
[avision] set_window: [27-28] halftone pattern: 0
[avision] set_window: [29]    padding_and_bitset: 3
[avision] set_window: [30-31] bit ordering: 0
[avision] set_window: [32]    compression type: 0
[avision] set_window: [33]    compression argument: 0
[avision] set_window: [34-35] paper length: 0
[avision] set_window: [40]    vendor id: ff
[avision] set_window: [41]    param lenght: 20
[avision] set_window: [42]    bitset1: 60
[avision] set_window: [43]    highlight: 255
[avision] set_window: [44]    shadow: 0
[avision] set_window: [45-46] line-width: 3792
[avision] set_window: [47-48] line-count: 2096
[avision] set_window: [49]    bitset2: 10
[avision] set_window: [50]    ir exposure time: 0
[avision] set_window: [51-52] r exposure: 0
[avision] set_window: [53-54] g exposure: 0
[avision] set_window: [55-56] b exposure: 0
[avision] set_window: [57]    bitset3: 0
[avision] set_window: [58]    auto focus: 0
[avision] set_window: [59]    line-width (MSB): 0
[avision] set_window: [60]    line-count (MSB): 0
[avision] set_window: [61]    background lines: 0
[avision] set_window: sending command. Bytes: 70
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 70 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] sane_start: due to inquiry no calibration needed!
[avision] send_gamma: table_raw_size: 256, table_size: 256
[avision] send_gamma: values: 1, invert_table: 0
[avision] send_gamma: brightness: 0.000000, contrast: 0.000000
[avision] send_gamma: sending 256 bytes gamma table.
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 256 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] send_gamma: sending 256 bytes gamma table.
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 256 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] send_gamma: sending 256 bytes gamma table.
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 256 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] sane_start: starting thread
[avision] reader_process:
[avision] sane_get_parameters:
[avision] reserve_unit:
[avision] filling command to have a length of 10, was: 6
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] start_scan:
[avision] start_scan: sending command. Bytes: 6
[avision] filling command to have a length of 10, was: 6
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] dev->scsi_buffer_size / 2: 524288
[avision] bytes_per_line: 3792, pixels_per_line: 1264
[avision] lines_per_stripe: 32, lines_per_output: 32
[avision] max_bytes_per_read: 1048576, stripe_size: 121344, out_size:  
121344
[avision] reader_process: total_size: 7948032
[avision] reader_process: stripe filled: 0
[avision] reader_process: processed_bytes: 0, total_size: 7948032
[avision] reader_process: this_read: 60674
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 60674 bytes of data on  
endpoint 0x82
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 37922 bytes of data on  
endpoint 0x82
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 15170 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] No data arrived.
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 60674 bytes of data on  
endpoint 0x82
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 52770 bytes of data on  
endpoint 0x82
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 30018 bytes of data on  
endpoint 0x82
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 7266 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] No data arrived.
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 60674 bytes of data on  
endpoint 0x82
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 45090 bytes of data on  
endpoint 0x82
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 22338 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] No data arrived.
[avision] Max retry count reached: I/O error
[avision] reader_process: read_data failed with status: 9
[avision] reader_process: stripe filled: 60674
[avision] reader_process: useful_bytes 60674
[avision] reader_process: end of iteration
[avision] reader_process: i/o loop finished
[avision] release unit: type: 0
[avision] filling command to have a length of 10, was: 6
[avision] Timeouts: write: 30000, read: 30000, status: 10000
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] <== (bulk read) got: 0, status: 0
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] <== (bulk read) got: 0, status: 0
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 10 bytes of data on  
endpoint 0x02
[avision] avision_usb_status: timeout 10000, 1 retries
[avision] ==> (bulk read) going down ...
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
libusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
USB error: libusb/darwin.c usb_bulk_transfer: unknown error
USB error: usb_bulk_read: An error occured during read (see messages  
above)
libusb/darwin.c ep_to_pipeRef: Converting ep address to pipeRef.
USB error: usb_clear_halt(ClearPipeStall): pipe is stalled
[avision] <== (bulk read) got: 0, status: 0
[avision] Max retry count reached: I/O error
[avision] reader_process: release_unit failed
[avision] reader_process: returning success
[avision] sane_read: got 0 bytes, err: 60 Operation timed out
[avision] do_eof:
[avision] do_eof: returning 9
scanimage: sane_read: Error during device I/O
[avision] sane_cancel:
[avision] do_cancel:
[avision] sane_close:
usb_os_close: 043d:00d3
[avision] sane_exit:





=========================================
Output from scanimage -L with USB * Avision debug:
=========================================
ibusb/darwin.c usb_bulk_transfer: Transfering 1 bytes of data on  
endpoint 0x82
[avision] <== (bulk read) got: 1, status: 0
[avision] attach: raw data:
[avision]   [0] 00000110b   6o   6d  6x
[avision]   [1] 10000000b 200o 128d 80x
[avision]   [2] 00000010b   2o   2d  2x
[avision]   [3] 01000010b 102o  66d 42x
[avision]   [4] 01011011b 133o  91d 5bx
[avision]   [5] 00000000b   0o   0d  0x
[avision]   [6] 00000000b   0o   0d  0x
[avision]   [7] 00000000b   0o   0d  0x
[avision]   [8] 01001100b 114o  76d 4cx
[avision]   [9] 01000101b 105o  69d 45x
[avision]   [10] 01011000b 130o  88d 58x
[avision]   [11] 01001101b 115o  77d 4dx
[avision]   [12] 01000001b 101o  65d 41x
[avision]   [13] 01010010b 122o  82d 52x
[avision]   [14] 01001011b 113o  75d 4bx
[avision]   [15] 00100000b  40o  32d 20x
[avision]   [16] 01011000b 130o  88d 58x
[avision]   [17] 00110011b  63o  51d 33x
[avision]   [18] 00110100b  64o  52d 34x
[avision]   [19] 00110000b  60o  48d 30x
[avision]   [20] 00100000b  40o  32d 20x
[avision]   [21] 00100000b  40o  32d 20x
[avision]   [22] 00100000b  40o  32d 20x
[avision]   [23] 00100000b  40o  32d 20x
[avision]   [24] 00100000b  40o  32d 20x
[avision]   [25] 00100000b  40o  32d 20x
[avision]   [26] 00100000b  40o  32d 20x
[avision]   [27] 00100000b  40o  32d 20x
[avision]   [28] 00100000b  40o  32d 20x
[avision]   [29] 00100000b  40o  32d 20x
[avision]   [30] 00100000b  40o  32d 20x
[avision]   [31] 00100000b  40o  32d 20x
[avision]   [32] 00110000b  60o  48d 30x
[avision]   [33] 00101110b  56o  46d 2ex
[avision]   [34] 00110110b  66o  54d 36x
[avision]   [35] 00110000b  60o  48d 30x
[avision]   [36] 10100000b 240o 160d a0x
[avision]   [37] 00001100b  14o  12d  cx
[avision]   [38] 00001100b  14o  12d  cx
[avision]   [39] 10000111b 207o 135d 87x
[avision]   [40] 00000100b   4o   4d  4x
[avision]   [41] 10110000b 260o 176d b0x
[avision]   [42] 00000100b   4o   4d  4x
[avision]   [43] 10110000b 260o 176d b0x
[avision]   [44] 00000100b   4o   4d  4x
[avision]   [45] 10110000b 260o 176d b0x
[avision]   [46] 00000100b   4o   4d  4x
[avision]   [47] 10110000b 260o 176d b0x
[avision]   [48] 00000000b   0o   0d  0x
[avision]   [49] 00000000b   0o   0d  0x
[avision]   [50] 11001000b 310o 200d c8x
[avision]   [51] 00010101b  25o  21d 15x
[avision]   [52] 11000010b 302o 194d c2x
[avision]   [53] 00000000b   0o   0d  0x
[avision]   [54] 00010000b  20o  16d 10x
[avision]   [55] 00010000b  20o  16d 10x
[avision]   [56] 00010000b  20o  16d 10x
[avision]   [57] 00100000b  40o  32d 20x
[avision]   [58] 00100000b  40o  32d 20x
[avision]   [59] 00100000b  40o  32d 20x
[avision]   [60] 11000000b 300o 192d c0x
[avision]   [61] 10010000b 220o 144d 90x
[avision]   [62] 10100000b 240o 160d a0x
[avision]   [63] 00000001b   1o   1d  1x
[avision]   [64] 00000001b   1o   1d  1x
[avision]   [65] 00000001b   1o   1d  1x
[avision]   [66] 00000010b   2o   2d  2x
[avision]   [67] 00000011b   3o   3d  3x
[avision]   [68] 00000100b   4o   4d  4x
[avision]   [69] 00000101b   5o   5d  5x
[avision]   [70] 00000000b   0o   0d  0x
[avision]   [71] 00000000b   0o   0d  0x
[avision]   [72] 00000000b   0o   0d  0x
[avision]   [73] 00000000b   0o   0d  0x
[avision]   [74] 00000000b   0o   0d  0x
[avision]   [75] 00000000b   0o   0d  0x
[avision]   [76] 00000000b   0o   0d  0x
[avision]   [77] 00000000b   0o   0d  0x
[avision]   [78] 00000000b   0o   0d  0x
[avision]   [79] 00000000b   0o   0d  0x
[avision]   [80] 00000000b   0o   0d  0x
[avision]   [81] 00001010b  12o  10d  ax
[avision]   [82] 00000000b   0o   0d  0x
[avision]   [83] 00010000b  20o  16d 10x
[avision]   [84] 01101000b 150o 104d 68x
[avision]   [85] 00001010b  12o  10d  ax
[avision]   [86] 00000000b   0o   0d  0x
[avision]   [87] 00010000b  20o  16d 10x
[avision]   [88] 01101000b 150o 104d 68x
[avision]   [89] 00000100b   4o   4d  4x
[avision]   [90] 10110000b 260o 176d b0x
[avision]   [91] 10000001b 201o 129d 81x
[avision]   [92] 00000010b   2o   2d  2x
[avision]   [93] 10010000b 220o 144d 90x
[avision]   [94] 00000000b   0o   0d  0x
[avision]   [95] 00000000b   0o   0d  0x
[avision]   [96] 00000000b   0o   0d  0x
[avision]   [97] 00000000b   0o   0d  0x
[avision]   [98] 00000000b   0o   0d  0x
[avision]   [99] 00000000b   0o   0d  0x
[avision]   [100] 00000000b   0o   0d  0x
[avision]   [101] 00000000b   0o   0d  0x
[avision]   [102] 00000000b   0o   0d  0x
[avision]   [103] 00000000b   0o   0d  0x
[avision]   [104] 00000000b   0o   0d  0x
[avision]   [105] 00000000b   0o   0d  0x
[avision]   [106] 00000000b   0o   0d  0x
[avision]   [107] 00000000b   0o   0d  0x
[avision]   [108] 00000000b   0o   0d  0x
[avision]   [109] 00000000b   0o   0d  0x
[avision]   [110] 00000000b   0o   0d  0x
[avision]   [111] 00000000b   0o   0d  0x
[avision]   [112] 00000000b   0o   0d  0x
[avision]   [113] 00000000b   0o   0d  0x
[avision]   [114] 00000000b   0o   0d  0x
[avision]   [115] 00000000b   0o   0d  0x
[avision]   [116] 00000000b   0o   0d  0x
[avision]   [117] 00000000b   0o   0d  0x
[avision]   [118] 00000000b   0o   0d  0x
[avision]   [119] 00000000b   0o   0d  0x
[avision]   [120] 00000000b   0o   0d  0x
[avision]   [121] 00000000b   0o   0d  0x
[avision]   [122] 00000000b   0o   0d  0x
[avision]   [123] 00000000b   0o   0d  0x
[avision]   [124] 00000000b   0o   0d  0x
[avision]   [125] 00000000b   0o   0d  0x
[avision]   [126] 00000000b   0o   0d  0x
[avision]   [127] 00000000b   0o   0d  0x
[avision]   [128] 00000000b   0o   0d  0x
[avision]   [129] 00000000b   0o   0d  0x
[avision]   [130] 00000000b   0o   0d  0x
[avision]   [131] 00000000b   0o   0d  0x
[avision]   [132] 00000000b   0o   0d  0x
[avision]   [133] 00000000b   0o   0d  0x
[avision]   [134] 00000000b   0o   0d  0x
[avision]   [135] 00000000b   0o   0d  0x
[avision] attach: [8-15]  Vendor id.:      'LEXMARK '
[avision] attach: [16-31] Product id.:     'X340            '
[avision] attach: [32-35] Product rev.:    '0.60'
[avision] attach: [36]    Bitfield: ADF 3-pass color RGB color plane
[avision] attach: [37]    Optical res.:    1200 dpi
[avision] attach: [38]    Maximum res.:    1200 dpi
[avision] attach: [39]    Bitfield1: TRANS NEW_PROTOCOL AVISION
[avision] attach: [40-41] X res. in gray:  1200 dpi
[avision] attach: [42-43] Y res. in gray:  1200 dpi
[avision] attach: [44-45] X res. in color: 1200 dpi
[avision] attach: [46-47] Y res. in color: 1200 dpi
[avision] attach: [48-49] USB max read:    0
[avision] attach: [50]    ESA1: LIGHT_CONTROL BUTTON_CONTROL  
NEED_SW_GAMMA
[avision] attach: [51]    ESA2: SUPPORTS_QUALITY_SPEED_CAL  
HAS_PUSH_BUTTON ADF_MIRRORS_IMAGE
[avision] attach: [52]    ESA3: GRAY_WHITE SUPPORTS_GAIN_CONTROL  
POWER_SAVING_TIMER
[avision] attach: [53]    line difference (software color pack): 0
[avision] attach: [54]    color mode pixel boundary: 16
[avision] attach: [55]    gray mode pixel boundary: 16
[avision] attach: [56]    4bit gray mode pixel boundary: 16
[avision] attach: [57]    lineart mode pixel boundary: 32
[avision] attach: [58]    halftone mode pixel boundary: 32
[avision] attach: [59]    error-diffusion mode pixel boundary: 32
[avision] attach: [60]    channels per pixel: 1 3
[avision] attach: [61]    bits per channel: 1 8
[avision] attach: [62]    scanner type: Flatbed Flatbed (ADF)
[avision] attach: [75-76] Max shading target : 0
[avision] attach: [77-78] Max X of transparency: 0 dots * base_dpi
[avision] attach: [79-80] Max Y of transparency: 0 dots * base_dpi
[avision] attach: [81-82] Max X of flatbed:      2560 dots * base_dpi
[avision] attach: [83-84] Max Y of flatbed:      4200 dots * base_dpi
[avision] attach: [85-86] Max X of ADF:          2560 dots * base_dpi
[avision] attach: [87-88] Max Y of ADF:          4200 dots * base_dpi
[avision] attach: [89-90] Res. in Ex. mode:      1200 dpi
[avision] attach: [91]    ASIC:     129
[avision] attach: [92]    Buttons:  2
[avision] attach: [93]    ESA4: SUPPORTS_ACCESSORIES_DETECT  
SUPPORTS_FLASH_UPDATE
[avision] attach: [94]    ESA5:
[avision] attach: [95]    ESA6:
[avision] attach: [128]    ESA7:
[avision] attach: [129]    YCbCr:
[avision] attach: optical resolution set to: 1200 dpi
[avision] attach: max resolution set to: 1200 dpi
[avision] attach: max channels per pixel: 3, max bits per channel: 8
[avision] attach: x/y-range for mode 0 is valid!
[avision] attach: Mode 0 range is now: 216.846667 x 355.600000 mm.
[avision] attach: x/y-range for mode 1 is invalid! Using a default.
[avision] attach: Mode 1 range is now: 215.900000 x 299.720000 mm.
[avision] attach: x/y-range for mode 2 is valid!
[avision] attach: Mode 2 range is now: 216.846667 x 355.600000 mm.
usb_os_close: 043d:00d3
[avision] sane_init: Trying to find USB device 638 a16 ...
xxx (devices removed) xxx
[avision] sane_init: Trying to find USB device 482 335 ...
[avision] sane_get_devices:
[avision] sane_exit:
device `avision:libusb:005:006-043d-00d3-00-00' is a Lexmark X340  
flatbed scanner






=========================================
Output of sane-find-scanner -v -v
=========================================
usb_os_open: 043d:00d3
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
769 0 0x7fff5fbff6b0 2 1000
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
769 0 0x100104d80 44 1000
usb_os_close: 043d:00d3
usb_os_open: 043d:00d3
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
770 0 0x7fff5fbff6b0 2 1000
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
770 0 0x100104ea0 26 1000
usb_os_close: 043d:00d3

<device descriptor of 0x043d/0x00d3 at 005:006-043d-00d3-00-00  
(Lexmark International Lexmark X340)>
bLength               18
bDescriptorType       1
bcdUSB                2.00
bDeviceClass          0
bDeviceSubClass       0
bDeviceProtocol       0
bMaxPacketSize0       64
idVendor              0x043D
idProduct             0x00D3
bcdDevice             1.00
iManufacturer         1 (Lexmark International)
iProduct              2 (Lexmark X340)
usb_os_open: 043d:00d3
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
771 0 0x7fff5fbff6d0 2 1000
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
771 0 0x100104db0 16 1000
usb_os_close: 043d:00d3
iSerialNumber         3 (68029XT)
bNumConfigurations    1
  <configuration 0>
  bLength              9
  bDescriptorType      2
  wTotalLength         80
  bNumInterfaces       3
  bConfigurationValue  1
usb_os_open: 043d:00d3
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
772 0 0x7fff5fbff6d0 2 1000
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
772 0 0x100104e00 42 1000
usb_os_close: 043d:00d3
  iConfiguration       4 (Default Congurataion)
  bmAttributes         192 (Self-powered)
  MaxPower             0 mA
   <interface 0>
    <altsetting 0>
    bLength            9
    bDescriptorType    4
    bInterfaceNumber   0
    bAlternateSetting  0
    bNumEndpoints      2
    bInterfaceClass    255
    bInterfaceSubClass 255
    bInterfaceProtocol 255
usb_os_open: 043d:00d3
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
774 0 0x7fff5fbff6d0 2 1000
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
774 0 0x100104db0 36 1000
usb_os_close: 043d:00d3
    iInterface         6 (Scanner Interface)
     <endpoint 0>
     bLength           7
     bDescriptorType   5
     bEndpointAddress  0x02 (out 0x02)
     bmAttributes      2 (bulk)
     wMaxPacketSize    512
     bInterval         10 ms
     bRefresh          0
     bSynchAddress     0
     <endpoint 1>
     bLength           7
     bDescriptorType   5
     bEndpointAddress  0x82 (in 0x02)
     bmAttributes      2 (bulk)
     wMaxPacketSize    512
     bInterval         10 ms
     bRefresh          0
     bSynchAddress     0
   <interface 1>
    <altsetting 0>
    bLength            9
    bDescriptorType    4
    bInterfaceNumber   1
    bAlternateSetting  0
    bNumEndpoints      2
    bInterfaceClass    7
    bInterfaceSubClass 1
    bInterfaceProtocol 2
usb_os_open: 043d:00d3
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
773 0 0x7fff5fbff6d0 2 1000
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
773 0 0x100104de0 36 1000
usb_os_close: 043d:00d3
    iInterface         5 (Printer Interface)
     <endpoint 0>
     bLength           7
     bDescriptorType   5
     bEndpointAddress  0x01 (out 0x01)
     bmAttributes      2 (bulk)
     wMaxPacketSize    512
     bInterval         10 ms
     bRefresh          0
     bSynchAddress     0
     <endpoint 1>
     bLength           7
     bDescriptorType   5
     bEndpointAddress  0x81 (in 0x01)
     bmAttributes      2 (bulk)
     wMaxPacketSize    512
     bInterval         10 ms
     bRefresh          0
     bSynchAddress     0
   <interface 2>
    <altsetting 0>
    bLength            9
    bDescriptorType    4
    bInterfaceNumber   2
    bAlternateSetting  0
    bNumEndpoints      1
    bInterfaceClass    3
    bInterfaceSubClass 0
    bInterfaceProtocol 0
usb_os_open: 043d:00d3
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
775 0 0x7fff5fbff6d0 2 1000
libusb/darwin.c usb_control_msg (device: 006-043d-00d3-00-00): 128 6  
775 0 0x100104e70 28 1000
usb_os_close: 043d:00d3
    iInterface         7 (Hid Interface)
     <endpoint 0>
     bLength           7
     bDescriptorType   5
     bEndpointAddress  0x84 (in 0x04)
     bmAttributes      3 (interrupt)
     wMaxPacketSize    4
     bInterval         16 ms
     bRefresh          0
     bSynchAddress     0

<trying to find out which USB chip is used>
     checking for GT-6801 ...
     this is not a GT-6801 (bDeviceClass = 0)
     checking for GT-6816 ...
     this is not a GT-6816 (bcdUSB = 0x200)
     checking for GT-8911 ...
     this is not a GT-8911 (check 2, bcdUSB = 0x200)
     checking for MA-1017 ...
     this is not a MA-1017 (bDeviceClass = 0, bInterfaceClass = 255)
     checking for MA-1015 ...
     this is not a MA-1015 (bDeviceClass = 0)
     checking for MA-1509 ...
     this is not a MA-1509 (bDeviceClass = 0)
     checking for LM983[1,2,3] ...
     this is not a LM983x (bcdUSB = 0x200)
     checking for GL646 ...
     this is not a GL646 (bDeviceClass = 0, bInterfaceClass = 255)
     checking for GL646_HP ...
     this is not a GL646_HP (bDeviceClass = 0, bInterfaceClass = 255)
     checking for GL660+GL646 ...
     this is not a GL660+GL646 (bDeviceClass = 0, bInterfaceClass = 255)
     checking for GL84x ...
     this is not a GL841 (bDeviceClass = 0, bInterfaceClass = 255)
     checking for ICM532B ...
     this is not a ICM532B (check 1, bDeviceClass = 0, bInterfaceClass  
= 255)
     checking for PV8630/LM9830 ...
     this is not a PV8630/LM9830 (bcdUSB = 0x200)
     checking for M011 ...
     this is not a M011 (bDeviceClass = 0)
     checking for RTS8822 ...
     this is not a RTS8822 (bNumEndpoints = 2)
     checking for rts8858c ...
     this is not a rts8858c (bcdUSB = 0x200)
     checking for SQ113 ...
     this is not a SQ113 (bNumEndpoints = 2)
     checking for HP5550/5590/7650 chipset ...
     this is not a HP5550/5590/7650 chipset (bDeviceClass = 0)
     checking for rts8801/rts8891 ...
     this is not a rts8801/rts8891 (bcdUSB = 0x200)
<Couldn't determine the type of the USB chip (result from sane- 
backends 1.1.0-cvs)>

found USB scanner (vendor=0x043d [Lexmark International],  
product=0x00d3 [Lexmark X340]) at libusb:005:006-043d-00d3-00-00
   # Your USB scanner was (probably) detected. It may or may not be  
supported by
   # SANE. Try scanimage -L and read the backend's manpage.

   # Not checking for parallel port scanners.

   # Most Scanners connected to the parallel port or other proprietary  
ports
   # can't be detected by this program.

   # You may want to run this program as root to find all devices.  
Once you
   # found the scanner devices, be sure to adjust access permissions as
   # necessary.
done




More information about the sane-devel mailing list