Show Posts
Pages: [1]
1  Development / Other Software Development / Re: Smartcard access library on: July 18, 2013, 01:43:11 pm
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  smiley

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 smiley-wink

Hope this helps

  Angus
2  Development / Other Software Development / Re: Smartcard access library on: February 28, 2013, 03:51:22 pm
Hi s_premkumar999, Hi mkroll

As both of you have similar questions, I will try to answer them in one post.

@s_premkumar999

If I understand the datasheets I found for the CD4050 correctly, this is a "one way" level shifter, which will not help you in this case as at least the C7 (I/O) contact of the smart/sim card is driven by both communications partners. What you might need is a transceiver, which works in both ways. (This is actually what the TDA8024, TDA8035, DS8024 or DS8113 are doing + additional smart/sim card features). So the CD4050 won't work in my opinion in this case.

The chips you found or the ones I've mentioned above are in my opinion just level shifter (The DS8113 supports 5V, 3.3V and 1.8V smart/sim cards). They just take care of the conversion of the voltage levels between modern MCU (Mostly 3.3V or 5V) and smart / sim cards, they also provide some convenience functions, like correct reset timing etc. and last but not least as you can not control what card a use might insert, they protect the MCU against the "outside" world. So for actual products I would recommend using this chips. If you just want to learn how the smart / sim card functions work or have a controlled environment, you can connect your 3.3V SIM (I'm not sure what you meant by 3.7v as I wasn't able t find information's about 3.7v SIM cards, so I thought it's just a typo and you meant a 3.3Volt SIM card) card directly to an Arduino supporting 3.3V (Like the new DUE or a lot of the Mega Version, which support 3.3V / 5V logic).

@mkroll

I don't have a schematic how to connect the TDA8024 with the Arduino, as I've reused a old smart card slot of a set-top box I had laying around. This Smart Card slot is based on a TDA8024, but if you google NXP TDA8024 or NXP TDA8035 you will find a lot information right on the NXP site (there is also a application note AN11058 on how to replace a TDA8024 with a TDA8035). Also Maxim provides a lot information about there maxim DS8024 or maxim DS8113 chips and about the underlying communication protocols. If you read the data sheets closely it talks a lot about high frequency problems and there avoidance, which is quite out of my scope, but with the data from the NXP/MAXIM datasheets it should be possible to build quite decent shields / smart card interfaces.

With kind regards

  Angus

PS: I wasn't sure about giving direct links to the data on the NXP or Maxim sites, so I used the "google" way, which in my case led to very useful links on the first page ...
 
3  Development / Other Software Development / Re: Smartcard access library on: February 25, 2013, 01:17:31 pm
Hi s_premkumar999,

In general this should be possible with the library, but first you should check out the voltage used by the SIM card you are talking to, as the Arduino might use a voltage a little bit to high, if the SIM card is connected directly to the Arduino.

It should be possible to generate the needed APDU commands (Select File, Get Response etc.) to retrieve the data from the SIM cards, but I can't help you with the commands needed to retrieve the information. You need to check the documentation online available regarding the SIM card protocol and file layout.

Are you able to retrieve the ATR (Answer to reset) message from your SIM card? This is normally a good starting point for finding out, what protocol is supported (T=0 or T=1) and what communication parameters are needed. 

I would recommend the "apdu_t0_communication" example in the latest release (0.0.7rc3) as a starting point, this should give a framework for further experiments.

With kind regards

  Angus
4  Development / Other Software Development / Re: Smartcard access library on: November 28, 2012, 02:53:57 pm
Hi quertyn,

Nice to hear that you are actually using the Lib. As you are using the Arduino Mega the change to the PIN 20 for the CLK generation might be the problem. I've checked the pin mapping sheet for the Mega (http://arduino.cc/en/Hacking/PinMapping2560) and the digital PIN 20 can not be used as "Timer/Counter OutputCompare Match Output". In my case "OC1A", which is mapped to digital PIN 11 on the Arduino Mega.

First I would recommend to use digital pin 11 as CLK (Currently the use of OC1A is hardcoded, as I didn't found a fast way to determine if a counter is attached to the choosen CLK pin and how to configure it, so that it works all the time). I will look into this problem, but in your case it should work, if you use digital pin 11 and put the Vcc function to another pin.

Secondly. Which version are you using? Currently 0.0.7rc2 is the lastest and releases before 0.0.7 have problems getting certain cards recognized. This process is much more secure in 0.0.7rc2.

Please let me know if this helps.

regards

  Angus
5  Development / Other Software Development / Re: Smartcard access library on: July 22, 2012, 06:09:29 am
Hi,

As promised I updated the SCLib to be able to talk directly to a smartcard, without the need to have any interface chip (Just be carefull not to fry any 3.3V GSM cards etc., as currently it works with 5V).

The updated  release (0.0.4) can be found here http://sourceforge.net/p/arduinosclib/wiki/Home/. I also provided a schematic how to connect a smartcard slot to the Arduino.

Regards

   Angus
6  Development / Other Software Development / Re: Smartcard access library on: July 17, 2012, 12:57:51 pm
Hi Niyi,

For the mentioned card it should be okay to use it with in asynchronus mode, as it supports the T=0 protocol, which is defined to be asynchronus.

As there is a popular demand for a direct connection of smartcards to the arduino board, I will modify the code / description to reflect the needed wiring, when I'm able to get my hands on a smartcard slot. (I think one of my old set-top boxes is missing it's smart card slot in a minute. So if I'm not burning myself, unsoldering the smart card slot, I will start right away doing the needed modifications.)

If a SCLib version is available I will post an update here (But this might take a week or two smiley).

regards

  Angus
7  Development / Other Software Development / Re: Smartcard access library on: May 05, 2012, 03:59:27 am
Hi,

To answer your question in a short way .. It's designed to work with the TDA8024 as this IC was available to me, but as the TDA8024 is mainly used to "decouple" the controling curcit and the smartcard it should be able to communicate directly to the smartcard from the Arduino.

A description "how to connect" the TDA8024 / smart card can be found in the wiki page on sourceforge (http://sourceforge.net/p/arduinosclib/wiki/Home/). I hope this helps ... If more information is needed or you have any comments ... Just let me know

regards

  angus
8  Development / Other Software Development / Smartcard access library on: January 21, 2012, 05:59:02 am
Hi,

As I just started to check out the features the Arduino provides and after finishing several LED, Shift Register etc. projects the time had come for a more demanding project ... And after disassembling a old settop box a Smart Card access lib was started. It is based on the TDA8024T smart card interface chip, which is more or less just a "electrical" protection device and has only minor effect on the communication, it should be also possible to connect the Arduino directly to the smart card contacts (Which I never has tried, but this should work as the eletrical parameters match).

Currently it is able to communication (send / receive) to synchronous (2wire) and asynchronous cards, has autodetection of card type and can be compiled to support only one or the other type.

The checked card base is not representiv as I only could get my hands on the "smart cards" in my wallet ... All of them worked, but only up to a certain level, as most of the communication requires registration for specifications ... The german "Krankenversichertenkarte" is working greatly (Synchronous card - 256Byte EEPROM Card with an open specification).

The next steps I want to take are to remove the "interface chip" (Just buy me a card slot, without any additional hardware) and check out some other cards I can get my hands on, optimizing the library and all the other things a developer does in his spare time smiley-grin

The current version is attached and updates can be found on sourceforge (http://sourceforge.net/projects/arduinosclib/)

Regards
 
  angus





Pages: [1]