MacOS X with RFID Smartcards – Notes

Notes on my experiences playing with RFID smartcards and RFIDIOt on OSX (10.8, 10.9)

RFIDIOt

I’m using an OMNIKEY 5321 USB, now made by HID. I have a couple of RFID cards to play with including an old Javacard bought from Adam Laurie.

OS-X supplies a bunch of PC/SC infrastructure to get going – however I’d strongly recommend downloading the driver from HID: http://www.hidglobal.com/drivers/20384.

There are READMEs displayed in the installer – they are surprisingly detailed about what the installer actually installs. Read them.

Once the driver is installed, you can test that everything is working – so plug in the reader. The pcsc daemon should run automatically; check by typing:

So now you can run a test: place a card on the reader and run:

You should see something like this:

The 5321 has two readers, a regular smartcard reader and a contactless reader. From what I can tell, “Reader 01” is for regular smartcards and “Reader 02” is RFID. If you only see the entry for regular contact cards, you are probably suffering from this issue – to fix this all you need to do is install the drivers from Omnikey. The installer patches the installed card driver bundle so that it will use the correct driver.

So type “2”. You should see details about the card like:

Congratulations – you have a working reader!

Install RFIDIOt from http://rfidiot.org/documentation.html. Read the documentation carefully.

I needed to install pyscard. The installer installed the libraries against Python 2.6 and on my machine the default python version is 2.7. Consequently, every time I tried to run any RFIDIOt tool I got the dreaded “*** Warning – no pyscard installed or pcscd not running”. Copying the modules into /Library/Python/2.7/site-packages from /Library/Python/2.6/site-packages did the trick.

I also needed to install PIL (actually Pillow) and pyasn1. These were simply a case of running:

gpshell and GlobalPlatform

gpshell is a tool for interacting with smart cards using globalplatform. First you need the globalplatform library. I managed to get it to compile with:

The /opt/local prefix is because I wanted it to nestle in with my MacPorts stuff. Next I built gppcscconnectionplugin using:

And then gpshell would build with:

Feedback welcome

Share

Leave a Reply