PrabuKumar’s Blog

September 30, 2009

Check Out My Other Posts!!!!!!!!!!!!

Filed under: WinCE 6.0 — prabukumar @ 8:29 pm

Windows Embedded CE 6.0 R3 Available For Download!!!!!

Filed under: WinCE 6.0 — prabukumar @ 8:06 pm
Tags: , , ,

Windows Embedded CE 6.0 R3 is released and available for download.
Start exploring new features
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=bc247d88-ddb6-4d4a-a595-8eee3556fe46

Make sure to install all the updates before installing CE 6.0 R3.
Check out the release notes for features available in R3.

October 25, 2008

Connecting to WinCE 6.0 ARM Emulator using Active Sync

 

If you are working on the WinCE 6.0 ARM Emulator then this post will be useful.Mostly Emulator will be used for testing some application.In order to transfer application to the Emulator you may need either KITL transport or Active Sync support.

If you want to work without KITL and but with Active sync support on Wince 6.0 ARM emulator,do the following things

1. Add the necessary SYSGEN(SYSGEN_AS_BASE,SYSGEN_AS_FILE) variables from the OS catalog items.

2. Add the following line in the WINCE600\PLATFORM\DEVICEEMULATOR\FILES\platform.dat file

Directory(LOC_DIRWINDOWSSTARTUP):-File(“DMAcnect.lnk”,”\Windows\DMAcnect.lnk”)

This line is already present in the platform.dat file but inside IMGTPC environment variable.You can remove this if condition also.

But defining this environment variable in the OSbinary will make your Wince GUI look some what different(Because IMGTPC is for Tablet PC).So better remove this IF IMGTPC condition.

3. After building,downloading and launching the Emulator,Configure your PC Active Sync application by selecting File–> Connection Settings–>Select “Allow Connections to one of the Following:” check box–>Select DMA From the Dropdown box.

ActiveSync

4. In VS2005 Select Tools–>Device Emulator Manager.In Device Emulator Manager dialog box it will list WinCE Emulator,if it is not displaying as below press on the refresh button.Right click on WinCE emulator will show the Popup menu as shown in the Picture.Clicking on the Cradle option will connect the PC to the Emulator via Active sync.

image

 

Now it is possible to transfer files,running remote tools and debugging application from VS2005 on your WinCE 6.0 Emulator using Active Sync transport.

October 8, 2008

Windows Embedded CE 6.0 Fundamentals free e-book from Microsoft

If you want to learn about the fundamentals and how to start developing with Windows Embedded CE 6.0,then here is the free e-book from Microsoft.

Windows® Embedded CE 6.0 Fundamentals

Already in May 2008 Microsoft had released free Windows Embedded CE 6.0 material for MCTS exam.Windows Embedded CE 6.0 material for MCTS is also a good one to start with.And this is second from Microsoft.I think in near future you can expect more from Microsoft.

So Windows CE 6.0 developers enjoy reading these good books.

October 7, 2008

USB Function driver dynamic Switching in WINCE

We have three USB function class drivers in WinCE.

1. Serial

2. Mass Storage

3. RNDIS

Usually only one driver will load by default.Now the question is

“Is it possible to switch the USB Function driver dynamically during WinCE runtime?”

Yes it is possible.We have one IOCTL(IOCTL_UFN_CHANGE_CURRENT_CLIENT) for changing the current USB function driver.I found this solution in wince newsgroups only.Just to share the code I have written this blog.

You can test this by doing the following things:

But before doing these steps,first confirm the working of individual functions(Serial,Mass Storage,RNDIS) on your platform.Then go for this option.

1. Add all the three components in the catalog items.”Device Driver–>USB Function Driver–>Serial

                                                                                                                –>Mass Storage

                                                                                                                –>RNDIS”

2. Compile and generate the OS binary.

3. Write simple application to add the following functions.

