Subject: ugen, uscanner and the HP 5300C USB scanner
To: None <tech-kern@netbsd.org>
From: Lloyd Parkes <Lloyd.Parkes@eds.com>
List: tech-kern
Date: 12/22/2000 11:13:36
<blather>My attempts to port a NetBSD 1.4 driver to 1.5 have got me into 
kernel hackery again. One of the things I have been looking at is 
support for USB devices, and the one I am working on at the moment is 
the HP 5300C scanner. I have noticed that in 1.5 it attaches as ugen*, 
but under -current it attaches as uscanner*. I have also noticed that 
uscanner(4) says that ugen should be used with userland drivers, and 
that uscanner is just a nasty hack to help SANE backends written for 
Linux. Has anyone tested the uscanner supprt for the HP5300C or was it 
just added to the uscanner driver because it was a USB scanner? </blather>

Anyway, I removed the HP5300C from uscanner, so it attached as ugen and 
then wrote a program to talk to it. The HP5300C responds to raw SCSI 
commands sent to its bulk input endpoint. My program successfully sends 
an INQUIRY command. Woohoo. The next thing I thought was 'blowed if I'm 
going to write yet another SCSI CDB building library'. I want to reuse 
some prewritten SCSI software.

Ob kernel: The program that I have selected is called "The NetBSD 
Kernel". Does anyone have a problem with a shim that implements SCSI 
over USB? This way the scanner will attach as ss* and will repsond as 
expected. I have no idea how to implement this, but I will UTSL.

Cheers