USSD Virtual Laboratory

Unstructured Supplementary Service Data - Communication Engineering

GSM/UMTS Networks SS7/MAP Protocol Session-based

Learning Objectives

Architecture Understanding

Understand USSD network architecture including MSC, VLR, HLR, and USSD Gateway components.

Protocol Analysis

Analyze MAP (Mobile Application Part) messages over SS7 signaling network.

Session Management

Examine session-based communication vs. SMS store-and-forward mechanisms.

Service Codes

Decode USSD service code structure (*code# format) and routing mechanisms.

Roaming Scenarios

Analyze USSD operation in home network (HPLMN) and visited network (VPLMN).

Real-world Applications

Simulate mobile banking, balance inquiry, and prepaid services using USSD.

Theoretical Background

What is USSD?

USSD (Unstructured Supplementary Service Data) is a session-based communication protocol used in GSM cellular networks to facilitate real-time, two-way exchange of information between mobile devices and network applications. Unlike SMS which uses store-and-forward mechanism, USSD establishes a transparent session allowing instant interactive communication.

Key Characteristics

  • Session-based (real-time connection)
  • Maximum 182 characters per message
  • 7-bit GSM alphabet encoding
  • No internet/data connection required
  • Works on all GSM phones (feature phones to smartphones)

USSD vs SMS Comparison

Feature USSD SMS
Session Type Stateful Stateless
Storage No storage Store & forward
Speed Instant Delayed
Direction Network-centric Peer-to-peer

USSD Network Architecture

MS Mobile BTS BSC MSC/VLR Switching Center HLR USSD Gateway App Server Um Abis A MAP/SS7 MAP/SS7 SMPP/HTTP

Mobile Station (MS)

User device that initiates USSD requests by dialing service codes (*code# format).

MSC/VLR

Mobile Switching Center processes calls and USSD requests. Routes to HLR if service code not recognized locally.

HLR

Home Location Register stores subscriber data. Routes USSD requests to appropriate gateway based on service code.

Protocol Stack & Signaling

SS7 Protocol Stack for USSD

MAP (Mobile Application Part)

ProcessUnstructuredSS-Request, UnstructuredSS-Request, UnstructuredSS-Notify

TCAP (Transaction Capabilities)

Transaction management for USSD dialogs

SCCP (Signaling Connection Control)

Global Title Translation for routing to HLR

MTP (Message Transfer Part)

Message routing and error handling

USSD Message Types

PSSR
ProcessUnstructuredSS-Request

Mobile-initiated request (e.g., *123# for balance check)

USSR
UnstructuredSS-Request

Network-initiated request asking for user input

USSN
UnstructuredSS-Notify

Network notification (one-way, no response expected)

USSD Service Code Structure

*123*1*9876543210#
*
Start Character
Identifies as USSD/MMI code
123
Service Code
Identifies the service (1-3 digits)
*param
Parameters
Optional data separated by *
#
Terminator
End of USSD string

Common USSD Service Codes Examples:

*#06# - Display IMEI
*123# - Check balance
*135*PIN# - Recharge account
*99# - Mobile banking (India)
*100*1# - Data balance
*111# - Customer service menu

Interactive USSD Simulation

9:41
Enter USSD Code

Quick Test Codes:

Network Signaling Flow Idle

MS
BTS
MSC/VLR
HLR
GW
APP
System ready. Dial a USSD code to begin simulation...

USSD Session State Machine

IDLE
No active session
SETUP
Session establishment
ACTIVE
Dialogue in progress
RELEASE
Session terminated

Protocol Analysis & Message Structure

MAP Message Analyzer

Operation Code: 59 (ProcessUnstructuredSS-Request)
Invoke ID: 0x01
USSD String: *123#
Alphabet: GSM 7-bit default

Roaming Scenario Analysis

Home Network (HPLMN) Visited Network (VPLMN) MS MSC/VLR MSC/VLR HLR USSD GW
Home Network Scenario: MS is in HPLMN. USSD request goes directly to local MSC, then to HLR. The HLR routes to USSD Gateway for application processing.

Session Timing Analysis

Session Setup
~200-500 ms
Round Trip
~100-300 ms
Session Timeout
60-90 seconds
Max Characters
182 chars

Laboratory Procedure

Experiment 1: Basic USSD Session Establishment

  1. Launch the USSD Mobile Simulator on the left panel
  2. Dial the service code *123# using the virtual keypad
  3. Observe the session establishment in the Network Signaling Flow diagram
  4. Note the sequence: MS → BTS → BSC → MSC → HLR → USSD Gateway → Application Server
  5. Record the MAP message type (ProcessUnstructuredSS-Request) in the Protocol Analysis section
  6. Observe the response time and session state transitions
  7. Terminate the session and record the Release Complete message

Expected Observations:

  • Session state transitions: IDLE → SETUP → ACTIVE → RELEASE
  • Response time should be under 500ms for local network
  • MAP operation code 59 (ProcessUnstructuredSS-Request)

Experiment 2: USSD Code Structure Analysis

  1. Test various USSD code formats:
    • Simple code: *123#
    • With parameters: *135*1234#
    • Multiple parameters: *100*1*9876543210#
    • MMI code: *#06# (IMEI display)
  2. For each code, analyze the parameter extraction in the gateway
  3. Observe how the gateway parses the service code and parameters
  4. Record the decoded USSD string in the MAP message analyzer

Experiment 3: Roaming Scenario Simulation

  1. Select "Home Network" scenario and dial *123#
  2. Observe the direct path: MS → MSC → HLR → Gateway
  3. Switch to "Roaming (VPLMN)" scenario
  4. Dial the same code *123#
  5. Observe the routing path: Visited MSC → HLR (in home network) → Gateway
  6. Note that USSD messages always route to the Home Network HLR
  7. Compare the signaling delay between home and roaming scenarios

Key Concept - Virtual Home Environment (VHE):

USSD enables VHE by ensuring that roaming subscribers can access the same services as in their home network, as all USSD requests are routed to the HLR in the home network.

Experiment 4: Session Timeout and Error Handling

  1. Initiate a USSD session with *111# (menu service)
  2. Do not respond to the menu prompt
  3. Observe the session timer counting down (typically 60-90 seconds)
  4. Wait for automatic session release due to timeout
  5. Record the error cause in the message log
  6. Test invalid service code (e.g., *999#) and observe error handling

Lab Report Guidelines

Required Report Sections

1
Objective & Theory
State objectives and explain USSD architecture, MAP protocol, and session management
2
Experimental Setup
Describe simulation environment, network topology, and test codes used
3
Observations & Data
Include screenshots of signaling flows, MAP message captures, timing measurements
4
Analysis
Compare USSD vs SMS, analyze roaming behavior, session state transitions
5
Conclusion
Summarize findings and discuss real-world applications (mobile banking, balance inquiry)

Data Collection Checklist

Grading Rubric

Technical Accuracy 40%
Data Completeness 30%
Analysis & Insights 20%
Presentation 10%

Important Notes:

  • All screenshots must include timestamp and clearly show the signaling flow
  • Compare theoretical values from standards (3GPP TS 24.090) with observed simulation values
  • Discuss limitations of USSD (182 character limit, session timeout, no store-and-forward)
  • Research current USSD applications in mobile banking and IoT

References & Standards

3GPP Standards

  • 3GPP TS 24.090: Unstructured Supplementary Service Data (USSD)
  • 3GPP TS 22.090: USSD Stage 1 Service Description
  • 3GPP TS 23.090: USSD Stage 2 Service Architecture
  • 3GPP TS 29.002: Mobile Application Part (MAP) specification

ETSI Specifications

  • ETSI GSM 02.90: Stage 1 USSD Description
  • ETSI GSM 03.90: Stage 2 USSD Architecture
  • ETSI GSM 04.90: USSD Stage 3 Protocol
  • ITU-T Q.700 series: SS7 Signaling System