Smart Card Protocols: ISO 7816, SWP and SLE4442
Contact smart cards, from bank cards and SIMs to ID badges and health cards, follow ISO/IEC 7816: the reader supplies power, reset and a clock, and the card answers on a single half-duplex I/O line. SIM cards add the single wire protocol (SWP) to talk to a phone's NFC controller, and simple memory cards such as the Infineon SLE4442 use their own synchronous command set. A logic analyser with smart card decoders turns the I/O line into the answer to reset, protocol bytes and APDU commands.
Contacts, Activation and the Answer to Reset
| Contact | Name | Use |
|---|---|---|
| C1 | VCC | Supply: class A 5 V, class B 3 V, class C 1.8 V |
| C2 | RST | Reset from the reader |
| C3 | CLK | Clock from the reader |
| C5 | GND | Ground |
| C6 | VPP or SWP | Unused on most cards; the SWP line on NFC-enabled SIMs |
| C7 | I/O | Half-duplex data, open drain with a pull-up |
The reader holds RST low, powers the card, sets its I/O line to receive and starts the clock, then takes RST high after at least 400 clock cycles. The card answers with the answer to reset (ATR). Its first byte, TS, sets the convention: 3B for direct and 3F for inverse. The bytes that follow give the supported protocols and the clock rate conversion factor F and baud rate adjustment factor D. A reader can then send a protocol and parameters selection (PPS) request, starting with FF, to move to a faster rate.
How Characters and Protocols Work
- ETU: one bit lasts F/D clock cycles. With the defaults F=372 and D=1, a 3.5712 MHz clock gives exactly 9600 bit/s.
- T=0 is byte oriented. The reader sends a five-byte header (CLA, INS, P1, P2, P3), the card answers with a procedure byte, then data moves. Parity errors are signalled during the guard time and the character is repeated.
- T=1 is block oriented. Each block has a prologue (NAD, PCB, LEN), an information field and an LRC or CRC, so errors are handled by resending blocks.
- APDU: the application layer (ISO/IEC 7816-4) sends a command of CLA, INS, P1, P2 and optional data, and gets back optional data and two status bytes, SW1 and SW2. 90 00 means success; 6A 82 means file or application not found.
SIM Single Wire Protocol (SWP)
SWP links the SIM (UICC) to the NFC controller in a phone or module, on contact C6, so a secure element in the SIM can run contactless payment or transport applications. It is full duplex on one wire: the NFC controller sends to the SIM by varying the voltage, encoding each bit in the duty cycle of a pulse, and the SIM answers by drawing current during the same bits. A logic analyser probe sees only the voltage signal from the NFC controller. To decode the SIM's replies as well, convert its current signal to a voltage, for example with a sense resistor and amplifier, and capture it on a second channel; the ZeroPlus and Acute SWP decoders take the two directions as separate S1 and S2 inputs.
SLE4442 Memory Cards
The Infineon SLE4442 is a 256-byte EEPROM card with write protection and a three-byte programmable security code (PSC). It is not ISO 7816 T=0 or T=1: the reader clocks it synchronously on CLK, and each command is three bytes (control, address and data) sent between a start and a stop condition, similar to I2C. Reading is free; writing needs the correct PSC, and an error counter locks the card after three wrong attempts. They are common in prepaid meters, hotel locks and loyalty schemes.
Where Smart Card Interfaces Are Used
- Payment and ID: EMV bank cards, national ID, health and staff cards in contact readers.
- Mobile and IoT: SIM and embedded UICC in phones, trackers and meters, with SWP to the NFC controller.
- Access and metering: SLE4442 and similar memory cards in prepaid gas and electricity meters, vending and hotel locks.
- Secure elements: ISO 7816 is also the interface of many secure element chips soldered on to boards.
Common Smart Card Faults and How to Find Them
| Symptom | Likely Cause | What to Check |
|---|---|---|
| No ATR | Wrong supply class, clock missing or out of range, RST released too early | Capture VCC, CLK and RST timing during activation against ISO/IEC 7816-3 |
| ATR garbled | Wrong convention or baud rate assumed by the decoder or reader | Check TS (3B or 3F) and the clock frequency; set the decoder to F=372, D=1 for the ATR |
| Fails after PPS | Reader and card disagree on F and D | Decode the PPS request and response; compare the new ETU with the captured bit width |
| Repeated characters in T=0 | Parity errors from noise, slow edges or clock jitter | Look for the I/O line pulled low in the guard time; check the pull-up and edge rates |
| Command returns 6D 00 or 6E 00 | Instruction or class not supported by the card application | Decode the APDU header and check CLA and INS against the card specification |
Tools for Decoding Smart Card Protocols
Watch tools capture I/O, CLK and RST and decode characters, ATR and protocol bytes. Capture CLK too, so the decoder can work out the ETU from the clock.
| Product | Role | Capability | Price ex VAT |
|---|---|---|---|
| Acute TravelLogic 34-Channel | Watch | Logic analyser running Acute's decoder library, which includes smart card (ISO 7816) and SWP | €1.577,95 |
| ZeroPlus LAP-C Pro Series | Watch | Logic analyser with decoders for ISO 7816 (UART mode), SWP and SLE4442 in ZeroPlus's decoder library; ask us to confirm which come with your LAP-C Pro model | €1.158,95 |
Building a reader or testing a card application? Tell us the card type and protocol and we will recommend a set-up.
Frequently Asked Questions
Is ISO 7816 Just a UART?
The character frame looks like a UART frame with even parity, but the bit time is derived from the card clock, the line is half duplex, and in T=0 a receiver signals parity errors by pulling the line low during the guard time. A plain UART decoder can read characters at the right baud rate; a smart card decoder also understands the ATR, PPS and protocol structure.
What Baud Rate Does a Smart Card Use?
One bit is F/D clock cycles. At reset F is 372 and D is 1, so the rate is the clock divided by 372: 9600 bit/s at 3.5712 MHz. After a PPS exchange the rate can be much higher.
What Does 90 00 Mean?
90 00 is the status word for normal completion of an APDU command. Other values report errors or warnings, for example 6A 82 for file or application not found.
Can I Read an SLE4442 Card With an ISO 7816 Decoder?
Not with a T=0 or T=1 decoder. The SLE4442 uses the ISO 7816 contacts but synchronous transmission: three-byte commands framed by start and stop conditions, not asynchronous characters. Use an SLE4442 decoder.
Where Is SWP on a SIM?
On contact C6, which older cards reserved for programming voltage. The NFC controller drives it, and the SIM answers by modulating the current it draws.
More Protocols
By John Legg CEng, Director, Debug Store. Updated 24 November 2026.