Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jun 1997 23:30:06 -0700
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        Wm Brian McCane <root@bmccane.uit.net>
Cc:        multimedia@FreeBSD.ORG, chat@FreeBSD.ORG
Subject:   Re: Free At Last: A Scanner Storyn 
Message-ID:  <199706290630.XAA07386@rah.star-gate.com>
In-Reply-To: Your message of "Sun, 29 Jun 1997 00:29:31 CDT." <199706290529.AAA16622@bmccane.uit.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

sane web page: 
http://www.azstarnet.com/~axplinux/sane/
gimp web page:
http://www.XCF.Berkeley.EDU/~gimp/


This is what I did to the scsi subsystem:

/sys/scsi/scsiconf.c:
static struct scsidevs unknowndev =
	{
		T_UNKNOWN, T_UNKNOWN, 0, "*", "*", "*",
		"uk", SC_ONE_LU
		/*		"uk", SC_MORE_LUS*/
	};


/sys/scsi/scsi_ioctl.c:

	case	XS_BUSY:
		SC_DEBUG(xs->sc_link,SDEV_DB3,("busy\n"));
		screq->retsts = SCCMD_BUSY;
		break;

	default:
	    /*sc_print_addr(xs->sc_link); */
		screq->retsts = SCCMD_UNKNOWN;
		break;
	}

I changed "default:"
to just pass along the "unknown" error messages. With my umax-s12
I was getting scsi error messages of type "INTERMEDIATE" when the 
umax was busy and sane was sending scsi messages to it.
Hopefully, one of our scsi experts will fix scsi_ioctl to handle properly
all scsi error messages.

With the ioctl patch you don't need to run the scanner with scsi
disconnect disabled as the sane documentation recommends. Haven't check out tagged queuing however I doubt that it will 
be a problem.



----
mknod /dev/uk0

---
download sane and gimp from my  ftp site:
ftp://rah.star-gate.com/pub/gimp-0.9.10.tar.gz
ftp://rah.star-gate.com/pub/sane-0.6.tar.gz
ftp://rah.star-gate.com/pub/out.jpg

out.jpg is a sample scan of a picture taken at 100dpi resolution.

You will need gmake to compile gimp and sane
Additionally define :
setenv CC gcc

Try no to type ./configure for gimp or sane if you do be prepare
to fix up the build problems.

compile and install gimp . This should be no problem. 
compile and install sane-0.6
copy sane-0.6/backend/dll.conf to /usr/local/etc/sane.d/dll.conf

make sure that dll.conf has mustek in it:
{root} more backend/dll.conf
 # enable the next line if you want to allow access through the network:
 #net
pnm
mustek
hp
qcam
umax
---
ldconfig -m /usr/local/lib



cp gimp/frontend/.libs/xscanimage  /usr/local/lib/gimp/0.99.10/plug-ins/xscanimage


If all goes well you will be able to run sane:
xscanimage mustek

or run gimp and select  from the Xtns menu "Acquire Image".


If you have problems you can trace your scsi transactions:
scsi -f /dev/uk0 -d 255 
make sure that you compile a kernel with the option "SCSIDEBUG"

To talk to the scsi scanner I use the scsi library and the same
approach should work with your mustek -- I hope.  Anyhow I cant 
test the software over here because I don't have a mustek scanner.
sane uses low level scsi calls to talk to the scsi scanners.


Also it will be nice if someone just takes over sane and scsi friends
what I have is a good start given that at least it works with
my UMAX S12.

I am running FreeBSD 3.0-current no clue if any of this works on 
earlier releases of FreeBSD.

Last but not least I will be out of town till Wednesday .


	Good Luck !
	Amancio




>From The Desk Of Wm Brian McCane :
> I would love to look at this.  I have a Mustek 12000SP, and was looking at 
> porting PINT, but haven't had time to convert the NetBSD device driver to be 
> compatible with FreeBSD.  How do you get it to recognize the SCSI device, I 
> have tried using uk0, and also have setup 'sctarg' and 'pt' in the kernel wit
h 
> no luck.
> 
> 	brian
> 
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706290630.XAA07386>