Wednesday, 28 October 2009

Active Sync problems using RNDIS

I use a number of machine on a day to day basis, one of my development machines refuses to connect using Vista's Active Sync (Windows Mobile Device Center) to any devices using RNDIS as the connection type. The RNDIS connection is made but the device center refuses to attempt any connection... ger!

Connecting using USB serial works without any problems, so here is my work around until I find a fix:

If you are using Windows Mobile Standard (Smartphone) then you can switch to using USB Serial from the default that is RNDIS by going to settings->connections->USB to PC and un-selecting the "Enable advanced network functionality". This resorts to using the old fashioned USB serial. There should be a similar setting on Windows Mobile Professional (PocketPC).

Wednesday, 21 October 2009

Lightweight XML User interface for Windows CE

ByteSnap Design have just launched their user interface SnapUI, this UI engine uses XML to separate the graphics engine from the user interface configuration.

The XML file describes the whole screen menu structure and icon layout, any text placement, language and interaction, whilst the engine is responsible for rendering this configuration to the user and interfacing with any propriety hardware on the embedded system

The tool is aimed at embedded devices using Windows CE but can be run using the same graphics files on a Desktop PC for quick development, testing, demos etc, read more from the article on WindowsForDevices SnapUI

Bytesnap Design Ltd are a UK based company near Birmingham, read more about the SnapUI and design services at www.bytesnap.co.uk

Wednesday, 14 October 2009

Using WinCE APIs From Kernel OEM Routines

There are many occasions where you want to implement some functionality in a Kernel IOCTL or OEM kernel callback but you can't call the normal Windows CE API because you're in kernel space. So tasks such as setting or reading registry entries, creating events and signalling processes etc can't be done... or can they..?

Some of the basic API functions for this support are available but the functions have a prefix NK or K, for instance:

NKSleep()

NKRegCloseKey()
NKRegCreateKeyExW()
NKRegOpenKeyExW()
etc

Note that not all of these are documented, so for more information see:
\WINCE600\PUBLIC\COMMON\OAK\INC\nkexport.h

More advanced functions are available in:

\WINCE600\PRIVATE\WINCEOS\COREOS\NK\INC\syncobj.h

This is the publicly available Windows CE private kernel code, and includes event, Semaphores and even message queues!:

NKSetEvent
NKPulseEvent
NKResetEvent
NKCreateMsgQueue
etc!
So don't use flags and share memory, do it properly with some thread and process intercommunication! :)

Wednesday, 30 September 2009

Negating the need to run MakeImage when developing device drivers on WinCE

Debugging of drivers on Windows CE can be painful when downloading large images, NK.bin's of 10-30mb are typical and having to download the whole of this just for a driver modification can mean long times between compilation and testing. Here are my three methods for quicker development without having to push the full nk.bin down each time.

The firstly two methods have pretty much the same outcome but from a different approach:

1 - Remove the driver from the platform.bib file.

This means that the driver isn't embedded in the OS image (nk.bin), then run this image when on KITL enabled (the debug transport typically used to connect the target device to the development PC). This will result in the DLL being pulled from the desktop release directory over the KITL transport and being ran as if it were in the image.

2 - Tell Platform builder to force loading of modules over KITL

In Platform Builder go to

Target -> Release Directory Modules

Then include the DLL's that you want to force loading over the KITL connection, this tells the OS on start-up to ignore any DLLs included in the image. The benefit of this is that you don't even have to build the NK.BIN again.

3 - Load the drivers at runtime using ActiveDevice

This method is handy if you don't have a KITL connection, here we populate the registry with the driver entries, but instead of putting them under HKLM\Drivers\Builtin\ put the registry entry under HKLM\Drivers\Test\ to ensure that the system doesn't load the driver on start-up.

Then create a simple application that will tell device.exe to load the driver when you run it:

HANDLE device = ActivateDevice(L"Drivers\\Test\\myDriver", 0);

Using the handle returned, you can also force it to unload the driver. This means you can start (and stop) the driver without a KITL connection but allowing you to copy new versions of your driver on from an SDCard or ActiveSync, you'll need to rely on serial debug prints probably to debug here but it’s a quick easy mechanism if you don't have a debug transport.

