MS messaging is one of today's most common forms of communication. People send SMS messages everywhereon the train, crossing the road, and even driving! While most SMS messages are sent on the go, a huge portion of them are sent when stationarywhile people are at their desks, working. Though today's users are accustomed to composing messages using T9 inputs (or using a virtual keyboard, etc.), nothing beats using the keyboard you have for your computer. Therefore, you'd ideally prefer to send SMS messages from the comfort of your own keyboard.
This article will show you how to write applications to allow SMS messages to be sent from within your Windows computer. All you need is a Windows Mobile device (with a valid SIM card for sending SMS messages) and a syncing cable. Figure 1 shows the flow of the applications that you'll build in this article.
|Figure 1. Architecture: Sending SMS messages from the desktop.|
How It Works
To send SMS messages from within your Windows computer, you first connect your Windows Mobile device to your computer using ActiveSync. This allows the Windows computer to communicate with the device. You will write two applications: One for the device sending your messages and another for the desktop on which you'll compose them.
These two applications will communicate with each other using TCP/IP. But how do they know each others' IP addresses? The trick lies in understanding that when your device is connected to the computer using ActiveSync, it acts as a DHCP server and assigns a fixed IP address to the host computer. This IP address is: 169.254.2.2. The two applications can now rendezvous at this IP address.