Monday, November 24, 2008

Debugging Windows Mobile devices

Another boring notification while debugging Windows Mobile devices, is linked to the default security level of the OS. On every start of the debugger, VS2005 launch required applications on the device that are not digitally signed, so device warn you.
One solution to disable those warning messages, is to disable and change the security level. Of course this will completely remove all the security on the device... so make sure to revert your changes after debugging process to avoid any damages on your device.
On the device you have to set the following :
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"00001001"=dword:1
"0000101a"=dword:1

- Nicolas

ActiveSync Tweak

If you are like me, connecting, disconnecting, all day long, various Windows Mobile and Windows CE devices to you computer through ActiveSync, at each connection ActiveSync bother you make a partnership !
Partnership are nice while it's your personal or business device and you bring it everywhere with you to get an updated schedule and email... but while you are debugging applications, you don't want to be prompted.
ActiveSync have a "secret" registry key to always associate connected device as guest and will never prompt you anymore for any partnership.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE Services]
"GuestOnly"=dword:1

Set this value on your desktop computer and then plug your devices !!!

To revert this, just set GuestOnly to 0(zero) and partner ship will be enabled.
- Nicolas

Wednesday, November 19, 2008

ARM European Technical Conference

The ARM European Technical Conference will take place tomorrow November 20 th in Paris. It's not too late to register for the event (link).

- Nicolas

Monday, November 17, 2008

Dll Imports

When you are connecting managed code to native, it is often a pain to figure out how to write the “DllImport” properly. I'm using this site CONSTANTLY when I need access to native code from C#. It allows you to search on a function name and see user contributed definitions for the DLL Import…

http://www.pinvoke.net/

(Thanks to Joe)

- Nicolas

Tuesday, October 14, 2008

Flash back to Windows CE .Net 4.2

Last few weeks I have been involved into a customer project running Windows CE 4.2…. Woooaa a big jump in the past. I don't know if you were already involved in Windows CE at this time, but a big gap is visible between this version of Windows CE and the latest one… Thanks to Microsoft for all those improvements… Connectivity options was Configure Remote Connection… so i took me 10 minutes to find the right menu, as every thing change… But one thing that I found really surprising is the time spent to do a sysgen under Windows CE 4.2 with the most up-to-date development Platform. It took me only 10 minutes, while it was around 40 minutes on the best computer available at the release of Windows CE 4.2… oups I should say Windows CE .Net 4.2, the time when the .Net revolution starts :-).

The KITL over serial implementation give me a big headache, as at the time of Windows CE 4.2 the frames sent and received by the target where created and checked by the OAL itself before forwarding them to the upper layer of KITL… meaning that you had to know exactly the format of the frames sent and received by Platform Builder, otherwise the default KITL over serial implementation of Platform Builder was not able to communicate with the target. You can imagine that finding this information is not so easy as the MSDN documentation at this time was not so complete as it is now. But thanks to free sample BSPs, and to my favorite web search engine , I found my grale : "The definition of the KITL frames".

So as an archive for the Windows CE community here is the KITL header definition for Windows CE 4.2 : Header - Data - Trailer

typedef struct _SERIAL_PACKET_HEADER
{
UCHAR headerSignature[HEADER_SIGNATURE_BYTES];
UCHAR pktType;
UCHAR Reserved;
USHORT payloadSize;
UCHAR crcData;
UCHAR crcHdr;
} SERIAL_PACKET_HEADER;

With :
  • headerSignature : the signature of the header : { 'k', 'I', 'T', 'L' }
  • pktType : use by KITL to identify the service associated to the frame
  • payloadSize : packet data size, not including this header
  • crcData : packet data check sum (simple, 8-bit crc)
  • crcHdr : header data checksum (simple, 8-bit crc)

The simple 8 bits check sum algorithm :
UCHAR ComputeChecksum(PUCHAR pBuf, USHORT len)
{
USHORT s = 0;
UCHAR csum = 0;

for(s = 0; s < len; s++)
csum += *(pBuf + s);

return csum;
}


- Nicolas

Wednesday, October 1, 2008

FTF EMEA 2008


I will present on the Microsoft booth at the Freescale FTF EMEA 2008 that will take place October 7th in Paris. If you get a chance to come, it will be a great pleasure to exchange with you about the Microsoft Embedded Technologies.
If you didn't register yet, follow this link. See you then.

- Nicolas

Wednesday, September 17, 2008

Exam Preparation Kit in foreign languages available for download

The Exam Preparation Kit book (link) for the Microsoft Certification for Windows Embedded CE 6.0 is available for download in the following languages:

  • English
  • French
  • German
  • Simplified Chinese
Other languages will be soon available for download.

- Nicolas