Getting insertion callback to work

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/rodjohnstevens/Homepage.htm

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/rodjohnstevens/Homepage.htm

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/rodjohnstevens/Homepage.htm