Description
The Status Word (SW) is a fundamental element of the Application Protocol Data Unit (APDU) structure used in smart card communication, as defined by ISO/IEC 7816-4 and adopted by 3GPP for UICC (Universal Integrated Circuit Card) and USIM (Universal Subscriber Identity Module) operations. In 3GPP specifications such as TS 31.102, TS 31.103, and TS 31.131, the SW is a mandatory two-byte field returned by the card in response to every command APDU. It provides the terminal (e.g., mobile equipment) with information about the execution status of the command, such as success, warning, or error conditions. The SW is typically denoted as SW1 and SW2, each one byte, and their combination defines a specific status code. For example, '90 00' indicates normal successful execution, while '6A 82' means the requested file or application was not found. The SW is crucial for error handling, session management, and ensuring reliable communication between the terminal and the UICC. It enables the terminal to take appropriate actions, such as retrying, aborting, or initiating error recovery procedures. In the context of 3GPP, the SW is used extensively in authentication procedures (e.g., AKA), file access, and application management. The correct interpretation of SWs is essential for interoperability and security, as it prevents unauthorized access and ensures that only valid commands are executed. The SW mechanism is part of the broader APDU protocol, which structures commands and responses between the card and the terminal. The terminal sends a command APDU containing a header (CLA, INS, P1, P2) and optional data, and the card responds with a response APDU that includes optional data and the SW. The SW thus acts as a return code, similar to an HTTP status code, but at the smart card level. 3GPP specifications define specific SW values for various procedures, such as authentication, GSM/UMTS/LTE/5G security contexts, and file management. For instance, TS 31.102 specifies SWs for USIM commands, including those for PIN verification, authentication, and file access. The SW is also used in Over-the-Air (OTA) provisioning and remote management, where the card may return specific SWs to indicate the need for further actions. Understanding SWs is vital for developers and engineers working with UICC/USIM, as it allows them to diagnose issues, implement robust error handling, and ensure compliance with 3GPP standards. The SW is not just a simple code; it is a structured identifier that conveys precise information about the state of the card and the outcome of operations, forming the backbone of reliable smart card communication in mobile networks.
Purpose & Motivation
The Status Word (SW) exists to provide a standardized, unambiguous mechanism for smart cards to communicate the outcome of commands to terminals. Before its widespread adoption, smart card communication lacked a consistent way to signal success or failure, leading to interoperability issues and unreliable error handling. The SW solves this by defining a two-byte code that precisely indicates the result of each command, enabling terminals to react appropriately—whether to proceed, retry, or abort. This is particularly critical in 3GPP networks, where UICC/USIM cards perform sensitive functions like authentication and key generation. The SW ensures that the terminal can verify that these operations succeeded and handle any errors securely. Additionally, the SW supports extensibility, allowing new status codes to be defined as new features and services are introduced. Its creation was motivated by the need for a robust, standardized protocol for smart card communication, which is essential for global roaming and interoperability. Without the SW, mobile equipment would have no reliable way to determine if a command was executed correctly, potentially leading to security vulnerabilities or service disruptions. Thus, the SW is a cornerstone of the APDU protocol and a key enabler of secure and reliable UICC/USIM operations in 3GPP networks.
What changed in its specifications
The latest release-to-release comparison of specifications that define SW. Each summary describes the whole specification, not only this term.
Rel-18 brings only minor changes to TS 21.905: 0 clauses changed, with no change attributed to a release feature.
Full comparison in TR 21.905 →Rel-19 adds sidelink multi-hop relay EFs, lower selection-priority PLMN EFs, 5G ProSe EFs, and MINT-EPS definitions for disaster conditions.
Full comparison in TS 31.102 →Release Timeline
Evolution Across Releases
An overview written from the defining specifications, not a verified change history. For the exact text, open the specifications listed below.
Defining Specifications
3GPP specifications that define or reference SW, with the latest known release. Sourced from the 3GPP document catalog — see methodology.
| Specification | Title | Release |
|---|---|---|
| TR 21.905 vj20 | 3GPP Terminology and Definitions | Rel-19 read |
| TS 31.102 vk00 | USIM Application Specification | Rel-20 read |
| TS 31.103 vj10 | IM Services Identity Module Specification | Rel-19 read |
| TS 31.131 vj00 | C Language Binding for (U)SIM API | Rel-19 read |