Error capturing still. Error 31

Feb 3, 2008 at 7:04 AM

I managed to get hold of a USB Video standard specification webcam from a Chinese market, the camera contains a Vimicro 301V chip.
This camera requires no driver under XP and works fine using the Control Panel->Scanners and Cameras app.
But now, there is a new problem which is about the test application "CamTest2_007". There is no error message when I run it. It would
pop-up window but can't get any image. When I do "Get Still Image", it shows me the error: "Error capturing still. Error 31". Does anyone
know what's wrong? I have rebuild CamTest2007 and WebCam100, My OS is WinCE 5.0.
I debug the test application and driver and find where is the error happened? the test application call f = DeviceIoControl (pcs->hCam, IOCTLCAMERADEVICE_STARTVIDEOSTREAM, (LPVOID)&svStruct, sizeof (STARTVIDSTRUCT), (LPVOID)sz1, 0, &dwBytes, NULL);
err = mdd_SetVideoFormat (pDrv, pIn, dwIn, pdwBytesWritten); "
-->"rc = pdd_StartVidStream (pDrv, (BYTE)vsData.wFormatIndex, (BYTE)vsData.wFrameIndex, pVid, vsData.dwInterval); "
-->"rc = NegotiateQuality (pDrv, bFormatIndex, bFrameIndex, dwValidInterval);"
-->"rc = GetMinMaxQuality (pDrv, bFormatIndex, bFrameIndex, dwValidInterval,&wQualityMin,&wQualityMax,
-->"rc = DoVendorTransfer (pDrv, USBVIDGETMIN, USBVIDEOVSCSPROBE_CTL, bInterface, bUnit, (PBYTE)p, wProbeLen);"
-->"dw = IssueVendorTransfer (pDrv->lpUsbFuncs, pDrv->hDevice, DefaultTransferComplete, pPDD->hVendorEvent,(fSet ? USBOUTTRANSFER : USBINTRANSFER) | USBSHORTTRANSFER_OK,
&req, fSet && (req.wLength < sizeof (bTBuff)) ? pVal : bTBuff,
NULL, &dwBytes, 2000, &dwErr);"
then get a error 31.

Feb 4, 2008 at 2:09 AM
I am wondering whether the problem is that the camera is not compatible or that the driver needs modifications to work ok on my
platform.What am I doing wrong?How can I solve it?
Thanks in advance!

May 23, 2011 at 7:29 PM
Edited May 23, 2011 at 7:31 PM

Hey mike,

  Were you able to find out what was it? Because I have the same problem with a Microsoft NX-6000 (which I'm doubtful is UVC) and another noname A4Tech low-cost (which I think is UVC)...however for the Logitech for which I'm pretty sure is UVC I can't even get that far, since the CamTest2 load fails with message IOCTL_CAMERA_DEVICE_GETVIDEOFORMAT retruned 0 87 or something like that...I've also noticed that inside the CamTest2 app the webcam settings for Auto-Exposure Mode return the same error 31, thus my guess is that the webcam doesn't support, correct me if I'm wrong, but I think if the CamTest could be recompiled not to use that mode the app could work afterwards.

   Unfortunately, I'm yet to figure out how to add the sources to my CamTest2 subproject...any1 got any small tips about that, plz?