Tik-111-350 Multimediaseminaari
Turo Heikkinen, 40467U
8.4.1999

Wireless Application Protocol

1. Contents

1.Contents1
2.Introduction2
3.General2
4.Wireless vs Fixed2
4.1Devices2
4.2Networks3
4.3Network Operators3
4.4Current Protocols3
4.5What's Wrong with Existing Protocols?3
4.6The Solution3
5.Original Requirements4
6.Technology4
6.1Wireless Application Environment (WAE)4
6.1.1Wireless Markup Language (WML)4
6.1.2WMLScript5
6.1.3Wireless Telephony Application (WTA)5
6.2Wireless Session Protocol (WSP)5
6.3Wireless Transaction Protocol (WTP)5
6.4Wireless Transport Layer Security protocol (WTLS)5
6.5Wireless Datagram Protocol (WDP)5
7.Client-Server Operation5
8.Current Status6
9.The Future - Conclusion7
Appendix AExamples of WML and WMLS8
A.1WML Example8
A.2WMLS Example8
Appendix BAbbreviations9
Appendix CReferences10

2. Introduction

"The Wireless Application Protocol (WAP) is an open, global specification that empowers mobile users with wireless devices to easily access and interact with information and services instantly."
- WAP Forum FAQ

WAP is a general small application protocol mainly for small handheld communication devices like cellular phones and PDAs. WAP was originally founded by the cellular equipment giants Nokia, Ericsson, and Motorola and the handheld device software platform developer Unwired Planet, since that several dozens of companies, mainly hardware and software manufacturers and network operators, have joined the WAP and are developing all kinds of devices, applications, and services.

3. General

WAP is developed to be the standard means of information transportation and Internet service gateway for mobile communication services. WAP is hardware, software platform and network independent. It uses a lightweight browser, called the micro browser, client software that can be designed to have minimal footprint and hardware requirements to fit in a very large span of different devices.

WAP has been designed from various currently used Internet standards like HTML, HTTP, XML, TCP, IP, UDP, and TLS. The main points in developing this new protocol were to make it very bandwidth optimised to work as quickly as possible in slow wireless networks (compared to fixed line networks that conventional protocols are designed for) and flexible to work in small screens of different shapes and various user input devices. Bandwidth requirements are made low by transferring all information as compressed binary and not as plain text as current similar protocols like HTTP. Header information is optimised to be small and the page markup language supports making applications small and flexible.

WAP is an evolving standard. The current version of specifications is 1.0 which was released in April 1998 and the next version, v1.1, is being developed by feedback regeived from the first version and will be approved in May 1999.

4. Wireless vs Fixed

Portable wireless applications have very different premises from conventional fixed applications on many levels.

4.1 Devices

The need for a mobile communication device specific set of protocols arises from the basic differences between mobile and fixed devices. Mobile devices tend to have:

4.2 Networks

Mobile networks will during foreseeable future be more constrained than fixed ones. They do and will have:

4.3 Network Operators

Network operators want to offer more advanced and usable value-added services, and also more usable interfaces to current services like call forwarding in addition to entirely new ones. The mobile protocol must support this by being:

4.4 Current Protocols

The current Internet uses a wide selection of different protocols and standards to handle different services (HTML, HTTP, FTP, etc.) and network transport levels (TCP, UDP, IP, etc.). These protocols were originally designed for high-end computers with high-end resources including fast fixed networks therefore bandwidth optimisations were not of primary concern. Security was not originally a big issue since networks reached only limited amounts of hosts that were local or friendly remote hosts so need for information security has later produced several new secure protocols.

4.5 What's Wrong with Existing Protocols?

Implementing enough of these standard protocols requires much more resources than todays mobile phones (excluding more complex devices like Nokia Communicators that have real and more power-hungry processors and megabytes of memory) have to offer and waste large portions of the limited bandwidth for headers and low entropy plain text. In future, we there will be more and more computing power and bandwidth but unless major advancements in battery technology occur, electrical power will be limited and more powerful processors of one generation will always consume more of the precious battery energy. And when people get used to more and more powerful fixed computers and networks, handheld machines will begin to feel slow so there will always be need to keep the performance gap as small as possible.

4.6 The Solution

WAP is designed to be a consistent, small footprint, and bandwidth solution for wireless applications. Only essential parts of existing protocols are taken. Everything is bandwidth optimised by minimising headers and using compressed binary format instead of plain text. Information security is an integral part consistent with all protocols.

5. Original Requirements

The requirements set by the WAP Forum on which the WAP architecture was built were: These form the base of the current WAP and work as main guidelines for versions to come.

6. Technology

WAP is not, despite of its name, a single protocol but a stack of protocols that implement different layers needed for communication, applications, crypting, etc. This chapter gives a brief introduction of the protocols.


