blob: dc48f84a8d37ed2a096c564f2590512df98f7645 [file] [log] [blame]
Harald Weltec8a0b932012-08-24 21:27:26 +02001Test `CSD 9600/V.110/transparent' passed
2Test `Speech, all codecs' passed
Vadim Yanitskiy95fc8ea2022-07-03 05:41:02 +07003Test `Speech, without octet 3a' failed
Holger Hans Peter Freythercd252e32013-07-03 09:56:53 +02004Simple TMSI encoding test....passed
Maxd55d7d42018-02-15 11:27:18 +01005Simple IMSI encoding test....passed: [10] 17 08 99 10 07 00 00 00 64 02
Neels Hofmeyr49686282018-12-05 21:32:21 +01006
7Testing Mobile Identity conversions
8- IMSI 123456789012345
9 -> MI-TLV-hex='17081932547698103254'
10 -> MI-str="123456789012345" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010011 -> MI-name="IMSI-123456789012345"
Neels Hofmeyr49686282018-12-05 21:32:21 +010012- IMSI 12345678901234
13 -> MI-TLV-hex='170811325476981032f4'
14 -> MI-str="12345678901234" rc=15
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010015 -> MI-name="IMSI-12345678901234"
Neels Hofmeyr49686282018-12-05 21:32:21 +010016- IMSI 423423
17 -> MI-TLV-hex='1704413224f3'
18 -> MI-str="423423" rc=7
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010019 -> MI-name="IMSI-423423"
Neels Hofmeyr49686282018-12-05 21:32:21 +010020- unknown 0x9 423423
Harald Weltea13fb752020-06-16 08:44:42 +020021 -> MI-TLV-hex='1704413224f3'
22 -> MI-str="423423" rc=7
23 -> MI-name="IMSI-423423"
Neels Hofmeyr49686282018-12-05 21:32:21 +010024- IMSI 4234235
25 -> MI-TLV-hex='170449322453'
26 -> MI-str="4234235" rc=8
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010027 -> MI-name="IMSI-4234235"
Neels Hofmeyr49686282018-12-05 21:32:21 +010028- IMSI 4234235
29 -> MI-TLV-hex='170449322453'
Neels Hofmeyr627e0112018-12-05 21:32:40 +010030 -> MI-str="423" rc=4
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010031 -> MI-name="IMSI-4234235"
Neels Hofmeyr49686282018-12-05 21:32:21 +010032- IMEI 123456789012345
33 -> MI-TLV-hex='17081a32547698103254'
34 -> MI-str="123456789012345" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010035 -> MI-name="IMEI-123456789012345"
Neels Hofmeyr49686282018-12-05 21:32:21 +010036- IMEI 98765432109876
37 -> MI-TLV-hex='170892785634129078f6'
38 -> MI-str="98765432109876" rc=15
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010039 -> MI-name="IMEI-98765432109876"
Neels Hofmeyr49686282018-12-05 21:32:21 +010040- IMEI 987654321098765
41 -> MI-TLV-hex='17089a78563412907856'
42 -> MI-str="987654321098765" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010043 -> MI-name="IMEI-987654321098765"
Harald Welte13177712019-01-20 13:41:26 +010044- IMEI-SV 9876543210987654
45 -> MI-TLV-hex='17099378563412907856f4'
46 -> MI-str="9876543210987654" rc=17
47 -> MI-name="IMEI-SV-9876543210987654"
48- IMEI-SV 9876543210987654
49 -> MI-TLV-hex='17099378563412907856f4'
50 -> MI-str="9876543210987654" rc=17
51 -> MI-name="IMEI-SV-9876543210987654"
Neels Hofmeyr49686282018-12-05 21:32:21 +010052- TMSI 305419896
53 -> MI-TLV-hex='1705f412345678'
54 -> MI-str="305419896" rc=9
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010055 -> MI-name="TMSI-0x12345678"
Neels Hofmeyr49686282018-12-05 21:32:21 +010056- TMSI 12648430
57 -> MI-TLV-hex='1705f400c0ffee'
58 -> MI-str="12648430" rc=8
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010059 -> MI-name="TMSI-0x00C0FFEE"
Neels Hofmeyr49686282018-12-05 21:32:21 +010060- TMSI 0
61 -> MI-TLV-hex='1705f400000000'
62 -> MI-str="0" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010063 -> MI-name="TMSI-0x00000000"
Neels Hofmeyr49686282018-12-05 21:32:21 +010064- TMSI 305419896
65 -> MI-TLV-hex='1705f412345678'
66 -> MI-str="3054" rc=9
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010067 -> MI-name="TMSI-0x12345678"
Neels Hofmeyr49686282018-12-05 21:32:21 +010068- NONE 123
Harald Weltea13fb752020-06-16 08:44:42 +020069 -> MI-TLV-hex='17021832'
Neels Hofmeyr49686282018-12-05 21:32:21 +010070 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010071 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010072- NONE 1234
Harald Weltea13fb752020-06-16 08:44:42 +020073 -> MI-TLV-hex='17031032f4'
Neels Hofmeyr49686282018-12-05 21:32:21 +010074 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010075 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010076- unknown 0x8 1234
Harald Weltea13fb752020-06-16 08:44:42 +020077 -> MI-TLV-hex='17031032f4'
Neels Hofmeyr49686282018-12-05 21:32:21 +010078 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010079 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010080
81Decoding zero length Mobile Identities
82- MI type: IMSI
83 - writing to zero-length string:
Neels Hofmeyr627e0112018-12-05 21:32:40 +010084 rc=0
85 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +010086 - writing to 1-byte-length string:
87 rc=1
Neels Hofmeyr627e0112018-12-05 21:32:40 +010088 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +010089 - decode zero-length mi:
Neels Hofmeyr627e0112018-12-05 21:32:40 +010090 rc=1
91 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +010092- MI type: TMSI
93 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +010094 rc=0
95 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +010096 - writing to 1-byte-length string:
97 rc=1
98 returned empty string
99 - decode zero-length mi:
100 rc=1
101 returned empty string
102- MI type: NONE
103 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100104 rc=0
105 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100106 - writing to 1-byte-length string:
107 rc=1
108 returned empty string
109 - decode zero-length mi:
110 rc=1
111 returned empty string
112- MI type: IMSI | GSM_MI_ODD
113 - writing to zero-length string:
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100114 rc=0
115 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100116 - writing to 1-byte-length string:
117 rc=1
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100118 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +0100119 - decode zero-length mi:
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100120 rc=1
121 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +0100122- MI type: TMSI | GSM_MI_ODD
123 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100124 rc=0
125 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100126 - writing to 1-byte-length string:
127 rc=1
128 returned empty string
129 - decode zero-length mi:
130 rc=1
131 returned empty string
132- MI type: NONE | GSM_MI_ODD
133 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100134 rc=0
135 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100136 - writing to 1-byte-length string:
137 rc=1
138 returned empty string
139 - decode zero-length mi:
140 rc=1
141 returned empty string
142
Neels Hofmeyr83025bf2020-05-26 02:45:23 +0200143test_struct_mobile_identity()
Neels Hofmeyra7f97b92022-08-23 18:35:40 +0200144LU with IMSI 901700000004620: rc == 0, mi = IMSI-901700000004620 ok
145LU with TMSI 0x0980ad8a: rc == 0, mi = TMSI-0x0980AD8A ok
146LU with invalid MI type: rc != 0 ok
147LU with truncated IMSI MI: rc != 0 ok
148LU with too short IMSI MI (12345): rc != 0 ok
149LU with just long enough IMSI MI 123456: rc == 0, mi = IMSI-123456 ok
150LU with max length IMSI MI 123456789012345: rc == 0, mi = IMSI-123456789012345 ok
151LU with just too long IMSI MI 1234567890123456: rc != 0 ok
152LU with truncated TMSI MI: rc != 0 ok
153LU with odd length TMSI: rc != 0 ok
154LU with too long TMSI MI: rc != 0 ok
155LU with too short TMSI: rc != 0 ok
156CM Service Request with IMSI 123456: rc == 0, mi = IMSI-123456 ok
157CM Service Request with TMSI 0x5a42e404: rc == 0, mi = TMSI-0x5A42E404 ok
158CM Service Request with shorter CM2, with IMSI 123456: rc == 0, mi = IMSI-123456 ok
159CM Service Request with longer CM2, with IMSI 123456: rc == 0, mi = IMSI-123456 ok
160CM Service Request with shorter CM2, with TMSI 0x00000000: rc == 0, mi = TMSI-0x00000000 ok
161CM Service Request with invalid MI type: rc != 0 ok
162CM Service Request with truncated IMSI MI: rc != 0 ok
163CM Service Request with truncated TMSI MI: rc != 0 ok
164CM Service Request with odd length TMSI: rc != 0 ok
165CM Service Request with too long TMSI MI: rc != 0 ok
166CM Service Request with too short TMSI: rc != 0 ok
167CM Service Reestablish Request with TMSI 0x5a42e404: rc == 0, mi = TMSI-0x5A42E404 ok
168Paging Response with IMSI 1234567: rc == 0, mi = IMSI-1234567 ok
169Paging Response with TMSI 0xb48883de: rc == 0, mi = TMSI-0xB48883DE ok
170Paging Response with TMSI, with unused nibble not 0xf: rc != 0 ok
171Paging Response with too short IMEI (1234567): rc != 0 ok
172Paging Response with IMEI 123456789012345: rc == 0, mi = IMEI-123456789012345 ok
173Paging Response with IMEI 12345678901234 (no Luhn checksum): rc == 0, mi = IMEI-12345678901234 ok
174Paging Response with IMEISV 1234567890123456: rc == 0, mi = IMEI-SV-1234567890123456 ok
175Paging Response with too short IMEISV 123456789012345: rc != 0 ok
176Paging Response with too long IMEISV 12345678901234567: rc != 0 ok
177Paging Response with IMSI 123456789012345 and flipped ODD bit: rc != 0 ok
178IMSI-Detach with IMSI 901700000004620: rc == 0, mi = IMSI-901700000004620 ok
179IMSI-Detach with TMSI 0x0980ad8a: rc == 0, mi = TMSI-0x0980AD8A ok
180IMSI-Detach with invalid MI type: rc != 0 ok
181IMSI-Detach with truncated IMSI MI: rc != 0 ok
182IMSI-Detach with too short IMSI MI (12345): rc != 0 ok
183IMSI-Detach with just long enough IMSI MI 123456: rc == 0, mi = IMSI-123456 ok
184IMSI-Detach with max length IMSI MI 123456789012345: rc == 0, mi = IMSI-123456789012345 ok
185IMSI-Detach with just too long IMSI MI 1234567890123456: rc != 0 ok
186IMSI-Detach with truncated TMSI MI: rc != 0 ok
187IMSI-Detach with odd length TMSI: rc != 0 ok
188IMSI-Detach with too long TMSI MI: rc != 0 ok
189IMSI-Detach with too short TMSI: rc != 0 ok
190Identity Response with IMSI 901700000004620: rc == 0, mi = IMSI-901700000004620 ok
191Identity Response with IMEI 123456789012345: rc == 0, mi = IMEI-123456789012345 ok
192Identity Response with IMEISV 9876543210987654: rc == 0, mi = IMEI-SV-9876543210987654 ok
Neels Hofmeyr83025bf2020-05-26 02:45:23 +0200193
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700194BSD number encoding / decoding test
195- Running test: regular 9-digit MSISDN
196 - Encoding ASCII (buffer limit=0) '123456789'...
197 - Expected: (rc=6) '0521436587f9'
198 - Actual: (rc=6) '0521436587f9'
199 - Decoding HEX (buffer limit=0) '0521436587f9'...
200 - Expected: (rc=0) '123456789'
201 - Actual: (rc=0) '123456789'
202- Running test: regular 6-digit MSISDN with optional header (LHV)
203 - Encoding ASCII (buffer limit=0) '123456'...
Vadim Yanitskiy1dc82642019-05-27 00:53:54 +0700204 - Expected: (rc=8) '07ffffffff214365'
205 - Actual: (rc=8) '07ffffffff214365'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700206 - Decoding HEX (buffer limit=0) '07deadbeef214365'...
207 - Expected: (rc=0) '123456'
208 - Actual: (rc=0) '123456'
209- Running test: long 15-digit (maximum) MSISDN
210 - Encoding ASCII (buffer limit=0) '123456789012345'...
211 - Expected: (rc=9) '0821436587092143f5'
212 - Actual: (rc=9) '0821436587092143f5'
213 - Decoding HEX (buffer limit=0) '0821436587092143f5'...
214 - Expected: (rc=0) '123456789012345'
215 - Actual: (rc=0) '123456789012345'
216- Running test: long 15-digit (maximum) MSISDN, limited buffer
217 - Encoding ASCII (buffer limit=9) '123456789012345'...
218 - Expected: (rc=9) '0821436587092143f5'
219 - Actual: (rc=9) '0821436587092143f5'
220 - Decoding HEX (buffer limit=16) '0821436587092143f5'...
221 - Expected: (rc=0) '123456789012345'
Vadim Yanitskiy2cd1dda2019-05-26 00:14:16 +0700222 - Actual: (rc=0) '123456789012345'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700223- Running test: to be truncated 20-digit MSISDN
224 - Encoding ASCII (buffer limit=9) '12345678901234567890'...
225 - Expected: (rc=-5) ''
226 - Actual: (rc=-5) ''
227 - Decoding HEX (buffer limit=16) '0a21436587092143658709'...
Vadim Yanitskiy71940872019-05-26 00:49:57 +0700228 - Expected: (rc=-28) '123456789012345'
229 - Actual: (rc=-28) '123456789012345'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700230- Running test: LV incorrect length
231 - Decoding HEX (buffer limit=0) '05214365'...
Vadim Yanitskiye4799f52019-05-26 00:55:20 +0700232 - Expected: (rc=-22) '(none)'
233 - Actual: (rc=-22) '(none)'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700234- Running test: empty input buffer
235 - Encoding ASCII (buffer limit=0) ''...
236 - Expected: (rc=1) '00'
237 - Actual: (rc=1) '00'
238 - Decoding HEX (buffer limit=0) ''...
239 - Expected: (rc=-5) '(none)'
240 - Actual: (rc=-5) '(none)'
Oliver Smith186f8782019-06-06 16:11:32 +0200241- Running test: decoding buffer is one byte too small (OS#4049)
242 - Decoding HEX (buffer limit=4) '022143'...
243 - Expected: (rc=-28) '123'
244 - Actual: (rc=-28) '123'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700245
Maxf1ad60e2018-01-05 14:19:33 +0100246Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100247077-121-666-5
248MCC+MNC in BCD: 70 17 21
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100249077-121-666-5 (3-digit MNC)
Max99377c22017-08-30 19:17:50 +0200250RA test...passed
Maxf1ad60e2018-01-05 14:19:33 +0100251Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100252084-98-11-89
253MCC+MNC in BCD: 80 f4 89
254084-98-11-89
Max99377c22017-08-30 19:17:50 +0200255RA test...passed
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100256Constructed RA:
257000-00-0-0
258MCC+MNC in BCD: 00 f0 00
259000-00-0-0
260RA test...passed
261Constructed RA:
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100262000-000-0-0 (3-digit MNC)
263MCC+MNC in BCD: 00 00 00
264000-000-0-0 (3-digit MNC)
265RA test...passed
266Constructed RA:
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100267999-999-65535-255
268MCC+MNC in BCD: 99 99 99
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100269999-999-65535-255 (3-digit MNC)
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100270RA test...passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100271Constructed RA:
272001-02-23-42
273MCC+MNC in BCD: 00 f1 20
274001-02-23-42
275RA test...passed
276Constructed RA:
277001-002-23-42 (3-digit MNC)
278MCC+MNC in BCD: 00 21 00
279001-002-23-42 (3-digit MNC)
280RA test...passed
281Constructed RA:
282012-34-56-78
283MCC+MNC in BCD: 10 f2 43
284012-34-56-78
285RA test...passed
286Constructed RA:
287012-034-23-42 (3-digit MNC)
288MCC+MNC in BCD: 10 42 30
289012-034-23-42 (3-digit MNC)
290RA test...passed
291Constructed RA:
292123-456-23-42
293MCC+MNC in BCD: 21 63 54
294123-456-23-42 (3-digit MNC)
295RA test...passed
296Constructed RA:
297123-456-23-42 (3-digit MNC)
298MCC+MNC in BCD: 21 63 54
299123-456-23-42 (3-digit MNC)
300RA test...passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100301- gsm48_generate_lai() from 077-121-666-0
302 Encoded 70 17 21 02 9a
303 gsm48_decode_lai() gives 077-121-666-0
304 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100305- gsm48_generate_lai2() from 077-121-666
306 Encoded 70 17 21 02 9a
307 gsm48_decode_lai2() gives 077-121-666 (3-digit MNC)
308 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100309- gsm48_generate_lai() from 084-98-11-0
310 Encoded 80 f4 89 00 0b
311 gsm48_decode_lai() gives 084-98-11-0
312 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100313- gsm48_generate_lai2() from 084-98-11
314 Encoded 80 f4 89 00 0b
315 gsm48_decode_lai2() gives 084-98-11
316 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100317- gsm48_generate_lai() from 000-00-0-0
318 Encoded 00 f0 00 00 00
319 gsm48_decode_lai() gives 000-00-0-0
320 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100321- gsm48_generate_lai2() from 000-00-0
322 Encoded 00 f0 00 00 00
323 gsm48_decode_lai2() gives 000-00-0
324 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100325- gsm48_generate_lai() from 000-000-0-0 (3-digit MNC)
326 Encoded 00 f0 00 00 00
327 gsm48_decode_lai() gives 000-00-0-0
328 passed
329- gsm48_generate_lai2() from 000-000-0 (3-digit MNC)
330 Encoded 00 00 00 00 00
331 gsm48_decode_lai2() gives 000-000-0 (3-digit MNC)
332 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100333- gsm48_generate_lai() from 999-999-65535-0
334 Encoded 99 99 99 ff ff
335 gsm48_decode_lai() gives 999-999-65535-0
336 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100337- gsm48_generate_lai2() from 999-999-65535
338 Encoded 99 99 99 ff ff
339 gsm48_decode_lai2() gives 999-999-65535 (3-digit MNC)
340 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100341- gsm48_generate_lai() from 001-02-23-0
342 Encoded 00 f1 20 00 17
343 gsm48_decode_lai() gives 001-02-23-0
344 passed
345- gsm48_generate_lai2() from 001-02-23
346 Encoded 00 f1 20 00 17
347 gsm48_decode_lai2() gives 001-02-23
348 passed
349- gsm48_generate_lai() from 001-002-23-0 (3-digit MNC)
350 Encoded 00 f1 20 00 17
351 gsm48_decode_lai() gives 001-02-23-0
352 passed
353- gsm48_generate_lai2() from 001-002-23 (3-digit MNC)
354 Encoded 00 21 00 00 17
355 gsm48_decode_lai2() gives 001-002-23 (3-digit MNC)
356 passed
357- gsm48_generate_lai() from 012-34-56-0
358 Encoded 10 f2 43 00 38
359 gsm48_decode_lai() gives 012-34-56-0
360 passed
361- gsm48_generate_lai2() from 012-34-56
362 Encoded 10 f2 43 00 38
363 gsm48_decode_lai2() gives 012-34-56
364 passed
365- gsm48_generate_lai() from 012-034-23-0 (3-digit MNC)
366 Encoded 10 f2 43 00 17
367 gsm48_decode_lai() gives 012-34-23-0
368 passed
369- gsm48_generate_lai2() from 012-034-23 (3-digit MNC)
370 Encoded 10 42 30 00 17
371 gsm48_decode_lai2() gives 012-034-23 (3-digit MNC)
372 passed
373- gsm48_generate_lai() from 123-456-23-0
374 Encoded 21 63 54 00 17
375 gsm48_decode_lai() gives 123-456-23-0
376 passed
377- gsm48_generate_lai2() from 123-456-23
378 Encoded 21 63 54 00 17
379 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
380 passed
381- gsm48_generate_lai() from 123-456-23-0 (3-digit MNC)
382 Encoded 21 63 54 00 17
383 gsm48_decode_lai() gives 123-456-23-0
384 passed
385- gsm48_generate_lai2() from 123-456-23 (3-digit MNC)
386 Encoded 21 63 54 00 17
387 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
388 passed
Philipp Maiere36be562020-11-12 11:33:54 +0100389=====cm3_1=====
390mult_band_supp=06
391a5_bits=00
392assoc_radio_cap_1=04
393assoc_radio_cap_2=01
394
395r_support.present=0
396r_support.r_gsm_assoc_radio_cap=00
397
398hscsd_mult_slot_cap.present=0
399hscsd_mult_slot_cap.mslot_class=00
400
401ucs2_treatment=0
402extended_meas_cap=0
403
404ms_meas_cap.present=0
405ms_meas_cap.sms_value=00
406ms_meas_cap.sm_value=00
407
408ms_pos_method_cap.present=1
409ms_pos_method_cap.method=01
410
411ecsd_multislot_cap.present=0
412ecsd_multislot_cap.mslot_class=00
413
414psk8_struct.present=1
415psk8_struct.mod_cap=1
416psk8_struct.rf_pwr_cap_1.present=1
417psk8_struct.rf_pwr_cap_1.value=02
418psk8_struct.rf_pwr_cap_2.present=1
419psk8_struct.rf_pwr_cap_2.value=02
420
421gsm_400_bands_supp.present=0
422gsm_400_bands_supp.value=00
423gsm_400_bands_supp.assoc_radio_cap=00
424
425gsm_850_assoc_radio_cap.present=1
426gsm_850_assoc_radio_cap.value=04
427
428gsm_1900_assoc_radio_cap.present=0
429gsm_1900_assoc_radio_cap.value=00
430
431umts_fdd_rat_cap=0
432umts_tdd_rat_cap=0
433cdma200_rat_cap=0
434
435dtm_gprs_multislot_cap.present=0
436dtm_gprs_multislot_cap.mslot_class=00
437dtm_gprs_multislot_cap.single_slot_dtm=0
438dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
439dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
440
441single_band_supp.present=0
442single_band_supp.value=0
443
444gsm_750_assoc_radio_cap.present=0
445gsm_750_assoc_radio_cap.value=00
446
447umts_1_28_mcps_tdd_rat_cap=0
448geran_feature_package=1
449
450extended_dtm_gprs_multislot_cap.present=0
451extended_dtm_gprs_multislot_cap.mslot_class=00
452extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
453extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
454
455high_multislot_cap.present=0
456high_multislot_cap.value=00
457
458geran_feature_package_2=0
459gmsk_multislot_power_prof=00
460psk8_multislot_power_prof=00
461
462t_gsm_400_bands_supp.present=0
463t_gsm_400_bands_supp.value=00
464t_gsm_400_bands_supp.assoc_radio_cap=00
465
466dl_advanced_rx_perf=01
467dtm_enhancements_cap=1
468
469dtm_gprs_high_multislot_cap.present=0
470dtm_gprs_high_multislot_cap.mslot_class=00
471dtm_gprs_high_multislot_cap.offset_required=0
472dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.present=0
473dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.mslot_class=00
474
475repeated_acch_capability=1
476
477gsm_710_assoc_radio_cap.present=0
478gsm_710_assoc_radio_cap.value=00
479
480t_gsm_810_assoc_radio_cap.present=0
481t_gsm_810_assoc_radio_cap.value=00
482
483ciphering_mode_setting_cap=0
484add_pos_cap=0
485e_utra_fdd_supp=0
486e_utra_tdd_supp=0
487e_utra_meas_rep_supp=0
488prio_resel_supp=1
489utra_csg_cells_rep=0
490vamos_level=01
491tighter_capability=01
492sel_ciph_dl_sacch=0
493cs_ps_srvcc_geran_utra=00
494cs_ps_srvcc_geran_eutra=00
495geran_net_sharing=0
496e_utra_wb_rsrq_meas_supp=0
497er_band_support=0
498utra_mult_band_ind_supp=0
499e_utra_mult_band_ind_supp=0
500extended_tsc_set_cap_supp=0
501extended_earfcn_val_range=0
502
503=====cm3_2=====
504mult_band_supp=05
505a5_bits=05
506assoc_radio_cap_1=05
507assoc_radio_cap_2=05
508
509r_support.present=0
510r_support.r_gsm_assoc_radio_cap=00
511
512hscsd_mult_slot_cap.present=1
513hscsd_mult_slot_cap.mslot_class=0a
514
515ucs2_treatment=1
516extended_meas_cap=0
517
518ms_meas_cap.present=1
519ms_meas_cap.sms_value=05
520ms_meas_cap.sm_value=05
521
522ms_pos_method_cap.present=0
523ms_pos_method_cap.method=00
524
525ecsd_multislot_cap.present=1
526ecsd_multislot_cap.mslot_class=0a
527
528psk8_struct.present=1
529psk8_struct.mod_cap=0
530psk8_struct.rf_pwr_cap_1.present=1
531psk8_struct.rf_pwr_cap_1.value=01
532psk8_struct.rf_pwr_cap_2.present=0
533psk8_struct.rf_pwr_cap_2.value=00
534
535gsm_400_bands_supp.present=1
536gsm_400_bands_supp.value=01
537gsm_400_bands_supp.assoc_radio_cap=05
538
539gsm_850_assoc_radio_cap.present=0
540gsm_850_assoc_radio_cap.value=00
541
542gsm_1900_assoc_radio_cap.present=1
543gsm_1900_assoc_radio_cap.value=05
544
545umts_fdd_rat_cap=0
546umts_tdd_rat_cap=1
547cdma200_rat_cap=0
548
549dtm_gprs_multislot_cap.present=1
550dtm_gprs_multislot_cap.mslot_class=01
551dtm_gprs_multislot_cap.single_slot_dtm=0
552dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=1
553dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=01
554
555single_band_supp.present=0
556single_band_supp.value=0
557
558gsm_750_assoc_radio_cap.present=1
559gsm_750_assoc_radio_cap.value=05
560
561umts_1_28_mcps_tdd_rat_cap=0
562geran_feature_package=1
563
564extended_dtm_gprs_multislot_cap.present=0
565extended_dtm_gprs_multislot_cap.mslot_class=00
566extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
567extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
568
569high_multislot_cap.present=1
570high_multislot_cap.value=01
571
572geran_feature_package_2=1
573gmsk_multislot_power_prof=01
574psk8_multislot_power_prof=01
575
576t_gsm_400_bands_supp.present=0
577t_gsm_400_bands_supp.value=00
578t_gsm_400_bands_supp.assoc_radio_cap=00
579
580dl_advanced_rx_perf=01
581dtm_enhancements_cap=0
582
583dtm_gprs_high_multislot_cap.present=1
584dtm_gprs_high_multislot_cap.mslot_class=02
585dtm_gprs_high_multislot_cap.offset_required=1
586dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.present=0
587dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.mslot_class=00
588
589repeated_acch_capability=1
590
591gsm_710_assoc_radio_cap.present=0
592gsm_710_assoc_radio_cap.value=00
593
594t_gsm_810_assoc_radio_cap.present=1
595t_gsm_810_assoc_radio_cap.value=05
596
597ciphering_mode_setting_cap=0
598add_pos_cap=1
599e_utra_fdd_supp=0
600e_utra_tdd_supp=0
601e_utra_meas_rep_supp=0
602prio_resel_supp=0
603utra_csg_cells_rep=0
604vamos_level=00
605tighter_capability=00
606sel_ciph_dl_sacch=0
607cs_ps_srvcc_geran_utra=00
608cs_ps_srvcc_geran_eutra=00
609geran_net_sharing=0
610e_utra_wb_rsrq_meas_supp=0
611er_band_support=0
612utra_mult_band_ind_supp=0
613e_utra_mult_band_ind_supp=0
614extended_tsc_set_cap_supp=0
615extended_earfcn_val_range=0
616
617=====cm3_3=====
618mult_band_supp=02
619a5_bits=0a
620assoc_radio_cap_1=0a
621assoc_radio_cap_2=00
622
623r_support.present=1
624r_support.r_gsm_assoc_radio_cap=02
625
626hscsd_mult_slot_cap.present=1
627hscsd_mult_slot_cap.mslot_class=0a
628
629ucs2_treatment=1
630extended_meas_cap=0
631
632ms_meas_cap.present=1
633ms_meas_cap.sms_value=05
634ms_meas_cap.sm_value=05
635
636ms_pos_method_cap.present=0
637ms_pos_method_cap.method=00
638
639ecsd_multislot_cap.present=1
640ecsd_multislot_cap.mslot_class=0a
641
642psk8_struct.present=1
643psk8_struct.mod_cap=0
644psk8_struct.rf_pwr_cap_1.present=1
645psk8_struct.rf_pwr_cap_1.value=01
646psk8_struct.rf_pwr_cap_2.present=0
647psk8_struct.rf_pwr_cap_2.value=00
648
649gsm_400_bands_supp.present=1
650gsm_400_bands_supp.value=01
651gsm_400_bands_supp.assoc_radio_cap=05
652
653gsm_850_assoc_radio_cap.present=0
654gsm_850_assoc_radio_cap.value=00
655
656gsm_1900_assoc_radio_cap.present=1
657gsm_1900_assoc_radio_cap.value=05
658
659umts_fdd_rat_cap=0
660umts_tdd_rat_cap=1
661cdma200_rat_cap=0
662
663dtm_gprs_multislot_cap.present=1
664dtm_gprs_multislot_cap.mslot_class=01
665dtm_gprs_multislot_cap.single_slot_dtm=0
666dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=1
667dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=01
668
669single_band_supp.present=0
670single_band_supp.value=0
671
672gsm_750_assoc_radio_cap.present=1
673gsm_750_assoc_radio_cap.value=05
674
675umts_1_28_mcps_tdd_rat_cap=0
676geran_feature_package=1
677
678extended_dtm_gprs_multislot_cap.present=0
679extended_dtm_gprs_multislot_cap.mslot_class=00
680extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
681extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
682
683high_multislot_cap.present=1
684high_multislot_cap.value=01
685
686geran_feature_package_2=1
687gmsk_multislot_power_prof=01
688psk8_multislot_power_prof=01
689
690t_gsm_400_bands_supp.present=0
691t_gsm_400_bands_supp.value=00
692t_gsm_400_bands_supp.assoc_radio_cap=00
693
694dl_advanced_rx_perf=01
695dtm_enhancements_cap=0
696
697dtm_gprs_high_multislot_cap.present=1
698dtm_gprs_high_multislot_cap.mslot_class=02
699dtm_gprs_high_multislot_cap.offset_required=1
700dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.present=0
701dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.mslot_class=00
702
703repeated_acch_capability=1
704
705gsm_710_assoc_radio_cap.present=0
706gsm_710_assoc_radio_cap.value=00
707
708t_gsm_810_assoc_radio_cap.present=1
709t_gsm_810_assoc_radio_cap.value=04
710
711ciphering_mode_setting_cap=0
712add_pos_cap=0
713e_utra_fdd_supp=0
714e_utra_tdd_supp=0
715e_utra_meas_rep_supp=0
716prio_resel_supp=0
717utra_csg_cells_rep=0
718vamos_level=00
719tighter_capability=00
720sel_ciph_dl_sacch=0
721cs_ps_srvcc_geran_utra=00
722cs_ps_srvcc_geran_eutra=00
723geran_net_sharing=0
724e_utra_wb_rsrq_meas_supp=0
725er_band_support=0
726utra_mult_band_ind_supp=0
727e_utra_mult_band_ind_supp=0
728extended_tsc_set_cap_supp=0
729extended_earfcn_val_range=0
730
Stefan Sperlingfdf8b7b2018-07-27 12:19:15 +0200731Element is: 2 => freqs[i] = 121
732Element is: 2 => freqs[i] = 1
733Element is: 0 => freqs[i] = 68
734w[0]=122
735w[1]=2
736w[2]=69
737w[3]=204
738w[4]=75
739w[5]=66
740w[6]=60
741w[7]=70
742w[8]=83
743w[9]=3
744w[10]=24
745w[11]=67
746w[12]=54
747w[13]=64
748w[14]=70
749w[15]=9
750Range512: 89 4b 2a 95 65 95 55 2c a9 55 aa 55 6a 95 59 55
751Range test 0: range 511, num ARFCNs 12
752range=511, arfcns_used=11, f0=1, f0_included=1
753chan_list = 88 00 98 34 85 36 7c 50 22 dc 5e ec 00 00 00 00
754Decoded freqs 12 (expected 12)
755Decoded: 1 12 31 51 57 91 97 98 113 117 120 125
756Range test 1: range 511, num ARFCNs 17
757range=511, arfcns_used=16, f0=1, f0_included=1
758chan_list = 88 00 82 7f 01 3f 7e 04 0b ff ff fc 10 41 07 e0
759Decoded freqs 17 (expected 17)
760Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
761Range test 2: range 511, num ARFCNs 18
762range=511, arfcns_used=17, f0=1, f0_included=1
763chan_list = 88 00 82 7f 01 7f 7e 04 0b ff ff fc 10 41 07 ff
764Decoded freqs 18 (expected 18)
765Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
766Range test 3: range 511, num ARFCNs 18
767range=511, arfcns_used=17, f0=1, f0_included=1
768chan_list = 88 00 94 3a 44 32 d7 2a 43 2a 13 94 e5 38 39 f6
769Decoded freqs 18 (expected 18)
770Decoded: 1 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 417 511
771Range test 4: range 511, num ARFCNs 6
772range=511, arfcns_used=5, f0=1, f0_included=1
773chan_list = 88 00 8b 3c 88 b9 6b 00 00 00 00 00 00 00 00 00
774Decoded freqs 6 (expected 6)
775Decoded: 1 17 31 45 58 79
776Range test 5: range 511, num ARFCNs 6
777range=511, arfcns_used=5, f0=10, f0_included=1
778chan_list = 88 05 08 fc 88 b9 6b 00 00 00 00 00 00 00 00 00
779Decoded freqs 6 (expected 6)
780Decoded: 10 17 31 45 58 79
781Range test 6: range 1023, num ARFCNs 17
782range=1023, arfcns_used=16, f0=0, f0_included=1
783chan_list = 84 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
784Decoded freqs 17 (expected 17)
785Decoded: 0 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
786Range test 7: range 1023, num ARFCNs 16
787range=1023, arfcns_used=16, f0=0, f0_included=0
788chan_list = 80 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
789Decoded freqs 16 (expected 16)
790Decoded: 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
791Random range test: range 127, max num ARFCNs 29
792Random range test: range 255, max num ARFCNs 22
793Random range test: range 511, max num ARFCNs 18
794Random range test: range 1023, max num ARFCNs 16
Pau Espin Pedrol1dac8752022-04-26 17:32:33 +0200795rach_tx_integer_raw2val(0x00): 3 slots used to spread transmission
796rach_tx_integer_raw2val(0x01): 4 slots used to spread transmission
797rach_tx_integer_raw2val(0x02): 5 slots used to spread transmission
798rach_tx_integer_raw2val(0x03): 6 slots used to spread transmission
799rach_tx_integer_raw2val(0x04): 7 slots used to spread transmission
800rach_tx_integer_raw2val(0x05): 8 slots used to spread transmission
801rach_tx_integer_raw2val(0x06): 9 slots used to spread transmission
802rach_tx_integer_raw2val(0x07): 10 slots used to spread transmission
803rach_tx_integer_raw2val(0x08): 11 slots used to spread transmission
804rach_tx_integer_raw2val(0x09): 12 slots used to spread transmission
805rach_tx_integer_raw2val(0x0a): 14 slots used to spread transmission
806rach_tx_integer_raw2val(0x0b): 16 slots used to spread transmission
807rach_tx_integer_raw2val(0x0c): 20 slots used to spread transmission
808rach_tx_integer_raw2val(0x0d): 25 slots used to spread transmission
809rach_tx_integer_raw2val(0x0e): 32 slots used to spread transmission
810rach_tx_integer_raw2val(0x0f): 50 slots used to spread transmission