Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Wireless Application Protocol

Concise study notes on Wireless Application Protocol (WAP): its architecture, protocols (WAE, WSP, WTP, WTLS, WDP), WAP gateway role, differences between WAP 1.x and WAP 2.0, examples and exam-style problems.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

WAP provides a protocol stack and environment to deliver web-style content and services to resource-constrained mobile devices over various wireless bearers. Engineers use WAP concepts when designing or debugging mobile service delivery, gateways, or lightweight client applications that must work over low-bandwidth, high-latency links.

Key ideas

  • Wireless Application Environment (WAE) — the application layer in WAP. It includes markup languages (WML for WAP 1.x, XHTML-MP for WAP 2.0), scripting (WMLScript), and APIs that let device applications invoke sessions and transactions. WAE provides an environment analogous to the browser + HTML in the WWW. In WAP 1.x, content is often encoded using WBXML (binary XML) to reduce size.

  • Wireless Session Protocol (WSP) — a session and presentation-oriented protocol that offers a lightweight HTTP-like interface to WAE clients. WSP provides request/response semantics, header compression, and session management optimized for small devices.

  • Wireless Transaction Protocol (WTP) — a connectionless or optionally reliable transaction layer providing transactions with reliability, retransmission and acknowledgments on top of WDP. It is lighter than full TCP but supports Confirmed/Unconfirmed transactions.

  • Wireless Transport Layer Security (WTLS) — a security layer adapted from TLS but optimized for low-bandwidth/CPU devices. WTLS provides authentication, privacy (encryption), integrity (MAC), and optional certificate support tailored for wireless constraints.

  • Wireless Datagram Protocol (WDP) — an adaptation layer that presents the same interface to the upper WAP stack regardless of the underlying bearer. It maps WDP datagrams onto bearer-specific primitives (SMS, CSD, GPRS, UDP/IP) so upper layers are bearer-independent.

  • WAP Gateway (Proxy) — a network entity that translates between WAP protocols and the Web (HTTP/SMTP), decompresses and encodes messages (e.g., WSP <-> HTTP), encodes/decodes WBXML (binary XML) for WML/XHTML-MP and may transcode HTML to WML (or XHTML-MP) when required by device constraints, and optionally terminates WTLS when end-to-end WTLS is not used. It also participates in WAP Push via the Push Proxy Gateway (PPG) using the Push Access Protocol (PAP) to deliver content to clients.

  • WAP 1.x vs WAP 2.0 (exact distinctions engineers must know):

    • WAP 1.x uses WML (a tag-based markup designed for small displays), WSP/WTP/WTLS/WDP stack, and typically a WAP gateway that translates binary WAP requests to HTTP; WTLS is typically used over the wireless hop.
    • WAP 2.0 moves toward open Internet standards: it uses XHTML-MP (XHTML Mobile Profile) and standard HTTP over TCP/IP for application transport, allowing end-to-end HTTP and TLS. WAP 2.0 reduces the need for protocol translation at the gateway and supports newer devices and IP bearers (e.g., GPRS, UMTS, LTE).
  • Security and privacy trade-offs: WTLS provides security over the wireless hop but a gateway that terminates WTLS breaks end-to-end security unless additional measures (such as end-to-end TLS over IP-capable bearers in WAP 2.0) are used. Always state whether security is hop-by-hop or end-to-end.

  • Design assumptions behind WAP: low bandwidth, high latency, small display and limited input, low CPU and memory. Features like binary encoding and header compression were introduced to save bytes and reduce RTTs.

Formulas

T_tx = S / B — where T_tx is transmission time (s), S is message size (bits), B is bandwidth (bit/s). Applies to bulk transfer ignoring protocol overhead and propagation delay.

D_prop = d / c — propagation delay (s) where d is distance (m) and c is speed of signal (≈ 3.0×10^8 m/s). Applies for radio or light propagation in free space; ignores processing and queuing delays.

Throughput_eff = (P / (P + H)) · B — effective payload throughput (bit/s) where P is payload size (bits), H is protocol overhead/header (bits), B is raw bandwidth (bit/s). Applies when headers are per-packet and packets are large enough to send.

RTT ≈ 2·D_prop + processing + queuing — round-trip time estimate. Use measured processing and queuing if known. Useful for transaction latency and transaction-per-second approximations.

TPS ≈ 1 / RTT — maximum transactions per second for single outstanding transaction over a single path (for strictly serialized request/response). Use when client must wait for response before next request.

