Click here to Skip to main content
Email Password   helpLost your password?

Introduction

In the first part, I described how to develop a set of classes with C# to wrap the PC/SC API of Windows. PC/SC is a set of APIs used to communicate with a Smart Card. Even if the classes are easier to use than the PC/SC functions, you still need to write code that is not always easy to understand. Communication with a Smart Card uses a protocol named APDU to send the commands to the card, they are called APDU commands. The framework I propose is designed to simplify the development of a Smart Card application. Most of the time, you would have to chain several commands to perform an action like reading or writing a file. With the framework I describe here, you can easily chain commands and then describe the Smart Card elements of your application with an XML description.

Background

This article assumes that you have read the Part 1 of this article and that you have some knowledge of XML. Even if not necessary, a basic knowledge of Smartcard programming can help.

The APDU command protocol

Most people have a mobile phone and so use a Smart Card every day. For example, when you enter your PIN on your mobile phone or read a phone number in your SIM card directory, your mobile sends a set of commands to the card to perform the action. An APDU command is a set of bytes that are send to the card that will respond with a code and eventually with the data you want to read.

APDU command description

An APDU command is basically composed of the following bytes:

APDU byte Length in bytes Description
Class 1 Class byte
Ins 1 Instruction byte
P1 1 Parameter 1
P2 1 Parameter 2
P3 1 This parameter is either the length of the sent data or the length of the expected data
Data N Data to send to the card

The card will respond to a command with an array of bytes.

Bytes Length Description
Data 0 to 255 Response data
SW1, SW2 2 Command status

An APDU command always returns at least two bytes that are the status bytes. When the command returns some data, the status bytes are the last two bytes returned by the command.

There are five different configurations to send commands to a card. They are categorized in two groups, commands that send data and commands that receive data.

APDU to send data

No data to send, no data to receive

CLASS
INS
P1
P2
P3
SW1
SW2
lgth = 0
90
00

Sending data to the card

CLASS
INS
P1
P2
P3
DATA with length datalgth
SW1
SW2
datalgth
90
00

If datalgth = 0, it sends 256 bytes to the card.

On a normal execution, those commands will answer with 9000 or with an error code.

APDU to receive data

Receiving data of known length

CLASS
INS
P1
P2
P3
DATA of length datalgth
SW1
SW2
datalgth
90
00

Receiving data of unknown length

When a command requests data from the card with an unknown number of bytes, you must first send the command with a length of 0 to get the number of bytes that the card will return. Then, you can call the GET RESPONSE command with a request length lower or equal to the given length.

1 - Send the command with the requested length of 0.

CLASS
INS
P1
P2
P3
SW1
SW2
0
9F
lgth

2 - Send the GET RESPONSE with req_lgth < lgth.

CLASS
INS
P1
P2
P3
DATA of length req_lgth <= lgth
SW1
SW2
C0
0
0
req_lgth
90
00

Sending data and receiving data of known or unknown length

This case is very similar to the previous one. The difference is that you are first sending a command that transmits data to the card. This command replies with a 9FXX code where XX indicates the length of the maximum data you can read with the GET RESPONSE command.

1 - Send data to the card

CLASS
INS
P1
P2
P3
DATA with length datalgth
SW1
SW2
datalgth
90
00

2 - Send the GET RESPONSE with req_lgth < lgth.

CLASS
INS
P1
P2
P3
DATA of length req_lgth <= lgth
SW1
SW2
C0
0
0
req_lgth
90
00

SIM card commands

The commands that can be sent to a SIM card are described in a specification called 3GPP TS 11.11 (a.k.a. GSM 11.11). I won't describe here the whole set of commands and the files of the SIM card. If you are interested in it, you can find a version of the GSM1111 here.

Here is a short list of the commands for a SIM card:

Class byte for GSM is A0, S indicates that data is sent to the card, and R that data is received from the card. All byte values are given in hexadecimal.

