Thursday, July 1, 1999

Getting started developing software for the Auto PC

.KEYWORD autodevelop
.FLYINGHEAD PROGRAMMING POWER
.TITLE Getting started developing software for the Auto PC
.OTHER
.SUMMARY We continue our series on the Auto PC by almost literally looking under the hood. If you’re interested in developing software to run on the ever-so-cool Auto PC, you’ve come to the right place. That’s because Auto PC guru Mark Moeller provides you with an incredibly helpful roadmap that’ll get you started programming the Auto PC. Start your engines. Varrooom!
.AUTHOR Mark Moeller
In my last article, I discussed my vision for the Auto PC and included some ideas for software developers who might be considering writing software for the Auto PC. This month I want to provide the information necessary to start developing software for the Auto PC. In case you’re unfamiliar with the Auto PC, it’s a multimedia, information, entertainment and communication computer for automobiles or other vehicles. It’s designed as an open platform based on the Windows CE operating system and makes extensive use of speech recognition and text-to-speech for communicating with the operator of the vehicle.

There are many manufacturers working on Auto PC’s including Clarion, Delphi Delco, Harman Kardon, Infinity Systems and Intel. Currently, only Clarion (at http://www.autopc.com) has a product available to consumers. They can be purchased on-line at Cruchfield’s Web site (at http://www.crutchfield.com) for $1,299.95 to $1,599.95, depending on the options.

I run a consulting business for Auto PC developers and Auto PC manufacturers. I often get these three questions:

.BEGIN_LIST
.BULLET Where do I get the software developers kit for writing software for the Auto PC?
.BULLET How do I develop for the Auto PC?
.BULLET How do I build an Auto PC?
.END_LIST

In this article I want to answer the first two questions and give a few pointers to address the third.

.H1 Development process overview
As with any embedded system product, developing for the Auto PC involves a host and target machine. Software for the Auto PC is developed using the Visual C++ development environment running under Windows NT (the host). Once the code is ready for testing, you can then choose to run it under the Auto PC emulator (which runs under NT) or the program can be downloaded to the Auto PC (the target) via a serial port where it can then be executed and debugged.

The emulation environment will likely be the preferred option for initial testing and evaluation because it allows you to make and test quick changes to the software versus using the download method. For final testing you’ll want to use the download method as there are important differences between the emulation environment and the actual Auto PC platform.

Once the software is finished and ready for deployment, you’ll need to build an installation tool for your software using the Auto PC CEI builder. The files generated by the CEI builder can then go onto a Compact Flash card or a writeable Compact Disc for installation on the Auto PC. When the Auto PC sees that a Compact Flash card or Compact Disc is inserted that contains a CEI builder package on it, it automatically offers the user the option to install the software.

.H1 The hardware
My father always taught me to make sure I had the "right tools for the job". Though as a kid that usually meant not using a screwdriver in place of a chisel or pliers in place of a wrench, I still employ this wisdom today and encourage others to do so as well. So for developing software for the Auto PC, I use a dual processor Pentium III/450Mhz with 256MB of RAM with about 28GB of hard disk space.

Yeah, my dad taught me well. However, you don’t need much more than a 200Mhz Pentium machine with 64MB of RAM. You’ll want a couple of gigabytes of hard drive space free as well has having NT Workstation 4.0 installed and at least one serial port free.

Of course, you’ll also need to have an Auto PC. The Clarion AutoPC 310C is just the ticket (okay, so it’s the only ticket right now). Make the investment in their higher-end model. It comes with the GPS and CF card; both are useful additions.

You’ll also need to purchase a serial card to put in the Compact Flash slot of the Auto PC. This is to allow the Auto PC to be connected to the development PC for running and debugging software on the Auto PC. Socket Communications sells such a device; it’s called the Socket Serial I/O CF+ Card. An AT to AT null modem cable is needed to make the actual connection. Finally, a 12-volt power supply for the Auto PC is needed. It should have at least a 3 amp rating, more if you intend to crank up the volume on the Auto PC. I use a 3 amp unit that I purchased from Radio Shack and it works great.

As a fully equipped developer, you’ll want four high fidelity speakers and an AM/FM antenna to hook to the Auto PC. The speakers are deceptively important. When doing anything with audio, you’ll want to listen closely to what is coming out of the speakers for sound quality. It is amazing how a .WAV file that might sound great on a desktop sounds terrible in a vehicle when you’re surrounded by four speakers. It is also handy to have a toggle switch to put on the Accessory input line of the Auto PC to simulate ignition on/off without unhooking the wire from the power supply. For doing real world testing, an Auto PC should also be installed in a vehicle to which you or a tester has access. Alternatively, the Auto PC used for development can be put in a carrying case to allow it to be easily moved between the office and the vehicle.

.H1 The software
The Auto PC development environment is comprised of three main components:

.BEGIN_LIST
.BULLET Windows NT;
.BULLET Visual C++ 6.0;
.BULLET The Auto PC SDK.
.END_LIST

The first two can be purchased retail; the third can be downloaded free from Microsoft’s Windows CE SDK Web site (at http://msdn.microsoft.com/cetools/downloads/devkits.asp).

Up until just recently, the Auto PC software developer needed to use Visual C++ 5.0 instead of 6.0 because the Auto PC SDK was not compatible with Visual C++ 6.0. This has been corrected and by the time you read this, the updated SDK should be available for download. It’s important to know that Windows 95/98 can’t be used instead of NT. This is due, in part, to the fact that Windows 95 and 98 do not support UniCode like NT and Windows CE, so the emulator cannot run on Windows 95/98.

A component that you should consider adding to your suite of development tools is the NavTech Navigation Libraries for the Auto PC. These are tools that allow for the development of navigation related software. They can be acquired directly from NavTech (at http://www.navtech.com).

.H1 New concepts and programming interfaces
The Auto PC introduces a rich set of new concepts and programming interfaces. This is due largely to the fact that the automotive environment has a unique set of requirements. The focus on a speech driven user interface is one such requirement. Keep in mind that, as a software developer for the Auto PC, you have a responsibility to write software for the Auto PC that will not be distracting to the driver by drawing the driver away from his or her primary task of operating the vehicle.

Using text-to-speech, speech recognition and .WAV files to interact with the user should be the primary interface for any application written for the Auto PC. Making the move away from thinking in Graphic User Interface centric models to speech models is very challenging. There is very little published in the arena of speech user interface but you can look at the work that is being done in the accessibility arena for the visually or physically impaired.

Both the Department of Defense and the automotive industry have done quite a bit of research in the area of speech UI–but most of it is closely held. The Auto PC makes use of the Microsoft Speech API as the underlying interface to the speech recognition and text-to-speech, but the Auto PC SDK also includes libraries to significantly simplify creating a speech user interface for an application.

Another area new to the Auto PC is the Forms Manager. It’s the means by which applications for the Auto PC draw to the screen and receive event notifications such as key presses. The Forms Manager uses a special type of ActiveX control to interact with the user, both visually and through speech. The Forms Manager handles the sharing of the screen and other resources between applications as well as watches over the application to make sure it is still responding.

As an example, the Forms Manager requires that applications paint their screen within of several seconds of being notified of the need to paint the screen. Failure to paint the screen in a timely manner causes the Forms Manager to assume the application has hung and the application is forced to exit.

Another new component that works in conjunction with the Forms Manager to assure the system works reliably is the CPM (Critical Process Monitor). You can use the CPM to designate your application as one that’s critical to the operation of the Auto PC. A critical process is one that is required by the system for proper operation or where a malfunction could have significant impact on the Auto PC.

Through various methods, the CPM will monitor the application for proper operation. If the application is determined to be malfunctioning, the application is forced to terminate and may be automatically restarted. The CPM also monitors the overall health of the Auto PC. In the event that some catastrophic system failure should occur, the CPM will force the Auto PC through a soft reset to correct the failure condition, without user intervention. An Auto PC application should be written with these factors in mind so as to prevent or minimize data loss by the application in the event of failure.

Other areas of interest are the Vehicle I/O interface which allows applications written for the Auto PC to communicate with the vehicle’s onboard diagnostic computer if proper interface hardware is installed. The Position and Navigation interface is used by applications to query the GPS for vehicle position and motion information. Finally, the Audio Source Manager is used for controlling the high fidelity audio output of the Auto PC.

To move beyond this introductory information about writing software for the Auto PC, check out Microsoft’s article on writing applications for the Auto PC available on their developer support Web site at http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/techart/apcapps.htm.

One can also search the Microsoft Developer Network for more information on programming for the Auto PC at http://msdn.microsoft.com.

There is also a new class available from Paul Yao company called Principles of Microsoft Windows CE Programming for the AutoPC. It is a 5 day, intensive course on writing an Auto PC application from start to finish. Check out http://www.paulyao.com/workshop.html for more information.

.BEGIN_KEEP
.H1 Want to build an Auto PC?
Microsoft is always looking to add new companies to the list of those who produce Auto PCs. Signing up to do this involves becoming a Windows CE systems integrator. System’s integrators go through an application process and must meet certain qualifications that Microsoft has set. Send email to wcesi@microsoft.com for more information on this. Once you have obtained the title of Auto PC SI (Systems Integrator), Microsoft will provide an adaptation kit for Windows CE design to allow you to port the Auto PC software to a new Auto PC hardware platform. SIs also get other debugging and development tools designed to facilitate bringing up Windows CE on new hardware platforms. These same tools can be used for developing applications and are critical if you want to write device drivers or system level components for the Auto PC. Alternatively, interested companies can contact me at markmo@autopcware.com to get started. General information about the Auto PC can be found at Microsoft’s Auto PC Web site at http://www.microsoft.com/windowsce/autopc.

.BEGIN_SIDEBAR
.H1 Product availability and resources
For information on Clarion’s AutoPC, visit http://www.autopc.com.

To purchase Clarion’s AutoPC, visit Cruchfield’s Web site at http://www.crutchfield.com.

The Auto PC SDK is available from Microsoft’s Windows CE SDK Web site at http://msdn.microsoft.com/cetools/downloads/devkits.asp.

NavTech Navigation Libraries for the Auto PC are available at http://www.navtech.com.

Microsoft’s article on writing applications for the Auto PC is available on their developer support Web site at http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/techart/apcapps.htm.

Search the Microsoft Developer Network for more information on programming for the Auto PC at http://msdn.microsoft.com.

Principles of Microsoft Windows CE Programming for the AutoPC is available at http://www.paulyao.com/workshop.html.

General information about the Auto PC can be found at Microsoft’s Auto PC Web site at http://www.microsoft.com/windowsce/autopc.
.END_SIDEBAR

.BIO
.END_KEEP