Hi,
I found information from the vendor of my webcamera, it's CPiA based.
I've hacked together a userland driver program that simply
opens an ugen device, verifies that it's the right camera,
and prints vendorId/productNo. Next it attempts to read
from the camera using an reg_read(fd, reg) function (What I want
to read at first is "GetCPIAVersion", some version info).
reg_read() is supposed to get data using the usb_ctl_request structure.
This is how I use it:
struct usb_ctl_request ur;
unsigned char data[1024];
ur.request.bmRequestType = UT_READ_VENDOR_INTERFACE;
ur.request.bRequest = 1; //
// i got these numbers
USETW(ur.request.wValve, 0); // from the vendor's info
USETW(ur.request.wIndex, 0); // about GetCPIAVersion
USETW(ur.request.wLength, 4); //
ur.data = data;
ur.flags = 0;
ur.actlen = 0;
Then attempting an ioctl call with ioctl(fd, USB_DO_REQUEST, &ur)
fails with "Input/output error"...
This is probably simple, but I can't figure out why this happens.
Thanks in advance
Torbjorn Kristoffersen
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message