5

I have a IC memory cards that support only Synchronous Interface (like SLE5532,SLE5542...etc)

I would like to know how to write an application that read memory contents, verify PSC (PIN) and write the memory.

This type of cards cannot accept normal APDUs like microprocessor cards. In Datasheet it specify the commands to be send in binary (all commands in 3 byte length)

I found an application that was designed to work with SCM Reader (based on MCSCM.dll) but it is not working with my OmniKey reader.

I want to know if there is a possible to build an application that directly calls winsCard API functions without needing to work directly with Reader's DLLs. and if so, What are the proper functions to call?

And If not possible, How Can I find API of OmniKey? and Can anybody send me samples that works with OmniKey 3121 Reader and synchronous cards?

Thanks in advance

Michael Roland
  • 39,663
  • 10
  • 99
  • 206

2 Answers2

3

If your reader supports the PC/SC 2.01.14 specifications find them here, it may support a generic way to access storage cards. (But be warned that support is optional and not all readers support it.)

In section 3.2.2.1 of part 3 of the PC/SC specifications, storage card functionality support is defined. This functionality consists of several reader-interpreted APDU commands that you can send to the reader. The reader then translates those commands to the storage card specific commands. For instance, there is a READ BINARY command to read data from a storage card:

FF B0 ADDR1 ADDR0 Le

And there is a VERIFY command (for cards that support PIN verification)

FF 20 xx yy Lc PIN

In order to identify the type of a specific storage card, you can refer to the ATR (emulation) format for (contactless) storage cards (in section 3.1.3.2.3.2 of part 3 of the specification) and supplemental document 1 (Storage Card ATR) of part 3 of the spec.

For instance if your card operates according to the ISO/IEC 7816-10 I2C variant, the ATR you get from the reader would look something like this:

8E 80 01 80 4F 0C A000000306 0D xxxx 00000000 yy

In addition to that some manufacturers define their own custom commands (that can either be used through the PC/SC API or through some other interface, e.g. CT-API or Omnikey Synchronous API).

Michael Roland
  • 39,663
  • 10
  • 99
  • 206
2

No, it is not possible to address memory cards from a smart card reader in a generic way. The hardware communication protocol is different from processor cards, and each hardware manufacturer is on its own, which pseudo-APDUs to support for that behaviour. So without specific reader support you have no chance to establsih communication. Situation is better with MIFARE, but that will not help you. If you are unable to find documentenation on http://www.hidglobal.com, you might ask their support. Otherwise I would recommend to use an SCM reader, where you aleady have the matching software.

Thi seems to be what you need, the magic keyword is CT-API, but this is independent from winscard: http://www.hidglobal.com/drivers/14877

guidot
  • 5,095
  • 2
  • 25
  • 37
  • Thanks alot, I have another question: Does The hardware communication protocol differ depending on the reader or both reader and chip? I mean if I have a DLL that send (psaudo APDU) commands that works for one reader manufacturer (e.g. SCM) is it possible to use the same DLL to deal with the same reader but with different chip manufacturer(of course I will change command bytes according to chip datasheet)? – AbdelRahman Shabana Aug 14 '14 at 12:55
  • @AbdelRahmanShabana: read the accompanying documentation. The reader does not necessarily support all types of memory cards. The chip datasheets are important for the reader manufacturer to know, what the reader has to do. You just have to look into the reader documentation, which commands to sent to the reader. – guidot Aug 14 '14 at 13:09