Go Down

Topic: Smartcard access library (Read 13147 times) previous topic - next topic


Hello Angus,

Thanks for your replay, i was checking the things you said. You explained things very nicely. This library works perfect for SIM cards, Thanks a lot.....  :) :)
without any interfacing IC you said, i'm able to connect the sim card directly to the arduino and getting the ATR response. I'm attaching the screenshot plz check it, is that working correctly??
I have some doubts...
I want to read the complete phone book and the messages stored in the sim card and save in a memory card(not needed to display as characters in the mmc file just want to dump as a cache)and then write this to another sim card. Is it possible with this library?  how to access the phone book and the message stored location in the sim card?? and which function is used to write thing to the sim card?


Hi s_premkumar999,

I checked the ATR and at least it's valid from an ATR standpoint, but as you've said you are talking to a SIM Card, the communication flow might be different than the one defined in the test you've used. I assume you used the "apdu_t0_communication" example, which just checks a apdu / T0 communication. Based on the ATR you've provided and the result code found in the screenshot, the basic communication worked, but the smart card was not able to "SELECT" the file requested.

This is perfectly normal in your case and now the "fun" part starts  :)

I'm using the smart card lib currently for accessing normal memory cards and no SIM cards, so I can't help you with the communication sequence needed to access the Phone Book etc. of a sim card, but I think the "GSM 11.11" standard might be a good starting point to understand the communication between the mobile phone and the sim card, so that you can read the needed data.

The wikipedia article about the "Subscriber identity module" might also give a lot of hints to further information (The "Design" and "Data" sections of the english version mentions ETSI TS 102 223, ETSI TS 102 241, ETSI TS 102 588 and ETSI TS 131 111 and the above mentioned GSM 11.11)

Just let me know if you have any success, otherwise I have to check one of my old mobiles for a SIM card to check with ;)

Hope this helps



Ya Angus, you really helping me a lot....I'll surely update you the progress.....
Thank you


hello Angus,

If one changes the clock pin on Arduino mega to 11 the what will vcc be for the smartcard?


Sep 29, 2016, 11:48 pm Last Edit: Sep 29, 2016, 11:57 pm by Alferciu

Using the latest version, with the example called: "apdu_t0_communication", I cant get anything else but this:
Code: [Select]
Waiting for Smartcard
Smartcard found
Received ATR ...
00|3B 79 94 00 00 F7 04 01 01 03 80 01 02 A9       ';y..............'
SELECT FILE Command ...
Received ... 6A82

The card It's a sle4432 I guess, also i think it hasn't any protection (0xFFF...)

Can anyone help me? How should I send the commands?

How can I know which byte correspond to a specific value? (for example time or money remaining)

Thank you :)

Go Up