Bearer Management

Have you ever had the wish to connect your Laptop or mobile device to the Internet with the help of Qt (in particular in public environments such as airports or the local shopping center )? Well, the Bearer Management API is exactly what you are looking for ;)

The ability to utilize a large variety of sometimes transient networks is an important feature for any mobile platform such as mobile phones or laptops. The user wants to be online for as long as possible while at the same time cost and speed are optimized for the use case at hand. The Bearer Management API provides important enablers such as the basic ability to start, stop and monitor network access points, access point grouping and roaming capabilities (the process of migrating from one network to the next) and session management. In addition mobile specific functionality such as the discovery of transient and stationary access points (e.g. Ethernet, WLAN or GPRS/3G) is supported.

What other features does this API bring to Qt? Apart from the use cases mentioned above other indirect use cases become possible. For example QNetworkAccessManager based applications (such as Webkit) may simply be able to access the Internet without having to consider whether the device is online already or which access point they should use. HTTP requests could automatically trigger the start of the best (cheapest/fastest etc.) access point and the system would ensure that a network interface does not shutdown until the last user has indicated that the interface is no longer required (session management).

One of the most challenging aspects of this API is the large, and sometimes opposing, variety of system capabilities. Symbian/S60 provides almost all desirable aspects for mobile networking whereas desktop platforms (due to their rather stationary context) are pretty limited. Laptops are usually somewhere in the middle of the feature scale. One of the most obvious desktop issues are missing (public) API's which could give access to the required feature set and session management. This diversity is reflected by some API elements whose only purpose it is to detect the platform's capabilities. The most minimalistic feature set supported by all platforms is the ability to asynchronously monitor network interfaces. This is implemented by using busy polling via QNetworkInterface. Where possible more specific platform API's are used to extend the feature set and avoid polling. The most complete feature set is provided for Symbian/S60 version 3.1 or higher and is based on RConnection.

The current API supports Symbian/S60 3.1+, Windows, Linux (NetworkManager) and a generic QNetworkInterface fallback backend. More platforms are planned. Note that the recently released Qt/S60 Tower pre-release and in particular the updated version of OpenC is required to enable roaming for S60 devices.

The code is available on Gitorious and please feel free to send your comments/feedback to qtmobility at trolltech.com.


Blog Topics:

Comments