COMMAND
INS
p1
P2
P3
S/R
SELECT
A4
00
00
02
S/R
STATUS
F2
00
00
lght
R
READ BINARY
B0
offset_high
offset_low
lgth
R
UPDATE BINARY
D6
offset_high
offset_low
lgth
S
READ RECORD
B2
rec_No
mode
lgth
R
UPDATE RECORD
DC
rec_No
mode
lgth
S
VERIFY CHV
20
00
CHV_No
08
S
CHANGE CHV
24
00
CHV_No
10
S
RUN GSM ALGORITHM
88
00
00
10
S/R
GET RESPONSE
C0
00
00
lgth
R

Now, let us see how it is possible to write an XML framework to simplify the writing of Smart Card applications.

XML framework for APDU commands

The basic idea is to provide a simple and flexible framework in XML to describe APDU commands and write an application which can be a sequence of several commands or of sequences. A command is the atomic unit of description, it can be used alone or from a sequence if parameters need to be passed to the command itself.

APDU command

An atomic APDU command is represented with an XML element. APDU commands are assembled in a ApduList document. The ApduList and the Apdu elements are defined by the following schema:

<xs:schema attributeFormDefault="unqualified" 
        elementFormDefault="qualified" 
        xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="ApduList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="Apdu">
          <xs:complexType>
            <xs:attribute name="Name" type="xs:string" use="required" />
            <xs:attribute name="Class" type="xs:string" use="required" />
            <xs:attribute name="Ins" type="xs:string" use="required" />
            <xs:attribute name="P1" type="xs:unsignedByte" use="required" />
            <xs:attribute name="P2" type="xs:unsignedByte" use="required" />
            <xs:attribute name="P3" type="xs:string" use="required" />
            <xs:attribute name="Data" type="xs:string" use="optional" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

A command file contains a set of pre-defined APDU commands. A command can be played by its name after the APDU command list has been loaded. There are different types of commands; some commands can be played individually, and some need to use the result of a previous command.

When the P3 parameter represents the length of expected data from the command, its value can be the result of the previous call of a command, or the command should have to be replayed to get this variable value. Here is the syntax accepted by the parameter to handle this case:

P3 = "R,0:SW1?xx"

R indicates that the command must be replayed with a condition on the value of SW1 after a first call with P3=0. If SW1 == xx, the command will be replayed with P3 = SW2.

<Apdu Name="Get OTP ID" Class="A0" Ins="1A" 
     P1="80" P2="2" Lc="0" Le="R,0:SW1?6C" Data="" />

P3 = "R,xx:DRyy"

R indicates that the command must be replayed, but without the condition this time. On the first call, P3 = xx, then the command is replayed with P3 = xx + RespData[yy] (yyth data of the response, the first data index is 1 in the norm).

<Apdu Name="Get Status" Class="A0" Ins="F2" P1="0" 
      P2="0" Lc="0" Le="R,13:DR13" Data="" />

P3 = "SW2"

If SW1 == 0x9F on the previous call to a command, then this command is played using P3 = SW2 of the previous command.

<Apdu Name="Get Response" Class="A0" Ins="C0" P1="0" P2="0" P3="SW2" />

P3 = "DRxx"

If there were data from the previous command, xx is used as the index in the response data to get the value of P3. Le = RespData[xx].

<Apdu Name="Read Binary" Class="A0" Ins="B0" P1="0" P2="0" P3="DR15" />

Sequence of commands

A sequence of commands is used to chain atomic APDU commands or sequences. A sequence can use parameters that are given to commands that compose it. A SequenceList describes a set of Sequence elements that can be called in an application. The following schema describes a SequenceList of Sequence elements:

<xs:schema attributeFormDefault="unqualified" 
        elementFormDefault="qualified" 
        xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="SequenceList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="Sequence">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Command">
                <xs:complexType>
                  <xs:attribute name="Apdu" 
                        type="xs:string" use="optional" />
                  <xs:attribute name="P2" 
                        type="xs:unsignedByte" use="optional" />
                  <xs:attribute name="Data" 
                        type="xs:string" use="optional" />
                  <xs:attribute 
                        name="Sequence" type="xs:string" use="optional" />
                  <xs:attribute name="P1" 
                        type="xs:string" use="optional" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="Name" type="xs:string" use="required" />
            <xs:attribute name="PIN" type="xs:string" use="optional" />
            <xs:attribute name="Record" 
                        type="xs:unsignedByte" use="optional" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

