[sane-devel] Epson Perfection 1650 on FreeBSD

Karl Heinz Kremer khk@khk.net
Thu, 24 Jan 2002 21:46:58 -0500


--mojUlQ0s9EVzWg2t
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 24, 2002 at 04:04:31PM -0800, JJ Behrens wrote:
> I'm not able to get scanimage to scan an image on my Epson Perfection 1650
> under FreeBSD. I get the following error message:
>=20
> tcp# scanimage -d "epson:/dev/uscanner0"
> scanimage: open of device epson:/dev/uscanner0 failed: Invalid argument
>=20
> I know that the device is recognized successfully, because when I plug it
> in, I get the following in /var/log/messages:
>=20
> Jan 24 15:41:04 tcp /kernel: uscanner0: EPSON EPSON Scanner, rev
> 1.00/1.08, addr 2
>=20
> I used truss to do a kernel trace while debugging was turned on,
> and I get the following:
>=20
> open("/dev/uscanner0",2,02001)                   =3D 3 (0x3)
> ioctl(3,CAMGETPASSTHRU,0xbfbfd614)               ERR#22 'Invalid argument'
> close(3)                                         =3D 0 (0x0)
> fstat(2,0xbfbfdc18)                              =3D 0 (0x0)
> [epson] write(2,0xbfbfd580,8)                            =3D 8 (0x8)
> attach: open failed: Invalid argument
>=20
> Notice that it's doing an ioctl call. It interesting that in
> /usr/src/sys/dev/usb/uscanner.c, uscannerioctl is defined as:
>=20
> int
> uscannerioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc
> *p)
> {
> 	return (EINVAL);
> }
>=20
> Hence, it's not proper to do an IOCTL for USB scanners under FreeBSD.=20

Edit the file epson.c in Sane's backend directory. Search for the string
TEST_IOCTL and make sure that the #define statment is commented out.=20
This should disable the ioctl.=20

Karl Heinz



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

--mojUlQ0s9EVzWg2t
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQCVAwUBPFDHIR4KmkKPBVxtAQHOVgQAmirsh3cm1KtvoRx83piwwUIQ3s+c0m5w
z+4rRga/YG0hFLZtE5by3h/kbFplApVVBBCrITvrjTHT7gLRj4mbHzFI5t7MOWHx
RilDXqotHis5d2ckk7Zq8LTRTt4amPTFxbeP72ObsoBrRXL5NBgys9ZORK6gxY9E
uo/QxFWyf20=
=YvJ6
-----END PGP SIGNATURE-----

--mojUlQ0s9EVzWg2t--