diff --git a/pySim/ts_51_011.py b/pySim/ts_51_011.py index 0161f7d2..d37715f8 100644 --- a/pySim/ts_51_011.py +++ b/pySim/ts_51_011.py @@ -249,7 +249,7 @@ class EF_SMSP(LinFixedEF): "call_number": "" }, "tp_sc_addr": { "length": 8, "ton_npi": { "ext": True, "type_of_number": "international", "numbering_plan_id": "isdn_e164" }, - "call_number": "4915790109999f" }, + "call_number": "4915790109999" }, "tp_pid": b"\x00", "tp_dcs": b"\x00", "tp_vp_minutes": 4320 } ), ( '454e6574776f726b73fffffffffffffff1ffffffffffffffffffffffffffffffffffffffffffffffff0000a7', { "alpha_id": "ENetworks", "parameter_indicators": { "tp_dest_addr": False, "tp_sc_addr": True, @@ -298,7 +298,7 @@ class EF_SMSP(LinFixedEF): def __init__(self, fid='6f42', sfid=None, name='EF.SMSP', desc='Short message service parameters', **kwargs): super().__init__(fid, sfid=sfid, name=name, desc=desc, rec_len=(28, None), **kwargs) ScAddr = Struct('length'/Rebuild(Int8ub, lambda ctx: EF_SMSP.sc_addr_len(ctx)), - 'ton_npi'/TonNpi, 'call_number'/BcdAdapter(Rpad(Bytes(10)))) + 'ton_npi'/TonNpi, 'call_number'/PaddedBcdAdapter(Rpad(Bytes(10)))) self._construct = Struct('alpha_id'/COptional(GsmOrUcs2Adapter(Rpad(Bytes(this._.total_len-28)))), 'parameter_indicators'/InvertAdapter(BitStruct( Const(7, BitsInteger(3)), diff --git a/requirements.txt b/requirements.txt index 056d9129..2ffd9998 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ cmd2>=2.6.2,<3.0 jsonpath-ng construct>=2.10.70 bidict -pyosmocom>=0.0.9 +pyosmocom>=0.0.12 pyyaml>=5.1 termcolor colorlog diff --git a/setup.py b/setup.py index 1b78274f..3942df19 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ setup( "jsonpath-ng", "construct >= 2.10.70", "bidict", - "pyosmocom >= 0.0.9", + "pyosmocom >= 0.0.12", "pyyaml >= 5.1", "termcolor", "colorlog", diff --git a/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok b/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok index 49b28bdd..c9652503 100644 --- a/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok +++ b/tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok @@ -143,7 +143,7 @@ CardReset(3b9f96801f878031e073fe211b674a4c753034054ba9) =============================== 00 SEARCH RECORD MF/ADF.USIM/EF.SMSP 01 9000 {"cmd": {"file": "currently_selected_ef", "mode": "forward_search", "record_number": 1, "search_string": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}, "rsp": {"body": [2], "sw": "9000"}} =============================== -00 READ RECORD MF/ADF.USIM/EF.SMSP 01 9000 {"alpha_id": "", "parameter_indicators": {"tp_vp": true, "tp_dcs": true, "tp_pid": true, "tp_sc_addr": true, "tp_dest_addr": false}, "tp_dest_addr": {"length": 255, "ton_npi": {"ext": true, "type_of_number": "reserved_for_extension", "numbering_plan_id": "reserved_for_extension"}, "call_number": ""}, "tp_sc_addr": {"length": 5, "ton_npi": {"ext": true, "type_of_number": "unknown", "numbering_plan_id": "isdn_e164"}, "call_number": "0015555f"}, "tp_pid": "00", "tp_dcs": "00", "tp_vp_minutes": 5} +00 READ RECORD MF/ADF.USIM/EF.SMSP 01 9000 {"alpha_id": "", "parameter_indicators": {"tp_vp": true, "tp_dcs": true, "tp_pid": true, "tp_sc_addr": true, "tp_dest_addr": false}, "tp_dest_addr": {"length": 255, "ton_npi": {"ext": true, "type_of_number": "reserved_for_extension", "numbering_plan_id": "reserved_for_extension"}, "call_number": ""}, "tp_sc_addr": {"length": 5, "ton_npi": {"ext": true, "type_of_number": "unknown", "numbering_plan_id": "isdn_e164"}, "call_number": "0015555"}, "tp_pid": "00", "tp_dcs": "00", "tp_vp_minutes": 5} =============================== 00 SEARCH RECORD MF/ADF.USIM/EF.SMS 01 9000 {"cmd": {"file": "currently_selected_ef", "mode": "forward_search", "record_number": 1, "search_string": "00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}, "rsp": {"body": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], "sw": "9000"}} ===============================