Christmas is coming!

To celebrate the new year and thank for the support from all our dear customers, Christmas promotional activity is being held in JavaCardOS online store.

During the event, you can enjoy many promotional activities - High Discount on JavaCardOS products,Lucky Draw,Double forum Points.

Come to choose your own Christmas gift and try your luck now!

Compile pyGlobalplatform on Windows OS

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

Compile pyGlobalplatform on Windows OS

Postby JavaCardOS » Tue Jan 12, 2016 11:45 pm

1. Install cmake.

2. Download GlobalPlatform open source project Library file from this page, which has been compiled.

3. Go to pyGlobalPlatform source code directory where CMakeLists.txt exists.

4. Execute command cmake to generate Visual Studio project file.

5. Use Visual Studio to open the project file.

6. Add include directory:
X:\Python27\include (where Python.h exists)
PATH_TO_GLOBALPLATFORM_PATH (where globalplatform.h exists)

7. Add lib directory:
X:\Python27\libs (where Python27.lib exists)
PATH_TO_GLOBALPLATFORM_PATH ( where globalplatform.lib exists)

8. Build.

9. Generate pyglobalplatform.dll, rename the file to pyglobalplatform.pyd, copy and paste it to X:\Python27\Dlls .

10.Usage:

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'
    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.To run needs the following four dynamic libraries - globalplatform.dll / GPPcScConnectionPlugin.dll / libeay32.dll / ssleay32.dll
Please make sure that they are under system PATH directory.
2. 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