comp.lang.ada
 help / color / mirror / Atom feed
* Aide Communication avec lecteur de carte asynchrone
@ 2003-03-05 16:45 Christophe
  2003-03-06  9:05 ` David Marceau
  2003-03-06  9:18 ` Jean-Pierre Rosen
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe @ 2003-03-05 16:45 UTC (permalink / raw)


Bonjour tout le monde,

Je dois g�rer la communication avec un lecteur de carte asynchrone
compatible avec la norme ISO7816. Je gal�re un peut pour r�cup�rer
l'ATR en utilisant l'API de la WIN32. Si vous pouvez m'aider, cela
serait sympa.
Comment faire un RESET de la carte?
D�tecter une insertion de carte dans le lecteur?
Lire le contenu de la carte?

Mer�i d'avance.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Aide Communication avec lecteur de carte asynchrone
  2003-03-05 16:45 Aide Communication avec lecteur de carte asynchrone Christophe
@ 2003-03-06  9:05 ` David Marceau
  2003-03-06  9:18 ` Jean-Pierre Rosen
  1 sibling, 0 replies; 3+ messages in thread
From: David Marceau @ 2003-03-06  9:05 UTC (permalink / raw)


Christophe wrote:
> 
> Bonjour tout le monde,
> 
> Je dois g�rer la communication avec un lecteur de carte asynchrone
> compatible avec la norme ISO7816. Je gal�re un peut pour r�cup�rer
> l'ATR en utilisant l'API de la WIN32. Si vous pouvez m'aider, cela
> serait sympa.
> Comment faire un RESET de la carte?
> D�tecter une insertion de carte dans le lecteur?
> Lire le contenu de la carte?
> 
> Mer�i d'avance.

Bonjour Monsieur Christophe,

The question:
How to reset a smart card in win32 using the ISO 7816 protocol(actually
7816-4 aka APDU protocol)?

Since COM bindings are available for the windows for smardcard api, I
gather you will be using Ada95/AdaCOM/Windows for smartcards or maybe A#
for the .NET smart cards.

That said however much effort has been done to encourage the use of
javacard for coding cardlets because the same code can run on different
smart card manufacturer's javacard compliant cards.

The answer:
Most card manufacturers don't want most of the developers resetting the
smart card if I understood correctly.  The card mfgrs only want to give
the developer enough slack to load the card with cardlets(files) into
the smartcard file system because essentially that's what a smart card
is...very special file system storage period.

If I recall correctly when you slip a smart card into the reader, it
powers up the card and its clock continues counting where it left off.
When you pull out the card, the clock suspends...no reset happens and no
reset is ever allowed from within the cardlet.  
I can't be any more clearer than that.
Why?  Because the card manufacturer ships the smart cards with preloaded
cardlets usually i.e. the loader helpers running the APDU protocol
itself to validate/install the following cardlets.  This is just like a
cell phone ships with preloaded cellphone software embedded into it. 
Just like cell phones, there are some things that were never meant to be
reset by the general public and in your case a
non-card/non-cellphone-manufacturer-developer.
That said I ran into some links that some people like yourself might
absolutely need...if you know how to look for it you will find
undocumented stuff on the net the following link is a guy willing to
sell everybody on the net a cd with all sorts of docs and software for
unlocking/getting to know your cellphones/smartcards better:
http://groups.google.ca/groups?q=smartcard+cd+sdk+doc&hl=en&lr=&ie=UTF-8&selm=965887798.885551%40pacman.amis.net&rnum=2
I'm pretty sure this is illegal though however it might be necessary if
you really need to reset your card/re-program CARDOS/re-program javacard
vm.

A few things to help anybody master smart cards:
1)the book "Smart Card handbook" is great if you want to know the
low-level stuff including APDU and your RESET.
2)smart card open source
Smart Card FAQ mentions the projects MUSCLE et gcos:
http://www.scdk.com/atsfaq.htm
3)hang out on the usenet forum for smartcards and ask your questions
there:
alt.technology.smartcards
Another page with a bunch of links
http://smartcard.caret.cam.ac.uk/links.html
4)if you have lots of $$$ to throw at special equipment check out
PowerSIM.  From what I understand the big companies may not own it but
sometimes call upon some people who have access to this kind of
equipment.

On a tangent if you understand APDU/javacard, you will find J2ME/MIDP
easy to absorb.  In fact the javacard and j2me/midp compilers work much
more in the same manner than when compared to j2sdk.  Considering that
open-source jgnat(ada to java compiler) exists, it could potentially be
maintained/changed to generate javacard/j2me/midp compliant .class
files. This does however imply the existence of an ada95-aware
jvm/javacardvm/j2mevm debugger.  Is there such a beast that exists?

I hope it helps.

Sant� bonheur,
David Marceau



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Aide Communication avec lecteur de carte asynchrone
  2003-03-05 16:45 Aide Communication avec lecteur de carte asynchrone Christophe
  2003-03-06  9:05 ` David Marceau
@ 2003-03-06  9:18 ` Jean-Pierre Rosen
  1 sibling, 0 replies; 3+ messages in thread
From: Jean-Pierre Rosen @ 2003-03-06  9:18 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]


"Christophe" <izard.christophe@club-internet.fr> a �crit dans le message de news: 314d185b.0303050845.38f1b5ee@posting.google.com...
> Bonjour tout le monde,
>
> Je dois g�rer la communication avec un lecteur de carte asynchrone
> compatible avec la norme ISO7816. Je gal�re un peut pour r�cup�rer
> l'ATR en utilisant l'API de la WIN32. Si vous pouvez m'aider, cela
> serait sympa.
> Comment faire un RESET de la carte?
> D�tecter une insertion de carte dans le lecteur?
> Lire le contenu de la carte?
>
> Mer�i d'avance
Le groupe comp.lang.ada est en anglais.
Pour de l'aide en fran�ais, voir fr.comp.lang.ada.

--
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-03-06  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-05 16:45 Aide Communication avec lecteur de carte asynchrone Christophe
2003-03-06  9:05 ` David Marceau
2003-03-06  9:18 ` Jean-Pierre Rosen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox