locked
WinCE 6.0 Error - USB Camera RRS feed

  • Question

  • Hi,

    I am new to WinCE development environment.


    I am developing CamerApp to capture still image using usb camera on WinCE 6.0 headless display board. I added Null Display Driver for this support. I had also added USB Camera driver in WinCE 6.0 OS from Microsoft Website Windows Embedded CE 6.0 USB Camera Driver

    Now, When ever USB Camera is attached to WinCe board following error occurs.

    USBCam: Error calling IssueVendorTransfer rc: 31 USB Err: 4  ExtErr: 31
    USBCam: Error code 0x1f setting camera power

    Please find the log message below.

    USBCam: CUSBPdd
    USBCam: PddInit++
    USBCam: ReadConfigFromRegistry++
    USBCam: PreferredWidth = 176
    USBCam: PreferredHeight = 144
    USBCam: MJPEG Support = 0
    USBCam: Uncompressed Support = 1
    USBCam: SetPower++
    USBCam: Error calling IssueVendorTransfer rc: 31 USB Err: 4  ExtErr: 31
    USBCam: Error code 0x1f setting camera power
    USBCam: Camera may not support setting power
    USBCam: CheckCameraProperties++
    USBCam: Found Camera Input Terminal
    USBCam: MarkSupportedProperties++

    Please help me to resolve this issue.

    Thanks & Regards,

    Gagan

    Friday, May 16, 2014 9:06 AM

