blob: 0f237cc8f3b7d20a2e2bcf58a4a76e3bf0044d77 [file] [log] [blame]
Harald Welte52b1f982008-12-23 20:25:15 +00001/* A hackish minimal BSC (+MSC +HLR) implementation */
2
3/* (C) 2008 by Harald Welte <laforge@gnumonks.org>
4 * All Rights Reserved
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 */
21
22
23
24#include "gsm_data.h"
25#include "abis_rsl.h"
26#include "abis_nm.h"
27
28/* global pointer to the gsm network data structure */
29static struct gsm_network *gsmnet;
30
31/* The following definitions are for OM and NM packets that we cannot yet
32 * generate by code but we just pass on */
33
34// BTS Site Manager, SET ATTRIBUTES
35
36/*
37 Object Class: BTS Site Manager
38 Instance 1: FF
39 Instance 2: FF
40 Instance 3: FF
41SET ATTRIBUTES
42 sAbisExternalTime: 2007/09/08 14:36:11
43 omLAPDRelTimer: 30sec
44 shortLAPDIntTimer: 5sec
45 emergencyTimer1: 10 minutes
46 emergencyTimer2: 0 minutes
47*/
48
49unsigned char msg_1[] =
50{
51 0xD0, 0x00, 0xFF, 0xFF, 0xFF, 0x91, 0x07, 0xD7, 0x09, 0x08, 0x0E, 0x24,
52 0x0B, 0xCE, 0x02, 0x00, 0x1E, 0xE8, 0x01, 0x05, 0x42, 0x02, 0x00, 0x0A, 0x44,
53 0x02, 0x00, 0x00
54};
55
56// BTS, SET BTS ATTRIBUTES
57
58/*
59 Object Class: BTS
60 BTS relat. Number: 0
61 Instance 2: FF
62 Instance 3: FF
63SET BTS ATTRIBUTES
64 bsIdentityCode / BSIC:
65 PLMN_colour_code: 7h
66 BS_colour_code: 7h
67 BTS Air Timer T3105: 4 ,unit 10 ms
68 btsIsHopping: FALSE
69 periodCCCHLoadIndication: 255sec
70 thresholdCCCHLoadIndication: 100%
71 cellAllocationNumber: 00h = GSM 900
72 enableInterferenceClass: 00h = Disabled
73 fACCHQual: 6 (FACCH stealing flags minus 1)
74 intaveParameter: 31 SACCH multiframes
75 interferenceLevelBoundaries:
76 Interference Boundary 1: 0Ah
77 Interference Boundary 2: 0Fh
78 Interference Boundary 3: 14h
79 Interference Boundary 4: 19h
80 Interference Boundary 5: 1Eh
81 mSTxPwrMax: 11
82 GSM range: 2=39dBm, 15=13dBm, stepsize 2 dBm
83 DCS1800 range: 0=30dBm, 15=0dBm, stepsize 2 dBm
84 PCS1900 range: 0=30dBm, 15=0dBm, stepsize 2 dBm
85 30=33dBm, 31=32dBm
86 ny1:
87 Maximum number of repetitions for PHYSICAL INFORMATION message (GSM 04.08): 20
88 powerOutputThresholds:
89 Out Power Fault Threshold: -10 dB
90 Red Out Power Threshold: - 6 dB
91 Excessive Out Power Threshold: 5 dB
92 rACHBusyThreshold: -127 dBm
93 rACHLoadAveragingSlots: 250 ,number of RACH burst periods
94 rfResourceIndicationPeriod: 125 SACCH multiframes
95 T200:
96 SDCCH: 044 in 5 ms
97 FACCH/Full rate: 031 in 5 ms
98 FACCH/Half rate: 041 in 5 ms
99 SACCH with TCH SAPI0: 090 in 10 ms
100 SACCH with SDCCH: 090 in 10 ms
101 SDCCH with SAPI3: 090 in 5 ms
102 SACCH with TCH SAPI3: 135 in 10 ms
103 tSync: 9000 units of 10 msec
104 tTrau: 9000 units of 10 msec
105 enableUmLoopTest: 00h = disabled
106 enableExcessiveDistance: 00h = Disabled
107 excessiveDistance: 64km
108 hoppingMode: 00h = baseband hopping
109 cellType: 00h = Standard Cell
110 BCCH ARFCN / bCCHFrequency: 1
111*/
112
113unsigned char msg_2[] =
114{
115 0x41, 0x01, 0x00, 0xFF, 0xFF, 0x09, 0x3F, 0x0A, 0x04, 0x61, 0x00, 0x0B,
116 0xFF, 0x0C, 0x64, 0x62, 0x00, 0x66, 0x00, 0x6E, 0x06, 0x18, 0x1F, 0x19,
117 0x0A, 0x0F, 0x14, 0x19, 0x1E, 0x7B, 0x0B, 0x23, 0x14, 0x28, 0x00, 0x04,
118 0x03, 0x2A, 0x7F, 0x2B, 0x00, 0xFA, 0x8F, 0x7D, 0x33, 0x2C, 0x1F, 0x29,
119 0x5A, 0x5A, 0x5A, 0x87, 0x94, 0x23, 0x28, 0x95, 0x23, 0x28, 0x35, 0x01,
120 0x00, 0x46, 0x01, 0x00, 0x58, 0x01, 0x40, 0xC5, 0x01, 0x00, 0xF2, 0x01,
121 0x00, 0x08, 0x00, HARDCODED_ARFCN/*0x01*/,
122};
123
124// Handover Recognition, SET ATTRIBUTES
125
126/*
127Illegal Contents GSM Formatted O&M Msg
128 Object Class: Handover Recognition
129 BTS relat. Number: 0
130 Instance 2: FF
131 Instance 3: FF
132SET ATTRIBUTES
133 enableDelayPowerBudgetHO: 00h = Disabled
134 enableDistanceHO: 00h = Disabled
135 enableInternalInterCellHandover: 00h = Disabled
136 enableInternalIntraCellHandover: 00h = Disabled
137 enablePowerBudgetHO: 00h = Disabled
138 enableRXLEVHO: 00h = Disabled
139 enableRXQUALHO: 00h = Disabled
140 hoAveragingDistance: 8 SACCH multiframes
141 hoAveragingLev:
142 A_LEV_HO: 8 SACCH multiframes
143 W_LEV_HO: 1 SACCH multiframes
144 hoAveragingPowerBudget: 16 SACCH multiframes
145 hoAveragingQual:
146 A_QUAL_HO: 8 SACCH multiframes
147 W_QUAL_HO: 2 SACCH multiframes
148 hoLowerThresholdLevDL: (10 - 110) dBm
149 hoLowerThresholdLevUL: (5 - 110) dBm
150 hoLowerThresholdQualDL: 06h = 6.4% < BER < 12.8%
151 hoLowerThresholdQualUL: 06h = 6.4% < BER < 12.8%
152 hoThresholdLevDLintra : (20 - 110) dBm
153 hoThresholdLevULintra: (20 - 110) dBm
154 hoThresholdMsRangeMax: 20 km
155 nCell: 06h
156 timerHORequest: 3 ,unit 2 SACCH multiframes
157*/
158
159unsigned char msg_3[] =
160{
161 0xD0, 0xA1, 0x00, 0xFF, 0xFF, 0xD0, 0x00, 0x64, 0x00, 0x67, 0x00, 0x68,
162 0x00, 0x6A, 0x00, 0x6C, 0x00, 0x6D, 0x00, 0x6F, 0x08, 0x70, 0x08, 0x01,
163 0x71, 0x10, 0x10, 0x10, 0x72, 0x08, 0x02, 0x73, 0x0A, 0x74, 0x05, 0x75,
164 0x06, 0x76, 0x06, 0x78, 0x14, 0x79, 0x14, 0x7A, 0x14, 0x7D, 0x06, 0x92,
165 0x03, 0x20, 0x01, 0x00, 0x45, 0x01, 0x00, 0x48, 0x01, 0x00, 0x5A, 0x01,
166 0x00, 0x5B, 0x01, 0x05, 0x5E, 0x01, 0x1A, 0x5F, 0x01, 0x20, 0x9D, 0x01,
167 0x00, 0x47, 0x01, 0x00, 0x5C, 0x01, 0x64, 0x5D, 0x01, 0x1E, 0x97, 0x01,
168 0x20, 0xF7, 0x01, 0x3C,
169};
170
171// Power Control, SET ATTRIBUTES
172
173/*
174 Object Class: Power Control
175 BTS relat. Number: 0
176 Instance 2: FF
177 Instance 3: FF
178SET ATTRIBUTES
179 enableMsPowerControl: 00h = Disabled
180 enablePowerControlRLFW: 00h = Disabled
181 pcAveragingLev:
182 A_LEV_PC: 4 SACCH multiframes
183 W_LEV_PC: 1 SACCH multiframes
184 pcAveragingQual:
185 A_QUAL_PC: 4 SACCH multiframes
186 W_QUAL_PC: 2 SACCH multiframes
187 pcLowerThresholdLevDL: 0Fh
188 pcLowerThresholdLevUL: 0Ah
189 pcLowerThresholdQualDL: 05h = 3.2% < BER < 6.4%
190 pcLowerThresholdQualUL: 05h = 3.2% < BER < 6.4%
191 pcRLFThreshold: 0Ch
192 pcUpperThresholdLevDL: 14h
193 pcUpperThresholdLevUL: 0Fh
194 pcUpperThresholdQualDL: 04h = 1.6% < BER < 3.2%
195 pcUpperThresholdQualUL: 04h = 1.6% < BER < 3.2%
196 powerConfirm: 2 ,unit 2 SACCH multiframes
197 powerControlInterval: 2 ,unit 2 SACCH multiframes
198 powerIncrStepSize: 02h = 4 dB
199 powerRedStepSize: 01h = 2 dB
200 radioLinkTimeoutBs: 64 SACCH multiframes
201 enableBSPowerControl: 00h = disabled
202*/
203
204unsigned char msg_4[] =
205{
206 0xD0, 0xA2, 0x00, 0xFF, 0xFF, 0x69, 0x00, 0x6B, 0x00, 0x7E, 0x04, 0x01,
207 0x7F, 0x04, 0x02, 0x80, 0x0F, 0x81, 0x0A, 0x82, 0x05, 0x83, 0x05, 0x84,
208 0x0C, 0x85, 0x14, 0x86, 0x0F, 0x87, 0x04, 0x88, 0x04, 0x89, 0x02, 0x8A,
209 0x02, 0x8B, 0x02, 0x8C, 0x01, 0x8D, 0x40, 0x65, 0x01, 0x00 // set to 0x01 to enable BSPowerControl
210};
211
212
213// Transceiver, SET TRX ATTRIBUTES (TRX 0)
214
215/*
216 Object Class: Transceiver
217 BTS relat. Number: 0
218 Tranceiver number: 0
219 Instance 3: FF
220SET TRX ATTRIBUTES
221 aRFCNList (HEX): 0001
222 txPwrMaxReduction: 00h = 0dB
223 radioMeasGran: 254 SACCH multiframes
224 radioMeasRep: 01h = enabled
225 memberOfEmergencyConfig: 01h = TRUE
226 trxArea: 00h = TRX doesn't belong to a concentric cell
227*/
228
229unsigned char msg_6[] =
230{
231 0x44, 0x02, 0x00, 0x00, 0xFF, 0x05, 0x01, 0x00, HARDCODED_ARFCN /*0x01*/, 0x2D,
232 0x00, 0xDC, 0x01, 0xFE, 0xDD, 0x01, 0x01, 0x9B, 0x01, 0x01, 0x9F, 0x01, 0x00,
233};
234
235
236static void bootstrap_om(struct gsm_bts *bts)
237{
238 struct gsm_bts_trx *trx = &bts->trx[0];
239
240 /* stop sending event reports */
241 abis_nm_event_reports(bts, 0);
242
243 /* begin DB transmission */
244 abis_nm_db_transmission(bts, 1);
245
246 abis_nm_raw_msg(bts, sizeof(msg_1), msg_1); /* set BTS SiteMgr attr*/
247 abis_nm_raw_msg(bts, sizeof(msg_2), msg_2); /* set BTS attr */
248 abis_nm_raw_msg(bts, sizeof(msg_3), msg_3); /* set BTS handover attr */
249 abis_nm_raw_msg(bts, sizeof(msg_4), msg_4); /* set BTS power control attr */
250
251 /* Connect signalling of bts0/trx0 to e1_0/ts1/64kbps */
252 abis_nm_conn_terr_sign(trx, 0, 1, 0xff);
253 abis_nm_raw_msg(bts, sizeof(msg_6), msg_6); /* SET TRX ATTRIBUTES */
254
255 /* Use TEI 1 for signalling */
256 abis_nm_establish_tei(bts, 0, 0, 1, 0xff, 0x01);
257 abis_nm_set_channel_attr(&trx->ts[0], NM_CHANC_SDCCH_CBCH);
258#if 0
259 /* TRX 1 */
260 abis_nm_conn_terr_sign(&bts->trx[1], 0, 1, 0xff);
261 /* FIXME: TRX ATTRIBUTE */
262 abis_nm_establish_tei(bts, 0, 0, 1, 0xff, 0x02);
263#endif
264
265 /* SET CHANNEL ATTRIBUTE TS1 */
266 abis_nm_set_channel_attr(&trx->ts[1], 0x09);
267 /* Connect traffic of bts0/trx0/ts1 to e1_0/ts2/b */
268 abis_nm_conn_terr_traf(&trx->ts[1], 0, 2, 1);
269
270 /* SET CHANNEL ATTRIBUTE TS2 */
271 abis_nm_set_channel_attr(&trx->ts[2], 0x09);
272 /* Connect traffic of bts0/trx0/ts2 to e1_0/ts2/c */
273 abis_nm_conn_terr_traf(&trx->ts[2], 0, 2, 2);
274
275 /* SET CHANNEL ATTRIBUTE TS3 */
276 abis_nm_set_channel_attr(&trx->ts[3], 0x09);
277 /* Connect traffic of bts0/trx0/ts3 to e1_0/ts2/d */
278 abis_nm_conn_terr_traf(&trx->ts[3], 0, 2, 3);
279
280 /* SET CHANNEL ATTRIBUTE TS4 */
281 abis_nm_set_channel_attr(&trx->ts[4], 0x09);
282 /* Connect traffic of bts0/trx0/ts4 to e1_0/ts3/a */
283 abis_nm_conn_terr_traf(&trx->ts[4], 0, 3, 0);
284
285 /* SET CHANNEL ATTRIBUTE TS5 */
286 abis_nm_set_channel_attr(&trx->ts[5], 0x09);
287 /* Connect traffic of bts0/trx0/ts5 to e1_0/ts3/b */
288 abis_nm_conn_terr_traf(&trx->ts[5], 0, 3, 1);
289
290 /* SET CHANNEL ATTRIBUTE TS6 */
291 abis_nm_set_channel_attr(&trx->ts[6], 0x09);
292 /* Connect traffic of bts0/trx0/ts6 to e1_0/ts3/c */
293 abis_nm_conn_terr_traf(&trx->ts[6], 0, 3, 2);
294
295 /* SET CHANNEL ATTRIBUTE TS7 */
296 abis_nm_set_channel_attr(&trx->ts[7], 0x09);
297 /* Connect traffic of bts0/trx0/ts7 to e1_0/ts3/d */
298 abis_nm_conn_terr_traf(&trx->ts[7], 0, 3, 3);
299
300 /* end DB transmission */
301 abis_nm_db_transmission(bts, 0);
302
303 /* Reset BTS Site manager resource */
304 abis_nm_reset_resource(bts);
305
306 /* restart sending event reports */
307 abis_nm_event_reports(bts, 1);
308}
309
310
311
312struct bcch_info {
313 u_int8_t type;
314 u_int8_t len;
315 const u_int8_t *data;
316};
317
318/*
319SYSTEM INFORMATION TYPE 1
320 Cell channel description
321 Format-ID bit map 0
322 CA-ARFCN Bit 124...001 (Hex): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01
323 RACH Control Parameters
324 maximum 7 retransmissions
325 8 slots used to spread transmission
326 cell not barred for access
327 call reestablishment not allowed
328 Access Control Class = 0000
329*/
330static const u_int8_t si1[] = {
331 0x55, 0x06, 0x19, 0x04 /*0x00*/, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
332 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /*0x01*/,0xD5,
333 0x00, 0x00, 0x2B
334};
335
336/*
337 SYSTEM INFORMATION TYPE 2
338 Neighbour Cells Description
339 EXT-IND: Carries the complete BA
340 BA-IND = 0
341 Format-ID bit map 0
342 CA-ARFCN Bit 124...001 (Hex): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
343 NCC permitted (NCC) = FF
344 RACH Control Parameters
345 maximum 7 retransmissions
346 8 slots used to spread transmission
347 cell not barred for access
348 call reestablishment not allowed
349 Access Control Class = 0000
350*/
351static const u_int8_t si2[] = {
352 0x59, 0x06, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xD5, 0x00,
354 0x00
355};
356
357/*
358SYSTEM INFORMATION TYPE 3
359 Cell identity = 00001 (1h)
360 Location area identification
361 Mobile Country Code (MCC): 001
362 Mobile Network Code (MNC): 01
363 Location Area Code (LAC): 00001 (1h)
364 Control Channel Description
365 Attach-detach: MSs in the cell are not allowed to apply IMSI attach /detach
366 0 blocks reserved for access grant
367 1 channel used for CCCH, with SDCCH
368 5 multiframes period for PAGING REQUEST
369 Time-out T3212 = 0
370 Cell Options BCCH
371 Power control indicator: not set
372 MSs shall not use uplink DTX
373 Radio link timeout = 36
374 Cell Selection Parameters
375 Cell reselect hysteresis = 6 dB RXLEV hysteresis for LA re-selection
376 max.TX power level MS may use for CCH = 2
377 Additional Reselect Parameter Indication (ACS) = only SYSTEM INFO 4: The SI rest octets, if present, shall be used to derive the value of PI and possibly C2 parameters
378 Half rate support (NECI): New establishment causes are not supported
379 min.RX signal level for MS = 0
380 RACH Control Parameters
381 maximum 7 retransmissions
382 8 slots used to spread transmission
383 cell not barred for access
384 call reestablishment not allowed
385 Access Control Class = 0000
386 SI 3 Rest Octets
387 Cell Bar Qualify (CBQ): 0
388 Cell Reselect Offset = 0 dB
389 Temporary Offset = 0 dB
390 Penalty Time = 20 s
391 System Information 2ter Indicator (2TI): 0 = not available
392 Early Classmark Sending Control (ECSC): 0 = forbidden
393 Scheduling Information is not sent in SYSTEM INFORMATION TYPE 9 on the BCCH
394*/
395unsigned char si3[] = {
396 0x49, 0x06, 0x1B, 0x00, 0x01, 0x00, 0xF1, 0x10, 0x00, 0x01,
397 0x01, 0x03, 0x00, 0x28, 0x62, 0x00, 0xD5, 0x00, 0x00, 0x80,
398 0x00, 0x00, 0x2B
399};
400
401/*
402SYSTEM INFORMATION TYPE 4
403 Location area identification
404 Mobile Country Code (MCC): 001
405 Mobile Network Code (MNC): 01
406 Location Area Code (LAC): 00001 (1h)
407 Cell Selection Parameters
408 Cell reselect hysteresis = 6 dB RXLEV hysteresis for LA re-selection
409 max.TX power level MS may use for CCH = 2
410 Additional Reselect Parameter Indication (ACS) = only SYSTEM INFO 4: The SI rest octets, if present, shall be used to derive the value of PI and possibly C2 parameters
411 Half rate support (NECI): New establishment causes are not supported
412 min.RX signal level for MS = 0
413 RACH Control Parameters
414 maximum 7 retransmissions
415 8 slots used to spread transmission
416 cell not barred for access
417 call reestablishment not allowed
418 Access Control Class = 0000
419 Channel Description
420 Type = SDCCH/4[2]
421 Timeslot Number: 0
422 Training Sequence Code: 7h
423 ARFCN: 1
424 SI Rest Octets
425 Cell Bar Qualify (CBQ): 0
426 Cell Reselect Offset = 0 dB
427 Temporary Offset = 0 dB
428 Penalty Time = 20 s
429*/
430static const u_int8_t si4[] = {
431 0x41, 0x06, 0x1C, 0x00, 0xF1, 0x10, 0x00, 0x01, 0x62, 0x00,
432 0xD5, 0x00, 0x00, 0x64, 0x30, 0xE0, HARDCODED_ARFCN/*0x01*/, 0x80, 0x00, 0x00,
433 0x2B, 0x2B, 0x2B
434};
435
436/*
437 SYSTEM INFORMATION TYPE 5
438 Neighbour Cells Description
439 EXT-IND: Carries the complete BA
440 BA-IND = 0
441 Format-ID bit map 0
442 CA-ARFCN Bit 124...001 (Hex): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
443*/
444
445static const u_int8_t si5[] = {
446 0x06, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
447 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
448};
449
450// SYSTEM INFORMATION TYPE 6
451
452/*
453SACCH FILLING
454 System Info Type: SYSTEM INFORMATION 6
455 L3 Information (Hex): 06 1E 00 01 xx xx 10 00 01 28 FF
456
457SYSTEM INFORMATION TYPE 6
458 Cell identity = 00001 (1h)
459 Location area identification
460 Mobile Country Code (MCC): 001
461 Mobile Network Code (MNC): 01
462 Location Area Code (LAC): 00001 (1h)
463 Cell Options SACCH
464 Power control indicator: not set
465 MSs shall not use uplink DTX on a TCH-F. MS shall not use uplink DTX on TCH-H.
466 Radio link timeout = 36
467 NCC permitted (NCC) = FF
468*/
469
470static const u_int8_t si6[] = {
471 0x06, 0x1E, 0x00, 0x01, 0x00, 0xF1, 0x10, 0x00, 0x01, 0x28, 0xFF,
472};
473
474
475
476static const struct bcch_info bcch_infos[] = {
477 {
478 .type = RSL_SYSTEM_INFO_1,
479 .len = sizeof(si1),
480 .data = si1,
481 }, {
482 .type = RSL_SYSTEM_INFO_2,
483 .len = sizeof(si2),
484 .data = si2,
485 }, {
486 .type = RSL_SYSTEM_INFO_3,
487 .len = sizeof(si3),
488 .data = si3,
489 }, {
490 .type = RSL_SYSTEM_INFO_4,
491 .len = sizeof(si4),
492 .data = si4,
493 },
494};
495
496/* set all system information types */
497static int set_system_infos(struct gsm_bts *bts)
498{
499 int i;
500
501 for (i = 0; i < ARRAY_SIZE(bcch_infos); i++) {
502 rsl_bcch_info(bts, bcch_infos[i].type,
503 bcch_infos[i].data,
504 bcch_infos[i].len);
505 }
506 rsl_sacch_filling(bts, RSL_SYSTEM_INFO_5, si5, sizeof(si5));
507 rsl_sacch_filling(bts, RSL_SYSTEM_INFO_6, si6, sizeof(si6));
508}
509
510static void activate_traffic_channels(struct gsm_bts_trx *trx)
511{
512 int i;
513
514 /* channel 0 is CCCH */
515 for (i = 1; i < 8; i++)
516 rsl_chan_activate_tch_f(&trx->ts[i]);
517}
518
519static void bootstrap_bts(struct gsm_bts *bts)
520{
521 bootstrap_om(bts);
522
523 set_system_infos(bts);
524
525 /* FIXME: defer this until the channels are used */
526 activate_traffic_channels(&bts->trx[0]);
527}
528
529static void bootstrap_network()
530{
531 struct gsm_bts *bts;
532
533 /* initialize our data structures */
534 gsmnet = gsm_network_init(1, 1, 1);
535 bts = &gsmnet->bts[0];
536 bts->location_area_code = 1;
537 bts->trx[0].arfcn = HARDCODED_ARFCN;
538
539 /* initialize the BTS */
540 bootstrap_bts(&gsmnet->bts[0]);
541
542
543}