# PinPad AKA SPR532 and OpenSC mini-howto

To get feedback as early as possible, here's a small tutorial how to get going with SPR532 and pinpad. There are other PinpadReaders and other interfaces but the given interface makes use of PC/SC version 2.0 spec Part 10.

Things you need to try it out:

- get yourself a SPR532 reader from www.scmmicro.com
- upgrade the firmware to the latest (at least 5.05) version using stuff from here:

http://www.scmmicro.com/support/pcs_downloads.html?PID=70&s1=6&s2

- - Note that this upgrade will make your reader's pinpad unusable under Windows if your application only supports the older and broken firmware!
- make sure you have libusb installed (you can get it from here: http://www.opensc-project.org/svn/ideelabor/trunk/mp/libusb)
- install the latest pcsc-lite from SVN (or from here: http://www.opensc-project.org/svn/ideelabor/trunk/mp/pcsc-lite)
- install the latest ccid driver from SVN (or from here: http://www.opensc-project.org/svn/ideelabor/trunk/mp/ccid)
- install the latest opensc from SVN (or get one from here: http://www.opensc-project.org/svn/ideelabor/trunk/mp/opensc)
  - After installation, make sure you have opensc.conf in the location told by configure and make sure that enable_pinpad is set to 'true'

Notes:

- the whole topic is hairy - see discussions on muscle and opensc-devel mailinglist:
  - http://archives.neohapsis.com/archives/dev/muscle/2005-q1/0199.html
  - http://archives.neohapsis.com/archives/dev/muscle/2005-q1/0221.html
  - http://www.opensc-project.org/pipermail/opensc-devel/2005-March/005709.html

What you can do:

1. test and provide feedback
2. make the code of ccid library better. It seriously looks ugly when the SecurePIN functions come to play - though it works.
3. help to argue how things should look like in different places and how we shall solve some issues - see DesignDiscussion

Known issues:

1. It is known to work with SPR532 under Linux. In theory it should work without modifications on windows using the latest windows drivers available from the SCM specific download location above. In practice it doesn't because that given method is not supported by the windows driver.
2. Support is only for T=0 cards (as of now Estonian and Belgian eID cards have been tested on Linux). It might as well work with T=1 cards, but to try it out you must disable the check for active protocol in reader-pcsc.c. Write a note here if it works.
3. Support for pinpad operations in general might lag behind your needs. Patches most welcome :)

Open questions:

1. SCM seems to also offer a CCID driver for LINUX: http://www.scmmicro.com/support/pcs_product_drivers.html Has anyone tested it? Does it work? martin: the usual 'binary only' whining applies. Also, there should be no difference from the pcsc v2 part 10 point of view.