#10 doTransmit - index out of range

v1.0 (example)
wont-fix
5
2016-03-27
2010-11-18
No

Hey guys I came to across with RF reader FEIG CPRG40.30-USB and that fucker is responding for RF REQA cmd ([0xFF, 0x96, 0x01, 0x00, 0x00]) only by "0x1C" which is completely non standard answer - as everything in RFID readers... But since I can not change FEIG reader please change your library in this way:
smartcard/pcsc/PCSCCardConnection.py: line 177:
sw1 = (response[-2] + 256) % 256
sw2 = (response[-1] + 256) % 256
data = map(lambda x: (x + 256) % 256, response[:-2])
change to:
if(len(response)>1):
sw1 = (response[-2] + 256) % 256
else:
sw1 = 0x00
sw2 = (response[-1] + 256) % 256
if(len(response)>1):
data = map(lambda x: (x + 256) % 256, response[:-2])
else:
data = []

Discussion

  • jean-daniel aussel

    • labels: --> PCSC wrapper
    • assigned_to: nobody --> jdaussel
    • status: open --> open-accepted
     
  • jean-daniel aussel

    thanks for pointing out this non-standard reader behaviour. Looking for the implication of your proposal, and eventual alternate workarounds. will keep you posted.

     
  • Ludovic Rousseau

    Hello,

    Please check again using the latest PySCard version 1.9.2 (or more) and open a new bug if you still have the problem.

     
  • Ludovic Rousseau

    • status: open-accepted --> wont-fix
    • Group: --> v1.0 (example)
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks