[sane-devel] Fujitsu USB scanner support working!

Karl Heinz Kremer khk@khk.net
Sat, 15 Feb 2003 16:07:46 -0500


--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Ron,=20

thanks for the patch. I almost missed it because it was under the
Fujitsu subject. Just can case you have more EPSON patches, can=20
you please CC them to my email account.=20

Thanks,

Karl Heinz

On Sat, Feb 15, 2003 at 10:31:58AM -0800, Ron Cemer wrote:
> Sure.  Here is the Epson patch.  It makes epson.conf work properly with=
=20
> lines formatted like "usb 0x04b8 0x011e" (where 0x04b8 is the vendor and=
=20
> 0x011e is the product).
>=20
> Henning, can you put this into the latest version?
>=20
> The fujitsu patches are huge, since they also add USB support, and=20
> support for the fi-4220C scanner.  I've posted them before, and they are=
=20
> in the process of being reviewed.
>=20
> Thanks!
> Ron
>=20
> Till Kamppeter wrote:
>=20
> >Can you post a patch which fixes both the "fujitsu" and the "epson"=20
> >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 @@
>  	 */
> =20
>  	/*
> -	 * if the config file contains a line "usb /dev/usbscanner", then handl=
e=20
> -	 * this here and use the USB device from now on.
> -	 */
> -	if (s->hw->connection =3D=3D 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.
>  	 */
> =20
> @@ -2215,6 +2205,8 @@
>  	if( version_code !=3D NULL)
>  		*version_code =3D SANE_VERSION_CODE (V_MAJOR, V_MINOR, SANE_EPSON_BUIL=
D);
> =20
> +	sanei_usb_init();
> +
>  	/* default to /dev/scanner instead of insisting on config file */
>  	if( (fp =3D sanei_config_open (EPSON_CONFIG_FILE)))
>  	{
> @@ -2231,7 +2223,7 @@
>  			if( !len)
>  				continue;			/* ignore empty lines */
> =20
> -			if (sscanf(line, "usb %d %d", &vendor, &product) =3D=3D 2)
> +			if (sscanf(line, "usb %i %i", &vendor, &product) =3D=3D 2)
>  			{
>  				sanei_usb_attach_matching_devices(line, attach_one_usb);
>  			}


--=20
Karl Heinz Kremer                                  khk@khk.net
PGP Key at                 http://www.khk.net/download/khk.asc
EPSON Sane Backend:                         http://www.khk.net

--k+w/mQv8wyuph6w0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+Tqwixejv3RfKrhsRAthSAKCTyDE4xH9Ib9cvcOlzIe2NLaFQ3QCfUQmo
PNzb3SC4UUafkgatAfu0/ac=
=TNj7
-----END PGP SIGNATURE-----

--k+w/mQv8wyuph6w0--