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 Windows OS

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

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 .


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)

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