From 013b3fccbb3025ea73a900c10e3c946006b4901d Mon Sep 17 00:00:00 2001 From: p1-bmu Date: Thu, 1 Apr 2021 16:37:39 +0200 Subject: [PATCH] corenet: enable a configurable SMS TI value --- pycrate_corenet/HdlrUESMS.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pycrate_corenet/HdlrUESMS.py b/pycrate_corenet/HdlrUESMS.py index 5ad2059..73a676c 100644 --- a/pycrate_corenet/HdlrUESMS.py +++ b/pycrate_corenet/HdlrUESMS.py @@ -49,7 +49,12 @@ class UESMSd(SigStack): # CP ack / err timer TC1star = 2 - + + # maximum Transaction Identifier value + # 0x7f correspond to using the extended TI structure + # otherwise set it to 0x06 to always use the basic TI structure + TI_MAX_VAL = 0x7f + def _log(self, logtype, msg): self.RAN._log(logtype, '[SMS] %s' % msg) @@ -142,12 +147,12 @@ class UESMSd(SigStack): while tid in self.Proc: tid += 1 step += 1 - if step == 0x7f: + if step == self.TI_MAX_VAL: # no TID available return None - if tid > 0x7f: + if tid > self.TI_MAX_VAL: tid = 0 - if tid == 0x7f: + if tid == self.TI_MAX_VAL: self._tid = 0 else: self._tid = 1 + tid