Alan Stern 写道: > On Tue, 28 Nov 2006, xiaoxin liu wrote: > > >> Hi, Currently I got a philips webcam (type 740), which can be driven by >> pwc in Linux. >> >> Now I want to write my own program to test the isochronus transfer >> function of the device, not using the pwc driver. >> >> So I found out the device node in /proc/bus/usb/* and open it, then use >> such an ioctl(fd, USBDEVFS_SUBMITURB, struct userspace_urb...) call to >> send a isoc urb to the device. >> >> My urb includes fields like below: >> >> type = 0 (ISOC transfer) >> endpoint = 0x85 (ISOC IN endpoint) >> status = 0; >> flags = 2 (USBDEVFS_URB_ISO_ASAP) >> buffer = isoc_buf (isoc_buf was defined as char isoc_buf[9600]) >> buffer_length = sizeof (isoc_buf) >> actual_length = 0; >> start_frame = 0; >> number_of_packets = 10 >> error_count = 0; >> signr = 0 >> usercontext = the address of urb structure >> >> The wMaxPacketSize of the isoc endpoint is 960. >> >> while I send out this urb, I hope to receive some data from the webcam >> device. but I receive nothing, the actual_length = 0. >> >> Could anybody tell me why? >> > > Did you fill in the contents of urb->iso_frame_desc[]? > yes, I did fill in the urb->iso_frame_desc[], and from 0 to 9 (because number of packets = 10), I set the length member of iso_frame_desc[] as 960, which is the maxPacketSize. > > What was the return code from the USBDEVFS_SUBMITURB ioctl call? > > the return code for the ioctl call is 0, It seems that it has successfully returned. but I can't see any new data in my receive buffer. > Did you remember to make a USBDEVFS_REAPURB ioctl call? > > I did't make a USBDEVFS_REAPURB ioctl call. Must I make this call?? > Are you certain the camera was trying to send ISO data? > > Currently, I only know the camera is powered on. So I created a ISO transfer URB to the webcam, I think it should reply some data to me. What I want to do is to let the webcam reply to me.
> Alan Stern > > Danny ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
