This online tutorial is a reaction on the countless number of qestions people asked me about: how to connect Windows Mobile devices with a network.
Especially, in combination with the topic of how to access a mobile device through VNC over a network or how to remote connect a mobile device through a network. Often this questions arise from the need of many companies to remote administrate mobile devices or thin clients.
The basis for every connection between a mobile device and a network is the ability to run a TCP/IP stack on top of any available data link layer or physical media (such a media can be Ethernet, WLAN, Bluetooth, a serial cable, Infrared, ActiveSync, and so on…).
Another important aspect for the communication between a mobile device and a network is the question if the mobile device owns a public IP address. If it does, it can be directly accessed from a global network (Internet). If it does not own a public IP, just a private IP address from a local network (e.g.: 192.168.100.x) it is just accessible from within the private network.
Here an overview of connection possibilities (all i can think of, if anybody has additional information i am glad to add them here!):
__LAN or WLAN (802.. Standards)
Today most of the mobile devices/thin clients offer the possibility to connect to a TCP/IP network through traditional Ethernet cable LAN or wireless radio based WLAN.
To connect to an existing TCP/IP network it is just necessary to fill in the IP address of your mobile device. If this IP address is a public IP the mobile device is accessible from the Internet. If it is a private IP address, but your network is connected to the Internet, the mobile device is able to access
the Internet but you are not able to access your device from the Internet.
My opinion is that this possibility is the easiest without much trouble, easy to configure, quite reliable and based on well established standards.
Most of the mobile devices/thin clients and Smartphone devices offer the possibility to connect to other devices through Bluetooth. Bluetooth is specialized for ad-hoc communication and works with Piconets. Within a Piconet every device is able to communicate with each other, which makes perfect sense between Headsets and Phones, PDAs and Phones and so on.
Bluetooth defines specific profiles for specific communication scenarios: serial profile for a serial connection, headset profile for headset communication and which is important for us: a personal network profile
(PAN) for TCP/IP networking.
To connect a Bluetooth device with a TCP/IP network it is necessary that your Bluetooth device offers the personal network profile (PAN). Also your gateway to the TCP/IP network (typically a Desktop PC) has to offer a
Bluetooth stack that offers the personal network profile (PAN).
You have to pair the two devices, enable the PAN profile and to configure the IP address on both devices. It depends on the Bluetooth stack and the driver how the PAN configuration screen looks like on your device. After you connect the mobile device with the gateway device you can use the IP address to communicate with the device.
General Packet Radio Service (GPRS) is a data service which operates on top of the GSM network. Most of the wireless operators offer GPRS for modern mobile devices. GPRS is a useful possibility to wirelessly access a network within a wide area.
Typically, the mobile device connects to a GSM network through a wireless base station and is then able to connect a network through the GPRS data service. Most of the time GPRS is used for client driven applications,
which means that the wireless operator assigns private dynamic IP addresses to the mobile devices. Therefore, the mobile devices are able to access the Internet (Web surfing, email checking, …) but the device
is not accessible from the Internet (refer to the picture below).
Servers running on GPRS devices need a static public IP to be accessed from the Internet. There are specific GPRS solutions where the wireless operator agrees to assign public IP addresses in order to access
the device from the Internet (but this depends on your wireless operator).
Serial connections between devices use a point-to-point connection for communication. Typically, RS232 and IrDA but also Bluetooth serial profile can be used to connect a mobile device through a serial connection. If the device opened a serial connection over a media like IrDA or a serial RS232 cable,a communication stream is open and ready for reading and writing
of binary data.
For our purpose, which is the connection to a TCP/IP network, we have to use a point-to-point protocol on top of the physical communication layer. There exist quite a lot point-to-point protocols for TCP/IP communication over serial connections but one of the most popular at the moment is PPP (Point-To-Point Protocol). PPP is also used by internet providers to tunnel the dial in of modems into the internet.
Microsoft ActiveSync is a synchronization software which manages the synchronization of Windows Mobile devices with Windows Desktop systems. It sychronizes outlook dates, contacts files and so on. ActiveSync uses TCP/IP to handle the communication between the mobile device and a desktop system. Therefore, it automatically sets up a private TCP/IP network in which it uses fixed private IP addresses for the mobile device and for the desktop system.
At the moment ActiveSync in combination with Windows Mobile 4 devices always uses the private address 192.168.55.100 for the desktop computer and 192.168.55.101 for the mobile device. (refer to the picture below) If the mobile device is connected through ActiveSync it is able to access the
Internet through the ActiveSync private network using the desktop PC as a gateway.
Problem with ActiveSync! – Actually, ActiveSync is a very easy possibility to get connected to a TCP/IP network without much configuration efforts. Theoretically, you just need a USB sync cable and your device is accessible through a network. The major problem is that ONLY Windows Mobile 5.0 and above creates a network interface for the private ActiveSync network! You can only directly access the device (e.g. ping the mobile device from the desktop PC) if you have a network interface
for the private ActiveSync network. You can check all your network interfaces by opening the ‘cmd prompt’ and typing ‘ipconfig’. You will get something like on the picture below:
You can identify my wireless network connection and two network interfaces which are used by VMWare, but you cannot identify the network interface for my mobile device which is actually synced.
Windows Mobile 5.0 devices and above offer a specific network interface for the communication with a mobile device. Typically, ActiveSync assigns the address ‘169.254.2.2’ for the desktop PC and ‘169.254.2.1’ for the mobile device.
So if you type ipconfig and you can identify a network interface with the IP address of kind ‘192.168.55.100’ or ‘169.254.2.2’ you are lucky and you can ping your mobile device with the command ‘ping 192.168.55.101’ or ‘ping 169.254.2.1’, as you can see below: