Subject: Re: usb-question
To: Lennart Augustsson <email@example.com>
From: Love <firstname.lastname@example.org>
Date: 09/20/2000 16:11:48
Lennart Augustsson <email@example.com> writes:
> Love wrote:
> > I'm trying to figure out how usb works in NetBSD, but I'm a little bit
> > puzzled. If the ioctl(USB_GET_INTERFACE_DESC) returns 2 endpoints,
> > shouldn't it be possible to open /dev/ugen0.01 and /dev/ugen0.02 ?
> Not necessarily, you need to find out what the numbers of the endpoints are.
> If you use the usbgen program in the usbutil package it will dump all the
> descriptors of the device.
After looking at it a while I and reading the documentation i understod
that endpoint 1 is a CONTROL endpoint and bidirectional, and endpoint 2 is
I tried to make ugen support CONTROL endpoints (at least let me open the
device RW). If I want to send control message to the pipe, is
usbd_do_request_flags() the right function (for control-message frameing as
described in the USB-spec) ? Looks that will do the right thing when I look
at other drivers, but I only get back EIO from the ioctl(), it goes thru
the 'if (err = USBD_STALLED)' case in usbd_do_request().
Sorry for inconsistent andstupid questions, but I haven't really understod
how all this fits together.