herlesupreeth / pysim

Pysim repository from Osmocom with added features
GNU General Public License v2.0
13 stars 3 forks source link

Fail to record the data on the sysmoISIM-SJA5-9FV #2

Closed MKSBarbosa closed 4 months ago

MKSBarbosa commented 4 months ago

Hello everyone, I have a sysmoISIM-SJA5-9FV sim card, and I tried to write information to it, but Python says it doesn't recognize this type:

When I test the command:

root@432d7a63b454:~/pysim# ./pySim-prog.py --pcsc-device=0 --type="sysmoISIM-SJA5-9FV" --name="CInRDS" --mcc=001 --mnc=01 --imsi=001010000109031 --msisdn=0100010109031 --op=504F20634F6320504F50206363500A4F --opc=8b7645883644923debfadb824021f087 --ki=6874736969202073796d4b2079650a73 --iccid=8988211000001090318 --pin-adm=89250005 --acc=0002 --dry-run
Using PC/SC reader interface
Generated card parameters :
 > Name     : CInRDS
 > SMSP     : e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
 > ICCID    : 8988211000001090318
 > MCC/MNC  : 001/01
 > IMSI     : 001010000109031
 > Ki       : 6874736969202073796d4b2079650a73
 > OPC      : 8b7645883644923debfadb824021f087
 > ACC      : 0002
 > ADM1(hex): 3839323530303035
 > OPMODE   : None
Dry Run: NOT PROGRAMMING!
Programming successful: Remove card from reader

When I exec the command:


root@432d7a63b454:~/pysim# ./pySim-prog.py --pcsc-device=0 --type="sysmoISIM-SJA5-9FV" --name="CInRDS" --mcc=001 --mnc=01 --imsi=001010000109031 --msisdn=0100010109031 --op=504F20634F6320504F50206363500A4F --opc=8b7645883644923debfadb824021f087 --ki=6874736969202073796d4b2079650a73 --iccid=8988211000001090318 --pin-adm=89250005 --acc=0002          
Using PC/SC reader interface
Ready for Programming: Insert card now (or CTRL-C to cancel)

Card programming failed with an execption:
---------------------8<---------------------
Traceback (most recent call last):
  File "./pySim-prog.py", line 754, in <module>
    rc = process_card(opts, first, card_handler)
  File "./pySim-prog.py", line 660, in process_card
    card = card_detect(opts.type, scc)
  File "/root/pysim/pySim/cards.py", line 1528, in card_detect
    raise ValueError("Unknown card type: %s" % ctype)
ValueError: Unknown card type: sysmoISIM-SJA5-9FV
---------------------8<---------------------

Programming failed: Remove card from reader
herlesupreeth commented 4 months ago

I would suggest to run the program without --type

Btw, I would suggest to use https://github.com/osmocom/pysim repo rather than this repo as it has all the latest changes/features/fixes

laf0rge commented 4 months ago

the official pysim repository is https://gitea.osmocom.org/sim-card/pysim and the issue tracker for reporting bugs is at https://osmocom.org/projects/pysim/issues

MKSBarbosa commented 4 months ago

Thanks, removing the --type option worked.