Subject: OV511+, NetBSD, ugen, vid, and you
To: None <netbsd-help@netbsd.org>
From: Chrischen <cchen@nougat.org>
List: netbsd-help
Date: 04/13/2001 18:09:44
Well, the author of vid claims that vid, available at:

http://ovtvid-bsd.sourceforge.net/

Works under NetBSD, but I have a feeling that's not quite true. It would seem
that NetBSD's naming scheme for generic USB devices differs from that of
FreeBSD in a few ways, and I wonder, oh, I wonder, what else has diverged
since they ported the USB stack from times past.

So I tried, and it doesn't seem to work. Grabbing Wulf's patched version off
/pub/NetBSD/misc/wulf... doesn't seem to work either, even with a recent
enough -current kernel to include isochronous IO transfers. So here's the
end of a ktruss of it:

   348 vid      open("/dev/ugen0", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen1", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen2", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen3", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen4", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen5", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen6", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen7", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen8", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen9", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen10", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen11", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen12", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen13", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      open("/dev/ugen14", 0x2, 0xbfbfd234) Err#2 ENOENT
   348 vid      write(0x2, 0xbfbfbf34, 0x25)       = 37
       "vid: couldn't locate an OV511 device\n"
   348 vid      exit(0x1)

Well, okay, so NetBSD uses ugenX.nn instead of ugenX. Great. I'll try
and run it with vid -d /dev/ugen0.00 (ugen0.01-15 give me "unconfigured
device)...

Again the ktruss:

   353 vid      open("/dev/ugen0.00", 0x2, 0x804b19c) = 3
,_IOW('U',0x70,0x74)   353 vid      ioctl(0x3, 0xbfbfda28)             = 0
   353 vid      write(0x2, 0xbfbfbf18, 0x30)       = 48
       "device /dev/ugen0.00 is not an OmniVision OV511\n"
   353 vid      exit(0x1)

My dmesg, or the important part:

ugen0 at uhub0 port 2
ugen0: OmniVision OV511+ Camera, rev 1.00/1.00, addr 2

It's one of those Creative Labs WebCam 3 things. It's not mine, but I have
to work with it. Yay. :)

Any help would be appreciated!

-- 
Chris Chen <cchen@Nougat.ORG>
Beyond Chewable