Posts

Showing posts from August, 2023

How SIM “talks” to external

Image
  Basically SIM card is one entity in cellular telecommunication system . Like any other smart card, it can be programmed, receive commands, and initiate commands to external system. The external system can be a SIM reader, mobile phone or any other mobile device which can has SIM / eSIM inside it. When SIM talks the command to the external and it will receive answer or response.     The language or the command which SIM talks to the external is APDU (Application Protocol Data Unit). APDU is a command response protocol for pushing functions executed on a smart card or similar device. The command consists of a 4 byte header followed by up to 255 bytes of data. The response contains a 2 byte header followed by up to 256 bytes of data. The headers and data are specified in a suite of standards from ISO and others. The structure of a Command APDU (C-APDU) includes a required header (CLA INS P1 P2) and an optional body ([Lc field] [Data field] [Le field]).   An APDU...