Wednesday, 18 November 2009

CE6.0 CETK using ActiveSync failes on ARM devices

One of the guys here was having problems getting his CE6.0 CETK connected using activeSync to the target device. It sounded like something on the platform or his PC was just not setup correctly as the Platform Builder connection test just wouldn't work... very bizzare.

We're all running Vista 64 or Windows 7 64 so we were thinking it was a 64 bit issue (as there are other problems using these OS's for day to day development work but no it seems that the Platman folders on the PC that are used to store the target binaries for the CETK and remote tools is being checked incorrectly. If you look in this directory:

C:\Program Files\Common Files\Microsoft Shared\Windows CE Tools\Platman\target\wce600\

You'll see the ARMv4i directory but not an ARMv4 one like in previous versions of the Windows CE OS releases. It seems that the PC side application to push these target executables is looking (incorrectly) for an ARMV4 not ARMV4i directory.

To work around this simply copy the ARMV4i folder to create an ARMV4 directory and it should now all connect up.


Nigel Goodyear said...

Actually this happens with Remote Tools as well. When you launch from Platform Builder 6.0 using platman (Platform Manager) over ActiveSync. To connect your device, when platman starts, it asks Windows CE to return the processor type, through a KernelIoControl, to download the right binary file to the device (client side of the tool). In the case of the ARM processor, Platform Manager do not seem to identify correctly the ARMV4i processor type, but identify as ARMv4 instead. Therefore the tool cannot copy the right files to your device. Your documented fix of copying the folder would correct this issue also.

Alon said...

Hi Graeme,

Is a bit off-topic (let me know where should I post it if here is 'too' wrong...)

A while ago you posted an answer about starting the Bluetooth by using CreateFile and DeviceIoControl (

I'm trying to translate it to .Net but it keep on failing on the DeviceIoControl. Any chance you can help me with that?

Thanks a lot,


(let me know how can I/you contact you/me)

GraemeW said...

There seems to be a reasonable example of calling DeviceIOControl :

But you will need to find out the values for IOCTL_SERVICE_START and IOCTL_SERVICE_STOP.

Hope that helps!

Alon said...

Thanks Graeme for your prompt reply.
Yes, I've found quite a few samples about DeviceIoControl but not so many about the BT driver (BTD0). On those I found, it was usually in CPP (how do I convert this: WCHAR *argPtr = L"card";
DeviceIoControl (hDev, dwctl, argPtr, sizeof(WCHAR) * (wcslen (argPtr)
+ 1), NULL, 0, NULL, NULL);
to .Net?)
And on the one I found in .Net - it didn’t work... that sample used for calculating the IOCTL_SERVICE_START the function CTL_CODE(0x00000104, 1, 0,0). How can I find out the correct values of the parameters DeviceType, Function, Method, Access ?

About the sample you pointed out for me – I’ve implemented it (by taking part of what I already found and the DeviceIoControl part from that sample and still not working…
Is it possible somehow DeviceIoControl was blocked in my PND??!