HANDLE GetUfnController()
{
    HANDLE hUfn = NULL;
    BYTE rgbGuidBuffer[sizeof(GUID) + 4]; // +4 because scanf writes longs
    LPGUID pguidBus = (LPGUID) rgbGuidBuffer;
    LPCTSTR pszBusGuid = _T(“E2BDC372-598F-4619-BC50-54B3F7848D35″);
    // Parse the GUID
    int iErr = _stscanf(pszBusGuid, SVSUTIL_GUID_FORMAT,SVSUTIL_PGUID_ELEMENTS(&pguidBus));
    if (iErr == 0 || iErr == EOF)
        return INVALID_HANDLE_VALUE;
    // Get a handle to the bus driver
    DEVMGR_DEVICE_INFORMATION di;
    memset(&di, 0, sizeof(di));
    di.dwSize = sizeof(di);
    HANDLE hf = FindFirstDevice(DeviceSearchByGuid, pguidBus, &di);
    if (hf != INVALID_HANDLE_VALUE) {
        RETAILMSG(1,(TEXT(“FindDevice = %s\r\n”),di.szBusName));
        hUfn = CreateFile(di.szBusName, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING, 0, NULL);
        CloseHandle(hf);
    }
    else {
        hUfn = INVALID_HANDLE_VALUE;
    }
    return hUfn;

}

BOOL ChangeClient(HANDLE hUfn, LPCTSTR pszNewClient)
{
    if(hUfn == INVALID_HANDLE_VALUE || pszNewClient == NULL)
        return ERROR_INVALID_PARAMETER;
    DWORD dwRet = ERROR_SUCCESS;
    UFN_CLIENT_NAME ucn;
    _tcscpy(ucn.szName, pszNewClient);
    RETAILMSG(1,(TEXT(“NewClient Name: %s\r\n”),pszNewClient));
    BOOL fSuccess = DeviceIoControl(hUfn,IOCTL_UFN_CHANGE_CURRENT_CLIENT, &ucn, sizeof(ucn), NULL, 0, NULL,
NULL);

    CloseHandle(hUfn);
    RETAILMSG(1,(TEXT(“DeviceIOcontrol Returned value=0x%x\r\n”),fSuccess));
   return fSuccess;

}

4. I have written small menu based application with three menus for selecting the current client driver to load.Here is the code which I handled in the menus.By selecting the corresponding menu will change the corresponding function driver to load.

case ID_USBFN_SERIAL:
    wsprintf(tempBuf,_T(“serial_class”));
    ChangeClient(GetUfnController(),tempBuf);
    break;

case ID_USBFN_MASS:
    wsprintf(tempBuf,_T(“mass_storage_class”));
    ChangeClient(GetUfnController(),tempBuf);
    break;

case ID_USBFN_RNDIS:
    wsprintf(tempBuf,_T(“RNDIS”));
    ChangeClient(GetUfnController(),tempBuf);
    break;

With this solution now you have all the three functions in single NK.bin but still you can use only one function(i.e.either serial or mass storage or RNDIS)at a time.If you want to use two functions(ex:Serial and Mass storage) simultaneously then you need to go for new feature USB Function Composite device driver which is supported in Wince 6.0.

September 24, 2008

WinCE 6.0 DirectShow Camera Driver Higher Resolution support

Filed under: WinCE 6.0 — prabukumar @ 12:34 am
Tags: , , ,

I have been working on the Wince 6.0 DirectShow Camera driver for quite a long time. I have taken NULL PDD driver from PUBLIC code and changed the source to support our custom sensor board. Our camera sensor can support a still resolution of 1600×1200.

With the help of one sample application I am able to see the preview and I am able to capture the still,but supports still resolution up to 640×480.But for a long time with our driver I am not able to get the still of 1600×1200.

Once I increase the resolution of the Still in the driver to 1600×1200,the application fails to run even preview is also not coming.

