[Muscle] How can I know what's the type of a card through it's ATR?

Michael Bender Michael.Bender at Sun.COM
Tue Jan 13 10:54:04 PST 2009


On Jan 12, 2009, at 5:36 PM, lion wrote:

> Thanks a lot for your detail information.
>
> I want to find out  informations on the card just in order to find  
> out the command set of the card.
>
> I don't know the commands is ISO7816 based or card producer  
> dependent ?
>
> eg. I find out the SELECT FILE command from ISO7816(MF file):  00 A4  
> 0000 02 3F00
>       But the response error. So, I looked up in Google,and someone  
> says the command
>       may be this: A0 A4 0000 02 3F00 , depending on the card's type.
> (http://developergemalto.com/nc/forums.html?view=single_thread&cat_uid=1&conf_uid=3&thread_uid=445&page=3 
> )

If you don't know what type of card you have, then just sending random  
APDUs to the
card won't do you much good, and you may wind up locking up the card  
and rendering
it useless.

In your example, you are looking at a Gemalto forum, do you think that  
your card is a
Gemalto card of some type?

> > You can try some common APDUs that work with OpenPlatform JavaCard
> So, I don't know here what commands I can use ?

Do a Google search for "OpenPlatform" or have a look at the OpenSC  
sources for
example to find more information on APDUs that you can use.

> And in my opinion, most of the commands in ISO7816-4 should SELECT  
> FILE at first.
> So, I  just try to implement the SELECT FILE command.

Well, why do you think that you need to do a SELECT FILE at first?  
Some cards don't
have any type of filesystem at all, so a SELECT FILE won't do anything  
with those types
of cards.

mike

----

> ------
> Cherrs,
> Bob
>
> >
> >On Jan 12, 2009, at 12:43 AM, lion wrote:
> >
> >> Hi, All
> >> I am wirting a smartcard driver, the ATR is like below.
> >> ----ATR:   TS is 3b
> >>                  T0  is 6c
> >>                  TB1 is 0
> >>                 TC1 is 2
> >>                 history char is : 36 61 86 38 4b 8c 13 4 62 3 59 8a
> >>
> >>          Then,how can I know what's the type of my card(such as the
> >> producer..)
> >>
> >> I have try to find it at http://www.sun-rays.org/lib/smartcard_list.txt,but
> >>  have no answer.
> >>
> >> I want to do this, because i always get failure when selecting the
> >> MF file
> >> I try to get more information about my card.
> >
> >Well my experience is that you can't always tell what type of card  
> you
> >have just
> >by looking at the ATR, which is why I created the SwapDrop language
> >that Sun Ray
> >uses to run "smartcard config files" that use heuristics to  
> identify a
> >card that is
> >inserted into the Sun Ray's internal smartcard reader. The config
> >files may use
> >the ATR information (usually the history bytes and/or the length) as
> >one of the tests
> >to try to identify a card. Other tests include checking for the
> >presence of specific
> >directories and/or files, checking for the length and/or contents  
> of a
> >particular file,
> >trying to select one or more applets (on cards that support applets)
> >and issuing
> >specific APDUs and noting the response from the card.
> >
> >I had a look on Ludovic's list here:
> >
> >http://ludovic.rousseau.free.fr/softwares/pcsc-tools/smartcard_list.txt
> >
> >but I couldn't find an ATR that matches your card's ATR.
> >
> >Try playing with Google to see if someone else has posted the ATR or
> >an ATR
> >that is similar to yours.
> >
> >Do you have any more information on the card that you want to find  
> out
> >about?
> >You can try some common APDUs that work with OpenPlatform JavaCard
> >cards,
> >perhaps you have one of those cards. Or maybe scan an image of the
> >card (if
> >it's not a blank white card ;-) and post it somewhere for people to
> >look at. Even if
> >it is a blank white card, you can usually tell the manufacturer of  
> the
> >chip from the
> >contact pad design, so that might be a good lead.
> >
> >mike
>
> ¡¶´ó»°Î÷ÓÎÍâ´«¡·ºØËêÐÂ×÷£¬ËͺÀÕ¬¡¢ËÍÄã5000ԪѹËêÇ®  
> _______________________________________________
> Muscle mailing list
> Muscle at lists.musclecard.com
> http://lists.drizzle.com/mailman/listinfo/muscle

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drizzle.com/pipermail/muscle/attachments/20090113/d4a439dc/attachment.html


More information about the Muscle mailing list