All replies

  • Try to enable all the debugzones to see complete log.See whether all the supported format and resolutions are retrived by the driver.

    What is happening when you run the test application?


    Please mark it as answer or vote as helpful if my reply helps.

    Regards,

    Prabu[eMVP]

    http://prabukumar.wordpress.com

    Friday, May 16, 2014 9:15 AM
  • Hi,

    I had created CameraApp same as sample provided in C:\WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW\CAMERA\CAMERAAPP. Only difference is that my application is non UI based because there is no display. While running application I am getting following error

    "USBCam: Error: could not allocate DMA capture buffers"

    Please find the short log.

    PIN_IOControl(d0d23b80): IOCTL_CS_BUFFERS
    PIN_IOControl(d0d23b80): EnqueueDescriptor
    PIN_IOControl(d0d23b80): IOCTL:0x2f401f, InBuf:0x18fe1c, InBufLen:8, OutBuf:0x0, OutBufLen:0x0)
    PIN_IOControl(d0d23b80): IOCTL_CS_BUFFERS
    PIN_IOControl(d0d23b80): EnqueueDescriptor
    PIN_IOControl(d0d23b80): IOCTL:0x2f401f, InBuf:0x18fe1c, InBufLen:8, OutBuf:0x0, OutBufLen:0x0)
    PIN_IOControl(d0d23b80): IOCTL_CS_BUFFERS
    PIN_IOControl(d0d23b80): EnqueueDescriptor
    PIN_IOControl(d0d23b80): IOCTL:0x2f401f, InBuf:0x18fe1c, InBufLen:8, OutBuf:0x0, OutBufLen:0x0)
    PIN_IOControl(d0d23b80): IOCTL_CS_BUFFERS
    PIN_IOControl(d0d23b80): EnqueueDescriptor
    CAM_IOControl(d0d23520): IOCTL:0x2f0003, InBuf:0x7f60c, InBufLen:32, OutBuf:0x7f60c, OutBufLen:0x20)
    CAM_IOControl(d0d23520): IOCTL_CS_PROPERTY
    CAM_IOControl(d09ba140): AdapterHandleCustomRequests
    USBCam: HandleAdapterCustomProperties++
    CAM_IOControl(d09ba140): HandleVideoControlRequests
    Pin: 1 Setting State to 0x2
    USBCam: TakeStillPicture++
    USBCam: SetSensorState++
    USBCam: CSSTATE_RUN
    USBCam: FindVideoInfo++
    USBCam: SetVideoFormat++
    USBCam: GetQualityParameters++
    USBCam: Quality: bFormatIndex 1, bFrameIndex 4, min 0, max 0, increment 0
    USBCam: ProbeCommit++
    USBCam: SetStreamInterface++
    USBCam: FindStreamInterface++
    USBCam: SetVideoFormat: bFormatIndex 1, bFrameIndex 4, dwInterval 333333 (30 fps), wQuality 0 (max 0), dwPacketSize 3072
    USBCam: Error: could not allocate DMA capture buffers
    Exception 'Data Abort' (4): Thread-Id=056c0006(pth=81f1094c), Proc-Id=056b0006(pprc=81dfaa80) 'CameraAppVision.exe', VM-active=056b0006(pprc=81dfaa80) 'CameraAppVision.exe'
    PC=40028ed0(coredll.dll+0x00018ed0) RA=00080000(???+0x00080000) SP=0007f660, BVA=00010018

    Thanks & Regards,

    GAgan

    Friday, May 16, 2014 9:23 AM
  • From the log it looks like it is failing to allocate memory for the buffers,so check whether you have enough program memory on your device and also try with the small resolution format.

    Please mark it as answer or vote as helpful if my reply helps.

    Regards,

    Prabu[eMVP]

    http://prabukumar.wordpress.com

    Friday, May 16, 2014 10:11 AM
  • Hi Prabhu,

    I had set lowest resolution (160 * 120) but still I am getting same error.

    I observed one more thing whenever
    hr = m_pMediaControl->Run(); is called following below log was generated in this somewhere it's is showing USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f0003, InBuf:0x7f990, InBufLen:24, OutBuf:0x7f9c4, OutBufLen:0x4)
    PIN_IOControl(d0d24ec0): IOCTL_CS_PROPERTY
    IOControl: Unsupported PropertySet Request
    PIN_IOControl(d0d24ec0): PinHandleConnectionRequests  . Why this Not Implemented and Unsupported PropertySet Request is coming.

    ----------------------------------------------------------------------

    CAM_IOControl(d0d24860): IOCTL:0x2f0003, InBuf:0x7f9a8, InBufLen:24, OutBuf:0x7f9d0, OutBufLen:0x4)
    CAM_IOControl(d0d24860): IOCTL_CS_PROPERTY
    CAM_IOControl(d09e1420): AdapterHandleCustomRequests
    USBCam: HandleAdapterCustomProperties++
    CAM_IOControl(d09e1420): HandlePinRequests
    CAM_IOControl(d09e1420): CSPROPERTY_PIN_CTYPES
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x114520, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x1145c0, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x114660, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x114700, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x1147c0, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x114860, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x114900, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x1149a0, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x114a40, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f401f, InBuf:0x7f970, InBufLen:8, OutBuf:0x114ae0, OutBufLen:0x78)
    PIN_IOControl(d0d24ec0): IOCTL_CS_BUFFERS
    USBCam: RegisterClientBuffer++ (Not Implemented)
    PIN_IOControl(d0d24ec0): IOCTL:0x2f0003, InBuf:0x7f990, InBufLen:24, OutBuf:0x7f9c4, OutBufLen:0x4)
    PIN_IOControl(d0d24ec0): IOCTL_CS_PROPERTY
    IOControl: Unsupported PropertySet Request
    PIN_IOControl(d0d24ec0): PinHandleConnectionRequests
    USBCam: InitSensorMode++
    USBCam: SetSensorState++
    USBCam: CSSTATE_PAUSE
    CAM_IOControl(d0d24860): IOCTL:0x2f0003, InBuf:0x7f96c, InBufLen:24, OutBuf:0x7f994, OutBufLen:0x4)
    CAM_IOControl(d0d24860): IOCTL_CS_PROPERTY
    CAM_IOControl(d09e1420): AdapterHandleCustomRequests
    USBCam: HandleAdapterCustomProperties++
    CAM_IOControl(d09e1420): HandlePinRequests
    CAM_IOControl(d09e1420): CSPROPERTY_PIN_CTYPES
    PIN_IOControl(d0d24ec0): IOCTL:0x2f0003, InBuf:0x7f944, InBufLen:24, OutBuf:0x7f978, OutBufLen:0x4)
    PIN_IOControl(d0d24ec0): IOCTL_CS_PROPERTY
    IOControl: Unsupported PropertySet Request
    PIN_IOControl(d0d24ec0): PinHandleConnectionRequests

    Thanks,

    Gagan

    Saturday, May 17, 2014 5:10 PM
  • Hi ,

    After changing USB Camera , "USBCam: Error: could not allocate DMA capture buffers" was gone.

    Now, I am getting different error. Please find the log.

    CAM_IOControl(d0917840): IOCTL_CS_PROPERTY
    CAM_IOControl(d09e6a40): AdapterHandleCustomRequests
    USBCam: HandleAdapterCustomProperties++
    CAM_IOControl(d09e6a40): HandleVideoControlRequests
    Pin: 1 Setting State to 0x2
    USBCam: TakeStillPicture++
    USBCam: SetSensorState++
    USBCam: CSSTATE_RUN
    USBCam: FindVideoInfo++
    USBCam: SetVideoFormat++
    USBCam: GetQualityParameters++
    USBCam: Error calling IssueVendorTransfer rc: 31 USB Err: 4  ExtErr: 31
    USBCam: Error 0x1f getting res values
    USBCam: Camera may not support getting res values
    USBCam: ProbeCommit++
    USBCam: SetStreamInterface++
    USBCam: FindStreamInterface++
    USBCam: SetVideoFormat: bFormatIndex 1, bFrameIndex 3, dwInterval 333333 (30 fps), wQuality 0 (max 0), dwPacketSize 256
    USBCam: DMA capture buffers size : 32768
    USBCam: Allocated frame buffer: VA Uncached [0xd0f00000] : VA Cached [0xd0f10000]  : Size [32768]
    PIN_IOControl(d0917ea0): RemoveBufferFromList
    USBCam: FillBuffer++
    USBCam: CaptureThread created
    USBCam: Detected USB 2.x host controller (bcdUSB = 0x200)
    USBCam: Capture State: RE_SYNC
    USBCam: Capture State: RE_SYNC
    USBCam: Capture State: RE_SYNC
    USBCam: Capture State: RE_SYNC

    .....

    .....

    RE_SYNC is coming continuously

    Thanks & Regards,

    Gagan

    Monday, May 19, 2014 7:15 AM