<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi, <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I am trying to build sane-backend  (tarball 1.0.23) on windows.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">It's my first approach to cygwin, but the build passed seemlessly, with every backend.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">And after installing the last libusb-win32 (is it the way it should work?), sane-find-scanner.exe found my scanner.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new
 roman,new york,times,serif; background-color: transparent; font-style: normal;"> scanimage also list it:</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-style: italic;">C:\sane\bin>scanimage -L<br>device `plustek:libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2206' is a Canon CanoScan N650U/N656U flatbed scanner<br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Detection work, but then:<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span
 style="font-style: italic;">scanimage > image.pnm</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: italic;"><span style="font-style: italic;">scanimage: sane_read: Operation was cancelled</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: italic;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">The scanner lights up its lamp but then do nothing else. it seems.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">The changes i made on plustek.conf, to add and configure the device never seems to be read.</div><div
 style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I suspect one (or maybe multiples) problem(s) with the filesystem, path to config files?<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">The auto-detection call my device: 'plustek:libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2206' .</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">What should i write on plustek.conf?</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I tried:<span style="font-style: italic;"><br>[usb] 0x04a9 0x2206<br>device
 plustek:libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2206</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: italic;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I also tried:<br><span style="font-style: italic;">[usb] 0x04a9 0x2206<br>device 'plustek:libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2206'</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>Maybe i never</span> figured to write the good config, (wich is very likely, heh..) but the program, at another time, cannot read to
 another filesystem path, when it tries to write to i.e. "<span>/home/Station/.sane/Canon_CanoScan_N650U_N656U-coarse.cal" </span>where it is supposed to read or write its calibrations data?</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent;">I can't tell more as i couldn't make the settings in plustek.conf to apply, (wanted to bypass that problem using "option skipcalibration=1").</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I need help as you could guess:<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I
 don't know how to debug libusb-win32 "driver" ( i tried several versions from 0.1 to 1.2.6)<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I tried to set USB_DEBUG and SANE_DEBUG without success. <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I would like to have some advises to continue with those tests...</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Thanks you very much if you could guide me in this process.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0);
 font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"> In my case no updated drivers exists for my device on windows 7... So thanks everyone for having made those piece of code working with win32!</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Even if it is not actually working, it probably just lacks testing and some tweaks, i could tryout if one can guide me a little more.<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Some could also find sane on windows usefull for network scanning, the big missing functionnality on pretty much every windows driver...</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif;
 background-color: transparent; font-style: normal;">(My case: i use virtualbox+debian+apache+phpsane to scan on windows for now but would find native sane version much more clean, haha :)<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">I had only success with SANE_DEBUG_PLUSTEK:<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-style: italic;">C:\sane\bin\set SANE_DEBUG_PLUSTEK=3 </span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span
 style="font-style: italic;">C:\sane\bin>scanimage >image.pnm<br>[sanei_debug] Setting debug level of plustek to 3.<br>[plustek] UIO error<br>[plustek] #########################<br>[plustek] usb_SpeedTest(38,1000000)<br>[plustek] Scanner not ready!!!<br>[plustek] UIO error<br>[plustek] UIO error<br>[plustek] cano_PrepareToReadWhiteCal() failed<br>[plustek] calibration failed!!!<br>[plustek] reader_process: read failed, status = -9004, errno 2<br>scanimage: sane_read: Operation was cancelled</span><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: italic;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color:
 transparent; font-style: normal;">Here are the results with SANE_DEBUG_PLUSTEK=255 if necessary:</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span style="font-style: italic;"><br>C:\sane\bin>set SANE_DEBUG_PLUSTEK=255<br><br>C:\sane\bin>scanimage >image.pnm<br>[sanei_debug] Setting debug level of plustek to 255.<br>[plustek] Plustek backend V0.52-10, part of sane-backends 1.0.23<br>[plustek] Retrieving all supported and conntected devices<br>[plustek] Checking for 0x07b3-0x0010<br>[plustek] Checking for 0x07b3-0x0011<br>[plustek] Checking for 0x07b3-0x0013<br>[plustek] Checking for 0x07b3-0x0017<br>[plustek] Checking for 0x07b3-0x0015<br>[plustek] Checking for 0x07b3-0x0015<br>[plustek] Checking for 0x07b3-0x0017<br>[plustek] Checking for 0x07b3-0x0013<br>[plustek] Checking for 0x07b3-0x0011<br>[plustek] Checking for
 0x07b3-0x0010<br>[plustek] Checking for 0x07b3-0x0014<br>[plustek] Checking for 0x07b3-0x0014<br>[plustek] Checking for 0x07b3-0x0016<br>[plustek] Checking for 0x07b3-0x0017<br>[plustek] Checking for 0x07b3-0x0017<br>[plustek] Checking for 0x07b3-0x0007<br>[plustek] Checking for 0x07b3-0x000f<br>[plustek] Checking for 0x07b3-0x000f<br>[plustek] Checking for 0x07b3-0x0005<br>[plustek] Checking for 0x07b3-0x0014<br>[plustek] Checking for 0x07b3-0x0012<br>[plustek] Checking for 0x0400-0x1000<br>[plustek] Checking for 0x0400-0x1001<br>[plustek] Checking for 0x0400-0x1001<br>[plustek] Checking for 0x0458-0x2007<br>[plustek] Checking for 0x0458-0x2008<br>[plustek] Checking for 0x0458-0x2009<br>[plustek] Checking for 0x0458-0x2013<br>[plustek] Checking for 0x0458-0x2015<br>[plustek] Checking for 0x0458-0x2016<br>[plustek] Checking for 0x03f0-0x0505<br>[plustek] Checking for 0x03f0-0x0605<br>[plustek] Checking for 0x04b8-0x010f<br>[plustek] Checking for
 0x04b8-0x011d<br>[plustek] Checking for 0x1606-0x0050<br>[plustek] Checking for 0x1606-0x0060<br>[plustek] Checking for 0x1606-0x0160<br>[plustek] Checking for 0x049f-0x001a<br>[plustek] Checking for 0x04a9-0x2206<br>[plustek] Checking for 0x04a9-0x2207<br>[plustek] Checking for 0x04a9-0x2208<br>[plustek] Checking for 0x04a9-0x220d<br>[plustek] Checking for 0x04a9-0x220e<br>[plustek] Checking for 0x04a9-0x2220<br>[plustek] Checking for 0x0a82-0x4600<br>[plustek] Checking for 0x0a82-0x6620<br>[plustek] Checking for 0x04a7-0x0427<br>[plustek] Checking for 0x0a53-0x1000<br>[plustek] Available and supported devices:<br>[plustek] Device: >libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2206< - 0x04a9x0x2206<br><br>[plustek] attach (auto, 0x286980, 0x0)<br>[plustek] Device configuration:<br>[plustek] device name  : ><<br>[plustek] USB-ID       : ><<br>[plustek] model ovr.   : 0<br>[plustek]
 warmup       : -1s<br>[plustek] lampOff      : -1<br>[plustek] lampOffOnEnd : yes<br>[plustek] cacheCalData : no<br>[plustek] altCalibrate : no<br>[plustek] skipCalibr.  : no<br>[plustek] skipFine     : no<br>[plustek] skipFineWhite: no<br>[plustek] skipDarkStrip: no<br>[plustek] incDarkTarget: yes<br>[plustek] invertNegs.  : no<br>[plustek] dis.Speedup  : no<br>[plustek] pos_x        : 0<br>[plustek] pos_y        : 0<br>[plustek] pos_shading_y: -1<br>[plustek] neg_x        : 0<br>[plustek] neg_y        : 0<br>[plustek] neg_shading_y: -1<br>[plustek] tpa_x        : 0<br>[plustek] tpa_y        : 0<br>[plustek] tpa_shading_y: -1<br>[plustek] red
 gain     : -1<br>[plustek] green gain   : -1<br>[plustek] blue gain    : -1<br>[plustek] red offset   : -1<br>[plustek] green offset : -1<br>[plustek] blue offset  : -1<br>[plustek] red lampoff  : -1<br>[plustek] green lampoff: -1<br>[plustek] blue lampoff : -1<br>[plustek] red Gamma    : 1.00<br>[plustek] green Gamma  : 1.00<br>[plustek] blue Gamma   : 1.00<br>[plustek] gray Gamma   : 1.00<br>[plustek] ---------------------<br>[plustek] usbDev_open(auto,) - 0x20043048<br>[plustek] Vendor ID=0x04A9, Product ID=0x2206<br>[plustek] usbio_DetectLM983x<br>[plustek] usbio_DetectLM983x: found LM9832/3<br>[plustek] Detected vendor & product ID: 0x04A9-0x2206<br>[plustek] Device description for >0x04A9-0x2206< found.<br>[plustek] usb_initDev(38,0x04a9,-1)<br>[plustek] Device WAF  : 0x00004002<br>[plustek] Transferrate: 1000000
 Bytes/s<br>[plustek] Device Flags: 0x00000000<br>[plustek] Vendor adjusted to: >Canon<<br>[plustek] LAMP-STATUS: 0x00000001 (on)<br>[plustek] RESETTING REGISTERS(-1) - 0x80<br>[plustek] SETTING THE MISC I/Os<br>[plustek] MISC I/O after RESET: 0x66, 0x16, 0x91<br>[plustek] Calibration file-names set to:<br>[plustek] >/home/Station/.sane/Canon_CanoScan_N650U_N656U-coarse.cal<<br>[plustek] >/home/Station/.sane/Canon_CanoScan_N650U_N656U-fine.cal<<br>[plustek] usb_SetScanParameters()<br>[plustek] * HDPI: 4.000<br>[plustek] * XDPI=150, HDPI=4.000<br>[plustek] * YDPI=150, MinDPIY=75<br>[plustek] * DataPixelStart=89, LineEnd=89<br>[plustek] * DataPixelStart=90, LineEnd=90 (ADJ)<br>[plustek] >> End-Start=0, HDPI=4.00<br>[plustek] * Full Steps to Skip at Start = 0x0000<br>[plustek] * StepSize(Preset) = 121 (0x0079)<br>[plustek] * Scan calculations...<br>[plustek] * LineLength=6080, LineRateColor=3<br>[plustek] * Stepsize = 571, 0x46=0x02
 0x47=0x3b<br>[plustek] * DPD =16404 (0x4014)<br>[plustek] * DPD =1836 (0x072c), step size=571, steps2rev=63<br>[plustek] * llen=6080, lineRateColor=3, qtcnt=8, hfcnt=8<br>[plustek] usb_GetMCLKDivider()<br>[plustek] usb_GetMCLKDiv()<br>[plustek] - lower mclkdiv limit=4.000000<br>[plustek] - upper mclkdiv limit=32.500000<br>[plustek] - hdpi          = 4.000<br>[plustek] - pixelbits     = 8<br>[plustek] - pixelsperline = 0<br>[plustek] - linelen       = 6080<br>[plustek] - transferrate  = 1000000<br>[plustek] - MCLK Divider  = 0<br>[plustek] - Current MCLK Divider = 4<br>[plustek] * Integration Time Adjust = 0 (HDPI=4.000,MCLKD=4.000)<br>[plustek] * Setting GreenPWMDutyCycleHigh<br>[plustek] * Current MCLK Divider = 4.000000<br>[plustek] * MOTOR-Settings: PWM=0x08, PWM_DUTY=0x1f<br>[plustek] * FFStepSize = 428, [0x48] = 0x01, [0x49] = 0xac<br>[plustek]
 * PhyBytes   = 6<br>[plustek] * PhyLines   = 4<br>[plustek] * TotalBytes = 24<br>[plustek] * PL=295, coeffsize=216, scaler=3<br>[plustek] * PauseLimit = 2, [0x4e] = 0x01, [0x4f] = 0x01<br>[plustek] * Scansteps=72 (9*1200/150)<br>[plustek] usb_SetScanParameters() done.<br>[plustek] usbDev_getCaps()<br>[plustek] Scanner information:<br>[plustek] Vendor : Canon<br>[plustek] Model  : CanoScan N650U/N656U<br>[plustek] Flags  : 0x00000000<br>[plustek] drvclose()<br>[plustek] usbDev_stopScan()<br>[plustek] usbDev_ScanEnd(), start=0, park=0<br>[plustek] usbDev_close()<br>[plustek] attach: model = >CanoScan N650U/N656U<<br>[plustek] sane_get_devices (0x288ab8, 0)<br>[plustek] sane_open - libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2206<br>[plustek] Presetting Gamma tables (len=4096)<br>[plustek] * Channel[0], gamma 2.000<br>[plustek] * Channel[1], gamma 2.000<br>[plustek] * Channel[2], gamma 2.000<br>[plustek] * Channel[3], gamma
 2.000<br>[plustek] ----------------------------------<br>[plustek] Checking MISC IO[0]=0x66<br>[plustek] * port 1 configured as input, status: RELEASED (40)<br>[plustek] * port 2 configured as input, status: RELEASED (41)<br>[plustek] Checking MISC IO[1]=0x16<br>[plustek] * port 3 configured as input, status: RELEASED (42)<br>[plustek] Checking MISC IO[2]=0x91<br>[plustek] sane_start<br>[plustek] usbDev_open(libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2206,) - 0x0<br>[plustek] Vendor ID=0x04A9, Product ID=0x2206<br>[plustek] usbio_DetectLM983x<br>[plustek] usbio_DetectLM983x: found LM9832/3<br>[plustek] Detected vendor & product ID: 0x04A9-0x2206<br>[plustek] Device description for >0x04A9-0x2206< found.<br>[plustek] usb_initDev(38,0x04a9,38)<br>[plustek] Device WAF  : 0x00004002<br>[plustek] Transferrate: 1000000 Bytes/s<br>[plustek] Device Flags: 0x00000006<br>[plustek] Vendor adjusted to: >Canon<<br>[plustek] LAMP-STATUS: 0x00000000
 (off)<br>[plustek] RESETTING REGISTERS(38) - 0x80<br>[plustek] USING MISC I/O settings<br>[plustek] MISC I/O after RESET: 0x66, 0x16, 0x91<br>[plustek] usbDev_getCaps()<br>[plustek] scanmode = 3<br>[plustek] usbDev_getCropInfo()<br>[plustek] usb_GetImageInfo()<br>[plustek] Area: cx=1216, cy=900<br>[plustek] PPL = 202<br>[plustek] LPA = 150<br>[plustek] BPL = 606<br>[plustek] brightness 0, contrast 0<br>[plustek] usbDev_setScanEnv()<br>[plustek] usb_SaveImageInfo()<br>[plustek] * dwFlag = 0x00000400<br>[plustek] usb_GetImageInfo()<br>[plustek] Area: cx=1216, cy=900<br>[plustek] * Preview Mode NOT set!<br>[plustek] AdjustCISLamps(1)<br>[plustek]  * setting color mode<br>[plustek] usb_AdjustLamps(1)<br>[plustek] Setting map[0] at 0x20047d18<br>[plustek] Setting map[1] at 0x2004bd18<br>[plustek] Setting map[2] at 0x2004fd18<br>[plustek] usbDev_startScan()<br>[plustek] * HDPI: 12.000<br>[plustek] * XDPI=50, HDPI=12.000<br>[plustek] * YDPI=75,
 MinDPIY=75<br>[plustek] LAMP-STATUS: 0x00000000 (off)<br>[plustek] Switching Lamp on<br>[plustek] usb_AdjustLamps(1)<br>[plustek] Warmup-Timer started<br>[plustek] LAMP-STATUS: 0x00000001 (on)<br>[plustek] Lamp-Timer stopped<br>[plustek] dwflag = 0x40000400 dwBytesLine = 606<br>[plustek] Lines          = 150<br>[plustek] Bytes per Line = 606<br>[plustek] Bitdepth       = 8<br>[plustek] TIME START<br>[plustek] local_sane_start done<br>[[plustekplustek] ] sane_start donereader_process started (forked)<br>] reader_process:starting to READ data (90900 bytes)<br>[plustek] buf = 0x2005c978<br>[plustek] usbDev_PrepareScan()<br>[plustek] UIO error<br>[plustek] cano_DoCalibration()<br>[plustek] #########################<br>[plustek] usb_SpeedTest(38,1000000)<br>[plustek] GETMCLK[7/2], using entry 6: 6.000, 600<br>[plustek] SETMCLK[7/2]: 6.000<br>[plustek]
 usb_SetScanParameters()<br>[plustek] Scanner not ready!!!<br>[plustek] #########################<br>[plustek] usb_AutoWarmup()<br>[plustek] - function skipped, CIS device!<br>[plustek] GETMCLK[7/2], using entry 6: 6.000, 600<br>[plustek] SETMCLK[7/2]: 6.000<br>[plustek] GETMCLK[7/2], using entry 0: 7.000, 50<br>[plustek] SETMCLK[7/2]: 7.000<br>[plustek] ###### ADJUST LAMP (COARSE)#######<br>[plustek] UIO error<br>[plustek] UIO error<br>[plustek] cano_PrepareToReadWhiteCal() failed<br>[plustek] calibration failed!!!<br>[[plustekplustek] ] reader_process: read failed, status = IPC: Transferrate = -2<br>0000009004 Bytes/s, errno 2<br>[plustek<br>] sane_read - read 0 bytes<br>[plustek] drvclose()<br>[plustek] (SIG) Child is down (signal=20)<br>[plustek] TIME END 1: 68s<br>[plustek] usbDev_stopScan()<br>[plustek] usbDev_ScanEnd(), start=1, park=1<br>[plustek] usbDev_close()<br>[plustek] close_pipe (r_pipe)<br>scanimage: sane_read: Operation was
 cancelled<br>[plustek] sane_cancel<br>[plustek] do_cancel<br>[plustek] >>>>>>>> killing reader_process <<<<<<<<<br>[plustek] reader_process killed<br>[plustek] TIME END 2: 68s<br>[plustek] sane_close<br>[plustek] sane_exit<br>[plustek] Shutdown called (dev->fd=-1, libusb:bus-0:\\.\libusb0-0001--0x04a9-0x2<br>206)<br>[plustek] Waiting for scanner-ready...<br>[plustek] Lamp-Timer stopped</span><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: italic;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent;">Thanks you and best regards, <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style:
 italic;">Fred.<br></div></div></body></html>