The Sequence element allows you to pass parameters to a command or another Sequence. The Sequence uses a subelement that is Command. A Command is used to call an APDU with or without parameters. When a parameter is given in a Command, it overrides the default parameter of the APDU element.

For example, if you want to verify a PIN code, you can use the following Sequence:

<Sequence Name="Verify CHV1" PIN="FFFFFFFFFFFFFFFF">
  <Command Apdu="Verify CHV" P2="1" Data="PIN"/>
</Sequence>

The class that is used to call this sequence allows you to give a value to the PIN parameter. When the Command is executed, the parameter Data will get the value given for the parameter PIN. A Sequence parameter can take any name. In this version, the value of the parameter is a string that represents a set of byte values.

The code to call this Sequence is the following:

SequenceParameter seqParam = new SequenceParameter();

// Process Apdu: VerifyCHV
Console.WriteLine("Sequence: Verify CHV1");

seqParam.Add("PIN", "31323334FFFFFFFF");
apduResp = player.ProcessSequence("Verify CHV1", seqParam);
Console.WriteLine(apduResp.ToString());

Now that we have seen how to declare the commands and chain them using the Sequence element, I'm going to describe the code that takes advantage of this simple 'XML language'.

APDUPlayer: A C# class to be used with the XML description

In order to use the XML format previously described, I have developed a simple C# class which is able to process APDU commands or APDU sequences.

The class APDUPlayer has three constructors, and exposes a few public methods. The two most important methods are those that are used to execute an APDU command or a sequence of APDUs.

The following method is used to execute a single APDU command. The APDUParam parameter can be used to modify a parameter of the APDU that was read from the XML description.

/// <summary>
/// Process a simple APDU command, Parameters
/// can be provided in the APDUParam object
/// </summary>
/// <param name="command">APDU command name</param>
/// <param name="apduParam">Parameters for the command</param>
/// <returns>An APDUResponse object with the response of the card </returns>
public APDUResponse ProcessCommand(string apduName, APDUParam apduParam);

This other method is used to execute a sequence of APDUs. The SequenceParameter class is a list of parameter/value couple that are used as input parameters for the sequence to play.

/// <summary>
/// Process an APDU sequence and execute each
/// of its commands in the sequence order
/// </summary>
/// <param name="apduSequenceName">Name of the sequence to play</param>
/// <param name="seqParam">An array of SequenceParam
/// object used as parameters for the sequence</param>
/// <returns>APDUResponse object of the last command executed</returns>
public APDUResponse ProcessSequence(string apduSequenceName, 
                    SequenceParameter seqParam);

Using this method has been shown previously.

A sample application to read the phone book of a SIM card

In my previous article, we read the phone book of a SIM card using the PC/SC wrapper I described, but this application was just getting the raw content of the phone book file (6F3A). In this sample, we are going to interpret the data of each record. The content of the phone record is the following:

This EF contains the Abbreviated Dialing Numbers (ADN). In addition, it contains identifiers of associated network/bearer capabilities and identifiers of extension records. It may also contain an associated alpha tagging.

Identifier: 6F3A

Record length: X + 14 bytes
Bytes Description Mandatory/Optional Length
1 to X Alpha identifier O X bytes
X + 1 Length of phone number string M 1 byte
X + 2 TON & NPI M 1 byte
X + 3 to X + 12 Phone number string M 10 bytes
X + 13 CCP identifier M 1 byte
X + 14 Extension 1 record

This specification has been taken from the GSM11.11 document that specifies the logic of the SIM card. We are going to extract from this description the information we need to get the phone number and its associated name.

The first bytes are the name that appears on your mobile phone with the phone number. It is a string using a coding close to the ASCII coding by default.

The fourteenth bytes that follow contain the phone number itself and some description bytes. The first byte is the length of the phone number in bytes, including the TON & NPI byte which indicates if the number is national (Ax, 8x) or international (9x).

The ten last bytes of this group contain the phone number itself. The coding is BCD where the bytes are in reverse order. If the number of digits is odd, then the last byte of number contains a F and the digit. For example, the number 015648327 is coded the following way: 10658423F7.

