Announce two new product: SmartCard Reader Rockey200 and USB2.0 Extension Cable

ROCKEY 200 is a handy and portable USB Smart Card reader that can perform read/write operations on any ISO 7816-1/2/3/4 smart cards which are compatible with protocol T=0 and T=1.

USB2.0 Extension Cable With high speed USB 2.0 devices such as USB token ,USB Card Reader and so on.

Come to try it now!

Compile pyGlobalplatform on Linux OS

pyGlobalPlatform is a open source python library of globalplatform client library.
User avatar
JavaCardOS
Posts: 257
Joined: Thu Apr 30, 2015 12:00 pm
Points: 2253
Contact:

Compile pyGlobalplatform on Linux OS

Postby JavaCardOS » Wed Jan 13, 2016 2:14 am

Take Ubuntu for example.

1. Install cmake

Code: Select all

sudo apt-get install cmake


2. Install make

Code: Select all

sudo apt-get install automake


3.Install gcc

Code: Select all

sudo apt-get install gcc


4.Install g++

Code: Select all

sudo apt-get install g++


5. Enter pyGlobalPlatform source code directory. Execute cmake to generate Makefile
Note: Whether to execute step 2 to 3 is according to your own system situation.
You can of course execute the command of this step to install the corresponding tools your system lacks according to the system prompt.

6. Execute make command

Code: Select all

make
make install (Administrator permission required)


7. Enter python

Code: Select all

import pyglobalplatform as gp

c = gp.establishContext()
readername = gp.listReaders(c)[0]
ci = gp.connectCard(c, readername, 1)
selectCommand = '\x00\xA4\x04\x00\x00'
for i in xrange(1000):
      print ">> " + "".join("%02X" %(ord(v)) for v in selectCommand)
      print "<< " + "".join("%02X" %(ord(v)) for v in gp.GP211_send_APDU(c, ci, None, selectCommand))
gp.disconnectCard(c, ci)
gp.releaseContext(c)


Note:
1. Please be sure that you have already installed GlobalPlatform and gppcscconnectionplugin
2. If GlobalPlatform and gppcscconnectionplugin are installed under /usr/local/lib, you need to add LD_LIBRARY_PATH:

Code: Select all

 export LD_LIBRARY_PATH="/usr/lib;/usr/local/lib;"

3. If you have any problem, feel free to address them here!

Return to “pyGlobalPlatform”

Who is online

Users browsing this forum: No registered users and 1 guest

JavaCard OS : Disclaimer