[S] Change in pysim[master]: Decode GSM 7-bit packed EF.PNN data
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41913?usp=email ) Change subject: Decode GSM 7-bit packed EF.PNN data ...................................................................... Decode GSM 7-bit packed EF.PNN data Use the NetworkNameAdapter from pyosmocom to decode the Network Name IEs (TS 24.008 Section 10.5.3.5a) in EF.PNN records, instead of exposing the raw bytes. Depends: pyosmocom.git Change-Id I4661352e39031dc0041fc7851f675d6083a1035f Change-Id: I4558fd011592aeeae2389fe8a1f62f3d7e21d219 Closes: OS#6930 --- M pySim/ts_51_011.py M requirements.txt M setup.py 3 files changed, 13 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index af7a433..1855a13 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -947,17 +947,22 @@ # TS 51.011 Section 4.2.58 class EF_PNN(LinFixedEF): - # TODO: 430a82d432bbbc7eb75de432450a82d432bbbc7eb75de432ffffffff - # TODO: 430a82c596b34cbfbfe5eb39ffffffffffffffffffffffffffffffffffff + _test_de_encode = [ + ('430a82d432bbbc7eb75de432450a82d432bbbc7eb75de432', + [{'full_name_for_network': 'Telekom.de'}, {'short_name_for_network': 'Telekom.de'}]), + ('430a82c596b34cbfbfe5eb39', + [{'full_name_for_network': 'E-Networks'}]), + ('430584c330bc0c', + [{'full_name_for_network': 'Cape'}]), + ] + class FullNameForNetwork(BER_TLV_IE, tag=0x43): # TS 24.008 10.5.3.5a - # TODO: proper decode - _construct = GreedyBytes + _construct = NetworkNameAdapter(GreedyBytes) class ShortNameForNetwork(BER_TLV_IE, tag=0x45): # TS 24.008 10.5.3.5a - # TODO: proper decode - _construct = GreedyBytes + _construct = NetworkNameAdapter(GreedyBytes) class NetworkNameCollection(TLV_IE_Collection, nested=[FullNameForNetwork, ShortNameForNetwork]): pass diff --git a/requirements.txt b/requirements.txt index 947ccff..a50f701 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ jsonpath-ng construct>=2.10.70 bidict -pyosmocom>=0.0.12 +pyosmocom>=0.0.13 pyyaml>=5.4 termcolor colorlog diff --git a/setup.py b/setup.py index 31f839b..32f1a55 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ "jsonpath-ng", "construct >= 2.10.70", "bidict", - "pyosmocom >= 0.0.12", + "pyosmocom >= 0.0.13", "pyyaml >= 5.4", "termcolor", "colorlog", -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41913?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4558fd011592aeeae2389fe8a1f62f3d7e21d219 Gerrit-Change-Number: 41913 Gerrit-PatchSet: 5 Gerrit-Owner: biocape <biofel@cape.co> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org>
participants (1)
-
laforge