my usb camera works fine under linux. but in linux it can not get the data. i custom the V4L2 driver for the camera. everything seems good,but just can not read data from the camera. i use the Isochronous mode to get the data from the camera. in the complete handler of the struct urb that been submited . i check the return status of the iso packet in the urb ,and the status is success (0). but the actual length of the transfer_buffer is 0 which means no data.
/*-----the code in the complete handler of urb*/ if(urb->status!=-ENOENT) { for(step=0;step<FRAMES_PER_DESC;step++) { PDEBUG("the step packe %d size is %d\n",step,urb- >iso_frame_desc[step].actual_length); if(!urb->iso_frame_desc[step].status) { len=urb->iso_frame_desc[step].actual_length; if(len<=pktsz) memcpy(buf+dst,buf+urb->iso_frame_desc[step].offset,len); dst+=len; } else { /*this packet is error*/ PDEBUG("PACKET STATE ERROR states:%d\n",urb->iso_frame_desc[step].status); } } /*and the output of the dmesg and /var/log/messages*/ Jun 3 21:27:22 Sky kernel: DC DEBUG: get from frame 371 len 0 buflen 8184 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 0 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 1 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 2 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 3 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 4 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 5 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 6 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: the step packe 7 size is 0 Jun 3 21:27:22 Sky kernel: DC DEBUG: read one buffer done len 0 /****************************************************/ can anybody gei wo some advise to help me figure out the error? thank u for help ___________________________________________________________ 雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 http://cn.mail.yahoo.com/?id=77071 ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel