4

My board contains an STM32 (manual here) and a SIM card reader (manual here). I need to write drivers to test that the SIM reader is working an properly communicating with the STM32. However, looking through both manuals, I couldn't find a way to get the two devices to "talk" to each other.

Is there a standard SIM card communication protocol for embedded devices? How can I do basic I/O on a SIM card?

Randomblue
  • 10,953
  • 29
  • 105
  • 178
  • Actually, I realise that the chapter "Smartcard" under USART covers what I want, although at no point is "SIM" mentioned. – Randomblue Mar 26 '12 at 13:46

2 Answers2

4

Smart cards come in several flavours, each with their own protocols. Here's some Arduino code to read ISO7816 T=0 cards:

http://www.makomk.com/~aidan/iso7816_interface.pde

Here's an overview of the standard:

http://www.smartcardsupply.com/Content/Cards/7816standard.htm

Toby Jaffey
  • 28,796
  • 19
  • 96
  • 150
4

You can get the official ETSI specification here (Downloads).

The particular specification that is interesting for you is
ETSI TS 102 221 "Smart Cards; UICC-Terminal interface; Physical and logical characteristics"

Although the spec mentions both protocols "T=0" and "T=1" it is very likely that you only need "T=0" if you use only SIM cards (no banking cards etc.).

Curd
  • 16,043
  • 34
  • 43