For debugging this issue I was breaking my head by changing lot of configuration setting in the DirectShow Camera driver. Using debug version build I found the reason for the failure is due to lack of the program memory. The development board which I used for testing contains only 64 MB of SDRAM.

So I tested in different development board which contains 128MB of SDRAM. After giving enough program memory my application starts capturing still of resolution 1600×1200(2MP).But I don’t know the reason why this application is taking too much amount of memory (around 90MB) for running simple Preview and Still pins. As I am not familiar with DirectShow Application development I am investigating on it, I will try to find the reason and will post it in future.

 

September 20, 2008

Playing Media File FULLSCREEN in CEPlayer.exe

Filed under: WinCE 6.0 — prabukumar @ 1:36 am
Tags: , ,

Normally in CEPlayer.exe for playing the video in full screen mode you need to select the FULLSCREEN option from the VIEW menu.

If you are developing an application on Windows CE from which you want to play any of the media file in full screen mode then here is the simple code to do it.

#define ID_VIEW_FULLSCREEN              40016

if(CreateProcess(_T(“\\windows\\ceplayer.exe”),_T(“\\windows\\test.wmv”), NULL,
NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &ProcessInfo))

{

    // Wait until the player comes to the foreground window

       Sleep(1000);
       hWnd = GetForegroundWindow();
       if (hWnd == NULL)
       {
               DWORD error = GetLastError();
               RETAILMSG(1,(_T(“Get HWnd Failed Error = %d”),error));
        }
        else
        {
                if(i < 5)
                {
                          SendMessage(hWnd,WM_COMMAND,(WPARAM)ID_VIEW_FULLSCREEN,(LPARAM)0);

                           i++;
                 }
         }

}

July 24, 2008

Volume and Sound Properties In WINCE

Normally in windows CE sound properties it doesn’t show the option for disabling the sounds of “key click” and “screen taps”.

clip_image001

If you want to enable these two options in the Volume control panel applet, you need to add following registry entry either in platform.reg or project.reg.

[HKEY_LOCAL_MACHINE\ControlPanel]

“InputConfig”=dword:3 ;                        Bit0=have keybd, Bit1=have touch screen ,Bit2=have HW buttons

After adding the above registry entry you will be able to see “key click” and “screen taps” option in the Volume and Sound Properties control panel applet.

With_Screen_Tap_mark

June 19, 2008

Windows Embedded CE and Windows Mobile Live Chat!

Filed under: WinCE 6.0 — prabukumar @ 12:11 pm
Tags: , , , , , ,

If you have any technical question regarding Windows Embedded CE 6.0 or Windows Mobile.Join the live chat with the Microsoft experts.This chat will cover the tools and technologies used to develop devices using the CE operating system.

Tuesday, June 24, 2008

9:00 – 10:00 A.M. Pacific Time

10:00 – 11:00 A.M. Mountain Time

16:00 – 17:00 GMT

Join the chat room on the day of the chat:

 www.microsoft.com/communities/chats/chatrooms/msdn.aspx

June 14, 2008

PXA320 QCI Issue

I have been working on the camera driver for PXA320 processor.We have ported WINCE 6.0 on this board.We were able to capture 640×480 images from the sensor using PXA320 QCI interface.But in the captured images we are getting first line as black.This is due to invalid data for the first line. We struggled to find out exactly why this is happening and due to what. There are three options for this problem

a. Problem might be with the sensor which will be giving one line less data (i.e. giving only 479 line instead of 480).We have tested this by probing the MSB(D7) data line for the first line.From this we confirmed that we are getting the valid 480 lines from the sensor.

b. Problem might be with the DMA data buffer.Since PXA320 is having dedicated DMA channels,there is only less chance to miss the data by the DMA channel.

c. Problem might be with the QCI controller of the PXA320.For this we contacted Marvell for the support and finally got the message that “PXA320’s QCI interface which cannot correctly store the first line of sensor data”.

To workaround for this issue you can configure the sensor to output one extra line.

Next Page »

Blog at WordPress.com.