The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

Support of Inverse convention in pySimReader

by larytet on Thu Jun 28, 2012 1:07 pm

Hi,

My SIM returns TS 0x03 (first byte), This probably means that order of bits is inverted. I have tried to modify python (attached). Still there is something wrong in sending the command out. SIM does not respond to what sendAPDU() sends.
I will appreciate any tip

Thank you, Arkady

Code: Select all | TOGGLE FULL SIZE
TS: 0x3 Inverse convention
T0: 0xd0
TAi = ff
TCi = 7f
TDi = 96
read: 50
read: fd
read: f9
read: fe
read: c1
read: ff
read: ff
read: f5
read: f1
read: 7c
read: c1
read: 60
read: e9
In:  A0A40000023F00
a0
a4
0
0
2
Traceback (most recent call last):
  File "/home/arkady/pySimReader-Serial-src-v2/pySIMserial.py", line 344, in gatherInfo
    self.gotoFile(["3F00"])
  File "/home/arkady/pySimReader-Serial-src-v2/pySIMserial.py", line 376, in gotoFile
    data, sw = self.sendAPDU("A0A4000002%s" % i)
  File "/home/arkady/pySimReader-Serial-src-v2/pySIMserial.py", line 281, in sendAPDU
    print "%x" % ord(rep)
TypeError: ord() expected a character, but string of length 0 found
Attachments
pySIMserial.py.txt
(14.64 KiB) Downloaded 189 times
larytet
 
Posts: 1
Joined: Thu Jun 28, 2012 1:00 pm