This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/24004 ) Change subject: ts_51_011, utils: fix Access Technology Identifier coding ...................................................................... ts_51_011, utils: fix Access Technology Identifier coding When the Access Technology Identifier encoder sets the bits for E-UTRAN it does not respect that bit "100" is also a valid bit combination that encodes E-UTRAN WB-S1 and E-UTRAN NB-S1. Lets encode this bit combination if the user is just specifying "E-UTRAN" without further spefication of WB or NB. The decoder only looks at bit 14 and decodes "1xx" always to "E-UTRAN". This is not specific enough. Lets make sure that the decoder is complementary to the encoder. Change-Id: Ibfe8883a05f9ad6988d8e212cb9a598229954296 Related: OS#4963 --- M pySim/ts_51_011.py M pySim/utils.py M tests/test_utils.py 3 files changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/04/24004/1 diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 14be6dc..1675aaf 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -704,6 +704,8 @@ if 'cdma2000 1xRTT' in in_list: u16 |= 0x0010 # E-UTRAN + if 'E-UTRAN' in in_list: + u16 |= 0x4000 if 'E-UTRAN WB-S1' in in_list: u16 |= 0x6000 if 'E-UTRAN NB-S1' in in_list: diff --git a/pySim/utils.py b/pySim/utils.py index 00cbb5d..78058fc 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -230,7 +230,20 @@ sel = [] for a in act_list: if u16t & (1 << a['bit']): - sel.append(a['name']) + if a['name'] == "E-UTRAN": + # The Access technology identifier of E-UTRAN + # allows a more detailed specification: + if u16t & (1 << 13) and u16t & (1 << 12): + sel.append("E-UTRAN WB-S1") + sel.append("E-UTRAN NB-S1") + elif u16t & (1 << 13): + sel.append("E-UTRAN WB-S1") + elif u16t & (1 << 12): + sel.append("E-UTRAN NB-S1") + else: + sel.append("E-UTRAN") + else: + sel.append(a['name']) return sel def dec_xplmn_w_act(fivehexbytes:Hexstr) -> Dict[str,Any]: diff --git a/tests/test_utils.py b/tests/test_utils.py index 558b5e7..0fb502c 100755 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -93,7 +93,7 @@ self.assertEqual(utils.dec_act("0010"), ["cdma2000 1xRTT"]) def testDecAct_allSet(self): - self.assertEqual(utils.dec_act("ffff"), ["UTRAN", "E-UTRAN", "GSM", "GSM COMPACT", "cdma2000 HRPD", "cdma2000 1xRTT"]) + self.assertEqual(utils.dec_act("ffff"), ["UTRAN", "E-UTRAN WB-S1", "E-UTRAN NB-S1", "GSM", "GSM COMPACT", "cdma2000 HRPD", "cdma2000 1xRTT"]) def testDecxPlmn_w_act(self): expected = {'mcc': '295', 'mnc': '10', 'act': ["UTRAN"]} -- To view, visit https://gerrit.osmocom.org/c/pysim/+/24004 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ibfe8883a05f9ad6988d8e212cb9a598229954296 Gerrit-Change-Number: 24004 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210430/c7a343dc/attachment.htm>