How to Integrate MSN Direct into a Device

Windows CE 5.0 Not SupportedWindows Embedded NavReady 2009 Supported

10/16/2008

This topic describes the process of integrating MSN Direct into a Windows Embedded NavReady powered device. This includes building an operating-system (OS) design that supports MSN Direct, creating an application that receives, processes, and displays MSN Direct data to the user, adding the application to the run-time image, and obtaining the supporting hardware.

MSN Direct services provides many different services that each deliver up-to-date data for a specific category. Categories include traffic, weather, movie times, gas stations, local events, news, stocks, group messages, emergency alerts, and more. Work with your development team to decide on the subset of MSN Direct services that will be supported by the Windows Embedded NavReady powered device.

Hardware and Software Assumptions

  • You have a standard development board (SDB) that uses the ARM microprocessor.
  • If the standard development board (SDB) does not have a COM port, you have a USB-to-Serial converter that you can attach to the USB port on the SDB.
  • You have an ARM-based board support package (BSP) that is selectable in the Catalog. For more information, see ARM BSPs or BSP Wizard.
  • You have obtained the Receiver Development Kit (RDK) from the MSN Direct team.

Steps

Step Further information

1. Create an operating-system (OS) design based on the Portable Navigation Device design template.

On the board support package (BSP) page, you must choose an ARM-based BSP.

Note   The OS design must include SYSGEN_MSNDIRECT_SAMPLE, which you can use as a starting point for building an MSN Direct application.

Creating an OS Design

Portable Navigation Device Design Template

2. Build your run-time image to generate header files and dynamic-link libraries (DLLs).

Building a Run-Time Image

3. Download the run-time image to the target device by using a serial remote connection.

Configuring a Serial Remote Connection

How to Connect to a Target Device for Debugging

4. Learn about the MSN Direct host-side architecture.

MSN Direct Services Architecture

5. Decide on which service types that will be supported by your MSN Direct application.

MSN Direct Service Type Constants

6. Create a new MSN Direct application.

  • Link to the DBRCore.lib library that you built in step 2. DBRCore.lib is from the sample application.

Creating an MSN Direct Application

7. Add custom classes to your project that support the data in incoming messages for weather, emergency alerts, gas, group messages, local events, movies, stocks, traffic, and user locations. Then, you can modify these classes to meet your specific requirements.

Adding Custom Classes for Incoming Messages

8. Create message-handler classes for each supported service type. Each message handler must do the following:

  • Parse the data received from the MSN Direct receiver.
  • Provide a locking mechanism.
  • Cache incoming data and store it inside the message handler. You do this by creating arrays to store data from incoming messages.
  • Provide Get* methods for other components to retrieve the data stored in the message handler.

For examples, see the *Handler.cpp source files in the sample application, located at %_WINCEROOT%\PUBLIC\SERVERS\SDK\SAMPLES\MSNDIRECT\DBRCore.

Each handler you create can be called when its corresponding message is received by DBR701::ProcessInMessageFromReceiver.

No further information

9. In MSNDirect.cpp, define a subclass that inherits from DBR701.

You can use the DBRHost subclass as a starting point for how to override the DBR701 parent class. This class is implemented in DBRHost.cpp, a source file in the sample application.

At a minimum, your subclass must provide the Get* methods inherited from DBR701. These methods are each called internally to request data from the receiver.

Your subclass must also provide functionality to handle messages received over a serial connection. To handle each type of incoming message, we recommend that you add a call to a message-processing method that calls the handler's methods to handle incoming messages.

This subclass must also override the DBR701::ProcessInMessageFromReceiver method and provide custom code to handle incoming messages for the MSN Direct service types supported by your application. You can add a call to a specific message handler when the application type for that message is received by this method.

No further information

10. Create a user interface (UI) for your application based on the MSN Direct UI guidelines and logo requirements.

After the UI components are created, you must implement a design that enables your UI to retrieve information from the data that was cached in the message handlers and display it to the user in a timely manner.

MSN Direct UI Guidelines and Logo Requirements

11. Build your application.

  • In the Workspace window, choose the FileView tab, select your project, and then from the Build Project menu, choose Build.

In this example, MSNDirect.exe is the name of the built executable file.

No further information

12. Test your application on the run-time image that you downloaded in step 3 by using the development tools.

Follow the steps to use the development tools and substitute MSNDirect.exe (the production-ready application) for MSNDirectApp.exe (the sample application).

How to Use the MSN Direct Development Tools

13. Purchase or build MSN Direct receivers that will be connected to each portable navigation device (PND) by using a serial cable. For more information, contact the MSN Direct Business Team at dbbusdev@microsoft.com.

No further information

14. To obtain the current location of the Windows Embedded NavReady powered device for MSN Direct services, use a third-party GPS driver and GPS hardware. (The location contains latitude and longitude coordinates to describe a location on earth.)

You can get this location by doing one of the following:

  • Create a network connection between the GPS hardware and the receiver. The GPS hardware then routes the current location directly to the receiver. Once located, the receiver can communicate the location to the Windows Embedded NavReady powered device by sending an incoming message of type GPS_MESSAGE. An application can typecast it to a GPSMsg object.
    - or -
  • Include a GPS driver in the run-time image, connect the GPS hardware to a COM port on the Windows Embedded NavReady powered device, and use the GPS technology to obtain the current location. Once located, send the location to the receiver by creating a WGS84 object and putting it into a LocationMsg response message, which is sent to the receiver. You can do this by using the LocationMsg::SetLocation method.

Stream Interface Driver Development Concepts

Adding a Device Driver to an OS Design

15. (Optional) Add support for the MSN Direct Received Locations service to enable users to send search results to a portable navigation device (PND).

How to Enable Users to Send Search Results from a Desktop PC to a Portable Navigation Device

16. Complete the certification process for both the MSN Direct hardware and the software.

MSN Direct Services Certification

17. Add the certified application to your production-ready OS design.

Adding an Existing Project to an OS Design

Updating the Project.bib File

18. Rebuild your OS design into a run-time image and download it to your production-ready devices.

No further information

19. (Optional) Create user documentation that describes how to set up and connect the portable navigation device (PND) and the receiver.

Creating End User Documentation for an OS Design

20. Deploy Windows Embedded NavReady powered devices that each have a run-time image that includes the tested, certified MSN Direct application, together with a MSN Direct receiver.

No further information

See Also

Concepts

MSN Direct Services How-to Topics