timmerk / libfreefare

Automatically exported from code.google.com/p/libfreefare
Other
0 stars 0 forks source link

PC/SC support #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using libfreefare for multiple projects in order to isolate myself from a 
DESfire implementation (I'm under an NXP NDA). Currently it's entirely bound to 
libnfc, which is a pity since libnfc only handles a very small fraction of all 
available RFID readers. Most of them come with an PC/SC IFD handler, even for 
Linux!

The DESfire functions specifically would be a great match for T=CL handling 
through PC/SC, but part 3 section 3.2.2.1 of the specification 
(http://www.pcscworkgroup.com/specifications/specdownload.php) also details 
operations on storage cards like Mifare Classic which are implemented by at 
least some devices (all Omnikey devices do this in the IFD handler, some other, 
I think SCM, do it in the reader firmware).

Implementing libfreefare support for PC/SC would greatly increase the 
usefulness and range of supported devices.

Original issue reported on code.google.com by hen...@ploetzli.ch on 17 May 2013 at 11:56

GoogleCodeExporter commented 9 years ago
Hi Henryk. It's indeed a good idea but we don't have the resources to do it at 
the moment. Feel free to provide some patches if you have the opportunity.
If supporting DESFire through PC/SC is indeed pretty easy, I would be much more 
cautious about handling storage cards by part 3 section 3.2.2.1.
Support is optional and would have to be tested against the reader someone 
tries to use, and even so I'm not sure you could handle e.g. MF ULC cards.
More promising is the new part 3 sup 2 to transparently communicating with 
contactless cards. But as of today, almost no reader implement it yet.

Original comment by yob...@gmail.com on 19 Jun 2013 at 9:34

GoogleCodeExporter commented 9 years ago
Hello out there,
we are a 3 man group from university Erlangen and currently working for our 
practicum on this issue. All in all we are trying to keep the interface of 
libfreefare as much as possible to status quo, so that your process of 
readjustment comes nearly to zero. Three functions for easy initialisation, 
termination and listing devices with pcsc-lite were added and 
freefare_get_tags, freefare_tag_new got some alternative function for pcsc_data 
structures. freefare-functions communicating with an RFID device got branches 
and execute the nfc/pcsc-variant depending on what library you initialized.

We got our first great results with the project, like reading the UID and 
getting some information about the tag. But we could need some help for testing 
some tags and more functionalities we implemeneted. 
Currently you can find the project on github, its named "libfreefare-pcsc", but 
its not yet recommended for stable use. We are happy for every hint supporting 
the progress of the project, maybe we can send in foreseeable time a big patch 
to the libfreefare team.

Original comment by simon.pu...@gmail.com on 13 Sep 2013 at 5:36

GoogleCodeExporter commented 9 years ago
Great initiative!
Technically it would have been easier for you to fork the git repo rather than 
creating one from scratch. I'll contact you by email and see what we can do to 
prepare a future merge.

Original comment by yob...@gmail.com on 13 Sep 2013 at 6:05

GoogleCodeExporter commented 9 years ago
patches have now been cherry-picked in a separate branch "pcsc"

Original comment by yob...@gmail.com on 13 Sep 2013 at 8:45

GoogleCodeExporter commented 9 years ago
For info, Simon's Github fork is now rebased on our original git repo and is 
available here:
https://github.com/simonibus/libfreefare-pcsc/tree/pcsc

Original comment by yob...@gmail.com on 14 Sep 2013 at 4:22

GoogleCodeExporter commented 9 years ago
I just pushed 2 changes related to PCSC on GNU/Linux.

I also tried to compile on Mac OS X but I need to make more modification to the 
code and the Mac OS X pcsclite do not support SCARD_AUTOALLOCATE. So more work 
is needed.

Original comment by ludovic....@gmail.com on 15 Sep 2013 at 6:46

GoogleCodeExporter commented 9 years ago
Any progress on this topic?

Was there any reason why PC/SC has not been integrated into libnfc directly? 
``nfc_register_driver`` explicitly allows loading a third party reader driver.

Original comment by frankmor...@googlemail.com on 2 Jun 2014 at 8:44