Project

General

Profile

Bug #1988

problem changing the ICCID on sysmo-usim-sjs1

Added by dexter 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
03/20/2017
Due date:
% Done:

100%

Spec Reference:

Description

When programming an sysmo-usim-sjs1, all parameters are written fine, except for the ICCID. There are no error messages printend. When checking the ICCID with the phone, the original ICCID is shown, regardless what is previously programmed.

$ ./mksim.sh 
Insert card now (or CTRL-C to cancel)
Generated card parameters :
 > Name    : Magic
 > SMSP    : e1ffffffffffffffffffffffff0581005155f5ffffffffffff000000
 > ICCID   : 1234567890123456789
 > MCC/MNC : 1/1
 > IMSI    : 001010000000006
 > Ki      : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
 > OPC     : 79316551103BD050B7C8CDB0030C49F0
 > ACC     : None

Programming ...
Done !

Script used for programming:

#!/bin/bash

PYSIM=~/bin/pysim/pySim-prog.py
ADM1=14546485
OPC=79316551103BD050B7C8CDB0030C49F0
MCC=001
MNC=01
IMSI=001010000000006
KI=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
ICCID=1234567890123456789
python $PYSIM -p 0 -t sysmoUSIM-SJS1 -o $OPC -k $KI -x $MCC -y $MNC -i $IMSI -s $ICCID -a $ADM1

History

#1 Updated by laforge 6 months ago

An APDU trace should be revealing what actually happens. Maybe the
pySim software never actually writes to EF.ICCID, or the card returns an
error which is ignored by pySim?

#2 Updated by dexter 6 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

I have checked the apdu trace and the code. ICCID is indeed not programmed, we just need to add it.

18845296 APDU: 00 A4 00 0C 02 3F 00 
00168766 SW: 90 00 
00000573 APDU: 00 A4 00 0C 02 7F 20 
00030396 SW: 90 00 
00000494 APDU: 00 20 00 0A 08 31 34 35 34 36 34 38 35 
00134533 SW: 90 00 
00000571 APDU: 00 A4 00 0C 02 00 FF 
00039378 SW: 90 00 
00000443 APDU: 00 D6 00 00 10 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00023548 SW: 90 00 
00000384 APDU: 00 A4 00 0C 02 00 F7 
00035621 SW: 90 00 
00000417 APDU: 00 D6 00 00 11 01 79 31 65 51 10 3B D0 50 B7 C8 CD B0 03 0C 49 F0 
00023587 SW: 90 00 
00000423 APDU: 00 A4 00 0C 02 6F 07 
00039574 SW: 90 00 
00000396 APDU: 00 D6 00 00 09 08 09 10 10 00 00 00 00 60 
00029598 SW: 90 00 

#3 Updated by dexter 6 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 10 to 100

I have added the missing bits, patch is on: pmaier/fixfci

#4 Updated by laforge 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF