From cc3f99b4726c1aed56659ee45105b7574415f589 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 17 Apr 2026 16:23:34 +0200 Subject: [PATCH] personalization: EF_SMSP: keep same length as found in template Change-Id: Id24752101ae82c4986209f4103cc9cbdcce8ce1d --- pySim/esim/saip/personalization.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pySim/esim/saip/personalization.py b/pySim/esim/saip/personalization.py index f5efd2a0..71c9108d 100644 --- a/pySim/esim/saip/personalization.py +++ b/pySim/esim/saip/personalization.py @@ -633,13 +633,14 @@ class SmspTpScAddr(ConfigurableParameter): # - To generate the right amount of fillFileContent, pass total_len=42 to encode_record_bin(). # - To show the right size in the PES, set f_smsp.rec_len = 42 ef_smsp_dec['alpha_id'] = '' - f_smsp.rec_len = 42 + + # we can set this to choose a fixed length: + #f_smsp.rec_len = 42 + # but leave rec_len unchanged to keep the same length as was found in the eSIM template. # re-encode into the File body. - # - #print("SMSP (new): %s" % f_smsp.body) - # re-generate the pe.decoded member from the File instance f_smsp.body = ef_smsp.encode_record_bin(ef_smsp_dec, 1, total_len=f_smsp.rec_len) + # re-generate the pe.decoded member from the File instance pe.file2pe(f_smsp) @classmethod