[sane-devel] HP Scanjet 2400c (partial) success, 100 and 300 dpi work both in grayscale and colour (some small changes needed)

stef stef.dev at free.fr
Sun May 30 09:14:23 UTC 2010


Le vendredi 28 mai 2010 16:07:50 Piotr Mis, vous avez écrit :
> Very sorry, sent to soon.
> 
> Hello,
> 
> I was delighted that there is some progress with Scanjet 2400c.
> 
> I ran it through some tests, and fixed what I could. Results:
> 
> git version of genesys backend works partially:
> 
> grayscale:
>       * 50  dpi: hangs
>       * 100 dpi: works partially, motor step too big, need to switch off
>         the scanner to prevent damage
>       * 300 dpi: works nicely
>       * 600 dpi: picture distorted
> colour:
> as grayscale, but colour channels seem to be switched and slightly
> offset vertically.
> 
> I tried to fix it myself and managed to fix the colour channels and the
> motor step in 100dpi.
> 
> 
> My changes below, comments/advice very welcome:
> 
> 1. The scanner  (at least mine) is RBG not BGR, this fixes the vertical
> offset as well:
> 
> 
> diff --git a/backend/genesys_devices.c b/backend/genesys_devices.c
> index a8da85d..3459090 100644
> --- a/backend/genesys_devices.c
> +++ b/backend/genesys_devices.c
> @@ -1173,7 +1173,7 @@ Genesys_Model hp2400c_model = {
> 
>    0, 24, 48,                   /* RGB CCD Line-distance correction in
> pixel */
> 
> -  COLOR_ORDER_BGR,             /* Order of the CCD/CIS colors */
> +  COLOR_ORDER_RGB,             /* Order of the CCD/CIS colors */
> 
>    SANE_FALSE,                  /* Is this a CIS scanner? */
>    SANE_FALSE,                  /* Is this a sheetfed scanner? */
> 
> 
> 2. The motor definition for 100 dpi from FULL_STEP to HALF_STEP:
> 
> diff --git a/backend/genesys_gl646.h b/backend/genesys_gl646.h
> index 5dc3725..695d55f 100644
> --- a/backend/genesys_gl646.h
> +++ b/backend/genesys_gl646.h
> @@ -555,11 +555,11 @@ static Motor_Master motor_master[] = {
> 
>    /* HP2400/G2410 motor settings base motor dpi = 600 */
>    {MOTOR_HP2400,  50, SANE_TRUE ,  50, HALF_STEP, SANE_FALSE,
> SANE_FALSE, 63,
> -  {MOTOR_HP2400, 100, SANE_TRUE , 100, FULL_STEP, SANE_FALSE,
> SANE_TRUE,  63, 1
> +  {MOTOR_HP2400, 100, SANE_TRUE , 100, HALF_STEP, SANE_FALSE,
> SANE_TRUE,  63, 1
>    {MOTOR_HP2400, 300, SANE_TRUE , 300, HALF_STEP, SANE_FALSE,
> SANE_TRUE , 63, 3
>    {MOTOR_HP2400, 600, SANE_TRUE , 600, FULL_STEP, SANE_FALSE,
> SANE_TRUE , 63,
>    {MOTOR_HP2400,  50, SANE_FALSE,  50, HALF_STEP, SANE_FALSE,
> SANE_FALSE, 63,
> -  {MOTOR_HP2400, 100, SANE_FALSE, 100, FULL_STEP, SANE_FALSE,
> SANE_TRUE,  63, 1
> +  {MOTOR_HP2400, 100, SANE_FALSE, 100, HALF_STEP, SANE_FALSE,
> SANE_TRUE,  63, 1
>    {MOTOR_HP2400, 300, SANE_FALSE, 300, HALF_STEP, SANE_FALSE,
> SANE_TRUE , 63, 3
>    {MOTOR_HP2400, 600, SANE_FALSE, 600, FULL_STEP, SANE_FALSE,
> SANE_TRUE , 63,
> 
> What I'm still really missing is the preview in xsane, has probably
> something to do with not working 50dpi mode.
> 
> Regards,
> 
> Piotr
> 
	Hello,

	so with these changes 100 dpi is working ? If you wish I can send you my 
log decoding scripts. By recording scanner activity under windows with 
usbsnoop, then processing it through them, you'll have the values to put in 
HP2400 motor and sensor tables for the modes that  aren't working yet.

Regards,
	Stef 



More information about the sane-devel mailing list