Subject: USB: QuickCam Express
To: None <netbsd-help@netbsd.org, port-i386@netbsd.org>
From: Berndt Josef Wulf <wulf@ping.net.au>
List: port-i386
Date: 08/13/2000 11:26:21
G'day,

I'm determined to a Logitech QuickCam Express video camera to work on
a NetBSD-i386-1.4Z system and have been playing with the USB for the
past few days. 

The kernel detects the device ok and I've been able to aquire USB
device information, descriptor and endpoints using ioctl() system
call.

Here is the kernel output:

NetBSD hotdog 1.4ZB NetBSD 1.4ZB (HOTDOG) #2: Mon Jul 31 00:35:12 CST
2000     wulf@hotdog:/usr/src/sys/arch/i386/compile/HOTDOG i386
...
ugen0 at uhub0 port 2
ugen0: Logitech, Inc. Camera, rev 1.00/1.00, addr 2


I wrote a small utility and get the following output from
USB_GET_DEVICEINFO on /dev/ugen0.00

********** Device Info **********
bus                 = 0
addr                = 2
cookie              = 2
product             = Camera
vendor              = Logitech, Inc.
release             = 1.00
productNo           = 0x840
vendorNo            = 0x46d
releaseNo           = 0x100
class               = 255
subclass            = 255
protocol            = 255
config              = 1
lowspeed            = 0
power               = 500
nports              = 0
devnames            = ugen0

and the endpoint descriptor for isochronous data transfer using
USB_GET_ENDPOINT_DESC

********** Enpoint Description **********
config_index        = 0
interface_index     = 0
alt_index           = 1
endpoint_index      = 0
bLength             = 7
bDescriptorType     = 5
bEndpointAddress    = 1       <- /dev/ugen0.01 ?
bmAttributes        = 1       <- isochronous transfer type
wMaxPacketSize      = 1023
bInterval           = 1 

Now trying to open("/dev/ugen0.01",O_RDONLY) will result in the
following message:

Couldn't open /dev/ugen0.01: Invalid argument

What does this mean in relation to the open() system call? What am I
missing? Isn't /dev/ugen0.01 the endpoint address 1 for the device in
question?

I'm using the "Software Developer's Guide for CPiA Cameras" as a guide
but seem to get nowhere at the moment. I haven't worked with the ugen0
device before and that is most likely my problem :-(

Is anyone experienced with the USB devices/protocol who may be able to
get me unstuck? Are there any peripherals that use the ugen0 device?

Any hints, tips and pointers are very much appreciated. 
Many thanks in advance

cheerio Berndt
-- 
Name    : Berndt Josef Wulf            | +++ With BSD on Packet Radio +++
E-Mail  : wulf@ping.net.au             |    tfkiss, tnt, dpbox, wampes
ICQ     : 18196098                     |  VK5ABN, Nairne, South Australia 
URL     : http://www.ping.net.au/~wulf | MBOX : vk5abn@vk5abn.#lmr.#sa.au.oc
Sysinfo : DEC AXPpci33+, NetBSD-1.4.2  | BBS  : vk5abn.#lmr.#sa.aus.oc