Getting insertion callback to work

bridged with qdn.public.ddk.usb
Post Reply
Rodney Stevens

Getting insertion callback to work

Post by Rodney Stevens » Wed Feb 19, 2003 5:35 am

Dear all

I have devu-uhci running and /dev/usb. I can run usb and get information
about the device (a web camera).

I am trying to modify the mouse driver as suggested in the docs. The driver
starts connects to the stack, but I get no insertion callback.

What parameters are critical to inform the stack of the device so that I
will get the callback.

Thanks for any hints.

Rod

--
Rodney Stevens
CSIRO Minerals

Phone 61 2 97106701
Fax 61 2 97106789
Email rod.stevens@csiro.au

Personal Homepage
http://mywebpage.netscape.com/rodjohnst ... mepage.htm

Henry Van Dyke

Re: Getting insertion callback to work

Post by Henry Van Dyke » Wed Feb 19, 2003 3:52 pm

In usbd_connect() call you provde a connection structure.

typedef struct usbd_connect_parm {
const char *path;
_uint16 vusb;
_uint16 vusbd;
_uint32 flags;
int argc;
char **argv;
_uint32 evtbufsz;
usbd_device_ident_t *ident;
usbd_funcs_t *funcs;
_uint16 connect_wait
} usbd_connect_parm_t;

You need to modify the usbd_device_ident_t structure.

typedef struct usbd_device_ident {
_uint32 vendor;
_uint32 device;
_uint32 class;
_uint32 subclass;
_uint32 protocol;
} usbd_device_ident_t;


change the class, subclass and protocol parameters to
USBD_CONNECT_WILDCARD and fill in the vendor and device
fields with the vendor and device as shown in the output
of the usb utility.

Your insertion callback will then be called only when
this device is inserted.

Henry


Rodney Stevens (rodney.stevens@minerals.csiro.au) wrote:
: Dear all

: I have devu-uhci running and /dev/usb. I can run usb and get information
: about the device (a web camera).

: I am trying to modify the mouse driver as suggested in the docs. The driver
: starts connects to the stack, but I get no insertion callback.

: What parameters are critical to inform the stack of the device so that I
: will get the callback.

: Thanks for any hints.

: Rod

: --
: Rodney Stevens
: CSIRO Minerals

: Phone 61 2 97106701
: Fax 61 2 97106789
: Email rod.stevens@csiro.au

: Personal Homepage
: http://mywebpage.netscape.com/rodjohnst ... mepage.htm

Rodney Stevens

Re: Getting insertion callback to work

Post by Rodney Stevens » Wed Feb 19, 2003 11:07 pm

Henry

Thanks for the help, I am now connecting to the webcam. Now comes the part
where I have to get information from the manufacturer of the camera so that
I can talk to it and get data out.

Rod

"Henry Van Dyke" <henry@93.com> wrote in message
news:b3097p$3tq$1@nntp.qnx.com...
In usbd_connect() call you provde a connection structure.

typedef struct usbd_connect_parm {
const char *path;
_uint16 vusb;
_uint16 vusbd;
_uint32 flags;
int argc;
char **argv;
_uint32 evtbufsz;
usbd_device_ident_t *ident;
usbd_funcs_t *funcs;
_uint16 connect_wait
} usbd_connect_parm_t;

You need to modify the usbd_device_ident_t structure.

typedef struct usbd_device_ident {
_uint32 vendor;
_uint32 device;
_uint32 class;
_uint32 subclass;
_uint32 protocol;
} usbd_device_ident_t;


change the class, subclass and protocol parameters to
USBD_CONNECT_WILDCARD and fill in the vendor and device
fields with the vendor and device as shown in the output
of the usb utility.

Your insertion callback will then be called only when
this device is inserted.

Henry


Rodney Stevens (rodney.stevens@minerals.csiro.au) wrote:
: Dear all

: I have devu-uhci running and /dev/usb. I can run usb and get information
: about the device (a web camera).

: I am trying to modify the mouse driver as suggested in the docs. The
driver
: starts connects to the stack, but I get no insertion callback.

: What parameters are critical to inform the stack of the device so that I
: will get the callback.

: Thanks for any hints.

: Rod

: --
: Rodney Stevens
: CSIRO Minerals

: Phone 61 2 97106701
: Fax 61 2 97106789
: Email rod.stevens@csiro.au

: Personal Homepage
: http://mywebpage.netscape.com/rodjohnst ... mepage.htm

Post Reply

Return to “qdn.public.ddk.usb”