[Muscle] ACR38, I2C memory card and pyscard + linux problem
Timo Parkkinen
tiparkki at gmail.com
Mon Jun 23 05:50:59 PDT 2008
Hi everyone,
My equipment:
- ACR38u smart card reader/writer
- 64kbit I2C memory cards
- pyscard framework
- Linux with pcsc, acr drivers etc.
I have problem to read / write I2C memory cards in this environment. Same
code works just fine in Windows.
Example:
READ = [0xFF, 0xB0]
STARTMSB = [0x00]
STARTLSB = [0x00]
MEM_L = [0x01]
self.cardrequest = CardRequest( timeout=1, cardType=self.cardtype )
self.cardservice = self.cardrequest.waitforcard()
self.cardservice.connection.connect()
apdu = READ + STARTMSB + STARTLSB + MEM_L
response1, sw1, sw2 = self.cardservice.connection.transmit( apdu )
Running this code gives following error when trying to get connection with
self.cardservice.connection.connect() :
'Smartcard Exception: Unable to connect with protocol: T0 or T1 Card
protocol mismatch.!'
If I change that line to
self.cardservice.connection.connect(CardConnection.RAW_protocol) I get rid
of that error, but after that I get same error using transmit method...
Changing transmit method to ...transmit ( apdu, CardConnection.RAW_protocol
) gives following:
'Smartcard Exception: Failed to transmit with protocol RAW. Transaction
failed.!'
Is there anyone who have succesfully used pyscard with memory cards? Am I
doing something wrong here or missing something?
cheers,
tp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drizzle.com/pipermail/muscle/attachments/20080623/196d9634/attachment.html
More information about the Muscle
mailing list