From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: FRENCH,ASCII X-Google-Thread: 103376,2d96c74570cc66c5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-06 01:14:45 PST Message-ID: <3E670F4A.C1EBAB6E@sympatico.ca> From: David Marceau X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.17-10mdksmp i686) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Aide Communication avec lecteur de carte asynchrone References: <314d185b.0303050845.38f1b5ee@posting.google.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 06 Mar 2003 04:05:14 -0500 NNTP-Posting-Host: 65.92.160.42 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1046941959 65.92.160.42 (Thu, 06 Mar 2003 04:12:39 EST) NNTP-Posting-Date: Thu, 06 Mar 2003 04:12:39 EST Organization: Bell Sympatico Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!snoopy.risq.qc.ca!torn!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Xref: archiver1.google.com comp.lang.ada:34958 Date: 2003-03-06T04:05:14-05:00 List-Id: 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