Installation of Linux CCID driver For NFC Reader

Document created by Wigros Sun Employee on Jul 13, 2017Last modified by Wigros Sun Employee on Jul 13, 2017
Version 2Show Document
  • View in full screen mode

Recently, some NFC customer want to use CCID driver to communcate with NFC reader on Linux platform, but they encontered some errors during installing CCID driver for linux. I tested it and installed it to ubuntu 16.04 LTS successfully. Let me share complete steps with those users who want to devevlope NFC applications based on linux platform. If we want to use CCID driver on linux, we need to install these packages:

--libusb

--pcsc-lite

--ccid driver

--opensc

Before starting to install above packages, probably we need to install necessary dependency packages:

# sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev

# sudo apt-get install x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z1-dev

# sudo apt-get install libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils xsltproc uuid-dev:i386 liblzo2-dev:i386

# sudo apt-get install gcc-multilib g++-multilib

# sudo apt-get install subversion

# sudo apt-get install openssh-server openssh-client

# sudo apt-get install libudev-dev

# sudo apt-get install openssl 

# sudo apt-get install libssl-dev

1. libus installation

(1) Download it from : libusb

File name is libusb-1.0.9.tar.bz2

(2)Decompressing it

# tar jxvf libusb-1.0.9.tar.bz2

# cd ~/ccid/libusb-1.0.9
# ./configure
# make

# sudo make install

(3) test it

# lsusb

2. pcsc-lite installation

(1) Downloading pcsc-lite package: MUSCLE 

Filename is : pcsc-lite-1.8.22.tar.bz2 

(2) Decompressing it

# tar jxvf pcsc-lite-1.8.22.tar.bz2 

(3) compiling it

# cd pcsc-lite-1.8.22
# ./configure

# make

...

# sudo make install

...

3. CCID driver installation

(1) Downloading it from : Alioth: Muscle PCSC lite: Project Filelist 

file name is : ccid-1.4.27.tar.bz2

(2) Decompressing it

# tar jxvf ccid-1.4.27.tar.bz2

(3) Compiling it

# cd ccid-1.4.27
# ./configure

After runing configure command, information below will be displayed:

...

# make

...

# sudo make install

...

4. opensc installation

(1) Downloading it from : OpenSC - Browse /OpenSC/opensc-0.16.0 at SourceForge.net 

File name is : opensc-0.16.0.tar.gz

(2) Decompressing it

# tar zxvf cd opensc-0.16.0.tar.gz

(3)Compiling it

# cd opensc-0.16.0

# ./configure --enable-openssl --enable-pcsc

# make

# sudo make install

 

Up to now, above 4 software packages have been installed to ubuntu 16.04 LTS.

(4) Add library file path

   open /etc/ld.so.conf , and add one line at the end of the file :  include /usr/local/lib , save and exit, run 'sudo ldconfig -v' to update it.

# sudo gedit /etc/ld.so.conf 

# sudo sudo ldconfig -v

 

5. Add Vendor ID & Product ID to info.plist

We should add Vendor ID & Product ID of NFC reader to info.plist, the file is at the path : /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/. For example , PN7462's vendor ID is 0x1FC9, and product ID is 0x0117.

 

[Note] This requires Firmware on NFC reader board should support USB CCID, if not, customer should replace it with firmware that supports USB CCID, for the purpose, customer can refer to UM10915.pdf(http://www.nxp.com/docs/en/user-guide/UM10915.pdf ) to do it.

 

 

 

TIC team Weidong Sun

2 people found this helpful

Attachments

    Outcomes