Figure 1 - The WAP Protocol Stack.

6.1 Wireless Application Environment (WAE)

WAE offers the software platform environment for the application software. WAE is built into the so-called micro browser program that works much like normal WWW browsers that interprets HTML and JavaScript. WAE consists of Wireless Markup Language (WML), WMLScript, and Wireless Telephony Application (WTA).

6.1.1 Wireless Markup Language (WML)

WML is WAP's markup language much like HTML is WWW's. WML is a DTD (Document Type Definition) of XML (EXtendable Markup Language) that is a subset of SGML (Standard Generalized Markup Language) so it is tag based like HTML. See Appendix A for a WML example.

6.1.2 WMLScript

WMLScript is WML's integrated scripting language much like JavaScript or ECMAScript that can control many functions of the browser and the phone itself by scripts downloaded from the server. See Appendix A for a WMLS example.

6.1.3 Wireless Telephony Application (WTA)

WTA is the telephony interface of WAE that can be used to control telephony functions of the device from WML, WLMScript or the network and to invoke functions by requests from the network.

6.2 Wireless Session Protocol (WSP)

WSP implements session services of WAP. Sessions can be connection-oriented and connectionless and they may be suspended and resumed at will.

6.3 Wireless Transaction Protocol (WTP)

WTP is WAP's transaction protocol that works between the session protocol WSP and security protocol WTLS. WTP chops data packets into lower level datagrams and concatenates received datagrams into useful data. WTP also keeps track of received and sent packets and does re-transmissions and acknowledgement sending when needed.

6.4 Wireless Transport Layer Security protocol (WTLS)

WTLS does all cryptography oriented features of WAP. WTLS handles crypting, decrypting, user authentications and data integrity checking. WTLS is based on the fixed network Transport Layer Security protocol (TLS), formerly known as Secure Sockets Layer (SSL).

6.5 Wireless Datagram Protocol (WDP)

WPD works as the transport layer of WAP. WDP processes datagrams from upper layers to formats required by different physical datapaths, bearers, that may be for example GSM SMS or CDMA Packet Data. WDP is adapted to the bearers available in the device so upper layers don't need to care about the physical level.

7. Client-Server Operation

WAP uses special WAP gateway proxies to convert data from HTTP to WAP and vice versa so that any conventional WWW server may be used as the document origin server with WAP. The programs in the WWW server may be either directly programmed in WML or standard HTML which will be converted to WML by the proxy server. The proxy converts client's WAP requests into HTTP requests understood by standard WWW servers and CGI programs and then converts their output to WAP formats such as WML and WMLScript and compresses them to packed binary for sending to the client.


Figure 2 - WAP Client-Server Architecture

The gateway- and origin servers may be integrated into a single WAP server that will directly deliver WML data for WAP requests. The server may also include a WTA (Wireless Telephony Application) server that can be directly connected by the mobile data terminal's data bearer layer like GSM SMS to speed up connections. The Nokia WAP server currently piloting is such integrated origin, gateway and WTA-server.

8. Current Status

Although, there are no actual WAP devices on the market yet, some have been introduced and many others are under development. For developing and previewing WAP applications there is the Nokia WAP SDK that is a Java-based application that emulates a WAP-enabled cellular phone and can be used to create WAP applications with any computer with a recent Java Runtime Engine.

The first WAP device introduced was the Nokia 7110 which looks much like any current mobile phone but has a relatively big display and a rolling wheel as an input device. The 7110 was introduced in the Cannes GSM World Conference 29.2.1999 and will be available in volume (according to the press release) in the second quarter of 1999.
Nokia also introduced their WAP server in CeBIT 18.3.1999. The server is currently in pilot use, no date of volume availability or technical information has been released yet.

Ericssons first WAP product will be the MC218 Mobile Companion that has the Psion V handheld computer as it's hardware platform and Symbian's WAP-enabled EPOC operating system with Ericsson's extensions and applications. The MC218 was introduced 12.3.1999 and will be available (according to the press release) during mid 1999.

Another WAP device by Ericsson will be the R380 mobile phone/PDA that will have size of current mobile phones and a large screen under a protective lid. The R380 was introduced in CeBIT 18.3.1999 and should be available in early 2000.

9. The Future - Conclusion

Everyone in the mobile data business - including end users - seem to benefit from WAP:
- hardware and software manufacturers since users and network operators will be demanding new equipment and applications
- network operators since they will be able to sell their customers new services and all services will work on all devices
- users because they will have new portable services and they don't have to worry if a particular service will work with their device or not.

