PN7412 time optimization with CCID specification

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PN7412 time optimization with CCID specification

238 次查看
ggpr
Contributor II

Hello,
We've been using the PN7412 with the CCID program from the examples package. Everything works correctly but the times we get to access the SAM are slow.

We have connected an Imx8mn with the PN7412 via USB. In the Imx8mn we run a small program that uses the PCSClite library (version 1.9.1) to communicate with the PN7412 . In the PN7412 we run the example "phExCcid" and we can communicate with the SAM without any problem.

Measuring the time from when we send a certain APDU command from the library until we receive the response takes about 12 ms and we need to reduce this time. We have tried to optimize to firmware in the PN7412 but we cannot reduce the time. 

We have tested the same command using the NXP software called RFIDDiscover and the reader NXP Pegoda and the time for all the process is 7 ms approx. Although we have to take into account that we do not have access to the source code and we can only see the logs shown by the program.

We do not know where we can optimize the system to reduce the time, is the CCID specification the best way to communicate the Imx8mn and the PN7412?
Is there any configuration of the PN7412 that will help us to reduce the communication times?

Any help or insights would be greatly appreciated.

标记 (2)
0 项奖励
回复
1 回复

99 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

 

------About CCID supported by embeded linux OS-------

USB CCID is a standard protocol, but if there is no CCID in customer's embeded linux source code, she needs to download corresponding source code and compile them, below is for your reference:
(1) downloading libusb: 
http://www.libusb.org/, and cross compile it.

./configure --host=mipsel-linux --prefix=/tango/ccid/ CC="/root/mips-4.3/bin/mips-linux-gnu-gcc -EL" CXX="/root/mips-4.3/bin/mips-linux-gnu-g++ -EL"
make
make install

(2) downloading ccid and pcsclite :
http://alioth.debian.org/projects/pcsclite/, and cross compile them.
-- Cross compile pcsclite:
./configure --host=mipsel-linux --prefix=/tango/ccid/ CC="/root/mips-4.3/bin/mips-linux-gnu-gcc -EL" CXX="/root/mips-4.3/bin/mips-linux-gnu-g++ -EL" --enable-libusb LIBUSB_LIBS="-L/tango/ccid/lib/ -lusb-1.0" LIBUSB_CFLAGS="-I/tango/ccid/include/libusb-1.0/" --disable-static --disable-libudev
make
make install
--Cross compile CCID
./configure --host=mipsel-linux --prefix=/tango/ccid/ CC="/root/mips-4.3/bin/mips-linux-gnu-gcc -EL" CXX="/root/mips-4.3/bin/mips-linux-gnu-g++ -EL" --enable-libusb LIBUSB_LIBS="-L/tango/ccid/lib/ -lusb-1.0" LIBUSB_CFLAGS="-I/tango/ccid/include/libusb-1.0/" PCSC_CFLAGS="-I/tango/ccid/include/PCSC/" PCSC_LIBS="-L/tango/ccid/lib/ -lpcsclite" --enable-usbdropdir="/tango/ccid/pcsc/drivers"
make
make install
(3) Running them
mount -t usbfs none /proc/bus/usb
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/xxx/ccid/lib
export LD_LIBRARY_PATH
./pcscd &

Note:
(1)pcsc is the server of CCID, so we must start pcsc service.
(2)pcsc service needs libccid.so, we should re-configure corresponding path, generally, path is in config.h.
(3)ccid driver needs libusb & libpcsclite, so before running it, we should cross compile libusb and libpcsclite.


Above steps are common method that add CCID driver to embeded linux OS.
 
Since ExCcid demo application from NFC Reader Library is a demonstration on how to implement CCID functionality, this software maybe not fully optimized. 
 
 
Regards
Daniel
0 项奖励
回复