Question

Can someone explain what is the difference/relationship between the two?

Now I'm using GPShell + globalplatform + pcsclite too manipulate the NFC-enabled card. From my point of view (I don't know much about libnfc) pcsclite and libnfc do the same.

Était-ce utile?

La solution

pcsclite (or rather PC/SC in general and not just the pcsclite implementation)

PC/SC is a smartcard API for the personal computer platform (initially mainly destop computers, but also servers, etc and even smartphones and other embedded systems). So PC/SC is a standard that provides interoperability between arbitrary smartcard readers and arbitrary PC platforms from different manufacturers. pcsclite is the implementation of this interoperability layer (from developer point of view basically providing a standardized API that is idependent of the smartcard and reader platform as well as the target OS). PC/SC comes from times before contactless smartcards and has since been extended to contactless smartcards and contactless memory cards.

libnfc

libnfc is a library for NFC controller chips and provides a standardized way to access an NFC interface. While this also permits access to contactless smartcards and memory cards/NFC tags, NFC controllers have much more capabilities (peer-to-peer mode communication and (host) card emulation). These capabilities are covered by libnfc (btw, there is not really a standard* defining the interfaces and layers of the software stack behind libnfc as is with PC/SC).

*) This is starting to change with the NFC Forum's NCI specification (at least for the lower levels).

To summarize, pcsclite is for access to smartcard readers (that could also be contactless smartcard readers) and libnfc is for access to NFC interfaces (which are something different than smartcard readers, though they may sometimes be used for the purpose of reading contactless smartcards). So, libnfc and pcsclite simply have a different purpose and comparing them is pretty much like comparing apples and oranges.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top