The two last bytes of the record contain data that are rarely used.

The class PhoneNumber is a helper class provided to interpret the bytes of a phone number record. It is used the following way:

PhoneNumber phone = new PhoneNumber(apduResp.Data);
Console.WriteLine("ADN n°" + nI.ToString());
Console.WriteLine(phone.ToString());

The ToString method gets a string of the content of the phone record in the following format, <name> : <number>.

The program ReadPhonebook is a console application that reads the tenth first phone numbers of the ADN file by default. You can read another number of records giving it as a parameter to the program.

Command line: ReadPhonebook P <pincode> <nbRecord>

The parameters are optional.

Examples:

APDExchange application

The APDUExchange Windows Forms application is a basic C# application that can be used to send any APDU command to a card. It is possible to type the command or use an APDUList file to preload commands.

The application automatically detects card insertion or removal on demand. It uses the NativeCard implementation of the Smart Card API described in the previous article.

The Exchange APDU form looks like this:

If you want to send a command that is not in the APDU list, you just need to add the command to the file using the format previously described.

Points of Interest

I have been working in the Smart Card industry for quite some time, and I rarely find articles about this topic on the internet. As Smart Cards are now largely adopted and that some computers even have an embedded Smart Card reader, I thought it would be interesting to demonstrate how a simple XML framework could simplify the development of a Smart Card enabled application. You can use this code and extend the framework to your needs, and I hope that these articles have shown you that using Smart Cards could be quite simple.

History

5 Mar 2007 - updated the ExchangeAPDU application to display the ATR value for the inserted card. Another evolution is to activate the card events for the selected reader if more than one reader is installed on your PC. The error message is displayed in hexa, it's easier to get the meaning using errorlookup.

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralHelp With GemSafe APDU list
Bibo1978
0:16 17 Mar '10  
Does anybody knows what are the GemSafe APDU list
AnswerRe: Help With GemSafe APDU list
orouit
1:15 17 Mar '10  
Unless you want to write your own PKCS driver or CSP you shouldn't need the APDU of the GemSafe Applet.

I'm not sure if this APDU list is published by Gemplus, however if you really need it I may be able to get it, but there might be version issues because I don't know which version of the GemSafe Applet you are using...

/Olivier
Software Architect, COM, .NET and Smartcard specialist.

GeneralRe: Help With GemSafe APDU list
Bibo1978
9:05 17 Mar '10  
Sure this would be helpful even if it is not the updated version
GeneralRe: Help With GemSafe APDU list
Bibo1978
14hrs 57mins ago 
How may I contact you?
QuestionSmart Card App
tumbastic
0:38 8 Mar '10  
Hi,
I am using a Motorola MC75 (Windows Mobile 6.1) with a attachable (Motorola)fingerprint scanner and a smart card reader. I have the sdk for finger print reader which works fine with the devices. However i am facing problems with the smart card reader. I have never tried this before and am new to reading smart cards.
Motorola does not provide with the smartcard sdk rather we have to use the windows sdk or api. I managed to get windows driver kit but they have explained everything except how to make a simple app to access a smart card.
I have no idea where to begin from, was wondering how could you help.

Thanks,
Karan.
AnswerRe: Smart Card App
orouit
17:46 8 Mar '10  
You should get information in my article about Smartcard and the compact framework. However this is not an easy subject as drivers are poorly standardized and depend on the device manufacturer.

I haven't used PPC since version 4 I think. The main advise is that you must get the Smartcard API from the manufacturer. The API is standard but its implementation is given by the manufacturer. That's what make things difficult as I cannot tell you in which DLL you can find it with your device.

Hope it helps.
O. Rouit
Software Architect, COM, .NET and Smartcard specialist.

GeneralADPU to verify PIN for EMV
samikhalfaoui
9:56 8 Nov '09  
Hi Olivier,
This is my first experience in apdu.
I'am looking for the APDU commands :
1- to verify a PIN code for an EMV Card,
2- to get the card number.

Thank you for your help
Sami
AnswerRe: ADPU to verify PIN for EMV
orouit
22:07 11 Nov '09  
I don't think I have the spec for EMV card. I'm not sure as well what exactly you can do with the PIN because EMV card have some more complex authentication mechanisms than just a PIN.

