blob: 0bd101de775de277abfc26cce8fe895acd1f1ed9 [file] [log] [blame]
Harald Weltec8a0b932012-08-24 21:27:26 +02001Test `CSD 9600/V.110/transparent' passed
2Test `Speech, all codecs' passed
Holger Hans Peter Freythercd252e32013-07-03 09:56:53 +02003Simple TMSI encoding test....passed
Maxd55d7d42018-02-15 11:27:18 +01004Simple IMSI encoding test....passed: [10] 17 08 99 10 07 00 00 00 64 02
Neels Hofmeyr49686282018-12-05 21:32:21 +01005
6Testing Mobile Identity conversions
7- IMSI 123456789012345
8 -> MI-TLV-hex='17081932547698103254'
9 -> MI-str="123456789012345" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010010 -> MI-name="IMSI-123456789012345"
Neels Hofmeyr49686282018-12-05 21:32:21 +010011- IMSI 12345678901234
12 -> MI-TLV-hex='170811325476981032f4'
13 -> MI-str="12345678901234" rc=15
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010014 -> MI-name="IMSI-12345678901234"
Neels Hofmeyr49686282018-12-05 21:32:21 +010015- IMSI 423423
16 -> MI-TLV-hex='1704413224f3'
17 -> MI-str="423423" rc=7
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010018 -> MI-name="IMSI-423423"
Neels Hofmeyr49686282018-12-05 21:32:21 +010019- unknown 0x9 423423
Neels Hofmeyr23187fa2018-12-05 23:24:50 +010020 -> MI-TLV-hex='1704413224f3'
21 -> MI-str="423423" rc=7
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010022 -> MI-name="IMSI-423423"
Neels Hofmeyr49686282018-12-05 21:32:21 +010023- IMSI 4234235
24 -> MI-TLV-hex='170449322453'
25 -> MI-str="4234235" rc=8
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010026 -> MI-name="IMSI-4234235"
Neels Hofmeyr49686282018-12-05 21:32:21 +010027- IMSI 4234235
28 -> MI-TLV-hex='170449322453'
Neels Hofmeyr627e0112018-12-05 21:32:40 +010029 -> MI-str="423" rc=4
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010030 -> MI-name="IMSI-4234235"
Neels Hofmeyr49686282018-12-05 21:32:21 +010031- IMEI 123456789012345
32 -> MI-TLV-hex='17081a32547698103254'
33 -> MI-str="123456789012345" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010034 -> MI-name="IMEI-123456789012345"
Neels Hofmeyr49686282018-12-05 21:32:21 +010035- IMEI 98765432109876
36 -> MI-TLV-hex='170892785634129078f6'
37 -> MI-str="98765432109876" rc=15
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010038 -> MI-name="IMEI-98765432109876"
Neels Hofmeyr49686282018-12-05 21:32:21 +010039- IMEI 987654321098765
40 -> MI-TLV-hex='17089a78563412907856'
41 -> MI-str="987654321098765" rc=16
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010042 -> MI-name="IMEI-987654321098765"
Harald Welte13177712019-01-20 13:41:26 +010043- IMEI-SV 9876543210987654
44 -> MI-TLV-hex='17099378563412907856f4'
45 -> MI-str="9876543210987654" rc=17
46 -> MI-name="IMEI-SV-9876543210987654"
47- IMEI-SV 9876543210987654
48 -> MI-TLV-hex='17099378563412907856f4'
49 -> MI-str="9876543210987654" rc=17
50 -> MI-name="IMEI-SV-9876543210987654"
Neels Hofmeyr49686282018-12-05 21:32:21 +010051- TMSI 305419896
52 -> MI-TLV-hex='1705f412345678'
53 -> MI-str="305419896" rc=9
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010054 -> MI-name="TMSI-0x12345678"
Neels Hofmeyr49686282018-12-05 21:32:21 +010055- TMSI 12648430
56 -> MI-TLV-hex='1705f400c0ffee'
57 -> MI-str="12648430" rc=8
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010058 -> MI-name="TMSI-0x00C0FFEE"
Neels Hofmeyr49686282018-12-05 21:32:21 +010059- TMSI 0
60 -> MI-TLV-hex='1705f400000000'
61 -> MI-str="0" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010062 -> MI-name="TMSI-0x00000000"
Neels Hofmeyr49686282018-12-05 21:32:21 +010063- TMSI 305419896
64 -> MI-TLV-hex='1705f412345678'
65 -> MI-str="3054" rc=9
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010066 -> MI-name="TMSI-0x12345678"
Neels Hofmeyr49686282018-12-05 21:32:21 +010067- NONE 123
68 -> MI-TLV-hex='17021832'
69 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010070 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010071- NONE 1234
72 -> MI-TLV-hex='17031032f4'
73 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010074 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010075- unknown 0x8 1234
Neels Hofmeyr23187fa2018-12-05 23:24:50 +010076 -> MI-TLV-hex='17031032f4'
Neels Hofmeyr49686282018-12-05 21:32:21 +010077 -> MI-str="" rc=1
Neels Hofmeyr02fd83d2019-01-05 00:38:54 +010078 -> MI-name="unknown"
Neels Hofmeyr49686282018-12-05 21:32:21 +010079
80Decoding zero length Mobile Identities
81- MI type: IMSI
82 - writing to zero-length string:
Neels Hofmeyr627e0112018-12-05 21:32:40 +010083 rc=0
84 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +010085 - writing to 1-byte-length string:
86 rc=1
Neels Hofmeyr627e0112018-12-05 21:32:40 +010087 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +010088 - decode zero-length mi:
Neels Hofmeyr627e0112018-12-05 21:32:40 +010089 rc=1
90 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +010091- MI type: TMSI
92 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +010093 rc=0
94 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +010095 - writing to 1-byte-length string:
96 rc=1
97 returned empty string
98 - decode zero-length mi:
99 rc=1
100 returned empty string
101- MI type: NONE
102 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100103 rc=0
104 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100105 - writing to 1-byte-length string:
106 rc=1
107 returned empty string
108 - decode zero-length mi:
109 rc=1
110 returned empty string
111- MI type: IMSI | GSM_MI_ODD
112 - writing to zero-length string:
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100113 rc=0
114 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100115 - writing to 1-byte-length string:
116 rc=1
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100117 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +0100118 - decode zero-length mi:
Neels Hofmeyr627e0112018-12-05 21:32:40 +0100119 rc=1
120 returned empty string
Neels Hofmeyr49686282018-12-05 21:32:21 +0100121- MI type: TMSI | GSM_MI_ODD
122 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100123 rc=0
124 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100125 - writing to 1-byte-length string:
126 rc=1
127 returned empty string
128 - decode zero-length mi:
129 rc=1
130 returned empty string
131- MI type: NONE | GSM_MI_ODD
132 - writing to zero-length string:
Neels Hofmeyrea2a0ab2018-12-05 23:30:08 +0100133 rc=0
134 nothing written
Neels Hofmeyr49686282018-12-05 21:32:21 +0100135 - writing to 1-byte-length string:
136 rc=1
137 returned empty string
138 - decode zero-length mi:
139 rc=1
140 returned empty string
141
Maxf1ad60e2018-01-05 14:19:33 +0100142Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100143077-121-666-5
144MCC+MNC in BCD: 70 17 21
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100145077-121-666-5 (3-digit MNC)
Max99377c22017-08-30 19:17:50 +0200146RA test...passed
Maxf1ad60e2018-01-05 14:19:33 +0100147Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100148084-98-11-89
149MCC+MNC in BCD: 80 f4 89
150084-98-11-89
Max99377c22017-08-30 19:17:50 +0200151RA test...passed
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100152Constructed RA:
153000-00-0-0
154MCC+MNC in BCD: 00 f0 00
155000-00-0-0
156RA test...passed
157Constructed RA:
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100158000-000-0-0 (3-digit MNC)
159MCC+MNC in BCD: 00 00 00
160000-000-0-0 (3-digit MNC)
161RA test...passed
162Constructed RA:
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100163999-999-65535-255
164MCC+MNC in BCD: 99 99 99
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100165999-999-65535-255 (3-digit MNC)
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100166RA test...passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100167Constructed RA:
168001-02-23-42
169MCC+MNC in BCD: 00 f1 20
170001-02-23-42
171RA test...passed
172Constructed RA:
173001-002-23-42 (3-digit MNC)
174MCC+MNC in BCD: 00 21 00
175001-002-23-42 (3-digit MNC)
176RA test...passed
177Constructed RA:
178012-34-56-78
179MCC+MNC in BCD: 10 f2 43
180012-34-56-78
181RA test...passed
182Constructed RA:
183012-034-23-42 (3-digit MNC)
184MCC+MNC in BCD: 10 42 30
185012-034-23-42 (3-digit MNC)
186RA test...passed
187Constructed RA:
188123-456-23-42
189MCC+MNC in BCD: 21 63 54
190123-456-23-42 (3-digit MNC)
191RA test...passed
192Constructed RA:
193123-456-23-42 (3-digit MNC)
194MCC+MNC in BCD: 21 63 54
195123-456-23-42 (3-digit MNC)
196RA test...passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100197- gsm48_generate_lai() from 077-121-666-0
198 Encoded 70 17 21 02 9a
199 gsm48_decode_lai() gives 077-121-666-0
200 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100201- gsm48_generate_lai2() from 077-121-666
202 Encoded 70 17 21 02 9a
203 gsm48_decode_lai2() gives 077-121-666 (3-digit MNC)
204 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100205- gsm48_generate_lai() from 084-98-11-0
206 Encoded 80 f4 89 00 0b
207 gsm48_decode_lai() gives 084-98-11-0
208 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100209- gsm48_generate_lai2() from 084-98-11
210 Encoded 80 f4 89 00 0b
211 gsm48_decode_lai2() gives 084-98-11
212 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100213- gsm48_generate_lai() from 000-00-0-0
214 Encoded 00 f0 00 00 00
215 gsm48_decode_lai() gives 000-00-0-0
216 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100217- gsm48_generate_lai2() from 000-00-0
218 Encoded 00 f0 00 00 00
219 gsm48_decode_lai2() gives 000-00-0
220 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100221- gsm48_generate_lai() from 000-000-0-0 (3-digit MNC)
222 Encoded 00 f0 00 00 00
223 gsm48_decode_lai() gives 000-00-0-0
224 passed
225- gsm48_generate_lai2() from 000-000-0 (3-digit MNC)
226 Encoded 00 00 00 00 00
227 gsm48_decode_lai2() gives 000-000-0 (3-digit MNC)
228 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100229- gsm48_generate_lai() from 999-999-65535-0
230 Encoded 99 99 99 ff ff
231 gsm48_decode_lai() gives 999-999-65535-0
232 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100233- gsm48_generate_lai2() from 999-999-65535
234 Encoded 99 99 99 ff ff
235 gsm48_decode_lai2() gives 999-999-65535 (3-digit MNC)
236 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100237- gsm48_generate_lai() from 001-02-23-0
238 Encoded 00 f1 20 00 17
239 gsm48_decode_lai() gives 001-02-23-0
240 passed
241- gsm48_generate_lai2() from 001-02-23
242 Encoded 00 f1 20 00 17
243 gsm48_decode_lai2() gives 001-02-23
244 passed
245- gsm48_generate_lai() from 001-002-23-0 (3-digit MNC)
246 Encoded 00 f1 20 00 17
247 gsm48_decode_lai() gives 001-02-23-0
248 passed
249- gsm48_generate_lai2() from 001-002-23 (3-digit MNC)
250 Encoded 00 21 00 00 17
251 gsm48_decode_lai2() gives 001-002-23 (3-digit MNC)
252 passed
253- gsm48_generate_lai() from 012-34-56-0
254 Encoded 10 f2 43 00 38
255 gsm48_decode_lai() gives 012-34-56-0
256 passed
257- gsm48_generate_lai2() from 012-34-56
258 Encoded 10 f2 43 00 38
259 gsm48_decode_lai2() gives 012-34-56
260 passed
261- gsm48_generate_lai() from 012-034-23-0 (3-digit MNC)
262 Encoded 10 f2 43 00 17
263 gsm48_decode_lai() gives 012-34-23-0
264 passed
265- gsm48_generate_lai2() from 012-034-23 (3-digit MNC)
266 Encoded 10 42 30 00 17
267 gsm48_decode_lai2() gives 012-034-23 (3-digit MNC)
268 passed
269- gsm48_generate_lai() from 123-456-23-0
270 Encoded 21 63 54 00 17
271 gsm48_decode_lai() gives 123-456-23-0
272 passed
273- gsm48_generate_lai2() from 123-456-23
274 Encoded 21 63 54 00 17
275 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
276 passed
277- gsm48_generate_lai() from 123-456-23-0 (3-digit MNC)
278 Encoded 21 63 54 00 17
279 gsm48_decode_lai() gives 123-456-23-0
280 passed
281- gsm48_generate_lai2() from 123-456-23 (3-digit MNC)
282 Encoded 21 63 54 00 17
283 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
284 passed
Stefan Sperlingfdf8b7b2018-07-27 12:19:15 +0200285Element is: 2 => freqs[i] = 121
286Element is: 2 => freqs[i] = 1
287Element is: 0 => freqs[i] = 68
288w[0]=122
289w[1]=2
290w[2]=69
291w[3]=204
292w[4]=75
293w[5]=66
294w[6]=60
295w[7]=70
296w[8]=83
297w[9]=3
298w[10]=24
299w[11]=67
300w[12]=54
301w[13]=64
302w[14]=70
303w[15]=9
304Range512: 89 4b 2a 95 65 95 55 2c a9 55 aa 55 6a 95 59 55
305Range test 0: range 511, num ARFCNs 12
306range=511, arfcns_used=11, f0=1, f0_included=1
307chan_list = 88 00 98 34 85 36 7c 50 22 dc 5e ec 00 00 00 00
308Decoded freqs 12 (expected 12)
309Decoded: 1 12 31 51 57 91 97 98 113 117 120 125
310Range test 1: range 511, num ARFCNs 17
311range=511, arfcns_used=16, f0=1, f0_included=1
312chan_list = 88 00 82 7f 01 3f 7e 04 0b ff ff fc 10 41 07 e0
313Decoded freqs 17 (expected 17)
314Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
315Range test 2: range 511, num ARFCNs 18
316range=511, arfcns_used=17, f0=1, f0_included=1
317chan_list = 88 00 82 7f 01 7f 7e 04 0b ff ff fc 10 41 07 ff
318Decoded freqs 18 (expected 18)
319Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
320Range test 3: range 511, num ARFCNs 18
321range=511, arfcns_used=17, f0=1, f0_included=1
322chan_list = 88 00 94 3a 44 32 d7 2a 43 2a 13 94 e5 38 39 f6
323Decoded freqs 18 (expected 18)
324Decoded: 1 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 417 511
325Range test 4: range 511, num ARFCNs 6
326range=511, arfcns_used=5, f0=1, f0_included=1
327chan_list = 88 00 8b 3c 88 b9 6b 00 00 00 00 00 00 00 00 00
328Decoded freqs 6 (expected 6)
329Decoded: 1 17 31 45 58 79
330Range test 5: range 511, num ARFCNs 6
331range=511, arfcns_used=5, f0=10, f0_included=1
332chan_list = 88 05 08 fc 88 b9 6b 00 00 00 00 00 00 00 00 00
333Decoded freqs 6 (expected 6)
334Decoded: 10 17 31 45 58 79
335Range test 6: range 1023, num ARFCNs 17
336range=1023, arfcns_used=16, f0=0, f0_included=1
337chan_list = 84 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
338Decoded freqs 17 (expected 17)
339Decoded: 0 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
340Range test 7: range 1023, num ARFCNs 16
341range=1023, arfcns_used=16, f0=0, f0_included=0
342chan_list = 80 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
343Decoded freqs 16 (expected 16)
344Decoded: 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
345Random range test: range 127, max num ARFCNs 29
346Random range test: range 255, max num ARFCNs 22
347Random range test: range 511, max num ARFCNs 18
348Random range test: range 1023, max num ARFCNs 16