[sane-devel] BearPaw 1200

Uros Bizjak Uros Bizjak <uros.bizjak@gmail.com>
Wed, 22 Dec 2004 23:36:49 +0100


Hi,

I'm having problems installing Mustek BearPaw 1200 scanner. Scanner is
identified ok using "sane-find-scanner", but when I try to scan with
"scanimage" I get "scanimage: sane_read: Error during device I/O".

Using dmesg I can see the following error:
usb 3-2: bulk timeout on ep2in
usb 3-2: usbfs: USBDEVFS_BULK failed ep 0x82 len 3014 ret -110

scanimage output is:
[sanei_debug] Setting debug level of plustek to 13.
[plustek] Plustek backend V0.47-11, part of sane-backends 1.0.14
[plustek] ># Plustek-SANE Backend configuration file<
[plustek] ># For use with LM9831/2/3 based USB scanners<
[plustek] >#<
[plustek] ><
[plustek] ># each device needs at least two lines:<
[plustek] ># - [usb] vendor-ID and product-ID<
[plustek] ># - device devicename<
[plustek] ># i.e. for Plustek (0x07B3) UT12/16/24 (0x0017)<
[plustek] ># [usb] 0x07B3 0x0017<
[plustek] ># device /dev/usb/scanner0<
[plustek] ># or<
[plustek] ># device libusb:bbb:ddd<
[plustek] ># where bbb is the busnumber and ddd the device number<
[plustek] ># make sure that your user has access to /proc/bus/usb/bbb/ddd<
[plustek] >#<
[plustek] ># additionally you can specify some options<
[plustek] ># warmup, lOffOnEnd, lampOff<
[plustek] >#<
[plustek] ># For autodetection use<
[plustek] >[usb] 0x0400 0x1000<
[plustek] next device is a USB device (0x0400-0x1000)
[plustek] ... next device
[plustek] >device libusb:003:004<
[plustek] Decoding device name >libusb:003:004<
[plustek] >#<
[plustek] ># or simply<
[plustek] ># [usb]<
[plustek] >#<
[plustek] ># or if you want a specific device but you have no idea about the<
[plustek] ># device node or you use libusb, simply set vendor- and product-ID<
[plustek] ># [usb] 0x07B3 0x0017<
[plustek] ># device auto<
[plustek] >#<
[plustek] ># NOTE: autodetection is safe, as it uses the info it got<
[plustek] >#       from the USB subsystem. If you're not using the<
[plustek] >#       autodetection, you MUST have attached that device<
[plustek] >#       at your USB-port, that you have specified...<
[plustek] >#<
[plustek] ><
[plustek] >#[usb]<
[plustek] ><
[plustek] >#<
[plustek] ># options for the previous USB entry<
[plustek] >#<
[plustek] ># switch lamp off after xxx secs, 0 disables the feature<
[plustek] >option lampOff 300<
[plustek] Decoding option >lampOff<
[plustek] ><
[plustek] ># warmup period in seconds, 0 means no warmup<
[plustek] >option warmup 15<
[plustek] Decoding option >warmup<
[plustek] ><
[plustek] ># 0 means leave lamp-status untouched, not 0 means switch off<
[plustek] ># on sane_close<
[plustek] >option lOffOnEnd 1<
[plustek] Decoding option >lOffOnEnd<
[plustek] ><
[plustek] >#<
[plustek] ># options to tweak the image start-position<
[plustek] ># (WARNING: there's no internal range check!!!)<
[plustek] >#<
[plustek] ># for the normal scan area<
[plustek] >#<
[plustek] >option posOffX 0<
[plustek] Decoding option >posOffX<
[plustek] >option posOffY 0<
[plustek] Decoding option >posOffY<
[plustek] ><
[plustek] ># for transparencies<
[plustek] >option tpaOffX 0<
[plustek] Decoding option >tpaOffX<
[plustek] >option tpaOffY 0<
[plustek] Decoding option >tpaOffY<
[plustek] ><
[plustek] ># for negatives<
[plustek] >option negOffX 0<
[plustek] Decoding option >negOffX<
[plustek] >option negOffY 0<
[plustek] Decoding option >negOffY<
[plustek] ><
[plustek] >#<
[plustek] ># for setting the calibration strip position<
[plustek] ># (WARNING: there's no internal range check!!!)<
[plustek] ># -1 means use built in<
[plustek] >#<
[plustek] >option posShadingY -1<
[plustek] Decoding option >posShadingY<
[plustek] >option tpaShadingY -1<
[plustek] Decoding option >tpaShadingY<
[plustek] >option negShadingY -1<
[plustek] Decoding option >negShadingY<
[plustek] ><
[plustek] >#<
[plustek] ># to invert the negatives, 0 disables the feature<
[plustek] >#<
[plustek] >option invertNegatives 0<
[plustek] Decoding option >invertNegatives<
[plustek] ><
[plustek] >#<
[plustek] ># to save/restore coarse calibration data<
[plustek] >#<
[plustek] >option cacheCalData 0<
[plustek] Decoding option >cacheCalData<
[plustek] ><
[plustek] >#<
[plustek] ># use alternate calibration routines<
[plustek] >#<
[plustek] >option altCalibration 0<
[plustek] Decoding option >altCalibration<
[plustek] ><
[plustek] >#<
[plustek] ># for skipping whole calibration step<
[plustek] >#<
[plustek] >option skipCalibration 0<
[plustek] Decoding option >skipCalibration<
[plustek] ><
[plustek] >#<
[plustek] ># for skipping entire fine calibration step<
[plustek] ># coarse calibration is done<
[plustek] >#<
[plustek] >option skipFine 0<
[plustek] Decoding option >skipFine<
[plustek] ><
[plustek] >#<
[plustek] ># discard the result of the fine white calibration<
[plustek] >#<
[plustek] >option skipFineWhite 0<
[plustek] Decoding option >skipFineWhite<
[plustek] ><
[plustek] ># for replacing the gain values found during<
[plustek] ># calibration<
[plustek] >option red_gain   -1<
[plustek] Decoding option >red_gain<
[plustek] >option green_gain -1<
[plustek] Decoding option >green_gain<
[plustek] >option blue_gain  -1<
[plustek] Decoding option >blue_gain<
[plustek] ><
[plustek] >#<
[plustek] >#<
[plustek] >option red_lampoff   -1<
[plustek] Decoding option >red_lampoff<
[plustek] >option green_lampoff -1<
[plustek] Decoding option >green_lampoff<
[plustek] >option blue_lampoff  -1<
[plustek] Decoding option >blue_lampoff<
[plustek] ><
[plustek] >#<
[plustek] ># for adjusting the default gamma values<
[plustek] >#<
[plustek] >option redGamma         1.0<
[plustek] Decoding option >redGamma<
[plustek] >option greenGamma       1.0<
[plustek] Decoding option >greenGamma<
[plustek] >option blueGamma        1.0<
[plustek] Decoding option >blueGamma<
[plustek] >option grayGamma        1.0<
[plustek] Decoding option >grayGamma<
[plustek] ><
[plustek] >#<
[plustek] ># to enable TPA (non Plustek devices only)<
[plustek] ># 0 means default behaviour as specified in the internal tables<
[plustek] ># 1 means enable<
[plustek] >#<
[plustek] >option enableTPA 0<
[plustek] Decoding option >enableTPA<
[plustek] ><
[plustek] >#<
[plustek] ># model override functionality, currently only available for<
[plustek] ># Mustek devices, using NSCs' vendor ID: 0x0400 and<
[plustek] ># also their product ID: 0x1000 (LM9831) 0x1001 (LM9832)<
[plustek] >#<
[plustek] ># mov/PID    |    0x1000   |   0x1001<
[plustek] ># ---------------------------------------<
[plustek] ># 0 (default)| BearPaw1200 | BearPaw 2400<
[plustek] ># 1          |   ignored   | BearPaw 1200<
[plustek] >#<
[plustek] >option mov 0<
[plustek] Decoding option >mov<
[plustek] ><
[plustek] >#<
[plustek] ># and of course the device-name<
[plustek] >#<
[plustek] ># device /dev/usb/scanner0<
[plustek] >#device auto<
[plustek] ><
[plustek] >#<
[plustek] ># to define a new device, start with a new section:<
[plustek] ># [usb]<
[plustek] >#<
[plustek] attach (libusb:003:004, 0xfef15810, (nil))
[plustek] Device configuration:
[plustek] device name  : >libusb:003:004<
[plustek] USB-ID       : >0x0400-0x1000<
[plustek] model ovr.   : 0
[plustek] warmup       : 15s
[plustek] lampOff      : 300
[plustek] lampOffOnEnd : yes
[plustek] cacheCalData : no
[plustek] altCalibrate : no
[plustek] skipCalibr.  : no
[plustek] skipFine     : no
[plustek] skipFineWhite: no
[plustek] invertNegs.  : no
[plustek] pos_x        : 0
[plustek] pos_y        : 0
[plustek] pos_shading_y: -1
[plustek] neg_x        : 0
[plustek] neg_y        : 0
[plustek] neg_shading_y: -1
[plustek] tpa_x        : 0
[plustek] tpa_y        : 0
[plustek] tpa_shading_y: -1
[plustek] red gain     : -1
[plustek] green gain   : -1
[plustek] blue gain    : -1
[plustek] red lampoff  : -1
[plustek] green lampoff: -1
[plustek] blue lampoff : -1
[plustek] red Gamma    : 1.00
[plustek] green Gamma  : 1.00
[plustek] blue Gamma   : 1.00
[plustek] gray Gamma   : 1.00
[plustek] ---------------------
[plustek] usbDev_open(libusb:003:004,0x0400-0x1000)
[plustek] Vendor ID=0x0400, Product ID=0x1000
[plustek] usbio_DetectLM983x
[plustek] usbio_DetectLM983x: found LM9831
[plustek] Detected vendor & product ID: 0x0400-0x1000
[plustek] BearPaw device: 0x0400-0x1000-0 (15)
[plustek] Device description for >0x0400-0x1000-0< found.
[plustek] usb_initDev(21,0x0400,-1)
[plustek] Device WAF: 0x00000000
[plustek] Vendor adjusted to: >Mustek<
[plustek] LAMP-STATUS: 0x00000000
[plustek] RESETTING REGISTERS(-1)
[plustek] SETTING THE MISC I/Os
[plustek] MISC I/O after RESET: 0x44, 0x44, 0x4f
[plustek] Calibration file-name set to:
[plustek] >/root/.sane/Mustek-BearPaw_1200.cal<
[plustek] usb_SetScanParameters()
[plustek] * HDPI: 4.000
[plustek] * XDPI=150, HDPI=4.000
[plustek] * YDPI=150, MinDPIY=150
[plustek] * DataPixelStart=140, LineEnd=140
[plustek] >> End-Start=0, HDPI=4.00
[plustek] * Full Steps to Skip at Start = 0x0000
[plustek] * StepSize(Preset) = 166 (0x00a6)
[plustek] * Scan calculations...
[plustek] * LineLength=5381, LineRateColor=1
[plustek] * Stepsize = 337, 0x46=0x01 0x47=0x51
[plustek] * DPD =132 (0x0084)
[plustek] * DPD =5249 (0x1481), step size=337, steps2rev=30
[plustek] * llen=5381, lineRateColor=1, qtcnt=3, hfcnt=3
[plustek] usb_GetMCLKDivider()
[plustek] * Integration Time Adjust = 0 (HDPI=4.000,MCLKD=4.000)
[plustek] * Setting GreenPWMDutyCycleHigh
[plustek] * Current MCLK Divider = 4.000000
[plustek] * MOTOR-Settings: PWM=0x10, PWM_DUTY=0x04
[plustek] * FFStepSize = 166, [0x48] = 0x00, [0x49] = 0xa6
[plustek] * PhyBytes   = 2
[plustek] * PhyLines   = 2
[plustek] * TotalBytes = 4
[plustek] * PL=295, coeffsize=216, scaler=1
[plustek] * PauseLimit = 2, [0x4e] = 0x01, [0x4f] = 0x01
[plustek] usb_SetScanParameters() done.
[plustek] usbDev_getCaps()
[plustek] Scanner information:
[plustek] Vendor : Mustek
[plustek] Model  : BearPaw 1200
[plustek] Flags  : 0x00000000
[plustek] drvclose()
[plustek] usbDev_stopScan()
[plustek] usbDev_ScanEnd(), start=0, park=0
[plustek] usbDev_close()
[plustek] attach: model = >BearPaw 1200<
[plustek] sane_get_devices (0xfef17938, 0)
[plustek] sane_open - libusb:003:004
[plustek] Presetting Gamma tables (len=4096)
[plustek] * Channel[0], gamma 1.000
[plustek] * Channel[1], gamma 1.000
[plustek] * Channel[2], gamma 1.000
[plustek] * Channel[3], gamma 1.000
[plustek] ----------------------------------
[plustek] sane_start
[plustek] usbDev_open(libusb:003:004,0x0400-0x1000)
[plustek] Vendor ID=0x0400, Product ID=0x1000
[plustek] usbio_DetectLM983x
[plustek] usbio_DetectLM983x: found LM9831
[plustek] Detected vendor & product ID: 0x0400-0x1000
[plustek] BearPaw device: 0x0400-0x1000-0 (15)
[plustek] Device description for >0x0400-0x1000-0< found.
[plustek] usb_initDev(21,0x0400,21)
[plustek] Device WAF: 0x00000000
[plustek] Vendor adjusted to: >Mustek<
[plustek] LAMP-STATUS: 0x00000000
[plustek] RESETTING REGISTERS(21)
[plustek] USING MISC I/O settings
[plustek] MISC I/O after RESET: 0x44, 0x44, 0x4f
[plustek] usbDev_getCaps()
[plustek] scanmode = 3
[plustek] usbDev_getCropInfo()
[plustek] usb_GetImageInfo()
[plustek] PPL = 248
[plustek] LPA = 150
[plustek] BPL = 744
[plustek] brightness 0, contrast 0
[plustek] usbDev_setScanEnv()
[plustek] usb_SaveImageInfo()
[plustek] dwFlag = 0x00000400
[plustek] usb_GetImageInfo()
[plustek] * Preview Mode NOT set!
[plustek] Setting map[0] at 0x0a04a874
[plustek] Setting map[1] at 0x0a04e874
[plustek] Setting map[2] at 0x0a052874
[plustek] usbDev_startScan()
[plustek] * HDPI: 12.000
[plustek] * XDPI=50, HDPI=12.000
[plustek] * YDPI=150, MinDPIY=150
[plustek] LAMP-STATUS: 0x00000000
[plustek] Switching Lamp on
[plustek] Warmup-Timer started
[plustek] LAMP-STATUS: 0x00000001
[plustek] Lamp-Timer stopped
[plustek] dwflag = 0x40000400 dwBytesPerLine = 744
[plustek] TIME START
[plustek] reader_process started (forked)
[plustek] reader_process:starting to READ data (111600 bytes)
[plustek] buf = 0x0a056ba0
[plustek] usbDev_PrepareScan()
[plustek] sane_start done
[plustek] usb_DoCalibration()
[plustek] goto shading position
[plustek] ShadingOriginY=20
[plustek] MotorDPI=600, MaxMoveSpeed=1.250, FFStepSize=333, Steps=40
[plustek] MOTOR: PWM=0x03, PWM_DUTY=0x20 0x45=0x13 0x48=0x01, 0x49=0x4d
[plustek] MCLK_FFW = 6 --> 0x0a
[plustek] shading position reached
[plustek] kNEC8861 adjustments
[plustek] SETMCLK[4/2], using entry 6: 11.500000, 600
[plustek] No Plustek model: 50dpi
[plustek] SETMCLK[4/2], using entry 0: 3.500000, 50
[plustek] Settings done, so start...
[plustek] ###### ADJUST GAIN (COARSE)#######
[plustek] usb_AdjustGain()
[plustek] Coarse Calibration Strip:
[plustek] Lines    = 1
[plustek] Pixels   = 5100
[plustek] Bytes    = 30600
[plustek] Origin.X = 70
[plustek] usb_SetScanParameters()
[plustek] * HDPI: 1.000
[plustek] * XDPI=600, HDPI=1.000
[plustek] * YDPI=600, MinDPIY=150
[plustek] * DataPixelStart=140, LineEnd=5240
[plustek] >> End-Start=5100, HDPI=1.00
[plustek] * Full Steps to Skip at Start = 0x0000
[plustek] * StepSize(Preset) = 190 (0x00be)
[plustek] * Scan calculations...
[plustek] * LineLength=5381, LineRateColor=1
[plustek] * Stepsize = 1349, 0x46=0x05 0x47=0x45
[plustek] * DPD =270 (0x010e)
[plustek] * DPD =5111 (0x13f7), step size=1349, steps2rev=0
[plustek] * llen=5381, lineRateColor=1, qtcnt=3, hfcnt=3
[plustek] usb_GetMCLKDivider()
[plustek] * Integration Time Adjust = 2 (HDPI=1.000,MCLKD=3.500)
[plustek] * Stepsize = 2023, 0x46=0x07 0x47=0xe7
[plustek] * DPD =369 (0x0171)
[plustek] * DPD =5012 (0x1394), step size=2023, steps2rev=0
[plustek] * llen=5381, lineRateColor=1, qtcnt=3, hfcnt=3
[plustek] * Setting GreenPWMDutyCycleHigh
[plustek] * Current MCLK Divider = 3.500000
[plustek] * MOTOR-Settings: PWM=0x10, PWM_DUTY=0x04
[plustek] * FFStepSize = 95, [0x48] = 0x00, [0x49] = 0x5f
[plustek] * PhyBytes   = 30602
[plustek] * PhyLines   = 1
[plustek] * TotalBytes = 30602
[plustek] * PL=290, coeffsize=192, scaler=1
[plustek] * PauseLimit = 30, [0x4e] = 0x0d, [0x4f] = 0x01
[plustek] usb_SetScanParameters() done.
[plustek] Warmup: Waiting 15 seconds
[plustek] usb_ScanBegin()
[plustek] usb_DownloadShadingData(1)
[plustek] Register Dump before reading data:
[plustek] 0x00: XX 00 81 00 00 XX XX 03  05 20 00 02 7c 3f 15 04
[plustek] 0x10: 16 01 02 05 06 00 00 0a  16 02 01 01 00 00 00 00
[plustek] 0x20: 14 f9 00 8c 14 78 00 00  03 01 04 91 00 00 3f ff
[plustek] 0x30: 00 00 00 00 00 00 00 00  00 00 00 01 01 01 00 00
[plustek] 0x40: 40 00 20 00 00 03 07 e7  00 5f 00 00 00 00 0d 01
[plustek] 0x50: 00 fc 13 94 00 13 10 04  00 44 44 4f 00 00 00 00
[plustek] 0x60: 00 25 18 b9 02 06 a8 48  00 03 00 00 30 00 00 02
[plustek] 0x70: 00 00 00 00 30 00 00 00  00 00 00 00 00 00 00 00
[plustek] usb_IsDataAvailableInDRAM()
[plustek] Data is available
[plustek] usb_ScanReadImage() failed
[plustek] usb_AdjustGain() failed
[plustek] Coarse Calibration failed!!!
[plustek] calibration failed!!!
[plustek] drvclose()
[plustek] TIME END 1: 45s
[plustek] usbDev_stopScan()
[plustek] usbDev_ScanEnd(), start=1, park=1
[plustek] read failed, status = -9003, errno 110
[plustek] (SIG) Child is down (signal=17)
[plustek] MotorDPI=600, MaxMotorSpeed=1.250, FFStepSize=333
[plustek] MOTOR: PWM=0x04, PWM_DUTY=0x04 0x45=0x13 0x48=0x01, 0x49=0x4d
[plustek] MCLK_FFW = 6 --> 0x0a
[plustek] Lamp-Timer started (using ITIMER)
[plustek] usbDev_close()
[plustek] close_pipe (r_pipe)
scanimage: sane_read: Error during device I/O
[plustek] sane_close
[plustek] sane_exit
[plustek] Shutdown called (dev->fd=-1, libusb:003:004)
[plustek] Waiting for scanner-ready...
[plustek] Switching lamp off...
[plustek] LAMP-STATUS: 0x00000001
[plustek] Switching Lamp off
[plustek] LAMP-STATUS: 0x00000000
[plustek] Lamp-Timer stopped

I'm using kernel 2.6.9-1.667.

Can anyone help me with this problem?

Thanks.

BR,
Uros.