ARM-on-USB3

I have seen some of the queries from windows embedded developers related to DirectShow Camera support in Windows Embedded CE. So in this article I am going to show how to get the USB camera working in Windows Embedded CE 6.0 with ARM platform. I am going to take our REGULUS platform for this demo.

Required SetUp:

• Platform Builder for CE 6.0 on Visual Studio 2005
• USB Camera Driver for CE 6.0 (Download and Install from this link)
• REGULUS ARM Development Kit with WinCE 6.0 R3 BSP. (https://www.e-consystems.com/regulus.asp)
• 3.2 MP USB Camera

Installation:

Installing the Visual Studio and Platform Builder for CE6.0 is out of scope for this article. There are articles available in the web for the installation for WinCE 6.0 Platform Builder.

Installing the USB camera driver downloaded from the above link will automatically place the driver source inside the WINCE600\PUBLIC\ThirdParty folder.

Building the OS with USB camera Driver:

Create an OSDesign or Open an existing OSDesign that came with the development Kit. In my case I had created the REGULUS-1_DEMO OSDesign for our REGULUS board.

Since this driver is a DirectShow based driver we need to add the DirectShow filters to the OS Image in order to get our driver and application working.

DirectShow Sysgen Components:

DirectShow Sysgen Components:

installed USB camera driver to the OS image

For adding the installed USB camera driver to the OS image select the following components form the catalog dialog box.

After adding all the SYSGEN components which I mentioned above, build the OSDesign by selecting the following command from the VS2005 Menu.

Build–>Advanced Build Commands–>Clean Sysgen

Once the compilation is finished check the ce.bib and reginit.ini file in the release directory for the presence of usbcam.dll settings.

Application Compilation:

So now adding the driver for USB camera is done. So we will move onto the application for testing the driver. We can find some sample DirectShow camera application in the Shared source of WinCE (i.e., PRIVATE directory).The source for the Camera application can be found in the following location.
WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW\CAMERA\CAMERAAPP

For building the application exe, follow the below mentioned steps.
• Select “Open release Directory in Build Window” from the workspace Build Menu.
• Change your directory to
WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW\COMMON\LIBS
• Type the command ‘build -c’.
• Once it is finished building those directories.
• Change the directory to
WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW\CAMERA
• Type the command ‘build -c’.
• It will build those directories, but finish of with the ‘kato.lib’ non availability error.
• Now Change the directory to
WINCE600\PRIVATE\TEST\MULTIMEDIA\DIRECTX\DSHOW\CAMERA\CAMERAAPP\
• Type the command ‘build -c’
• Now it will generate the “CameraDshowApp.exe” application binary in the Release directory of the OSDesign.

Downloading & Executing:

After building the OS Image with usbcam.dll and the CameraDShowApp.exe application we will download the image to the development kit. Once it is downloaded and booted then connect the USB camera to the REGULUS development kit USB Host port.

After connecting the application to the device, we can run the application which we compiled before (i.e., CameraDShowApp.exe).It will show the following screen with the list of filters to select for creating filter graph. If the camera driver is loaded properly then it will show the device name “CAM1:” in the combo box.

Capture Parameters

Selecting the required filters and clicking on OK will run the camera PREVIEW with the dimension supported by the camera near to the “PreferredWidth” registry setting. Check out the $(_WINCEROOT)\PUBLIC\ThirdParty\Catalog\USBCam\Driver\usbcam.reg registry file for programming the “PreferredWidth” registry key.

Camera Test Application

And also make sure to program the following registry keys according to the output format supported by the Webcam. The camera which I used supports YUV uncompressed outputs, so following is the registry settings which I used.

[HKEY_LOCAL_MACHINE\Drivers\USB\ClientDrivers\Video_Class]
“UncompressedSupport”=dword:1
“MJPEGSupport”=dword:0

2 thoughts on “How to Get USB Camera Working in WinCE 6.0 ARM Kit”

Comments are closed.