blob: f8de54afad79cb2e208530c7478c1b80eb089571 [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 Hofmeyrd1ceca92020-05-26 02:45:23 +020020 -> MI-TLV-hex=''
21 -> MI-str="" rc=1
22 -> MI-name="unknown"
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
Neels Hofmeyrd1ceca92020-05-26 02:45:23 +020068 -> MI-TLV-hex=''
Neels Hofmeyr49686282018-12-05 21:32:21 +010069 -> 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
Neels Hofmeyrd1ceca92020-05-26 02:45:23 +020072 -> MI-TLV-hex=''
Neels Hofmeyr49686282018-12-05 21:32:21 +010073 -> 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 Hofmeyrd1ceca92020-05-26 02:45:23 +020076 -> MI-TLV-hex=''
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
Neels Hofmeyrd1ceca92020-05-26 02:45:23 +0200142test_struct_mobile_identity()
143LU with IMSI 901700000004620: rc = 0, mi = IMSI-901700000004620 ok
144LU with TMSI 0x0980ad8a: rc = 0, mi = TMSI-0x0980AD8A ok
145LU with invalid MI type: rc = -22 ok
146LU with truncated IMSI MI: rc = -74 ok
147LU with too short IMSI MI (12345): rc = -74 ok
148LU with just long enough IMSI MI 123456: rc = 0, mi = IMSI-123456 ok
149LU with max length IMSI MI 123456789012345: rc = 0, mi = IMSI-123456789012345 ok
150LU with just too long IMSI MI 1234567890123456: rc = -74 ok
151LU with truncated TMSI MI: rc = -74 ok
152LU with odd length TMSI: rc = -74 ok
153LU with too long TMSI MI: rc = -74 ok
154LU with too short TMSI: rc = -74 ok
155CM Service Request with IMSI 123456: rc = 0, mi = IMSI-123456 ok
156CM Service Request with TMSI 0x5a42e404: rc = 0, mi = TMSI-0x5A42E404 ok
157CM Service Request with shorter CM2, with IMSI 123456: rc = 0, mi = IMSI-123456 ok
158CM Service Request with longer CM2, with IMSI 123456: rc = 0, mi = IMSI-123456 ok
159CM Service Request with shorter CM2, with TMSI 0x00000000: rc = 0, mi = TMSI-0x00000000 ok
160CM Service Request with invalid MI type: rc = -22 ok
161CM Service Request with truncated IMSI MI: rc = -74 ok
162CM Service Request with truncated TMSI MI: rc = -74 ok
163CM Service Request with odd length TMSI: rc = -74 ok
164CM Service Request with too long TMSI MI: rc = -74 ok
165CM Service Request with too short TMSI: rc = -74 ok
166CM Service Reestablish Request with TMSI 0x5a42e404: rc = 0, mi = TMSI-0x5A42E404 ok
167Paging Response with IMSI 1234567: rc = 0, mi = IMSI-1234567 ok
168Paging Response with TMSI 0xb48883de: rc = 0, mi = TMSI-0xB48883DE ok
169Paging Response with TMSI, with unused nibble not 0xf: rc = -74 ok
170Paging Response with too short IMEI (1234567): rc = -74 ok
171Paging Response with IMEI 123456789012345: rc = 0, mi = IMEI-123456789012345 ok
172Paging Response with IMEI 12345678901234 (no Luhn checksum): rc = 0, mi = IMEI-12345678901234 ok
173Paging Response with IMEISV 1234567890123456: rc = 0, mi = IMEI-SV-1234567890123456 ok
174Paging Response with too short IMEISV 123456789012345: rc = -74 ok
175Paging Response with too long IMEISV 12345678901234567: rc = -74 ok
176Paging Response with IMSI 123456789012345 and flipped ODD bit: rc = -74 ok
177IMSI-Detach with IMSI 901700000004620: rc = 0, mi = IMSI-901700000004620 ok
178IMSI-Detach with TMSI 0x0980ad8a: rc = 0, mi = TMSI-0x0980AD8A ok
179IMSI-Detach with invalid MI type: rc = -22 ok
180IMSI-Detach with truncated IMSI MI: rc = -74 ok
181IMSI-Detach with too short IMSI MI (12345): rc = -74 ok
182IMSI-Detach with just long enough IMSI MI 123456: rc = 0, mi = IMSI-123456 ok
183IMSI-Detach with max length IMSI MI 123456789012345: rc = 0, mi = IMSI-123456789012345 ok
184IMSI-Detach with just too long IMSI MI 1234567890123456: rc = -74 ok
185IMSI-Detach with truncated TMSI MI: rc = -74 ok
186IMSI-Detach with odd length TMSI: rc = -74 ok
187IMSI-Detach with too long TMSI MI: rc = -74 ok
188IMSI-Detach with too short TMSI: rc = -74 ok
189Identity Response with IMSI 901700000004620: rc = 0, mi = IMSI-901700000004620 ok
190Identity Response with IMEI 123456789012345: rc = 0, mi = IMEI-123456789012345 ok
191Identity Response with IMEISV 9876543210987654: rc = 0, mi = IMEI-SV-9876543210987654 ok
192
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700193BSD number encoding / decoding test
194- Running test: regular 9-digit MSISDN
195 - Encoding ASCII (buffer limit=0) '123456789'...
196 - Expected: (rc=6) '0521436587f9'
197 - Actual: (rc=6) '0521436587f9'
198 - Decoding HEX (buffer limit=0) '0521436587f9'...
199 - Expected: (rc=0) '123456789'
200 - Actual: (rc=0) '123456789'
201- Running test: regular 6-digit MSISDN with optional header (LHV)
202 - Encoding ASCII (buffer limit=0) '123456'...
Vadim Yanitskiy1dc82642019-05-27 00:53:54 +0700203 - Expected: (rc=8) '07ffffffff214365'
204 - Actual: (rc=8) '07ffffffff214365'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700205 - Decoding HEX (buffer limit=0) '07deadbeef214365'...
206 - Expected: (rc=0) '123456'
207 - Actual: (rc=0) '123456'
208- Running test: long 15-digit (maximum) MSISDN
209 - Encoding ASCII (buffer limit=0) '123456789012345'...
210 - Expected: (rc=9) '0821436587092143f5'
211 - Actual: (rc=9) '0821436587092143f5'
212 - Decoding HEX (buffer limit=0) '0821436587092143f5'...
213 - Expected: (rc=0) '123456789012345'
214 - Actual: (rc=0) '123456789012345'
215- Running test: long 15-digit (maximum) MSISDN, limited buffer
216 - Encoding ASCII (buffer limit=9) '123456789012345'...
217 - Expected: (rc=9) '0821436587092143f5'
218 - Actual: (rc=9) '0821436587092143f5'
219 - Decoding HEX (buffer limit=16) '0821436587092143f5'...
220 - Expected: (rc=0) '123456789012345'
Vadim Yanitskiy2cd1dda2019-05-26 00:14:16 +0700221 - Actual: (rc=0) '123456789012345'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700222- Running test: to be truncated 20-digit MSISDN
223 - Encoding ASCII (buffer limit=9) '12345678901234567890'...
224 - Expected: (rc=-5) ''
225 - Actual: (rc=-5) ''
226 - Decoding HEX (buffer limit=16) '0a21436587092143658709'...
Vadim Yanitskiy71940872019-05-26 00:49:57 +0700227 - Expected: (rc=-28) '123456789012345'
228 - Actual: (rc=-28) '123456789012345'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700229- Running test: LV incorrect length
230 - Decoding HEX (buffer limit=0) '05214365'...
Vadim Yanitskiye4799f52019-05-26 00:55:20 +0700231 - Expected: (rc=-22) '(none)'
232 - Actual: (rc=-22) '(none)'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700233- Running test: empty input buffer
234 - Encoding ASCII (buffer limit=0) ''...
235 - Expected: (rc=1) '00'
236 - Actual: (rc=1) '00'
237 - Decoding HEX (buffer limit=0) ''...
238 - Expected: (rc=-5) '(none)'
239 - Actual: (rc=-5) '(none)'
Oliver Smith186f8782019-06-06 16:11:32 +0200240- Running test: decoding buffer is one byte too small (OS#4049)
241 - Decoding HEX (buffer limit=4) '022143'...
242 - Expected: (rc=-28) '123'
243 - Actual: (rc=-28) '123'
Vadim Yanitskiyaa0683d2019-05-25 23:14:00 +0700244
Maxf1ad60e2018-01-05 14:19:33 +0100245Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100246077-121-666-5
247MCC+MNC in BCD: 70 17 21
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100248077-121-666-5 (3-digit MNC)
Max99377c22017-08-30 19:17:50 +0200249RA test...passed
Maxf1ad60e2018-01-05 14:19:33 +0100250Constructed RA:
Neels Hofmeyrc38b32d2018-02-20 15:13:18 +0100251084-98-11-89
252MCC+MNC in BCD: 80 f4 89
253084-98-11-89
Max99377c22017-08-30 19:17:50 +0200254RA test...passed
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100255Constructed RA:
256000-00-0-0
257MCC+MNC in BCD: 00 f0 00
258000-00-0-0
259RA test...passed
260Constructed RA:
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100261000-000-0-0 (3-digit MNC)
262MCC+MNC in BCD: 00 00 00
263000-000-0-0 (3-digit MNC)
264RA test...passed
265Constructed RA:
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100266999-999-65535-255
267MCC+MNC in BCD: 99 99 99
Neels Hofmeyrdbb25132018-02-20 15:12:23 +0100268999-999-65535-255 (3-digit MNC)
Neels Hofmeyrb9fd7eb2018-02-20 15:14:03 +0100269RA test...passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100270Constructed RA:
271001-02-23-42
272MCC+MNC in BCD: 00 f1 20
273001-02-23-42
274RA test...passed
275Constructed RA:
276001-002-23-42 (3-digit MNC)
277MCC+MNC in BCD: 00 21 00
278001-002-23-42 (3-digit MNC)
279RA test...passed
280Constructed RA:
281012-34-56-78
282MCC+MNC in BCD: 10 f2 43
283012-34-56-78
284RA test...passed
285Constructed RA:
286012-034-23-42 (3-digit MNC)
287MCC+MNC in BCD: 10 42 30
288012-034-23-42 (3-digit MNC)
289RA test...passed
290Constructed RA:
291123-456-23-42
292MCC+MNC in BCD: 21 63 54
293123-456-23-42 (3-digit MNC)
294RA test...passed
295Constructed RA:
296123-456-23-42 (3-digit MNC)
297MCC+MNC in BCD: 21 63 54
298123-456-23-42 (3-digit MNC)
299RA test...passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100300- gsm48_generate_lai() from 077-121-666-0
301 Encoded 70 17 21 02 9a
302 gsm48_decode_lai() gives 077-121-666-0
303 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100304- gsm48_generate_lai2() from 077-121-666
305 Encoded 70 17 21 02 9a
306 gsm48_decode_lai2() gives 077-121-666 (3-digit MNC)
307 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100308- gsm48_generate_lai() from 084-98-11-0
309 Encoded 80 f4 89 00 0b
310 gsm48_decode_lai() gives 084-98-11-0
311 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100312- gsm48_generate_lai2() from 084-98-11
313 Encoded 80 f4 89 00 0b
314 gsm48_decode_lai2() gives 084-98-11
315 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100316- gsm48_generate_lai() from 000-00-0-0
317 Encoded 00 f0 00 00 00
318 gsm48_decode_lai() gives 000-00-0-0
319 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100320- gsm48_generate_lai2() from 000-00-0
321 Encoded 00 f0 00 00 00
322 gsm48_decode_lai2() gives 000-00-0
323 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100324- gsm48_generate_lai() from 000-000-0-0 (3-digit MNC)
325 Encoded 00 f0 00 00 00
326 gsm48_decode_lai() gives 000-00-0-0
327 passed
328- gsm48_generate_lai2() from 000-000-0 (3-digit MNC)
329 Encoded 00 00 00 00 00
330 gsm48_decode_lai2() gives 000-000-0 (3-digit MNC)
331 passed
Neels Hofmeyrd5a577b2018-02-20 21:48:07 +0100332- gsm48_generate_lai() from 999-999-65535-0
333 Encoded 99 99 99 ff ff
334 gsm48_decode_lai() gives 999-999-65535-0
335 passed
Neels Hofmeyr4566f4e2018-02-20 22:19:56 +0100336- gsm48_generate_lai2() from 999-999-65535
337 Encoded 99 99 99 ff ff
338 gsm48_decode_lai2() gives 999-999-65535 (3-digit MNC)
339 passed
Neels Hofmeyr6c7b3e22018-02-20 22:20:42 +0100340- gsm48_generate_lai() from 001-02-23-0
341 Encoded 00 f1 20 00 17
342 gsm48_decode_lai() gives 001-02-23-0
343 passed
344- gsm48_generate_lai2() from 001-02-23
345 Encoded 00 f1 20 00 17
346 gsm48_decode_lai2() gives 001-02-23
347 passed
348- gsm48_generate_lai() from 001-002-23-0 (3-digit MNC)
349 Encoded 00 f1 20 00 17
350 gsm48_decode_lai() gives 001-02-23-0
351 passed
352- gsm48_generate_lai2() from 001-002-23 (3-digit MNC)
353 Encoded 00 21 00 00 17
354 gsm48_decode_lai2() gives 001-002-23 (3-digit MNC)
355 passed
356- gsm48_generate_lai() from 012-34-56-0
357 Encoded 10 f2 43 00 38
358 gsm48_decode_lai() gives 012-34-56-0
359 passed
360- gsm48_generate_lai2() from 012-34-56
361 Encoded 10 f2 43 00 38
362 gsm48_decode_lai2() gives 012-34-56
363 passed
364- gsm48_generate_lai() from 012-034-23-0 (3-digit MNC)
365 Encoded 10 f2 43 00 17
366 gsm48_decode_lai() gives 012-34-23-0
367 passed
368- gsm48_generate_lai2() from 012-034-23 (3-digit MNC)
369 Encoded 10 42 30 00 17
370 gsm48_decode_lai2() gives 012-034-23 (3-digit MNC)
371 passed
372- gsm48_generate_lai() from 123-456-23-0
373 Encoded 21 63 54 00 17
374 gsm48_decode_lai() gives 123-456-23-0
375 passed
376- gsm48_generate_lai2() from 123-456-23
377 Encoded 21 63 54 00 17
378 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
379 passed
380- gsm48_generate_lai() from 123-456-23-0 (3-digit MNC)
381 Encoded 21 63 54 00 17
382 gsm48_decode_lai() gives 123-456-23-0
383 passed
384- gsm48_generate_lai2() from 123-456-23 (3-digit MNC)
385 Encoded 21 63 54 00 17
386 gsm48_decode_lai2() gives 123-456-23 (3-digit MNC)
387 passed
Stefan Sperlingfdf8b7b2018-07-27 12:19:15 +0200388Element is: 2 => freqs[i] = 121
389Element is: 2 => freqs[i] = 1
390Element is: 0 => freqs[i] = 68
391w[0]=122
392w[1]=2
393w[2]=69
394w[3]=204
395w[4]=75
396w[5]=66
397w[6]=60
398w[7]=70
399w[8]=83
400w[9]=3
401w[10]=24
402w[11]=67
403w[12]=54
404w[13]=64
405w[14]=70
406w[15]=9
407Range512: 89 4b 2a 95 65 95 55 2c a9 55 aa 55 6a 95 59 55
408Range test 0: range 511, num ARFCNs 12
409range=511, arfcns_used=11, f0=1, f0_included=1
410chan_list = 88 00 98 34 85 36 7c 50 22 dc 5e ec 00 00 00 00
411Decoded freqs 12 (expected 12)
412Decoded: 1 12 31 51 57 91 97 98 113 117 120 125
413Range test 1: range 511, num ARFCNs 17
414range=511, arfcns_used=16, f0=1, f0_included=1
415chan_list = 88 00 82 7f 01 3f 7e 04 0b ff ff fc 10 41 07 e0
416Decoded freqs 17 (expected 17)
417Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
418Range test 2: range 511, num ARFCNs 18
419range=511, arfcns_used=17, f0=1, f0_included=1
420chan_list = 88 00 82 7f 01 7f 7e 04 0b ff ff fc 10 41 07 ff
421Decoded freqs 18 (expected 18)
422Decoded: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
423Range test 3: range 511, num ARFCNs 18
424range=511, arfcns_used=17, f0=1, f0_included=1
425chan_list = 88 00 94 3a 44 32 d7 2a 43 2a 13 94 e5 38 39 f6
426Decoded freqs 18 (expected 18)
427Decoded: 1 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 417 511
428Range test 4: range 511, num ARFCNs 6
429range=511, arfcns_used=5, f0=1, f0_included=1
430chan_list = 88 00 8b 3c 88 b9 6b 00 00 00 00 00 00 00 00 00
431Decoded freqs 6 (expected 6)
432Decoded: 1 17 31 45 58 79
433Range test 5: range 511, num ARFCNs 6
434range=511, arfcns_used=5, f0=10, f0_included=1
435chan_list = 88 05 08 fc 88 b9 6b 00 00 00 00 00 00 00 00 00
436Decoded freqs 6 (expected 6)
437Decoded: 10 17 31 45 58 79
438Range test 6: range 1023, num ARFCNs 17
439range=1023, arfcns_used=16, f0=0, f0_included=1
440chan_list = 84 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
441Decoded freqs 17 (expected 17)
442Decoded: 0 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
443Range test 7: range 1023, num ARFCNs 16
444range=1023, arfcns_used=16, f0=0, f0_included=0
445chan_list = 80 71 e4 ab b9 58 05 cb 39 17 fd b0 75 62 0f 2f
446Decoded freqs 16 (expected 16)
447Decoded: 17 31 45 58 79 81 97 113 127 213 277 287 311 331 391 1023
448Random range test: range 127, max num ARFCNs 29
449Random range test: range 255, max num ARFCNs 22
450Random range test: range 511, max num ARFCNs 18
451Random range test: range 1023, max num ARFCNs 16