laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/pysim/+/38048?usp=email )
Change subject: pySim.euicc: Add 'get_data sgp02_eid' in ADF.ECASD of M2M eUICC
......................................................................
pySim.euicc: Add 'get_data sgp02_eid' in ADF.ECASD of M2M eUICC
The M2M eUICC are completely different from the consumer/IoT eUICC.
Obtaining the EID works via GET DATA in the ECASD. Let's add support
for that.
Change-Id: I6cca6f75d268229244c90b3f1f88e26c89a2b4e0
---
M pySim/euicc.py
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/38048/1
diff --git a/pySim/euicc.py b/pySim/euicc.py
index 1ad0f22..c7b59d9 100644
--- a/pySim/euicc.py
+++ b/pySim/euicc.py
@@ -35,6 +35,13 @@
from pySim.commands import SimCardCommands
import pySim.global_platform
+# SGP.02 Section 2.2.2
+class Sgp02Eid(BER_TLV_IE, tag=0x5a):
+ _construct = BcdAdapter(GreedyBytes)
+
+# patch this into global_platform, to allow 'get_data sgp02_eid' in EF.ECASD
+pySim.global_platform.DataCollection.possible_nested.append(Sgp02Eid)
+
def compute_eid_checksum(eid) -> str:
"""Compute and add/replace check digits of an EID value according to
GSMA SGP.29 Section 10."""
if isinstance(eid, str):
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/38048?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6cca6f75d268229244c90b3f1f88e26c89a2b4e0
Gerrit-Change-Number: 38048
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>