Date: Sat, 4 Mar 2000 20:23:37 -0700 From: "Kenneth D. Merry" <ken@kdm.org> To: tom brown <tomb@cgf.net> Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: scanimage reports "open of device coolscan:/dev/pass4 failed: Invalid argument"] Message-ID: <20000304202337.A63158@panzer.kdm.org> In-Reply-To: <38C1C830.C97EC53E@cgf.net>; from tomb@cgf.net on Sat, Mar 04, 2000 at 06:36:32PM -0800 References: <38C1C830.C97EC53E@cgf.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 04, 2000 at 18:36:32 -0800, tom brown wrote: > Hi, > > I originaly sent this to freebsd-hackers but got no reply, maybe you can > help. > > Thanks > > Tom Brown [ ... ] > The story so far: > > Recompiled the kernel with > > controller scbus0 # SCSI bus (required) > device da0 # Direct Access (disks) > device sa0 # Sequential Access (tape etc) > device cd0 # CD > > controller scbus1 > device cd1 > device pass0 You don't need scbus1 and cd1. > Installed the scanner on the second SCSI channel > > Feb 27 15:27:09 foobar/kernel: pass4: <Nikon COOLSCANIII 1.31> > Removable Scanner SCSI-2 device > Feb 27 15:27:09 foobar/kernel: pass4: 3.300MB/s transfers > > build device node: > > bash#cd /dev > bash#./MAKEDEV pass4 That will only create pass0-pass3, not pass4. > Built sane, xsane, gimp from the ports. > > The config file for the coolscan /usr/local/etc/sane.d/coolscan.conf > > scsi Nikon * Scanner > /dev/pass4 > > Added the path: > > SANE_CONFIG_DIR=/usr/local/etc/sane.d > > > And the /dev/pass4 device has the following permissions > > crw------- 1 root operator 31, 4 Feb 27 14:17 /dev/pass4 So you'll only be able to open the device as root. > Execute scanimage: > > bash#scanimage -d coolscan:/dev/pass4 > scanimage: open of device coolscan:/dev/pass4 failed: Invalid > argument > > Any ideas? I find the device node permissions suspect, but I don't know > what they should be "crw_rw_rw_" prehaps? The permissions are fine if you're running as root. Otherwise, you'll want to make sure the permissions are 666 or something 660 if you're in the operator group. The pass(4) driver will generally only return EINVAL in two scenarios: - it was opened with the O_NONBLOCK flag set. The pass(4) driver doesn't allow non-blocking access. - someone tried to do a read or write on the device (that isn't supported) Look at the dmesg output from your machine, and you will see an error message if SANE tried to open the device in non-blocking mode. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000304202337.A63158>