I am trying to update ICCID of my SIM card to a different value but I get the following error
pySIM-shell (00:MF/EF.ICCID)# update_binary_decoded '{"iccid": "8986211000000689656"}'
EXCEPTION of type 'AttributeError' occurred with message: 'SwMatchError' object has no attribute 'add_note'
To enable full traceback, run the following command: 'set debug true'
pySIM-shell (00:MF/EF.ICCID)# set debug true
debug - was: False
now: True
pySIM-shell (00:MF/EF.ICCID)# update_binary_decoded '{"iccid": "8986211000000689656"}'
Traceback (most recent call last):
File "/home/sherle/pysim/pySim/commands.py", line 380, in update_binary
chunk_data, chunk_sw = self.send_apdu_checksw(pdu)
File "/home/sherle/pysim/pySim/commands.py", line 126, in send_apdu_checksw
return self._tp.send_apdu_checksw(pdu, sw)
File "/home/sherle/pysim/pySim/transport/__init__.py", line 244, in send_apdu_checksw
raise SwMatchError(rv[1], sw.lower(), self.sw_interpreter)
pySim.exceptions.SwMatchError: SW match failed! Expected 9000 and got 6982: Command not allowed - Security status not satisfied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sherle/.local/lib/python3.10/site-packages/cmd2/cmd2.py", line 2577, in onecmd_plus_hooks
stop = self.onecmd(statement, add_to_history=add_to_history)
File "/home/sherle/.local/lib/python3.10/site-packages/cmd2/cmd2.py", line 3066, in onecmd
stop = func(statement)
File "/home/sherle/.local/lib/python3.10/site-packages/cmd2/decorators.py", line 402, in cmd_wrapper
return func(*args_list, **kwargs) # type: ignore[call-arg]
File "/home/sherle/pysim/pySim/filesystem.py", line 653, in do_update_binary_decoded
(data, _sw) = self._cmd.lchan.update_binary_dec(data_json)
File "/home/sherle/pysim/pySim/runtime.py", line 530, in update_binary_dec
return self.update_binary(data_hex)
File "/home/sherle/pysim/pySim/runtime.py", line 520, in update_binary
return self.scc.update_binary(self.selected_file.fid, data_hex, offset, conserve=self.rs.conserve_write)
File "/home/sherle/pysim/pySim/commands.py", line 382, in update_binary
e.add_note('failed to write chunk (chunk_offset %d, chunk_len %d)' % (chunk_offset, chunk_len))
AttributeError: 'SwMatchError' object has no attribute 'add_note'
EXCEPTION of type 'AttributeError' occurred with message: 'SwMatchError' object has no attribute 'add_note'
Can anyone please let me know whether its possible to re-program ICCID on SysmocomSJA2 SIM card or not? If so, how?