Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email email@example.com
From: Drasko DRASKOVIC (drasko.draskovicgmail.com)
Date: Thu Dec 09 2010 - 10:48:38 CST
I have seen Ludovic's nice example of Pyscard usage here :
I would like to use similar method to program (write to) USIM card, so
I have two questions realted to this :
1) In gscriptor I run "Select EF_DIR" APDU, and I get something like this :
Beginning script execution...
Sending: 00 A4 08 04 02 2F 00 00
Received: 61 28
0x28 bytes of response still available.
Script was executed without error...
So, I have to run other commands, appropriately to transport layer.
I can see that OpenCT includes T=0 and T=1 protocol implementation
within IFDHandler, and I can see that PC/SC Lite includes IFDHandler,
inspired by the code found in OpenCT. That would say that PC/SC Lite
has transport layer implementation.
Question 1 is following :
Can I send and recive application layer commands (APDUs), and relay
that transport layer will be done by the underlaying driver (i.e. have
just one command for SELECT_EF_DIR) ? Does anyone have any example how this
can be done without re-implementing T=0 or T=1 transport layer i the
same python script (i.e. without analyzing SW1 and SW2 and resending
more bytes in case of SW1==0x61, etc.., but have all of this done by
driver/transport layer, and send only high layer commands and analyze
"SUCESS" or "ERROR").
2) In Ludovic's example he defined APDUs like this :
# define the APDUs used in this script
SELECT = [0x00, 0xA4, 0x04, 0x00, 0x0A, 0xA0, 0x00, 0x00, 0x00, 0x62,
0x03, 0x01, 0x0C, 0x06, 0x01]
COMMAND = [0x00, 0x00, 0x00, 0x00]
Question 2 :
Is anyone aware of and can he/she please recommend me any python
library or module
that implements ISO7816 (similar to this :
http://michau.benoit.free.fr/codes/smartcard/) and have all GSM APDUs
Thank you very much for any help you can provide me.
Muscle mailing list