[sane-devel] Sheetfed Scanners

Gerhard Jaeger gerhard at gjaeger.de
Fri Oct 31 10:21:06 UTC 2008


Hi Jack,

On Thursday 30 October 2008 19:53:46 John McGill wrote:
[SNIPSNAP]
> Your email inspired me to keep going. I have made some progress on the DS Mobile.  
> (I will wait to work on my TravelScanPro 600 until after I learn how to get this one working).  

good to hear that ;)

> Based on my usbsnoop logs, I made new new DCapsDef and HWDef sections. I think I have the 
> motor speeds correct.  

Great. In fact the motor speeds are correct, when the thingy moves smoothly.

> The colors are still not correct using SENSORORDER_gbr or rgb. 
> When I try other combinations, I get a I/O error. 

Not that good...
Which colors are swapped?
Have you tried SENSORORDER_gbr? 
What about the settings for IRIScan/Q-Scan USB001? 

I noticed that the sensor order changes depending on the resolution to scan.
Try to scan @75 dpi and @ 300 dpi - what changes?

> There are two parameters that I don't know how to set, which may be 
> the key to this problem. Maybe you could help.  
> 
> First, in HW Def, just after reg 0x29. The 464 settings are:
> 
> 	{ 3, 500, 1045, 500, 990, 500, 990 },
> 	{ 2, 500, 1045, 500, 990, 500, 990 },
> 
> While the Qscan uses:
> 
> 	{ 3,    0,    0, 2593, 4600,    0,    0 },
> 	{ 2, 2593, 7100, 2593, 4600, 2593, 4480 },
> 
> I am currently using the 464 settings. Next I will try the Qscan settings for 
> this parameter. Are these values based on the usb snoop log? Are they guessed or calculated? 

The first sets will come out of the snoop log. The first line will be
used for gray scans, the second one for color scans. The first value is reg 0x29, the 
following ones are for registers 0x2c...0x37, the rgb lamp on off values...
Yes I know these settings are also found later on and are somehow duplicated, but I
never found the time to cleanup that ;)

In general I got the final settings from the calibration step, where I set
the debug environment (epxort SANE_DEBUG_PLUSTEK=19) and see what the automatic
lamp adjustment produces:

[plustek] ###### ADJUST LAMP (COARSE)#######
[plustek] MotorDPI=1200, MaxMoveSpeed=0.230, FFStepSize=452, Steps=180
[plustek] MOTOR: PWM=0x08, PWM_DUTY=0x1f 0x45=0x13 0x48=0x01, 0x49=0xc4
[plustek] MCLK_FFW = 12 --> 0x16
   .
   .
   .
[plustek] usb_ScanBegin() done.
[plustek] usb_IsDataAvailableInDRAM()
[plustek] Data is available
[plustek] usbDev_ScanEnd(), start=1, park=0
[plustek] * PhyBytes  = 30606
[plustek] * PhyPixels = 5100
[plustek] red_lamp_off  = 1911/2855/3800
[plustek] green_lamp_off = 1661/2480/3300
[plustek] blue_lamp_off = 1361/2030/2700
[plustek] CUR(R,G,B)= 0xffff(65535), 0xe40f(58383), 0xd404(54276)
[plustek] * TOO BRIGHT --> reduce
[plustek] usb_AdjustLamps(1)
   .
   .
   .
[plustek] Data is available
[plustek] usbDev_ScanEnd(), start=1, park=0
[plustek] * PhyBytes  = 30606
[plustek] * PhyPixels = 5100
[plustek] red_lamp_off  = 1911/2383/2855
[plustek] green_lamp_off = 1661/2480/3300
[plustek] blue_lamp_off = 1361/2030/2700
[plustek] CUR(R,G,B)= 0xe235(57909), 0xe4fc(58620), 0xd42b(54315)
[plustek] * red_lamp_on    = 23
[plustek] * red_lamp_off   = 2383
[plustek] * green_lamp_on  = 23
[plustek] * green_lamp_off = 2480
[plustek] * blue_lamp_on   = 23
[plustek] * blue_lamp_off  = 2030
[plustek] cano_AdjustLightsource() done.
[plustek] ###### ADJUST OFFSET (COARSE) ####

After the "lamp calibration" you'll get the values you need.

This lamp calibration lasts long if the start values are bad. The goal
is to find much better values. The lamp_on values could be retrived
from the usbsnoop log.

> Second, in DCapsDef there is a setting called sensor distance. The value is 
> different for the Qscan and the TS464. I tried the values of 8 and then 2 and 
> didn't see much of a difference.   

The "distance" is responsible for min DPI limitation - see 
plustek-usbscan.c

> Should we put this email on the SANE message board, in case someone else has 
> the same questions in the future? 

I'll cc it.

Good luck,
- Gerhard



More information about the sane-devel mailing list