pycrate icon indicating copy to clipboard operation
pycrate copied to clipboard

Decoding Range256 FreqListRange is not correct

Open jewalt opened this issue 3 years ago • 2 comments

When decoding the following GSM SIB2: 59061A8BE7D683080000000000000000000000FF010000

I get the following ARFCNs (975 is the original ARFCN): 975, 1023, 1148 and 1152

The correct networks should be: 975, 124 ,128, 975 and 1023

This is due to a missing mod 1024 for Range256 and Range128 networks.

I am pretty sure there is also a bug in Range512 in that the result should be N, not W(0) + N mod 1024. Since Range 512, 256, 128 and BitmapVar are all decoded in https://github.com/P1sec/pycrate/blob/26c1a0a6bd26f9b0ab8f22e6efc619cbda3642b3/pycrate_mobile/TS44018_IE.py#L304

Correct?

jewalt avatar Nov 25 '21 00:11 jewalt

Thanks for your submission. I never checked those encodings too deeply, so you may be correct. Could you eventually provide some SIB buffers with various ARFCN range encodings, so that after patching, I can integrate specific tests ?

p1-bmu avatar Nov 29 '21 08:11 p1-bmu

I will do my best, but I'm not sure I can generate useful (and accurate) data for all ranges. I know I can generate 256 as that is the default in the tools I am using, but I will check and see if I can manipulate that to use the other ranges.

jewalt avatar Nov 29 '21 16:11 jewalt