Try to search on the internet for the EMV APDU specs.

/olivier

Software Architect, COM, .NET and Smartcard specialist.

QuestionRegarding Smart Card OS
vibhor goswami
20:05 30 Jun '09  
Hi Oliver,

Can you please provide me some information on how to create a master file in the smart card? I know this question is out of the article but it will be a lot of help if you can give me some links on how to create the master file?

Thanks and Regards,
Vibhor Smile
AnswerRe: Regarding Smart Card OS
orouit
21:00 30 Jun '09  
The create command is OS dependent if I have good memory. The master file is the root of the file system and there can be only one, specially with GSM.

You could create DF I think but this really depends on the OS and the final personalization of the card.

If you are using a standard SIM card for ex you won't have access to those commands normally because they are administrative commands. In addition for some cards after the final personalization steps it is no more possible to modify the file system structure.

In any case you need the specification of the administrative commands which normally you cannot get unless you are working with a smart card company...

Olivier

Software Architect, COM, .NET and Smartcard specialist.

GeneralRe: Regarding Smart Card OS
vibhor goswami
21:32 30 Jun '09  
Hi Oliver,

I am using a sim card that is just freshly prepared and doesn't even contain a master file. I have all the commands description from Phase control command to everything. But these commands are workable only if i can create a MF file. Since it is a freshly prepared sim card straight from the manufacturer, the file structure has not been laid out yet. I guess the final personalization has to be done by me. The MF is the root but the question is how is it created? I am stuck on this problem. Can you get me some information on the creation procedure?

Thanks
Vibhor Smile
AnswerRe: Regarding Smart Card OS
orouit
22:14 30 Jun '09  
This is difficult to help you like this because this process is totally manufacturer dependent.

It may be a binary download of the file system itself or of the MF or any other type of administrative command in order to initialize the filsystem.

The only person who could answer you is a technical support of the card manufacturer.

By the way, which company is the manufacturer?

Olivier

Software Architect, COM, .NET and Smartcard specialist.

GeneralRe: Regarding Smart Card OS
vibhor goswami
1:37 1 Jul '09  
I have contacted the technical support people. It seems that they will guide me to create the Master file. However, i tried different methods including Initializing the EEPROM, but i got an error, "INS Invalid". The manufacturer is a local company here.

Thank you for your help.

Thanks,
Vibhor Smile
QuestionHow to read short message in a SIM card???
kanb007
5:03 14 May '09  
Dear Olivier:
In you article, I know how access the the phone book file (Select file: 6F3A). But I don't konw how to access short message file, which file shall I select.....
Even though I have read the GSM1.11 document. Could you tell me how to read the short message file?????

kanb007
AnswerRe: How to read short message in a SIM card???
orouit
20:05 16 Jun '09  
Hi,

SMS is quite complex to analyze. The message is a record of the EF6F3C under Telecom directory. The same directory as the one of 6F3A.

