Change in pysim[master]: ts_31_102: Fix decoding of UServiceTable
laforge has submitted this change. ( 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(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved 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 <laforge@osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-MessageType: merged
participants (1)
-
laforge