Here is the result of usb -vvvvv :
Device Address : 2
Vendor : 0x0130
Product : 0x0130
Device Release : r1.00
USB Spec Release : v1.10
Serial Number : N/A
Class : 0x00 (Independant per interface)
Max PacketSize0 : 8
Languages : No string descriptors
Current Frame : 60903 (1024 bytes)
Configurations : 1
Configuration : 1
Attributes : 0x80 (Bus-powered)
Max Power : 100 mA
Interfaces : 1 (with 7 alternate)
Interface : 0 / 0
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 0
Interval : 1 ms
Interface : 0 / 1
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 128
Interval : 1 ms
Interface : 0 / 2
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 384
Interval : 1 ms
Interface : 0 / 3
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 512
Interval : 1 ms
Interface : 0 / 4
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 640
Interval : 1 ms
Interface : 0 / 5
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 768
Interval : 1 ms
Interface : 0 / 6
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 896
Interval : 1 ms
Interface : 0 / 7
Class : 0xff (Vendor-specific)
Subclass : 0x00
Protocol : 0x00
Endpoints : Control + 1
Endpoint : 0
Attributes : Control
Max Packet Size: 8
Endpoint : 1
Attributes : Isoch/IN
Max Packet Size: 1023
Interval : 1 ms
Ps: I’am going to “sniff” the windows driver to see if I don’t miss
something in the sensor or bridge configuration.
“Henry Van Dyke” <> henry@93.com> > a écrit dans le message news:
b5pk47$ffn$> 1@nntp.qnx.com> …
can you post the output from ‘usb -vvvvv’ for the device.
Hercot Jean-Yves (> fa063821@skynet.be> ) wrote:
: > Ok. Is the USB stack still running after you get this error.
: Yes
: > The pipes you open and pass to usbdi_io are valid endpoints
: > on the this selected interface/alternate right ?
: Yes I have checked the fields of the structures. All values seem
correct.
: > Could you post the source your insertion callback function
: Here is:
: void insertion(struct usbd_connection *connection,
usbd_device_instance_t
: *instance)
: {
: int eix = 0,error = 0;
: usbd_interface_descriptor_t *inter;
: struct usbd_device *device;
: struct usbd_desc_node nod;
: printf(“Insertion callback!\n”);
: if (!attached)
: {
: / S’attache au device SPCA508A */
: error = usbd_attach(connection,instance,sizeof(struct
: usb_spca508),&device);
: if (error)
: printf(“usbd_attach error: %d\n”,error);
: else
: {
: printf(“usbd_attach ok\n”);
: spca = usbd_device_extra(device);
: spca->ptrdevice = device;
: spca->instance = instance;
: printf(“Alternate = %d\n”,spca->instance.alternate);
: / Recuperer le descripteur de l interface */
: error =
usbd_select_interface(spca->ptrdevice,spca->instance.iface,7);
: if (error)
: printf(“usbd_select_interface error: %d\n”,error);
: inter =
:
usbd_interface_descriptor(spca->ptrdevice,spca->instance.config,spca->instan
: ce.iface,spca->instance.alternate,&nod);
: if (inter)
: printf(“Num = %d , Alt =
: %d\n”,inter->bInterfaceNumber,inter->bAlternateSetting);
: /* Parcourir les descripteurs de device /
: usb_descriptor = (usbd_descriptors_t)1;
: while (usb_descriptor != NULL)
: {
: usb_descriptor =
:
usbd_parse_descriptors(spca->ptrdevice,nod,USB_DESC_ENDPOINT,eix,&usb_desc_n
: ode);
: if (usb_descriptor)
: {
: printf(“Maxsize = %d\n”,usb_descriptor->endpoint.wMaxPacketSize);
: printf(“Attributes =
%d\n”,usb_descriptor->endpoint.bmAttributes);
: printf(“Endpoint =
%x\n”,usb_descriptor->endpoint.bEndpointAddress
&
: 0xF);
: switch(usb_descriptor->endpoint.bmAttributes)
: {
: case USB_ATTRIB_CONTROL:
: printf(“Ctrl\n”);
: error =
: usbd_open_pipe(spca->ptrdevice,usb_descriptor,&(spca->CtrlPipe));
: if (error)
: printf(“usbd_open_pipe error:
: %d\n”,error);
: printf(“Endpoint =
: %x\n”,usbd_pipe_endpoint(spca->CtrlPipe));
: break;
: case USB_ATTRIB_ISOCHRONOUS:
: printf(“Iso\n”);
: error =
: usbd_open_pipe(spca->ptrdevice,usb_descriptor,&(spca->IsoPipe));
: if (error)
: printf(“usbd_open_pipe error:
: %d\n”,error);
: printf(“Endpoint =
: %x\n”,usbd_pipe_endpoint(spca->IsoPipe));
: break;
: }
: }
: eix++;
: }
: config_spca508(spca);
: /* Set_mode */
: set_mode(spca,0,ext_modes);
: spca->urbIso = usbd_alloc_urb(NULL);
: spca->frameBuffer = usbd_alloc(MAX_FRAME_SIZE_PER_DESC);
: /* activer video ISO et drop packet */
: reg_write(spca, 0, 0x8112, 0x20 | 0x10);
: error =
:
usbd_setup_isochronous(spca->urbIso,URB_DIR_IN|URB_ISOCH_ASAP,0,spca->frameB
: uffer,MAX_FRAME_SIZE_PER_DESC);
: if (error)
: {
: printf(“usbd_setup_isochronous error: %d\n”,error);
: }
: else
: printf(“usbd_setup_isochronous ok\n”);
: error =
: usbd_io(spca->urbIso,spca>IsoPipe,isoc_irq,spca,USBD_TIME_INFINITY);
: if (error)
: {
: printf(“usbd_io error: %d\n”,error);
: }
: else
: printf(“usbd_io ok\n”);
: }
: }
: }
: The few comments are in french (sorry) but they are not very
helpfull…
;-p
: Peter > Do you only access to the Usb bridge of the cam or do you also
have
: to configure the sensor?
: “Henry Van Dyke” <> henry@93.com> > a écrit dans le message news:
: b5flt2$8ml$> 1@nntp.qnx.com> …
: > Hercot Jean-Yves (> fa063821@skynet.be> ) wrote:
: > : I have put the usbd_select_interface and now usbd_io returns error
3.
:
:
: > The pipes you open and pass to usbdi_io are valid endpoints
: > on the this selected interface/alternate right ?
:
: > Could you post the source your insertion callback function
:
:
: > : Is it bad doctor?
:
: > : “Hercot Jean-Yves” <> fa063821@skynet.be> > a écrit dans le message
news:
: > : b5fdn3$9r2$> 1@inn.qnx.com> …
: > : > > have you done a :
: > :
: > : > > usbd_select_interface( spca->ptrdevice, spca->instance.iface,
7 );
: > :
: > : > I don’t think I have done that. >
> This time it should be
allright.
: > : I’ll
: > : > test it immediatly and give you feedback as soon as possible.
: > :
: > : > Thanks
: > :
: > :
: > : > “Henry Van Dyke” <> henry@93.com> > a écrit dans le message news:
: > : > b5fcl3$2oq$> 1@nntp.qnx.com> …
: > : > > Hercot Jean-Yves (> fa063821@skynet.be> ) wrote:
: > : > > : I find out something… I explain.
: > :
: > : > > : I was doing that in the insertion callback:
: > :
: > : > > :
: > :
: > :
:
usbd_interface_descriptor(spca->ptrdevice,spca->instance.config,spca->instan
: > : > > : ce.iface,7,&nod);
: > :
: > : > > : Now I have written that and put the buffer size to 0 (size
for
: > : alternate
: > : > 0):
: > :
: > : > > : inter =
: > : > > :
: > :
: > :
:
usbd_interface_descriptor(spca->ptrdevice,spca->instance.config,spca->instan
: > : > > : ce.iface,spca->instance.alternate,&nod)
: > :
: > : > > : And after that status look like: 0x02000005
: > :
: > : > > : I think it means the device doesn’t respond. Perhaps
because
of
: > : packet
: > : > size
: > : > > : 0…
: > :
: > : > > : Could you tell me how to do to get the alternate 7 properly?
: > :
: > : > > have you done a :
: > :
: > : > > usbd_select_interface( spca->ptrdevice, spca->instance.iface,
7 );
: > :
: > :
: > : > > : “Hercot Jean-Yves” <> fa063821@skynet.be> > a écrit dans le
message
: news:
: > : > > : b5d5ff$ltm$> 1@inn.qnx.com> …
: > : > > : > > Have you initialized the camera to get it start
: > : > > : > > capturing frames.
: > : > > :
: > : > > : > Yes. But I also receive the call back if I don’t
initialize
the
: > : > camera to
: > : > > : > get it start capturing frames. :-s
: > : > > :
: > : > > : > > Is MAX_FRAME_SIZE_PER_DESC equal to the >endpoint size ?
: > : > > :
: > : > > : > Yes. 1023 exactly.
: > : > > :
: > : > > : > > In your callback function to do you continously get the
: > : > > : > > same error reported in the the call to usbd_urb_status()
?
: > : > > :
: > : > > : > Always the same status : 0x02040932
: > : > > :
: > : > > : > Tomorrow I’ll try the webcam on an other computer to see
if
: status
: > : > keeps
: > : > > : the
: > : > > : > same value.
: > : > > :
: > : > > : > But I can say I’am sure it is not a hardware problem
because
the
: cam
: > : > works
: > : > > : > very well under windows…
: > : > > :
: > : > > : > “Henry Van Dyke” <> henry@93.com> > a écrit dans le message
news:
: > : > > : > b5d5g7$j2n$> 1@nntp.qnx.com> …
: > : > > : > > Hercot Jean-Yves (> fa063821@skynet.be> ) wrote:
: > : > > : > > : > have a look to the mouse_parse_descriptors() in the
DDK
: mouse
: > : > > : example.
: > : > > : > > : > to get/test the endpoint number use ep =
bEndpointAddress
: &
: > : 0xF.
: > : > > :
: > : > > : > > : I get the correct value >
> (1)
: > : > > :
: > : > > : > > : >What USB controller chip are you running on.
: > : > > :
: > : > > : > > : VIA VT83C572
: > : > > :
: > : > > : > > : +
: > : > > :
: > : > > : > > : Opti 82C861 Firelink (Pci-to-usb bridge)
: > : > > :
: > : > > : > > : >Could you post code snippets of where you are
: > : > > : > > : >enqueuing the urbs ?
: > : > > :
: > : > > : > > : spca->urbIso = usbd_alloc_urb(NULL);
: > : > > : > > : spca->frameBuffer =
usbd_alloc(MAX_FRAME_SIZE_PER_DESC);
: > : > > : > > : error =
: > : > > : > > :
: > : > > :
: > : > > :
: > :
: > :
:
usbd_setup_isochronous(spca->urbIso,URB_DIR_IN|URB_ISOCH_ASAP,0,spca->frameB
: > : > > : > > : uffer,MAX_FRAME_SIZE_PER_DESC);
: > : > > : > > : if (error)
: > : > > : > > : {
: > : > > : > > : printf(“usbd_setup_isochronous error:
%d\n”,error);
: > : > > : > > : }
: > : > > : > > : else
: > : > > : > > : printf(“usbd_setup_isochronous ok\n”);
: > : > > : > > : error =
: > : > > : > > :
: > :
usbd_io(spca->urbIso,spca->IsoPipe,isoc_irq,spca,USBD_TIME_INFINITY);
: > : > > : > > : if (error)
: > : > > : > > : {
: > : > > : > > : printf(“usbd_io error: %d\n”,error);
: > : > > : > > : }
: > : > > :
: > : > > : > > : → the pipe is correctly initialized I think.
: > : > > :
: > : > > :
: > : > > : > > Have you initialized the camera to get it start
: > : > > : > > capturing frames.
: > : > > :
: > : > > : > > I can’t see anything obviously wrong with the above
code.
: > : > > :
: > : > > : > > Is MAX_FRAME_SIZE_PER_DESC equal to the endpoint size ?
: > : > > :
: > : > > : > > In your callback function to do you continously get the
: > : > > : > > same error reported in the the call to usbd_urb_status()
?
: > : > > :
: > : > > :
: > : > > :
: > : > > : > > : “Peter” <> nospam@nospam.at.all> > a écrit dans le message
news:
: > : > > : > > : b5cbel$mn9$> 1@inn.qnx.com> …
: > : > > : > > : > have a look to the mouse_parse_descriptors() in the
DDK
: mouse
: > : > > : example.
: > : > > : > > : > to get/test the endpoint number use ep =
bEndpointAddress
: &
: > : 0xF.
: > : > > : > > :
: > : > > : > > : > “Hercot Jean-Yves” <> fa063821@skynet.be> > schrieb im
: Newsbeitrag
: > : > > : > > : > news:b5ajj2$n6o$> 1@inn.qnx.com> …
: > : > > : > > : > > I have tried and it doesn’t work >
> .
: > : > > : > > :
: > : > > : > > : > > I have checked my code with Peter’s one and it
seems
: > : similar.
: > : > > : When
: > : > > : > I
: > : > > : > > : > setup
: > : > > : > > : > > an isochronous I receive the callback (even if I
don’t
: > : enable
: > : > > : Isoch
: > : > > : > > : > > transfers on the cam) but the urb_status is set to
: > : 0x02040932.
: > : > > : > > :
: > : > > : > > : > > The results of usb -vvv seems correct and the cam
works
: well
: > : > under
: > : > > : > > : windows
: > : > > : > > : > > on the same computer.
: > : > > : > > :
: > : > > : > > : > > I have noticed that the value returned by
: usbd_pipe_endpoint
: > : > is 0
: > : > > : > for
: > : > > : > > : the
: > : > > : > > : > > control pipe and 129 for the Isoch/in pipe (it
should be
: 1).
: > : > It
: > : > > : > also
: > : > > : > > : > > returns 129 with the other alternate settings.
: > : > > : > > :
: > : > > : > > : > > Help me!!! :-p
: > : > > : > > :
: > : > > : > > : > > “Hercot Jean-Yves” <> fa063821@skynet.be> > a écrit
dans
le
: > : > message
: > : > > : > news:
: > : > > : > > : > > b5abul$f7k$> 1@inn.qnx.com> …
: > : > > : > > : > > > Henry > I’ll test all you have said about the
: isochronous
: > : > > : > transfers.
: > : > > : > > : > I’ll
: > : > > : > > : > > > post my question here if it doesn’t work… > 
: > : > > : > > :
: > : > > : > > : > > > Thanx
: > : > > :
: > : > > : > > [snip]
: > : > > :
: > : > > :
: > : > > :
: > :
: > :
: > :
: > :
:
:
\