laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/28631 )
Change subject: minimalistic support for DF.MULTIMEDIA ......................................................................
minimalistic support for DF.MULTIMEDIA
No decode of the payload of the files yet, but let's at least name them.
Change-Id: I2d9c56bdea08fe6629978b6a1f7c139f487d075a --- M pySim/ts_31_102_telecom.py M pySim/ts_51_011.py 2 files changed, 25 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/31/28631/1
diff --git a/pySim/ts_31_102_telecom.py b/pySim/ts_31_102_telecom.py index 49f6868..5f695ed 100644 --- a/pySim/ts_31_102_telecom.py +++ b/pySim/ts_31_102_telecom.py @@ -5,7 +5,7 @@ # pylint: disable=undefined-variable
""" -DF_PHONEBOOK as specified in 3GPP TS 31.102 V16.6.0 +DF_PHONEBOOK, DF_MULTIMEDIA as specified in 3GPP TS 31.102 V16.6.0 Needs to be a separate python module to avoid cyclic imports """
@@ -69,3 +69,24 @@ # FIXME: Those 4Fxx entries with unspecified FID... ] self.add_files(files) + + + +# TS 31.102 Section 4.6.3.1 +class EF_MML(BerTlvEF): + def __init__(self, fid='4F47', name='EF.MML', desc='Multimedia Messages List', **kwargs): + super().__init__(fid, name=name, desc=desc, **kwargs) + +# TS 31.102 Section 4.6.3.2 +class EF_MMDF(BerTlvEF): + def __init__(self, fid='4F48', name='EF.MMDF', desc='Multimedia Messages Data File', **kwargs): + super().__init__(fid, name=name, desc=desc, **kwargs) + +class DF_MULTIMEDIA(CardDF): + def __init__(self, fid='5F3B', name='DF.MULTIMEDIA', desc='Multimedia', **kwargs): + super().__init__(fid=fid, name=name, desc=desc, **kwargs) + files = [ + EF_MML(), + EF_MMDF(), + ] + self.add_files(files) diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 21fd54b..b2a9ca4 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -32,7 +32,7 @@ from pySim.profile import match_sim from pySim.profile import CardProfile from pySim.filesystem import * -from pySim.ts_31_102_telecom import DF_PHONEBOOK +from pySim.ts_31_102_telecom import DF_PHONEBOOK, DF_MULTIMEDIA import enum from pySim.construct import * from construct import Optional as COptional @@ -500,6 +500,8 @@ EF_CMI(), # not really part of 51.011 but something that TS 31.102 specifies may exist here. DF_PHONEBOOK(), + # not really part of 51.011 but something that TS 31.102 specifies may exist here. + DF_MULTIMEDIA(), ] self.add_files(files)