blob: 721e2c53b4650c11834a386a5b0f00488f4d9297 [file] [log] [blame]
Harald Weltec8a0b932012-08-24 21:27:26 +02001Test `CSD 9600/V.110/transparent' passed
Vadim Yanitskiydefda4c2024-01-19 00:55:27 +07002Test `CSD 4800/RLP/non-transparent' passed
3Test `CSD 2400/V.22bis/transparent' failed
Harald Weltec8a0b932012-08-24 21:27:26 +02004Test `Speech, all codecs' passed
Vadim Yanitskiy95fc8ea2022-07-03 05:41:02 +07005Test `Speech, without octet 3a' failed
Holger Hans Peter Freythercd252e32013-07-03 09:56:53 +02006Simple TMSI encoding test....passed
Maxd55d7d42018-02-15 11:27:18 +01007Simple IMSI encoding test....passed: [10] 17 08 99 10 07 00 00 00 64 02
Neels Hofmeyr49686282018-12-05 21:32:21 +01008
9Testing Mobile Identity conversions
10- IMSI 123456789012345
11 -> MI-TLV-hex='17081932547698103254'
12 -> MI-str="123456789012345" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010013 -> MI-name="IMSI-123456789012345"
Neels Hofmeyr49686282018-12-05 21:32:21 +010014- IMSI 12345678901234
15 -> MI-TLV-hex='170811325476981032f4'
16 -> MI-str="12345678901234" rc=15
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010017 -> MI-name="IMSI-12345678901234"
Neels Hofmeyr49686282018-12-05 21:32:21 +010018- IMSI 423423
19 -> MI-TLV-hex='1704413224f3'
20 -> MI-str="423423" rc=7
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010021 -> MI-name="IMSI-423423"
Neels Hofmeyr49686282018-12-05 21:32:21 +010022- unknown 0x9 423423
Harald Weltea13fb752020-06-16 08:44:42 +020023 -> MI-TLV-hex='1704413224f3'
24 -> MI-str="423423" rc=7
25 -> MI-name="IMSI-423423"
Neels Hofmeyr49686282018-12-05 21:32:21 +010026- IMSI 4234235
27 -> MI-TLV-hex='170449322453'
28 -> MI-str="4234235" rc=8
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010029 -> MI-name="IMSI-4234235"
Neels Hofmeyr49686282018-12-05 21:32:21 +010030- IMSI 4234235
31 -> MI-TLV-hex='170449322453'
Neels Hofmeyr627e0112018-12-05 21:32:40 +010032 -> MI-str="423" rc=4
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010033 -> MI-name="IMSI-4234235"
Neels Hofmeyr49686282018-12-05 21:32:21 +010034- IMEI 123456789012345
35 -> MI-TLV-hex='17081a32547698103254'
36 -> MI-str="123456789012345" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010037 -> MI-name="IMEI-123456789012345"
Neels Hofmeyr49686282018-12-05 21:32:21 +010038- IMEI 98765432109876
39 -> MI-TLV-hex='170892785634129078f6'
40 -> MI-str="98765432109876" rc=15
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010041 -> MI-name="IMEI-98765432109876"
Neels Hofmeyr49686282018-12-05 21:32:21 +010042- IMEI 987654321098765
43 -> MI-TLV-hex='17089a78563412907856'
44 -> MI-str="987654321098765" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010045 -> MI-name="IMEI-987654321098765"
Harald Welte13177712019-01-20 13:41:26 +010046- IMEI-SV 9876543210987654
47 -> MI-TLV-hex='17099378563412907856f4'
48 -> MI-str="9876543210987654" rc=17
49 -> MI-name="IMEI-SV-9876543210987654"
50- IMEI-SV 9876543210987654
51 -> MI-TLV-hex='17099378563412907856f4'
52 -> MI-str="9876543210987654" rc=17
53 -> MI-name="IMEI-SV-9876543210987654"
Neels Hofmeyr49686282018-12-05 21:32:21 +010054- TMSI 305419896
55 -> MI-TLV-hex='1705f412345678'
56 -> MI-str="305419896" rc=9
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010057 -> MI-name="TMSI-0x12345678"
Neels Hofmeyr49686282018-12-05 21:32:21 +010058- TMSI 12648430
59 -> MI-TLV-hex='1705f400c0ffee'
60 -> MI-str="12648430" rc=8
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010061 -> MI-name="TMSI-0x00C0FFEE"
Neels Hofmeyr49686282018-12-05 21:32:21 +010062- TMSI 0
63 -> MI-TLV-hex='1705f400000000'
64 -> MI-str="0" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010065 -> MI-name="TMSI-0x00000000"
Neels Hofmeyr49686282018-12-05 21:32:21 +010066- TMSI 305419896
67 -> MI-TLV-hex='1705f412345678'
68 -> MI-str="3054" rc=9
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010069 -> MI-name="TMSI-0x12345678"
Neels Hofmeyr49686282018-12-05 21:32:21 +010070- NONE 123
Harald Weltea13fb752020-06-16 08:44:42 +020071 -> MI-TLV-hex='17021832'
Neels Hofmeyr49686282018-12-05 21:32:21 +010072 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010073 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010074- NONE 1234
Harald Weltea13fb752020-06-16 08:44:42 +020075 -> MI-TLV-hex='17031032f4'
Neels Hofmeyr49686282018-12-05 21:32:21 +010076 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010077 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010078- unknown 0x8 1234
Harald Weltea13fb752020-06-16 08:44:42 +020079 -> MI-TLV-hex='17031032f4'
Neels Hofmeyr49686282018-12-05 21:32:21 +010080 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010081 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010082
83Decoding zero length Mobile Identities
84- MI type: IMSI
85 - writing to zero-length string:
Neels Hofmeyr627e0112018-12-05 21:32:40 +010086 rc=0
87 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +010088 - writing to 1-byte-length string:
89 rc=1
Neels Hofmeyr627e0112018-12-05 21:32:40 +010090 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +010091 - decode zero-length mi:
Neels Hofmeyr627e0112018-12-05 21:32:40 +010092 rc=1
93 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +010094- MI type: TMSI
95 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +010096 rc=0
97 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +010098 - writing to 1-byte-length string:
99 rc=1
100 returned empty string
101 - decode zero-length mi:
102 rc=1
103 returned empty string
104- MI type: NONE
105 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100106 rc=0
107 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100108 - writing to 1-byte-length string:
109 rc=1
110 returned empty string
111 - decode zero-length mi:
112 rc=1
113 returned empty string
114- MI type: IMSI | GSM_MI_ODD
115 - writing to zero-length string:
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100116 rc=0
117 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100118 - writing to 1-byte-length string:
119 rc=1
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100120 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +0100121 - decode zero-length mi:
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100122 rc=1
123 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +0100124- MI type: TMSI | GSM_MI_ODD
125 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100126 rc=0
127 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100128 - writing to 1-byte-length string:
129 rc=1
130 returned empty string
131 - decode zero-length mi:
132 rc=1
133 returned empty string
134- MI type: NONE | GSM_MI_ODD
135 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100136 rc=0
137 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100138 - writing to 1-byte-length string:
139 rc=1
140 returned empty string
141 - decode zero-length mi:
142 rc=1
143 returned empty string
144
Neels Hofmeyr83025bf2020-05-26 02:45:23 +0200145test_struct_mobile_identity()
Neels Hofmeyra7f97b92022-08-23 18:35:40 +0200146LU with IMSI 901700000004620: rc == 0, mi = IMSI-901700000004620 ok
147LU with TMSI 0x0980ad8a: rc == 0, mi = TMSI-0x0980AD8A ok
148LU with invalid MI type: rc != 0 ok
149LU with truncated IMSI MI: rc != 0 ok
150LU with too short IMSI MI (12345): rc != 0 ok
151LU with just long enough IMSI MI 123456: rc == 0, mi = IMSI-123456 ok
152LU with max length IMSI MI 123456789012345: rc == 0, mi = IMSI-123456789012345 ok
153LU with just too long IMSI MI 1234567890123456: rc != 0 ok
154LU with truncated TMSI MI: rc != 0 ok
155LU with odd length TMSI: rc != 0 ok
156LU with too long TMSI MI: rc != 0 ok
157LU with too short TMSI: rc != 0 ok
158CM Service Request with IMSI 123456: rc == 0, mi = IMSI-123456 ok
159CM Service Request with TMSI 0x5a42e404: rc == 0, mi = TMSI-0x5A42E404 ok
160CM Service Request with shorter CM2, with IMSI 123456: rc == 0, mi = IMSI-123456 ok
161CM Service Request with longer CM2, with IMSI 123456: rc == 0, mi = IMSI-123456 ok
162CM Service Request with shorter CM2, with TMSI 0x00000000: rc == 0, mi = TMSI-0x00000000 ok
163CM Service Request with invalid MI type: rc != 0 ok
164CM Service Request with truncated IMSI MI: rc != 0 ok
165CM Service Request with truncated TMSI MI: rc != 0 ok
166CM Service Request with odd length TMSI: rc != 0 ok
167CM Service Request with too long TMSI MI: rc != 0 ok
168CM Service Request with too short TMSI: rc != 0 ok
169CM Service Reestablish Request with TMSI 0x5a42e404: rc == 0, mi = TMSI-0x5A42E404 ok
170Paging Response with IMSI 1234567: rc == 0, mi = IMSI-1234567 ok
171Paging Response with TMSI 0xb48883de: rc == 0, mi = TMSI-0xB48883DE ok
172Paging Response with TMSI, with unused nibble not 0xf: rc != 0 ok
173Paging Response with too short IMEI (1234567): rc != 0 ok
174Paging Response with IMEI 123456789012345: rc == 0, mi = IMEI-123456789012345 ok
175Paging Response with IMEI 12345678901234 (no Luhn checksum): rc == 0, mi = IMEI-12345678901234 ok
176Paging Response with IMEISV 1234567890123456: rc == 0, mi = IMEI-SV-1234567890123456 ok
177Paging Response with too short IMEISV 123456789012345: rc != 0 ok
178Paging Response with too long IMEISV 12345678901234567: rc != 0 ok
179Paging Response with IMSI 123456789012345 and flipped ODD bit: rc != 0 ok
180IMSI-Detach with IMSI 901700000004620: rc == 0, mi = IMSI-901700000004620 ok
181IMSI-Detach with TMSI 0x0980ad8a: rc == 0, mi = TMSI-0x0980AD8A ok
182IMSI-Detach with invalid MI type: rc != 0 ok
183IMSI-Detach with truncated IMSI MI: rc != 0 ok
184IMSI-Detach with too short IMSI MI (12345): rc != 0 ok
185IMSI-Detach with just long enough IMSI MI 123456: rc == 0, mi = IMSI-123456 ok
186IMSI-Detach with max length IMSI MI 123456789012345: rc == 0, mi = IMSI-123456789012345 ok
187IMSI-Detach with just too long IMSI MI 1234567890123456: rc != 0 ok
188IMSI-Detach with truncated TMSI MI: rc != 0 ok
189IMSI-Detach with odd length TMSI: rc != 0 ok
190IMSI-Detach with too long TMSI MI: rc != 0 ok
191IMSI-Detach with too short TMSI: rc != 0 ok
192Identity Response with IMSI 901700000004620: rc == 0, mi = IMSI-901700000004620 ok
193Identity Response with IMEI 123456789012345: rc == 0, mi = IMEI-123456789012345 ok
194Identity Response with IMEISV 9876543210987654: rc == 0, mi = IMEI-SV-9876543210987654 ok
Neels Hofmeyr83025bf2020-05-26 02:45:23 +0200195
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700196BSD number encoding / decoding test
197- Running test: regular 9-digit MSISDN
198 - Encoding ASCII (buffer limit=0) '123456789'...
199 - Expected: (rc=6) '0521436587f9'
200 - Actual: (rc=6) '0521436587f9'
201 - Decoding HEX (buffer limit=0) '0521436587f9'...
202 - Expected: (rc=0) '123456789'
203 - Actual: (rc=0) '123456789'
204- Running test: regular 6-digit MSISDN with optional header (LHV)
205 - Encoding ASCII (buffer limit=0) '123456'...
Vadim Yanitskiy1dc82642019-05-27 00:53:54 +0700206 - Expected: (rc=8) '07ffffffff214365'
207 - Actual: (rc=8) '07ffffffff214365'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700208 - Decoding HEX (buffer limit=0) '07deadbeef214365'...
209 - Expected: (rc=0) '123456'
210 - Actual: (rc=0) '123456'
211- Running test: long 15-digit (maximum) MSISDN
212 - Encoding ASCII (buffer limit=0) '123456789012345'...
213 - Expected: (rc=9) '0821436587092143f5'
214 - Actual: (rc=9) '0821436587092143f5'
215 - Decoding HEX (buffer limit=0) '0821436587092143f5'...
216 - Expected: (rc=0) '123456789012345'
217 - Actual: (rc=0) '123456789012345'
218- Running test: long 15-digit (maximum) MSISDN, limited buffer
219 - Encoding ASCII (buffer limit=9) '123456789012345'...
220 - Expected: (rc=9) '0821436587092143f5'
221 - Actual: (rc=9) '0821436587092143f5'
222 - Decoding HEX (buffer limit=16) '0821436587092143f5'...
223 - Expected: (rc=0) '123456789012345'
Vadim Yanitskiy2cd1dda2019-05-26 00:14:16 +0700224 - Actual: (rc=0) '123456789012345'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700225- Running test: to be truncated 20-digit MSISDN
226 - Encoding ASCII (buffer limit=9) '12345678901234567890'...
227 - Expected: (rc=-5) ''
228 - Actual: (rc=-5) ''
229 - Decoding HEX (buffer limit=16) '0a21436587092143658709'...
Vadim Yanitskiy71940872019-05-26 00:49:57 +0700230 - Expected: (rc=-28) '123456789012345'
231 - Actual: (rc=-28) '123456789012345'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700232- Running test: LV incorrect length
233 - Decoding HEX (buffer limit=0) '05214365'...
Vadim Yanitskiye4799f52019-05-26 00:55:20 +0700234 - Expected: (rc=-22) '(none)'
235 - Actual: (rc=-22) '(none)'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700236- Running test: empty input buffer
237 - Encoding ASCII (buffer limit=0) ''...
238 - Expected: (rc=1) '00'
239 - Actual: (rc=1) '00'
240 - Decoding HEX (buffer limit=0) ''...
241 - Expected: (rc=-5) '(none)'
242 - Actual: (rc=-5) '(none)'
Oliver Smith186f8782019-06-06 16:11:32 +0200243- Running test: decoding buffer is one byte too small (OS#4049)
244 - Decoding HEX (buffer limit=4) '022143'...
245 - Expected: (rc=-28) '123'
246 - Actual: (rc=-28) '123'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700247
Maxf1ad60e2018-01-05 14:19:33 +0100248Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100249077-121-666-5
250MCC+MNC in BCD: 70 17 21
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100251077-121-666-5 (3-digit MNC)
Max99377c22017-08-30 19:17:50 +0200252RA test...passed
Maxf1ad60e2018-01-05 14:19:33 +0100253Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100254084-98-11-89
255MCC+MNC in BCD: 80 f4 89
256084-98-11-89
Max99377c22017-08-30 19:17:50 +0200257RA test...passed
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100258Constructed RA:
259000-00-0-0
260MCC+MNC in BCD: 00 f0 00
261000-00-0-0
262RA test...passed
263Constructed RA:
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100264000-000-0-0 (3-digit MNC)
265MCC+MNC in BCD: 00 00 00
266000-000-0-0 (3-digit MNC)
267RA test...passed
268Constructed RA:
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100269999-999-65535-255
270MCC+MNC in BCD: 99 99 99
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100271999-999-65535-255 (3-digit MNC)
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100272RA test...passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100273Constructed RA:
274001-02-23-42
275MCC+MNC in BCD: 00 f1 20
276001-02-23-42
277RA test...passed
278Constructed RA:
279001-002-23-42 (3-digit MNC)
280MCC+MNC in BCD: 00 21 00
281001-002-23-42 (3-digit MNC)
282RA test...passed
283Constructed RA:
284012-34-56-78
285MCC+MNC in BCD: 10 f2 43
286012-34-56-78
287RA test...passed
288Constructed RA:
289012-034-23-42 (3-digit MNC)
290MCC+MNC in BCD: 10 42 30
291012-034-23-42 (3-digit MNC)
292RA test...passed
293Constructed RA:
294123-456-23-42
295MCC+MNC in BCD: 21 63 54
296123-456-23-42 (3-digit MNC)
297RA test...passed
298Constructed RA:
299123-456-23-42 (3-digit MNC)
300MCC+MNC in BCD: 21 63 54
301123-456-23-42 (3-digit MNC)
302RA test...passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100303- gsm48_generate_lai() from 077-121-666-0
304 Encoded 70 17 21 02 9a
305 gsm48_decode_lai() gives 077-121-666-0
306 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100307- gsm48_generate_lai2() from 077-121-666
308 Encoded 70 17 21 02 9a
309 gsm48_decode_lai2() gives 077-121-666 (3-digit MNC)
310 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100311- gsm48_generate_lai() from 084-98-11-0
312 Encoded 80 f4 89 00 0b
313 gsm48_decode_lai() gives 084-98-11-0
314 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100315- gsm48_generate_lai2() from 084-98-11
316 Encoded 80 f4 89 00 0b
317 gsm48_decode_lai2() gives 084-98-11
318 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100319- gsm48_generate_lai() from 000-00-0-0
320 Encoded 00 f0 00 00 00
321 gsm48_decode_lai() gives 000-00-0-0
322 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100323- gsm48_generate_lai2() from 000-00-0
324 Encoded 00 f0 00 00 00
325 gsm48_decode_lai2() gives 000-00-0
326 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100327- gsm48_generate_lai() from 000-000-0-0 (3-digit MNC)
328 Encoded 00 f0 00 00 00
329 gsm48_decode_lai() gives 000-00-0-0
330 passed
331- gsm48_generate_lai2() from 000-000-0 (3-digit MNC)
332 Encoded 00 00 00 00 00
333 gsm48_decode_lai2() gives 000-000-0 (3-digit MNC)
334 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100335- gsm48_generate_lai() from 999-999-65535-0
336 Encoded 99 99 99 ff ff
337 gsm48_decode_lai() gives 999-999-65535-0
338 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100339- gsm48_generate_lai2() from 999-999-65535
340 Encoded 99 99 99 ff ff
341 gsm48_decode_lai2() gives 999-999-65535 (3-digit MNC)
342 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100343- gsm48_generate_lai() from 001-02-23-0
344 Encoded 00 f1 20 00 17
345 gsm48_decode_lai() gives 001-02-23-0
346 passed
347- gsm48_generate_lai2() from 001-02-23
348 Encoded 00 f1 20 00 17
349 gsm48_decode_lai2() gives 001-02-23
350 passed
351- gsm48_generate_lai() from 001-002-23-0 (3-digit MNC)
352 Encoded 00 f1 20 00 17
353 gsm48_decode_lai() gives 001-02-23-0
354 passed
355- gsm48_generate_lai2() from 001-002-23 (3-digit MNC)
356 Encoded 00 21 00 00 17
357 gsm48_decode_lai2() gives 001-002-23 (3-digit MNC)
358 passed
359- gsm48_generate_lai() from 012-34-56-0
360 Encoded 10 f2 43 00 38
361 gsm48_decode_lai() gives 012-34-56-0
362 passed
363- gsm48_generate_lai2() from 012-34-56
364 Encoded 10 f2 43 00 38
365 gsm48_decode_lai2() gives 012-34-56
366 passed
367- gsm48_generate_lai() from 012-034-23-0 (3-digit MNC)
368 Encoded 10 f2 43 00 17
369 gsm48_decode_lai() gives 012-34-23-0
370 passed
371- gsm48_generate_lai2() from 012-034-23 (3-digit MNC)
372 Encoded 10 42 30 00 17
373 gsm48_decode_lai2() gives 012-034-23 (3-digit MNC)
374 passed
375- gsm48_generate_lai() from 123-456-23-0
376 Encoded 21 63 54 00 17
377 gsm48_decode_lai() gives 123-456-23-0
378 passed
379- gsm48_generate_lai2() from 123-456-23
380 Encoded 21 63 54 00 17
381 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
382 passed
383- gsm48_generate_lai() from 123-456-23-0 (3-digit MNC)
384 Encoded 21 63 54 00 17
385 gsm48_decode_lai() gives 123-456-23-0
386 passed
387- gsm48_generate_lai2() from 123-456-23 (3-digit MNC)
388 Encoded 21 63 54 00 17
389 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
390 passed
Neels Hofmeyr8d423942023-06-08 00:35:41 +0200391==test_osmo_routing_area_id()==
392RA ID: 077-121-666-5osmo_routing_area_id_encode_buf(): 70 17 21 02 9a 05 rc=6
393osmo_routing_area_id_decode(): 077-121-666-5 (3-digit MNC) rc=6
394ok
395RA ID: 084-98-11-89osmo_routing_area_id_encode_buf(): 80 f4 89 00 0b 59 rc=6
396osmo_routing_area_id_decode(): 084-98-11-89 rc=6
397ok
398RA ID: 000-00-0-0osmo_routing_area_id_encode_buf(): 00 f0 00 00 00 00 rc=6
399osmo_routing_area_id_decode(): 000-00-0-0 rc=6
400ok
401RA ID: 000-000-0-0 (3-digit MNC)osmo_routing_area_id_encode_buf(): 00 00 00 00 00 00 rc=6
402osmo_routing_area_id_decode(): 000-000-0-0 (3-digit MNC) rc=6
403ok
404RA ID: 999-999-65535-255osmo_routing_area_id_encode_buf(): 99 99 99 ff ff ff rc=6
405osmo_routing_area_id_decode(): 999-999-65535-255 (3-digit MNC) rc=6
406ok
407RA ID: 001-02-23-42osmo_routing_area_id_encode_buf(): 00 f1 20 00 17 2a rc=6
408osmo_routing_area_id_decode(): 001-02-23-42 rc=6
409ok
410RA ID: 001-002-23-42 (3-digit MNC)osmo_routing_area_id_encode_buf(): 00 21 00 00 17 2a rc=6
411osmo_routing_area_id_decode(): 001-002-23-42 (3-digit MNC) rc=6
412ok
413RA ID: 012-34-56-78osmo_routing_area_id_encode_buf(): 10 f2 43 00 38 4e rc=6
414osmo_routing_area_id_decode(): 012-34-56-78 rc=6
415ok
416RA ID: 012-034-23-42 (3-digit MNC)osmo_routing_area_id_encode_buf(): 10 42 30 00 17 2a rc=6
417osmo_routing_area_id_decode(): 012-034-23-42 (3-digit MNC) rc=6
418ok
419RA ID: 123-456-23-42osmo_routing_area_id_encode_buf(): 21 63 54 00 17 2a rc=6
420osmo_routing_area_id_decode(): 123-456-23-42 (3-digit MNC) rc=6
421ok
422RA ID: 123-456-23-42 (3-digit MNC)osmo_routing_area_id_encode_buf(): 21 63 54 00 17 2a rc=6
423osmo_routing_area_id_decode(): 123-456-23-42 (3-digit MNC) rc=6
424ok
Philipp Maiere36be562020-11-12 11:33:54 +0100425=====cm3_1=====
426mult_band_supp=06
427a5_bits=00
428assoc_radio_cap_1=04
429assoc_radio_cap_2=01
430
431r_support.present=0
432r_support.r_gsm_assoc_radio_cap=00
433
434hscsd_mult_slot_cap.present=0
435hscsd_mult_slot_cap.mslot_class=00
436
437ucs2_treatment=0
438extended_meas_cap=0
439
440ms_meas_cap.present=0
441ms_meas_cap.sms_value=00
442ms_meas_cap.sm_value=00
443
444ms_pos_method_cap.present=1
445ms_pos_method_cap.method=01
446
447ecsd_multislot_cap.present=0
448ecsd_multislot_cap.mslot_class=00
449
450psk8_struct.present=1
451psk8_struct.mod_cap=1
452psk8_struct.rf_pwr_cap_1.present=1
453psk8_struct.rf_pwr_cap_1.value=02
454psk8_struct.rf_pwr_cap_2.present=1
455psk8_struct.rf_pwr_cap_2.value=02
456
457gsm_400_bands_supp.present=0
458gsm_400_bands_supp.value=00
459gsm_400_bands_supp.assoc_radio_cap=00
460
461gsm_850_assoc_radio_cap.present=1
462gsm_850_assoc_radio_cap.value=04
463
464gsm_1900_assoc_radio_cap.present=0
465gsm_1900_assoc_radio_cap.value=00
466
467umts_fdd_rat_cap=0
468umts_tdd_rat_cap=0
469cdma200_rat_cap=0
470
471dtm_gprs_multislot_cap.present=0
472dtm_gprs_multislot_cap.mslot_class=00
473dtm_gprs_multislot_cap.single_slot_dtm=0
474dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
475dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
476
477single_band_supp.present=0
478single_band_supp.value=0
479
480gsm_750_assoc_radio_cap.present=0
481gsm_750_assoc_radio_cap.value=00
482
483umts_1_28_mcps_tdd_rat_cap=0
484geran_feature_package=1
485
486extended_dtm_gprs_multislot_cap.present=0
487extended_dtm_gprs_multislot_cap.mslot_class=00
488extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
489extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
490
491high_multislot_cap.present=0
492high_multislot_cap.value=00
493
494geran_feature_package_2=0
495gmsk_multislot_power_prof=00
496psk8_multislot_power_prof=00
497
498t_gsm_400_bands_supp.present=0
499t_gsm_400_bands_supp.value=00
500t_gsm_400_bands_supp.assoc_radio_cap=00
501
502dl_advanced_rx_perf=01
503dtm_enhancements_cap=1
504
505dtm_gprs_high_multislot_cap.present=0
506dtm_gprs_high_multislot_cap.mslot_class=00
507dtm_gprs_high_multislot_cap.offset_required=0
508dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.present=0
509dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.mslot_class=00
510
511repeated_acch_capability=1
512
513gsm_710_assoc_radio_cap.present=0
514gsm_710_assoc_radio_cap.value=00
515
516t_gsm_810_assoc_radio_cap.present=0
517t_gsm_810_assoc_radio_cap.value=00
518
519ciphering_mode_setting_cap=0
520add_pos_cap=0
521e_utra_fdd_supp=0
522e_utra_tdd_supp=0
523e_utra_meas_rep_supp=0
524prio_resel_supp=1
525utra_csg_cells_rep=0
526vamos_level=01
527tighter_capability=01
528sel_ciph_dl_sacch=0
529cs_ps_srvcc_geran_utra=00
530cs_ps_srvcc_geran_eutra=00
531geran_net_sharing=0
532e_utra_wb_rsrq_meas_supp=0
533er_band_support=0
534utra_mult_band_ind_supp=0
535e_utra_mult_band_ind_supp=0
536extended_tsc_set_cap_supp=0
537extended_earfcn_val_range=0
538
539=====cm3_2=====
540mult_band_supp=05
541a5_bits=05
542assoc_radio_cap_1=05
543assoc_radio_cap_2=05
544
545r_support.present=0
546r_support.r_gsm_assoc_radio_cap=00
547
548hscsd_mult_slot_cap.present=1
549hscsd_mult_slot_cap.mslot_class=0a
550
551ucs2_treatment=1
552extended_meas_cap=0
553
554ms_meas_cap.present=1
555ms_meas_cap.sms_value=05
556ms_meas_cap.sm_value=05
557
558ms_pos_method_cap.present=0
559ms_pos_method_cap.method=00
560
561ecsd_multislot_cap.present=1
562ecsd_multislot_cap.mslot_class=0a
563
564psk8_struct.present=1
565psk8_struct.mod_cap=0
566psk8_struct.rf_pwr_cap_1.present=1
567psk8_struct.rf_pwr_cap_1.value=01
568psk8_struct.rf_pwr_cap_2.present=0
569psk8_struct.rf_pwr_cap_2.value=00
570
571gsm_400_bands_supp.present=1
572gsm_400_bands_supp.value=01
573gsm_400_bands_supp.assoc_radio_cap=05
574
575gsm_850_assoc_radio_cap.present=0
576gsm_850_assoc_radio_cap.value=00
577
578gsm_1900_assoc_radio_cap.present=1
579gsm_1900_assoc_radio_cap.value=05
580
581umts_fdd_rat_cap=0
582umts_tdd_rat_cap=1
583cdma200_rat_cap=0
584
585dtm_gprs_multislot_cap.present=1
586dtm_gprs_multislot_cap.mslot_class=01
587dtm_gprs_multislot_cap.single_slot_dtm=0
588dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=1
589dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=01
590
591single_band_supp.present=0
592single_band_supp.value=0
593
594gsm_750_assoc_radio_cap.present=1
595gsm_750_assoc_radio_cap.value=05
596
597umts_1_28_mcps_tdd_rat_cap=0
598geran_feature_package=1
599
600extended_dtm_gprs_multislot_cap.present=0
601extended_dtm_gprs_multislot_cap.mslot_class=00
602extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
603extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
604
605high_multislot_cap.present=1
606high_multislot_cap.value=01
607
608geran_feature_package_2=1
609gmsk_multislot_power_prof=01
610psk8_multislot_power_prof=01
611
612t_gsm_400_bands_supp.present=0
613t_gsm_400_bands_supp.value=00
614t_gsm_400_bands_supp.assoc_radio_cap=00
615
616dl_advanced_rx_perf=01
617dtm_enhancements_cap=0
618
619dtm_gprs_high_multislot_cap.present=1
620dtm_gprs_high_multislot_cap.mslot_class=02
621dtm_gprs_high_multislot_cap.offset_required=1
622dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.present=0
623dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.mslot_class=00
624
625repeated_acch_capability=1
626
627gsm_710_assoc_radio_cap.present=0
628gsm_710_assoc_radio_cap.value=00
629
630t_gsm_810_assoc_radio_cap.present=1
631t_gsm_810_assoc_radio_cap.value=05
632
633ciphering_mode_setting_cap=0
634add_pos_cap=1
635e_utra_fdd_supp=0
636e_utra_tdd_supp=0
637e_utra_meas_rep_supp=0
638prio_resel_supp=0
639utra_csg_cells_rep=0
640vamos_level=00
641tighter_capability=00
642sel_ciph_dl_sacch=0
643cs_ps_srvcc_geran_utra=00
644cs_ps_srvcc_geran_eutra=00
645geran_net_sharing=0
646e_utra_wb_rsrq_meas_supp=0
647er_band_support=0
648utra_mult_band_ind_supp=0
649e_utra_mult_band_ind_supp=0
650extended_tsc_set_cap_supp=0
651extended_earfcn_val_range=0
652
653=====cm3_3=====
654mult_band_supp=02
655a5_bits=0a
656assoc_radio_cap_1=0a
657assoc_radio_cap_2=00
658
659r_support.present=1
660r_support.r_gsm_assoc_radio_cap=02
661
662hscsd_mult_slot_cap.present=1
663hscsd_mult_slot_cap.mslot_class=0a
664
665ucs2_treatment=1
666extended_meas_cap=0
667
668ms_meas_cap.present=1
669ms_meas_cap.sms_value=05
670ms_meas_cap.sm_value=05
671
672ms_pos_method_cap.present=0
673ms_pos_method_cap.method=00
674
675ecsd_multislot_cap.present=1
676ecsd_multislot_cap.mslot_class=0a
677
678psk8_struct.present=1
679psk8_struct.mod_cap=0
680psk8_struct.rf_pwr_cap_1.present=1
681psk8_struct.rf_pwr_cap_1.value=01
682psk8_struct.rf_pwr_cap_2.present=0
683psk8_struct.rf_pwr_cap_2.value=00
684
685gsm_400_bands_supp.present=1
686gsm_400_bands_supp.value=01
687gsm_400_bands_supp.assoc_radio_cap=05
688
689gsm_850_assoc_radio_cap.present=0
690gsm_850_assoc_radio_cap.value=00
691
692gsm_1900_assoc_radio_cap.present=1
693gsm_1900_assoc_radio_cap.value=05
694
695umts_fdd_rat_cap=0
696umts_tdd_rat_cap=1
697cdma200_rat_cap=0
698
699dtm_gprs_multislot_cap.present=1
700dtm_gprs_multislot_cap.mslot_class=01
701dtm_gprs_multislot_cap.single_slot_dtm=0
702dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=1
703dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=01
704
705single_band_supp.present=0
706single_band_supp.value=0
707
708gsm_750_assoc_radio_cap.present=1
709gsm_750_assoc_radio_cap.value=05
710
711umts_1_28_mcps_tdd_rat_cap=0
712geran_feature_package=1
713
714extended_dtm_gprs_multislot_cap.present=0
715extended_dtm_gprs_multislot_cap.mslot_class=00
716extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.present=0
717extended_dtm_gprs_multislot_cap.dtm_egprs_multislot_cap.mslot_class=00
718
719high_multislot_cap.present=1
720high_multislot_cap.value=01
721
722geran_feature_package_2=1
723gmsk_multislot_power_prof=01
724psk8_multislot_power_prof=01
725
726t_gsm_400_bands_supp.present=0
727t_gsm_400_bands_supp.value=00
728t_gsm_400_bands_supp.assoc_radio_cap=00
729
730dl_advanced_rx_perf=01
731dtm_enhancements_cap=0
732
733dtm_gprs_high_multislot_cap.present=1
734dtm_gprs_high_multislot_cap.mslot_class=02
735dtm_gprs_high_multislot_cap.offset_required=1
736dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.present=0
737dtm_gprs_high_multislot_cap.dtm_egprs_high_multislot_cap.mslot_class=00
738
739repeated_acch_capability=1
740
741gsm_710_assoc_radio_cap.present=0
742gsm_710_assoc_radio_cap.value=00
743
744t_gsm_810_assoc_radio_cap.present=1
745t_gsm_810_assoc_radio_cap.value=04
746
747ciphering_mode_setting_cap=0
748add_pos_cap=0
749e_utra_fdd_supp=0
750e_utra_tdd_supp=0
751e_utra_meas_rep_supp=0
752prio_resel_supp=0
753utra_csg_cells_rep=0
754vamos_level=00
755tighter_capability=00
756sel_ciph_dl_sacch=0
757cs_ps_srvcc_geran_utra=00
758cs_ps_srvcc_geran_eutra=00
759geran_net_sharing=0
760e_utra_wb_rsrq_meas_supp=0
761er_band_support=0
762utra_mult_band_ind_supp=0
763e_utra_mult_band_ind_supp=0
764extended_tsc_set_cap_supp=0
765extended_earfcn_val_range=0
766
Stefan Sperlingfdf8b7b2018-07-27 12:19:15 +0200767Element is: 2 => freqs[i] = 121
768Element is: 2 => freqs[i] = 1
769Element is: 0 => freqs[i] = 68
770w[0]=122
771w[1]=2
772w[2]=69
773w[3]=204
774w[4]=75
775w[5]=66
776w[6]=60
777w[7]=70
778w[8]=83
779w[9]=3
780w[10]=24
781w[11]=67
782w[12]=54
783w[13]=64
784w[14]=70
785w[15]=9
786Range512: 89 4b 2a 95 65 95 55 2c a9 55 aa 55 6a 95 59 55
787Range test 0: range 511, num ARFCNs 12
788range=511, arfcns_used=11, f0=1, f0_included=1
789chan_list = 88 00 98 34 85 36 7c 50 22 dc 5e ec 00 00 00 00
790Decoded freqs 12 (expected 12)
791Decoded: 1 12 31 51 57 91 97 98 113 117 120 125
792Range test 1: range 511, num ARFCNs 17
793range=511, arfcns_used=16, f0=1, f0_included=1
794chan_list = 88 00 82 7f 01 3f 7e 04 0b ff ff fc 10 41 07 e0
795Decoded freqs 17 (expected 17)
796Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
797Range test 2: range 511, num ARFCNs 18
798range=511, arfcns_used=17, f0=1, f0_included=1
799chan_list = 88 00 82 7f 01 7f 7e 04 0b ff ff fc 10 41 07 ff
800Decoded freqs 18 (expected 18)
801Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
802Range test 3: range 511, num ARFCNs 18
803range=511, arfcns_used=17, f0=1, f0_included=1
804chan_list = 88 00 94 3a 44 32 d7 2a 43 2a 13 94 e5 38 39 f6
805Decoded freqs 18 (expected 18)
806Decoded: 1 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 417 511
807Range test 4: range 511, num ARFCNs 6
808range=511, arfcns_used=5, f0=1, f0_included=1
809chan_list = 88 00 8b 3c 88 b9 6b 00 00 00 00 00 00 00 00 00
810Decoded freqs 6 (expected 6)
811Decoded: 1 17 31 45 58 79
812Range test 5: range 511, num ARFCNs 6
813range=511, arfcns_used=5, f0=10, f0_included=1
814chan_list = 88 05 08 fc 88 b9 6b 00 00 00 00 00 00 00 00 00
815Decoded freqs 6 (expected 6)
816Decoded: 10 17 31 45 58 79
817Range test 6: range 1023, num ARFCNs 17
818range=1023, arfcns_used=16, f0=0, f0_included=1
819chan_list = 84 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
820Decoded freqs 17 (expected 17)
821Decoded: 0 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
822Range test 7: range 1023, num ARFCNs 16
823range=1023, arfcns_used=16, f0=0, f0_included=0
824chan_list = 80 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
825Decoded freqs 16 (expected 16)
826Decoded: 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
827Random range test: range 127, max num ARFCNs 29
828Random range test: range 255, max num ARFCNs 22
829Random range test: range 511, max num ARFCNs 18
830Random range test: range 1023, max num ARFCNs 16
Pau Espin Pedrol1dac8752022-04-26 17:32:33 +0200831rach_tx_integer_raw2val(0x00): 3 slots used to spread transmission
832rach_tx_integer_raw2val(0x01): 4 slots used to spread transmission
833rach_tx_integer_raw2val(0x02): 5 slots used to spread transmission
834rach_tx_integer_raw2val(0x03): 6 slots used to spread transmission
835rach_tx_integer_raw2val(0x04): 7 slots used to spread transmission
836rach_tx_integer_raw2val(0x05): 8 slots used to spread transmission
837rach_tx_integer_raw2val(0x06): 9 slots used to spread transmission
838rach_tx_integer_raw2val(0x07): 10 slots used to spread transmission
839rach_tx_integer_raw2val(0x08): 11 slots used to spread transmission
840rach_tx_integer_raw2val(0x09): 12 slots used to spread transmission
841rach_tx_integer_raw2val(0x0a): 14 slots used to spread transmission
842rach_tx_integer_raw2val(0x0b): 16 slots used to spread transmission
843rach_tx_integer_raw2val(0x0c): 20 slots used to spread transmission
844rach_tx_integer_raw2val(0x0d): 25 slots used to spread transmission
845rach_tx_integer_raw2val(0x0e): 32 slots used to spread transmission
846rach_tx_integer_raw2val(0x0f): 50 slots used to spread transmission