Worked examples

  1. Transmission time for a WML deck over a GPRS-like link
  • Given: WML deck size 4.0 KiB (kilobytes, 1 KiB = 1024 bytes) of payload after binary encoding; available downlink B = 40 kb/s (40 000 bit/s). Use S in bits.
  • Convert: S = 4.0 KiB = 4 × 1024 bytes = 4096 bytes = 4096 × 8 = 32768 bits.
  • Formula: T_tx = S / B.
  • Calculation: T_tx = 32768 bit / 40000 bit/s = 0.8192 s.
  • Final answer: 0.8192 s (≈ 0.82 s) to transmit the 4 KiB deck ignoring additional protocol overhead and retransmissions.
  1. Header-compression saving and time reduction
  • Given: Raw HTTP request = 1.0 KiB (1024 bytes), WAP binary encoded request = 600 bytes. Link B = 40 000 bit/s.
  • Convert to bits: S_raw = 1024 × 8 = 8192 bits. S_bin = 600 × 8 = 4800 bits.
  • Time raw: T_raw = 8192 / 40000 = 0.2048 s.
  • Time binary: T_bin = 4800 / 40000 = 0.12 s.
  • Saving: 0.2048 − 0.12 = 0.0848 s, or 41.4% time reduction.
  • Final answer: Time reduced from 0.2048 s to 0.12 s; saving ≈ 0.0848 s (≈ 41.4% reduction in time).
  1. Protocol flow trace — WAP 1.x GET through gateway (step-by-step)
  • Scenario: Mobile wants resource /news.wml from origin server.
  • Steps to trace (draw sequence diagram with three vertical lifelines: Mobile, WAP Gateway, Origin Server):
    1. Mobile WAE issues WSP GET /news.wml to WSP layer.
    2. WSP on mobile requests WTP to send a transaction; WTP may use Unreliable or Reliable Confirmed transaction depending on request type.
    3. WDP maps the WTP datagram onto bearer (e.g., UDP/IP over GPRS or SMS segments) and sends to gateway.
    4. WAP Gateway receives WDP datagram, reconstructs WSP message; gateway decodes binary headers and optionally decrypts WTLS if terminated there.
    5. Gateway issues an HTTP GET /news.wml to the Origin Server over HTTP/TCP.
    6. Origin Server responds with content (e.g., WML deck) to Gateway via HTTP/TCP.
    7. Gateway converts/encodes the content into WAP binary, compresses headers (WSP), and sends back via WTP/WDP to the Mobile.
    8. Mobile receives datagrams, WTP handles reassembly and reliability, WSP delivers the response to WAE which renders the WML deck.
  • Note: If WTLS is used end-to-end (rare in WAP 1.x), the gateway must not terminate WTLS; in practice gateways often terminated WTLS (hop-by-hop security).

Common mistakes

  • Forgetting bearer mapping: WDP abstracts bearers — always mention the underlying bearer (SMS, CSD, GPRS, UDP/IP) when asked about performance.
  • Mixing bits and bytes: exams penalize using B (bytes) with kb/s (bits/s). Convert consistently.
  • Omitting gateway role in protocol conversion: in WAP 1.x the gateway does translation between binary WAP and text HTTP; in WAP 2.0 this translation is often unnecessary.

For your exam

Questions you will see:

  • Definitions and short notes: define WAP, WAE, WSP, WTP, WTLS, WDP, WAP Gateway. A full answer includes the role and one example of functionality for each term.
  • Diagram and explanation: draw the WAP protocol stack and explain bearer independence. Mark the gateway and origin server. Full-marks diagram must label each layer and show bearer under WDP.
  • Comparison: compare WAP 1.x and WAP 2.0. Include differences in application-language (WML vs XHTML-MP), transport (WSP/WTP vs HTTP/TCP), and security (WTLS vs TLS/end-to-end). Explain why the change happened (move to IP, better device capabilities).
  • Derivation/numerical: compute transmission time given payload size and bandwidth. Show unit conversions (bytes → bits) and show formula T = S/B with substitutions.
  • Protocol trace/sequence: explain step-by-step how a GET request travels from a mobile through gateway to origin server. Include mention of header compression, binary encoding, and where WTLS may terminate.

Full-marks answer checklist: define terms, provide diagram when needed, show assumptions (bearer speed, reliable/unreliable transmission), do unit conversions and state final units, mention security implications of gateway termination.

Quick check

  1. What layer in the WAP stack adapts to different wireless bearers?
  2. Which markup language did WAP 1.x specify for device content?
  3. Write the formula to compute transmission time for a 2 KiB message on a 50 kb/s link.

Answers: 1) WDP (Wireless Datagram Protocol). 2) WML (Wireless Markup Language). 3) T_tx = S / B; with S = 2 KiB = 2×1024×8 = 16384 bit, B = 50000 bit/s → T_tx = 16384/50000 = 0.32768 s.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?