However the coding is quite complex (it's compressed) and you have to use the 03.40 document to understand the coding of the message. It's too long to explain there.

I chose the 6F3A because it was simple to decode!

You can get the 03.40 there
http://www.3gpp.org/ftp/Specs/html-info/0340.htm

It takes patience to understand it!

Olivier

Software Architect, COM, .NET and Smartcard specialist.

GeneralThanks for your grateful help.
kanb007
16:32 17 Jun '09  
Hi,Olivier
Now, I can get raw data in 6F3C Directory. The problem is that analyze the raw data in record. I'll try my best to do it.
At last, Thanks for your help.

kanb007
09 06 18
GeneralSmartCard Update- and ReadBinary code
Feisberg
0:35 30 Apr '09  
Hi to all,

I want to programm some SIM application. Now the problem is, I'm new in this and don't know actually where to start from. Now I have researched a bit and I have found some informations about writing a programm, but what I couldn't find is: a free sourceode I can use for updating/reading EF fields.

I wanted to write this in C#.

Thanks a lot,
feisberg
QuestionscardTransmit error:1
fresh2g6
3:54 27 Mar '09  
i tried running the source code with i2c card type ,ATR :3B 04 49 32 43 2E . i keep on getting ScardTransmit error :1 .
how can i solve this .thank you
Generalcreate file APDU
boss-tech
2:35 23 Mar '09  
How do i create file with apdu? I only know that ins = E0... what about other arguments? thanks
Generalerror reading 100 record
cakkholil
22:20 1 Dec '08  
when I test this framework (read SIM card address book with xml apdu sequence) I found an error at record #100: ex.Message = "Value was either too large or too small for an unsigned byte."

please help me... thank you

bersyukurlah jika kita tau bahwa kita tidak tau

GeneralRe: error reading 100 record
cakkholil
22:17 3 Dec '08  
I was resolve this error just replace "apduParam.P1 = byte.Parse(sVal, NumberStyles.AllowHexSpecifier);" with this one "apduParam.P1 = Convert.ToByte(sVal);"

thank you ^.^

bersyukurlah jika kita tau bahwa kita tidak tau

GeneralSmart Card programming
xesojay
2:39 29 Sep '08  
Hello,

I have been a developer for some years now and I wish to go into smart card programming using .net but really don't have an idea where to start from.

Am interested in all aspect of smart card applications. Please can you help with any resource or book recommendation that I can start from.
Generalwriting at90sc144144ct smartcard
booltrue
14:38 31 Mar '08  
Hello,

i'll hope i am right here with my question.

I used smartcard with Atmel AT908515 or Atmega163, using the free opensource OS SOSSE. SOSSE (Simple Operating System for Smartcard Education) offers t=0 protokoll for smartcard communication.
For compiling my sources i used winavr and only the t=0 protocoll coded in asm with my project, only needed to communicate with the smartcard via t=0, the rest i do it on my own. For writing the smartcard i used sc master phoenix smartcard reader.

Now i would like to use at90sc144144ct. How can i communicate with the smartcard, without implementing t=0 or t=1 protocoll on my own?
Which reader/writer do i need to use for accessing/writing the smartcard?
GeneralPIN code
RobertoRegazzoni
6:24 14 Sep '07  
I quote from your interesting article: "The PIN value is entered in binary. If your PIN is 1234, you must enter 31323334 and pad FF bytes until the PIN length is 8".

As a consequence, you entered 31323334FFFFFFFF.


If the PIN code is 34073370, should I enter 3334303733333730 ?
I tried that with a smart card of mine and the "ACS ACR38U 0" card reader I always use.

Unfortunately, when your form is displayed, the Sent Data box shows 3334303733333730, but the buttons Connect, Disconnect and Transmit are disabled.
And if I change the APDU command to "Get status", I get the exception you can see below.

Can you give me some help ?
Thanks
Roberto


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at SmartCardPlayer.APDUPlayer.APDUFromXml(XmlNode xmlApdu)
at SmartCardPlayer.APDUPlayer.APDUByName(String apduName)
at TestGemCard.MainForm.comboApdu_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ApduExchange
Assembly Version: 1.0.2558.41801
Win32 Version: 1.0.2558.41801
CodeBase: file:///C:/Documents%20and%20Settings/codeproject2/smartcardFmwk_demo/smartcard_demo/ApduExchange.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
GemCard
Assembly Version: 1.0.2558.26014
Win32 Version: 1.0.2558.26014
CodeBase: file:///C:/Documents%20and%20Settings/codeproject2/smartcardFmwk_demo/smartcard_demo/GemCard.DLL
----------------------------------------
SmartCardPlayer
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/codeproject2/smartcardFmwk_demo/smartcard_demo/SmartCardPlayer.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




Roberto
GeneralUnicode in Smart Card Framework
mwquek
18:26 6 Sep '07  
Dear Oliver,

I've going through your articles many times, it is very helpful. But i got one question here...

I wanted to retrieve my phone book from the SIM card, but some of my entries are stored in Unicode Characters, e.g. Chinese etc. When i using your sample program, all my Unicode phone entry will show as "???".

Can APDU support Unicode? and How can i show my Chinese character in the C# application?


Thanx in advance,
m.w.


Last Updated 5 Mar 2007 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010