laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/27332 )


Change subject: ts_31_102: Fix decoding of UServiceTable
......................................................................

ts_31_102: Fix decoding of UServiceTable

range(0,7) in python is 0..6, and not 0..7, so we need range(0.8)
to produce the desired range covering all bits of a byte.

This resulted in services 8,16,24,... not being displayed in
the decoded output of EF.UST / EF.IST.

Change-Id: I22bbc481de342685352bf5b13d54931d3f37f9b7
---
M pySim/ts_31_102.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/27332/1

diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index c6bfa2d..3298534 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -554,7 +554,7 @@
         ret = {}
         for i in range(0, len(in_bin)):
             byte = in_bin[i]
-            for bitno in range(0, 7):
+            for bitno in range(0, 8):
                 service_nr = i * 8 + bitno + 1
                 ret[service_nr] = {
                     'activated': True if byte & (1 << bitno) else False

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/27332
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I22bbc481de342685352bf5b13d54931d3f37f9b7
Gerrit-Change-Number: 27332
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>
Gerrit-MessageType: newchange

Reply via email to