diff options
author | Harald Welte <laforge@osmocom.org> | 2022-02-25 15:25:52 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-02-25 15:44:26 +0100 |
commit | 1459e45005baa69874f05fb63556ef8022c1ca37 (patch) | |
tree | c0ed9ab7eb722957daecc74c05c794d74d0fa3ad | |
parent | 22a1cdde25f0d70cff35ca1c319e1e212f33efe3 (diff) |
ts_51_011: Better decode of EF_OPL LAI
before:
{
"lai": "62f2300000fffe",
"pnn_record_id": 1
}
after:
{
"lai": {
"mcc_mnc": "262f03",
"lac_min": "0000",
"lac_max": "fffe"
},
"pnn_record_id": 1
}
Change-Id: I82581220e9c33a8e67cbefd5dfeb40bbc2c31179
-rw-r--r-- | pySim/ts_51_011.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 9a6aff9..209a273 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -889,7 +889,7 @@ class EF_PNN(LinFixedEF): class EF_OPL(LinFixedEF): def __init__(self, fid='6fc6', sfid=None, name='EF.OPL', rec_len={8, 8}, desc='Operator PLMN List', **kwargs): super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=rec_len, **kwargs) - self._construct = Struct('lai'/Bytes(7), 'pnn_record_id'/Int8ub) + self._construct = Struct('lai'/Struct('mcc_mnc'/BcdAdapter(Bytes(3)), 'lac_min'/Bytes(2), 'lac_max'/Bytes(2)), 'pnn_record_id'/Int8ub) # TS 51.011 Section 10.3.44 + TS 31.102 4.2.62 class EF_MBI(LinFixedEF): |