Project

General

Profile

Support #2319

Writing the EF_AD

Added by a.roggeri 20 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
06/07/2017
Due date:
% Done:

0%

Spec Reference:

Description

I would like to know how to write the EF_AD file.

Reading works fine, but writing fails with Access Condition error (Code below)

from pySim.commands import SimCardCommands
from pySim.transport.pcsc import PcscSimLink
transport = PcscSimLink()
transport.wait_for_card()

cmd = SimCardCommands(transport)
print(cmd.read_binary(['3f00', '7f20', '6fad'])) # ('80000102', '9000')
print(cmd.verify_chv(0xa, '77777777')) # ('', '9000') Should be authenticated from here.
print(cmd.update_binary(['3f00', '7f20', '6fad'], '80000103')) # RuntimeError: SW match failed ! Expected 9000 and got 9804.

I was expecting the code above to work.

Is there any example for writing the AD file ?

Also available in: Atom PDF