Did I brick my sysmoEUICC1-C2T

Hey all,

I did some testing using a sysmoEUICC1-C2T. I installed test eSIM profiles containing custom applets I added using the saip-tool bundled in pySIM. So long story short I fafo’d. I used the example saip-tool_example_add-app.sh and edited the applet privilege, 04 instead of 00:

PYTHONPATH=$PYSIMPATH python3 $PYSIMPATH/contrib/saip-tool.py $OUTPATH add-app-inst --output-file $OUTPATH \
		      --aid 'D07002CA44' \
		      --class-aid 'D07002CA44900103' \
		      --inst-aid 'D07002CA44900103' \
		      --app-privileges '04' \
		      --app-spec-pars '00' \
		      --uicc-toolkit-app-spec-pars '01001505000000000000000000000000'

Now the eUICC seems to be stuck in the initialization. I can see the chip in a pcsc_scan but can’t download, enable, disable or delete profiles. Sending requests via lpac only results in:

$ ./lpac profile list | jq .
{
  "type": "lpa",
  "payload": {
    "code": -1,
    "message": "euicc_init",
    "data": ""
  }
}

Is there any way to “unbrick” the chip or did I fafo and really found out?

04 is the “Card Reset Privilege”, i.e. this application is automatically selected when the eUICC is being reset. I don’t think the GSMA eSIM specifications explain what should happen in such a situation, i.e. if and how one would ever get back to to talking to the ISD-R.

You might want to try to send APDUs to explicitly select the ISD-R. What happens at that point? What do APDU traces show?

I think in general there is no use case that I can think of where an application on any type of SIM (whether SIM, USIM, ISIM, … or eSIM profie) would ever have this kind of privilege. It is only useful in the context of pure Java Cards, that do not have a primary function as SIM.

1 Like

Okay that did the trick.

I was able to select the ISD-R with the pySIM shell and then send a memoryReset command.

EUICC is now responding fine:

$ ./lpac profile list | jq .
{
  "type": "lpa",
  "payload": {
    "code": 0,
    "message": "success",
    "data": []
  }
}

In the future I will first research the privileges and if they are generally mentioned in the GSMA specs and not after my experimentation. :grimacing:

Thanks for the quick answer!