The currently introduced devices will cover a wide base of customer needs when they hit markets and many more are following since most mobile phone manufacturers are developing new ones to keep up with others. According to mobile phone manufacturers committed to WAP, most mobile phones will be WAP-enabled in a couple of years and since all major mobile phone manufacturers do support WAP, there doesn't seem to be anything in the way of WAP success.

Appendix A - Examples of WML and WMLS

These examples are from the Nokia WAP SDK, this is a mortgage calculating application consisting of a WML file for the user interface layout and a WMLS file for the calculation function.

A.1 - WML Example

<b><?XML VERSION="1.0"?> 
<WML> 
  <CARD NAME="card1" TITLE="Mortgage Calc" NEWCONTEXT="TRUE"> 

    Principal: <INPUT FORMAT="*N" KEY="principal"
                TITLE="Principal:" DEFAULT="150000"/> 
    <BR/>
 
    Interest:  <INPUT FORMAT="*N" KEY="interest" TITLE="Interest:" DEFAULT="8.00"/> 
    <BR/> 
 
    Num payments:<INPUT FORMAT="*N" KEY="num_payments"
                  TITLE="Num. payments:" DEFAULT="360"/> 
    <BR/>
 
    Payment = <U>$(payment)</U> 
 
    <DO TYPE="ACCEPT" LABEL="Calculate"> 
      <GO URL="mortgage.wmls#payment('$(payment)','$(principal)',
               '$(interest)','$(num_payments)')"> 
      <VAR NAME="payment" VALUE="payment"/> 
      </GO> 
    </DO> 
 
    <DO TYPE="HELP" LABEL="Help"> 
      <GO URL="#help"/> 
    </DO> 

  </CARD> 
 
  <CARD NAME="help" TITLE="Help">

    <U>Principal</U> - $$ amount<BR/> 
 
    <U>Interest</U> - e.g. 0.075.<BR/> 
 
    <U>Payments</U> - e.g. 360 for 30 years<BR/> 
    	 
    <DO TYPE="PREV" LABEL="Back"> 
      <PREV/> 
    </DO> 

  </CARD> 
</WML> 

A.2 - WMLS Example

/* 
 * Calculate a mortgage's payment 
 * 
 *@param varname the variable name to store the result 
 *@param principal the principal 
 *@param interest the interest rate 
 *@param num_payments the number of payements 
 *@return the payment 
 */ 
external function payment(varname, principal, interest, num_payments) { 
	/*
	 * Interest formulae:
	 *
	 * If (i != 0), then:
	 * 		pmt = principal * [i * (1+i)^n / ((1+i)^n - 1)]
	 *
	 * If (i == 0), then:
	 * 		pmt = principal / n
	 */
    var mi = interest/1200;	// monthly interest from annual percentage 
    var payment;
	if (mi != 0) {
		var tmp = Float.pow((1 + mi), num_payments);
		payment = principal * (mi * tmp / (tmp - 1));
	} else {
		payment = principal / num_payments;
 	}
    var s = String.format("$%6.2f", payment); 
 
	/* 
 	 * Send the result to the browser 
	 */ 
    WMLBrowser.setVar(varname, s); 
 
	/* 
	 * Make sure the browser updates its current card 
	 */ 
    WMLBrowser.refresh(); 
}; 

Appendix B - Abbreviations

DTDDocument Type Definition, definition of a language built on XML or SGML
HTMLHyperText Markup Language, document definition language of WWW
HTTPHyperText Transfer Protocol, transfer protocol of WWW
PDAPersonal Digital Assistant, palmtop computer for storing calendar and contact information etc.
SGMLStandardised General Markup Language, a general markup language that can be adapted to different applications with DTD:s like HTML
SSLSecure Sockets Layer, security protocol now known as TLS
TLSTransport Layer Security, security protocol formerly known as SSL
WAEWireless Application Environment, execution environment for WAP applications
WAPWireless Application Protocol, a set of protocols and standards for wireless applications
WDPWireless Datagram Protocol, the transport protocol of WAP
WSPWireless Session Protocol, the session protocol of WAP
WTAWireless Telephony Application, application programming interface for controlling telephony features of the device
WTLSWireless Transport Layer Security, the security protocol of WAP
WTPWireless Transaction Protocol, the transaction protocol of WAP
WWWWorld Wide Web
XMLExtendable Markup Language, a subset of SGML

Appendix C - References

The most important resource for WAP is the WAP Forum home page at http://www.wapforum.com.

WAP Forum is the official coalition between all parties committed to WAP and its home page has most of technical and non-technical information about WAP released to the public. WAP Forum home page is a good source for general information, list of members, technical specifications and other technical documents.

Another useful site is the Nokia Wireless Data Forum at http://www.forum.nokia.com. The Nokia WAP SDK, its documentation and WAP reference manuals may be obtained from the Wireless Data Forum after free registration.