[sane-devel] Fujitsu USB scanner support working!

Till Kamppeter till.kamppeter at gmx.net
Sat Feb 15 20:40:57 GMT 2003


Thank you for the patch. The "epson" backend works correctly now. I have 
included the patch in the SANE package for Mandrake 9.1.

    Till


Ron Cemer wrote:
> Sure.  Here is the Epson patch.  It makes epson.conf work properly with 
> lines formatted like "usb 0x04b8 0x011e" (where 0x04b8 is the vendor and 
> 0x011e is the product).
> 
> Henning, can you put this into the latest version?
> 
> The fujitsu patches are huge, since they also add USB support, and 
> support for the fi-4220C scanner.  I've posted them before, and they are 
> in the process of being reviewed.
> 
> Thanks!
> Ron
> 
> Till Kamppeter wrote:
> 
>> Can you post a patch which fixes both the "fujitsu" and the "epson" 
>> backend?
>>
>>    Till
>>
> 
> ------------------------------------------------------------------------
> 
> --- backend/epson.c.orig	2002-12-31 13:20:33.000000000 -0800
> +++ backend/epson.c	2003-02-15 10:22:52.000000000 -0800
> @@ -1709,16 +1709,6 @@
>  	 */
>  
>  	/*
> -	 * if the config file contains a line "usb /dev/usbscanner", then handle 
> -	 * this here and use the USB device from now on.
> -	 */
> -	if (s->hw->connection == SANE_EPSON_USB)
> -	{
> -		/* we have a match for the USB string and adjust the device name */
> -		sanei_usb_init();
> -	}
> -
> -	/*
>  	 *  if interface is SCSI do an inquiry.
>  	 */
>  
> @@ -2215,6 +2205,8 @@
>  	if( version_code != NULL)
>  		*version_code = SANE_VERSION_CODE (V_MAJOR, V_MINOR, SANE_EPSON_BUILD);
>  
> +	sanei_usb_init();
> +
>  	/* default to /dev/scanner instead of insisting on config file */
>  	if( (fp = sanei_config_open (EPSON_CONFIG_FILE)))
>  	{
> @@ -2231,7 +2223,7 @@
>  			if( !len)
>  				continue;			/* ignore empty lines */
>  
> -			if (sscanf(line, "usb %d %d", &vendor, &product) == 2)
> +			if (sscanf(line, "usb %i %i", &vendor, &product) == 2)
>  			{
>  				sanei_usb_attach_matching_devices(line, attach_one_usb);
>  			}




More information about the sane-devel mailing list