Wednesday, 24 September 2008

Attending ESS'08 and Hosting half-day Windows Embedded Workshops


Just a quick note to invite you to come visit me on the Direct Insight stand at next week's Embedded Systems Show at the NEC. Stand 449 October 1st and 2nd. You can get your free exhibition pass here.

Also in conjunction with Microsoft and Silica, Direct Insight will be hosting half-day Windows Embedded Workshops. These 100% technical workshops will take you through the process of building and deploying with both Windows Embedded CE and Windows XP Embedded.
This is a unique hands-on opportunity to check out how Windows Embedded stacks up against Linux, and the various RTOS solutions out there. Places are strictly limited, so please visit the link below to secure your place.
http://www.directinsight.co.uk/services/windows-embedded-workshop.html

Hope to see you there.
-Nigel

PS. At the show, we're also introducing a new, high performance, low-power Windows CE module, at a ground-breaking price. See this, and our other solutions for platform-based design on Stand 449 at ESS'08 (October 1st & 2nd at the NEC)

Friday, 19 September 2008

Register for Microsoft® Tech•Ed EMEA 2008 Developers before 26th September and save €300

On behalf of Microsoft I would like to invite you to take advantage of the early bird discount and register for Microsoft® Tech·Ed EMEA 2008 Developers (10 - 14 November, Barcelona, Spain) before 26th September 2008.

As Microsoft will no longer be hosting the Mobile and Embedded DevCon (MEDC) there will be a significantly increased Windows® Embedded presence at this event. This will be focused around 2 key areas:
· A dedicated Windows Embedded track
· Increased Windows Embedded presence in the exhibition hall - on the Ask the Experts Pavilion and dedicated Windows Embedded Partner Zone

Attend to:
· Enhance your technical skills in the development and implementation of Windows Embedded operating systems
· Network with both the Windows Embedded and wider community
· Engage with the largest audience of Microsoft Technology Specialists that come together across EMEA
· Visit the Windows Embedded exhibition space – the exhibition hall is at the heart of this event. A new layout design will promote networking across the hall, offering presentations, informal Chalk and Talk, comfortable social areas and continuous community activities

Don’t forget to register before 26th September and save €300!

Tech·Ed EMEA 2008 Developers is the Microsoft premier technical education conference just for developers. For five days, you and more than 4,000 of your peers have countless opportunities to explore about the latest cutting-edge technologies from Microsoft. For general event information please visit www.microsoft.com/emea/teched2008/developer/

>> Nigel

Friday, 5 September 2008

Windows® Embedded CE 6.0 Fundamentals

Great book available called "Windows® Embedded CE 6.0 Fundamentals"

Synopsis
Delve into the fundamental tools and techniques for Windows Embedded CE—and get ready to deliver the next innovation in powered devices. Covering the newest version of the technology—Windows Embedded CE R2—and led by two embedded-development experts, you'll get both the hands-on instruction and pragmatic reference you need to begin building a range of small footprint, smart, connected, and service-oriented devices. This book examines the architecture, built-in programming tools, drivers, and build process, and shows how to take advantage of the Windows Embedded CE 6.0 Software Development Kit (SDK). Whether new to programming with Windows and Windows Embedded, or already working with the platform, you'll find the best practices and real-world guidance you need to get productive quickly.


Delve into the fundamental tools and techniques for Windows Embedded CE—and get ready to deliver the next innovation in powered devices. Covering the newest version of the technology—Windows Embedded CE R2—and led by two embedded-development experts, you'll get both the hands-on instruction and pragmatic reference you need to begin building a range of small footprint, smart, connected, and service-oriented devices. This book examines the architecture, built-in programming tools, drivers, and build process, and shows how to take advantage of the Windows Embedded CE 6.0 Software Development Kit (SDK). Whether new to programming with Windows and Windows Embedded, or already working with the platform, you'll find the best practices and real-world guidance you need to get productive quickly.


To find out where to buy follow this Link to the correct vendor for your country.

> Nigel