ACS ACR30 Reference Manual

ACS ACR30 Reference Manual

Smart card reader pc/sc memory card access
Hide thumbs Also See for ACR30:

Advertisement

PC/SC Memory Card Access Reference Manual
ACR30 Smart Card Reader
idvation GmbH
Otto-Hesse-Straße 19 / T5
D-64293 Darmstadt
info@idvation.com
Phone +49 6151 9926567
Fax
+49 6151 3689296
www.idvation.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ACR30 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ACS ACR30

  • Page 1 PC/SC Memory Card Access Reference Manual ACR30 Smart Card Reader idvation GmbH Otto-Hesse-Straße 19 / T5 Phone +49 6151 9926567 D-64293 Darmstadt +49 6151 3689296 info@idvation.com www.idvation.com...
  • Page 2: Table Of Contents

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Table of Contents Introduction ............................3 Supported Memory Cards and System Requirements ..............4 2.1. Supported Memory Cards ..........................4 2.2. System Requirements ............................. 4 Memory Card Access ........................... 5 3.1.
  • Page 3: Introduction

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 1. Introduction PC/SC 1.0 is an architecture that defines an interface between smart card readers and a resource manager. The specification includes a description of the general-purpose interface as well as card authorization, PIN verification, file access and cryptographic services.
  • Page 4: Supported Memory Cards And System Requirements

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 2. Supported Memory Cards and System Requirements 2.1. Supported Memory Cards Access to memory cards requires the support from reader. Currently the following cards are supported by ACR30U.  SLE4442 ...
  • Page 5: Memory Card Access

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 3. Memory Card Access 3.1. Logical Flow of Memory Card Functions The goal of the memory card functions is to provide access to memory card using the standard PC/SC routines as much as possible.
  • Page 6: Pc/Sc Functions For Memory Card Access

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 3.2. PC/SC Functions for Memory Card Access 3.2.1. SCardEstablishContext Descriptions: This function establishes the communication context with the ACR30U reader. It must be the first function to call. Synopsis: LONG SCardEstablishContext (...
  • Page 7: Scardreleasecontext

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Return Values: Success SCARD_S_SUCCESS Failure An error code (see MSDN Smart Card Error Codes for detail) 3.2.2. SCardReleaseContext Descriptions: This function releases the communication context and any resource allocated previously with SCardEstablishContext.
  • Page 8: Scardlistreaders

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 3.2.3. SCardListReaders Descriptions: This function returns application with a list of readers known to the system. Application must parse the buffer storing names of readers to retrieve the name of individual reader.
  • Page 9: Scardconnect

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 if (rv ! = SCARD_S_SUCCESS) print f (“error listing reader names!\n”); // release context and quit … Return Values: Success SCARD_S_SUCCESS Failure An error code (see MSDN Smart Card Error Codes for detail) 3.2.4.
  • Page 10 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Set to 0 with SCARD_SHARE_DIRECT phCard Handle that identifies the connection to the smart card in the specified reader. pdwActiveProtocol The smart card protocol to be used in the subsequent communication (the value will be SCARD_PROTOCOL_RAW).
  • Page 11: Scarddisconnect

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 3.2.5. SCardDisconnect Descriptions: This function releases the connection established between the calling application and the smart card inserted in the specified reader in the previous call to SCardConnect. Synopsis: LONG SCardDisconnect (...
  • Page 12: Scardtransmit

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 hCard, SCARD_UNPOWER_CARD If (rv != SCARD_S_SUCCESS) print f (“error connecting to smart card!\n”); \\ release context and quit … Return Values: Success SCARD_S_SUCCESS Failure An error code (see MSDN Smart Card Error Codes for detail) 3.2.6.
  • Page 13 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Parameters: hCard Handle to connection of target smart card retured from SCardConnect. pioSendPci Set to SCARD_PCI_RAW. phSendBuffer Buffer containing data to be sent to the smart card. cbSendLength Length (in bytes) of pbSendBuffer.
  • Page 14 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 rv = SCardListReaders (hContext, NULL, mszReaders, &pcchReaders) ; szReader = mszReaders; // Use the 1st reader in the list rv = SCardConnect ( hContext, szReader, SCARD_SHARE_EXCLUSIVE, SCARD_PROTOCOL_RAW, &hCard, &dwActiveProtocol) ; // Read 32 bytes from I2C card starting at address 00:10 pbSendBuffer [0] = 0x00;...
  • Page 15: Scardcontrol

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 3.2.7. SCardControl Descriptions: This function allows application to have direct control of the reader. Application can call it any time after a successful call to SCardConnect and before a successful call to SCardDisconnect.
  • Page 16 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Example Code: SCARDCONTEXT hContext; SCARDHANLDE hCard; LPSTR mszReaders; LPSTR szReader; BYTE lpOutBuffer [10] ; DWORD nOutBufferSize=10; DWORD lpBytesReturned; DWORD pcchReaders; DWORD dwActiveProtocol; LONG rv; rv = SCardEstablishContext (SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext) ;...
  • Page 17: Acr30U Command Set From Memory Card Access

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Return Values: Success SCARD_S_SUCCESS Failure An error code ( see MSDN Smart Card Error Codes for detail) 3.3. ACR30U Command Set from Memory Card Access The set of memory card commands is used the define the operations to be performed on the target memory card. The table below shows the full set of memory card commands and the corresponding type of memory cards that support these commands.
  • Page 18 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Parameters: Startin address of the read operation The number of bytes to read Response Data Format (pbRecvBuffer): … … BYTE 1 BYTE 2 BYTE 3 BYTE N BYTE x Data bytes read from the card memory.
  • Page 19 – Present the specified code to the card. The ACR30 does not try to erase the presentation counter after the code submission! This must be done by the application software through a separate ‘Write with carry’ command. Command Buffer Format (pbSendBuffer): pbSendBuffer [0] = 0x00;...
  • Page 20: Iic

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 The transport code. Response Data Format (pbRecvBuffer): No Response Data 3.3.2. pbSendBuffer [ ] is the buffer parameter of SCardTransmit that contains data to be sent to smart card. This is also the command buffer.
  • Page 21: Sle4432/ Sle4442

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 pbSendBuffer [2] = P1; pbSendBuffer [3] = P2; pbSendBuffer [4] = Len; pbSendBuffer [5] = Data00; pbSendBuffer [6] = Data01; Parameters: The byte address of the first byte to be written to card (high order byte).
  • Page 22 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 The byte address of the first byte to be written to card (low order byte). The number of bytes to be read from the card (0<N≤MAX_R). Response Data Format (pbRecvBuffer): …...
  • Page 23 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 The arrangement of the protection bits in the PROT bytes is a follows: … PROT 1 PROT 2 is the protection bit of BYTE x in the response data ‘0’ : byte is write protected ‘1’...
  • Page 24 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Response Data Format (pbrecvBuffer): No response data Example: 3.3.3.3. ACI_WRITEP This command writes the protection bits for the specified address in the card. Each of the bytes specified in the command is internally in the card compared with the byte stored at the specified address and if the data match, the corresponding protection bit is irreversibly programmed to ‘0’.
  • Page 25 ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Example: 3.3.3.4. ACI_PCODE (only SLE4442) This command submits secret code to card to enable the write operation with the SLE4442 card. Command Buffer Format (pbSendBuffer): pbSendBuffer [0] = 0x00; pbSendBuffer [1] = ACI_PCODE;...
  • Page 26: Sle4418/ Sle4428

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 3.3.3.5. ACI_CCODE (only SLE4442) This command writes the specified data as new secret code in the card. The current secret code must have been presented to the card with the PRESENT_CODE command prior to the...
  • Page 27: Idvation Gmbh

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Parameters: The byte address of the first byte to be read from card (high order byte). The byte address of the first byte to be read from card (low order byte).
  • Page 28: Idvation Gmbh

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 pbSendBuffer [4] = Len; pbSendBuffer [6] = Data00; pbSendBuffer [7] = Data01; Parameters: The byte address of the first byte to be written to card (high order byte). The byte address of the first byte to be written to card (low order byte).
  • Page 29: Idvation Gmbh

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Command Buffer Format (pbSendBuffer): pbSendBuffer [0] = 0x00; pbSendBuffer [1] = ACI_WRITEP; pbSendBuffer [2] = P1; pbSendBuffer [3] = P2; pbSendBuffer [4] = Len; pbSendBuffer [6] = Data00; pbSendBuffer [7] = Data01;...
  • Page 30: Idvation Gmbh

    ACR30 PC/SC MCA Refernce Manual Version 1.3/ January 2009 Parameters: Data x The secret code. Response Data Format (pbRecvBuffer): ERRCNT Code ERRCNT The value of the presentation error counter after the code presentation. CODE The two bytes secret code read from the card. If the correct code has been presented to the card, the value of ERRCNT is FF and the value of CODE is identical to the code data specified in the command.

Table of Contents