Project

General

Profile

Support #2319

Writing the EF_AD

Added by a.roggeri 5 months ago. Updated 2 months ago.

Status:
Rejected
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 ?

History

#1 Updated by laforge 3 months ago

  • Status changed from New to Feedback
  • Assignee set to a.roggeri

this appears to be more likely an issue with your card, not with pySim? which card are you using? maybe the ADM PIN you used for authentication doesn't have permission to write to EF.AD? How is the access control for EF.AD provisioned on that card?

#2 Updated by laforge 2 months ago

  • Status changed from Feedback to Rejected

no feedback from reporter.

Also available in: Atom PDF