The Connected BlackBerry : Connection Paths (part 2) - Mobile Data Service Connection, Wi-Fi Connection

10/19/2012 9:35:04 PM

4. Mobile Data Service Connection

Applications running on BlackBerry smartphones activated against the BlackBerry Enterprise Server have an extra connection not available to consumer (BIS) devices. A component of the BlackBerry Enterprise platform, called Mobile Data System (MDS), provides applications with a connection to internal network resources. These enterprise applications can open network connections to internal (inside the corporate firewall) application servers and securely access the data.

Figure 4 shows the path that a request takes to its destination. The request routes from the BlackBerry smartphone (1) through the carrier’s network (2) to the BlackBerry infrastructure (3) to the BlackBerry Enterprise Server running MDS (4), and then to the destination server (5).

Figure 4. Intranet request path

It’s possible for a BES administrator to configure the company’s BlackBerry devices so every request from a device to an Internet site must first route through the company’s MDS server (as shown in Figure 5). In this case, the request routes from the BlackBerry smartphone (1) through the carrier’s network (2) to the BlackBerry infrastructure (3) to the BlackBerry Enterprise Server running MDS (4), and then out through the company firewall to the destination server (5).

Figure 5. Internet request path through MDS

An organization would use this approach to enable IT to log every request (both internal and/or external) made by a mobile device or use a proxy server to restrict access to certain Internet sites. As companies are restricted more and more by government or industry regulations, this option has become a more common configuration.

All BES-activated BlackBerry devices except for the BlackBerry 6500 series and the BlackBerry 7500 series devices use the BlackBerry MDS connection if available. (The 6500 and 7500 series uses Direct TCP by default.) If you need to open a connection to an internal resource, you must force the MDS connection so your application can easily support all device models without additional coding. This sample Java code illustrates how to open this connection:


The Deviceside=false parameter tells the device to use the MDS connection. If the application wants to connect directly to the server, bypassing MDS, it should try to force the device (not MDS) managed connection by using


When using MDS, all communication between the device application and any internal resources is always compressed and encrypted.

5. Wi-Fi Connection

Beginning with the BlackBerry 8820, RIM began adding Wi-Fi capabilities to most device models. The first Wi-Fi device offered by RIM was the BlackBerry 7270 smartphone, but it was not available from carriers. These newer Wi-Fi–enabled devices use either the carrier’s network or a Wi-Fi connection for data transmission. When a Wi-Fi access point is in range, an application can use the Wi-Fi network instead of the carrier’s network; it’s cheaper and faster for the mobile user, and it doesn’t consume the carrier’s network bandwidth.

When using a Wi-Fi connection, the data can either connect directly to the destination server (if allowed by the carrier) or connect through the BlackBerry infrastructure, as shown in Figure 6. As shown in the figure, the request begins at the BlackBerry device (1), travels through the BlackBerry infrastructure (2) to the corporation’s MDS server (3), and on to the appropriate server (4).

Figure 6. Wi-Fi connection path

As discussed previously, when using WAP or a Direct TCP connection, the data path runs through the carrier’s network (refer to Figure 3.4). When developing applications that use either of these connections plus Wi-Fi, the developer must manually switch the data connection from the carrier’s network to Wi-Fi (and back) when needed. This restriction exists because the device network stack does not know how to switch automatically between the networks.

To detect the availability of the Wi-Fi connection, Java developers can use the BlackBerry WLANInfo class (added with the BlackBerry 4.3 device software) to register a WLANConnectionListener. This listener allows applications to receive notifications whenever the device connects or disconnects to/from a wireless access point.

To force a data connection to use a Wi-Fi connection, you must append interface=wifi to the method call in your application, as follows:


Before you attempt the Wi-Fi connection, however, check to see if Wi-Fi is enabled by using the following code:

public static boolean isWiFiActive() {
  return (RadioInfo.getActiveWAFs() & RadioInfo.WAF_WLAN)!=0;

If your application will be running on BlackBerry smartphones running Device Software 4.3 or higher, you can also check to see if the device is connected to a Wi-Fi network by using the following code:

public static boolean isWiFiActive() {
  return WLANInfo.getWLANState()==

Data connections using BIS-B and MDS are handled differently. Both of these connections route data traffic through the BlackBerry infrastructure and support seamless routing across networks. Because of this ability, the network connection libraries that contain the special programming logic needed to switch networks automatically include the ability to switch from a carrier network to a WiFi connection. What this means for the developer is that, if you’re using BIS-B or MDS connections, your data communication will automatically switch to WiFi when a Wi-Fi connection is available; there is nothing your application needs to do to detect or act upon the availability or loss or the Wi-Fi connection. Table 1 summarizes the Wi-Fi connection options that are available to a developer.

Table 1. Wi-Fi Connection Options
Connection PathSwitch to Wi-FiNotes
WAPManualDeveloper must watch for availability of the Wi-Fi connection and switch over (and back, if needed) manually.
Direct TCPManual
BIS-BAutomaticThe BlackBerry device network software automatically detects the presence of the Wi-Fi connection and automatically routes data traffic over Wi-Fi if the connection is available and switches back to the carrier network when the device loses its connection to the Wi-Fi access point.

A Wi-Fi–connected BlackBerry smartphone can also connect to internal network resources via a Virtual Private Network (VPN) connection, as shown in Figure 7. For this connection, the VPN connection specifics are handled by the VPN software running on the device; the application does not need to worry about setting up the connection parameters. The request begins with the BlackBerry device (1), travels through a secure VPN connection to the MDS server (2), and on to the destination server (3).

Figure 7. Wi-Fi VPN connection path
Most View
Using Services for UNIX to Integrate UNIX Systems with an Active Directory/Exchange Server 2007 Environment
Constellation Virgo/Centaur: High-End Audio Superstars (Part 1)
Windows Phone 8 Group Test – June 2013 (Part 3) : Nokia Lumia 820, Nokia Lumia 920
Asus F2A85-V PRO Mainboard - A Socket FM2 Mainboard With Good Performance (Part 1)
All About Battery Life (Part 3)
SQL Server 2012 : Exploring SQL CLR - CLR Triggers
Microsoft Dynamic AX 2009 : Configuration and Security - Security Framework (part 1)
Ferrari 458 Speciale Versus McLaren 650S Versus Porsche 911 GT3 – Holy Trinity (Part 4)
Ditch Your Laptop For Your Phone (Part 1)
SFF Media PCs: What Hardware To Consider, And What To Ignore (Part 2)
Popular Tags
Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
Top 10
Review : Acer Aspire R13
Review : Microsoft Lumia 535
Review : Olympus OM-D E-M5 Mark II
TomTom Runner + MultiSport Cardio
Timex Ironman Run Trainer 2.0
Suunto Ambit3 Peak Sapphire HR
Polar M400
Garmin Forerunner 920XT
Sharepoint 2013 : Content Model and Managed Metadata - Publishing, Un-publishing, and Republishing
Sharepoint 2013 : Content Model and Managed Metadata - Content Type Hubs