Subject: Re: usb-question
To: Love <lha@stacken.kth.se>
From: Lennart Augustsson <lennart@mail.augustsson.net>
List: current-users
Date: 09/20/2000 09:57:34
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.

    -- Lennart


>
>
> This is with NetBSD 1.5C.
>
> Love
>
> : lha@nutcracker ; dmesg | grep ugen0
> ugen0 at uhub0 port 1
> ugen0: vendor 0x0573 product 0x4d11, rev 1.00/1.00, addr 2
> : lha@nutcracker ; ./usbctl /dev/ugen0.00
> Configuration:
> type:               2
> numInterfaces:      1
> Configuration:      1
> Configuration idx:  0
> Attributes:         128 bus-powered
> Max power:          500 mA
> numEndpoints:       2           <- result of USB_GET_INTERFACE_DESC
> : lha@nutcracker ; ./usbctl /dev/ugen0.01
> usbctl: open(/dev/ugen0.01): Device not configured
> : lha@nutcracker ; ./usbctl /dev/ugen0.02
> usbctl: open(/dev/ugen0.01): Device not configured