Testing the Two Applications
To test the applications, first pair up your Windows Mobile device with your computer.
On the Windows Mobile device, go to your Bluetooth settings and in the COM Ports section, tap the New Incoming Port item (see left of Figure 4). Select an available COM port number. This example selects COM6 for its Windows Mobile device.
Figure 4: The COM Port Number. This example selects COM6 for its Windows Mobile device.
Figure 5: The SPP Service. Ticking the checkbox shows that COM18 is used for this serial connection.
On your computer, launch the Bluetooth application (in Windows XP) and select the Windows Mobile device that you have paired and click Properties (see Figure 5). Select the Services tab and you should be able to see the Serial Port (SPP) service offered by your Windows Mobile device. Tick the checkbox and, as shown in Figure 5, you'll see that COM18 is used by my computer for this serial connection.
Once the serial port connection is established, you can now deploy the RemoteController_WM project onto your Windows Mobile device. At the same time, run the RemoteController project.
In your Windows Mobile device, tap the Open menu item. This will open the serial connection to the desktop through Bluetooth.
On the desktop application, click "Open Serial Port" and then "Select PowerPoint file to load" to select a PowerPoint slide deck to view. You will now be able to navigate the PowerPoint slide deck using either your Windows Mobile device or the desktop application (see Figures 6 and 7).
Figure 6: Navigating the PowerPoint Slide Deck . Using your Windows Mobile device.
Figure 7: Navigating the PowerPoint Slide Deck. Using your desktop application.
You have now seen how to programmatically manipulate a PowerPoint slide deck using a Windows Mobile device connected to your PC through Bluetooth. With these concepts, hopefully you can define your own communication protocols and create interesting Bluetooth applications.