Project

General

Profile

SDR OsmoTRX network from scratch » History » Version 10

jolly, 02/19/2016 10:47 PM

1 1 jolly
[[PageOutline]]
2
= Installing a GSM network from scratch =
3
4
This document describes how to install, configure and run BTS transceiver, OsmoBTS, OpenBSC and LCR.
5
6
In order to use this quick howto, you must have basic knowledge about GIT and be familiar with compiling packages from source.
7
8
9
== Prerequisite ==
10
11
=== opencore-amr ===
12
13
This package installs GSM adaptive multirate codecs
14
15
It can downloaded at [http://sourceforge.net/projects/opencore-amr/files/opencore-amr/]
16
17
{{{
18
tar xvzf opencore-amr-x.x.x.tar.gz
19
cd opencore-amr-x.x.x
20
./configure
21
make
22
make install
23
ldconfig
24
cd ..
25
}}}
26
27
28
=== Sip-Sofia ===
29
30
This package installs the open source SIP stack of Nokia Research Center.
31
32
It can downloaded at [http://sourceforge.net/projects/sofia-sip/files/sofia-sip/].
33
34
{{{
35
tar xvzf sofia-sip-x.xx.xx.tar.gz
36
cd sofia-sip-x.xx.xx
37
./configure
38
make
39
make install
40
ldconfig
41
cd ..
42
}}}
43
44
45
=== oRTP ===
46
47
This package installs the open source RTP protocol required for libosmo-abis.
48
49
It can downloaded at [http://download.savannah.gnu.org/releases/linphone/ortp/sources/].
50
51
{{{
52
tar xvzf ortp-x.xx.x.tar.gz
53
cd ortp-x.xx.x
54
./configure
55
make
56
make install
57
ldconfig
58
cd ..
59
}}}
60
61
62
=== others ===
63
64
sqlite3 and libdbi should be available from your distribution.
65
66
67
68
== Installing  ==
69 2 jolly
70
=== Linux-Call-Router (LCR) ===
71
72
This package installs the open source PBX software to bridge ISDN (DSS1) / SIP / GSM (MNCC protocol)
73
74
The latest version can downloaded via git:
75
{{{
76
git clone git://git.misdn.eu/lcr.git/
77
}}}
78
79 3 jolly
Now configure, as described here:
80
81 2 jolly
{{{
82
cd lcr
83
autoreconf -i
84
./configure --with-sip --with-gsm-bs --with-gsm-ms --enable-gsm-hr
85
}}}
86 1 jolly
87 3 jolly
Sometimes it is necessary to point to different pkgconfig path, because your distribution may use other pkgconfig path than the default path of the packages above. Use the following prefix:
88
{{{
89
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....
90
}}}
91 1 jolly
92 3 jolly
The configure result should include:
93
{{{
94 2 jolly
configure: Compiled with GSM network side support
95
configure: Compiled with GSM mobile side support
96
configure: Compiled with GSM half rate codec support
97 1 jolly
configure: Compiled with GSM AMR codec support
98 2 jolly
configure: Compiled with SIP support
99 3 jolly
}}}
100 1 jolly
101 3 jolly
Finish the installation:
102
{{{
103 2 jolly
make
104
make install
105 1 jolly
ldconfig
106 2 jolly
cd ..
107 3 jolly
}}}
108 1 jolly
109
110 3 jolly
=== libosmocore ===
111 1 jolly
112 3 jolly
This package installs the core utility library for various Osmocom projects.
113 1 jolly
114 3 jolly
The latest version can downloaded via git:
115
{{{
116
git clone git://git.osmocom.org/libosmocore.git
117
}}}
118
119
Finish the installation:
120
{{{
121 2 jolly
cd libosmocore
122
git checkout -b
123
autoreconf -i
124
./configure
125 1 jolly
make
126 2 jolly
make install
127
ldconfig
128 1 jolly
cd ..
129 3 jolly
}}}
130 1 jolly
131
132 3 jolly
=== libosmo-abis ===
133 1 jolly
134 3 jolly
This package installs the core utility library for various Osmocom projects.
135
136
The latest version can downloaded via git:
137
{{{
138
git clone git://git.osmocom.org/libosmo-abis.git
139
}}}
140
141
Sometimes it is necessary to point to different pkgconfig path, because your distribution may use other pkgconfig path than the default path of the packages above. Use the following prefix:
142
{{{
143
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....
144
}}}
145
146
Finish the installation:
147
{{{
148 2 jolly
cd libosmo-abis
149
autoreconf -i
150 1 jolly
./configure
151 2 jolly
(sometimes it is necessary to point to different .../lib/pkgconfig/ path: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....)
152
make
153 1 jolly
make install
154
ldconfig
155
cd ..
156 3 jolly
}}}
157 1 jolly
158
159 3 jolly
=== OpenBSC ===
160 1 jolly
161 3 jolly
This package installs the open source base station controller.
162 2 jolly
163 3 jolly
The latest version can downloaded via git:
164
{{{
165
git clone git://git.osmocom.org/openbsc.git
166
}}}
167
168
Finish the installation:
169
{{{
170 1 jolly
cd openbsc/openbsc/
171 2 jolly
change repository: git checkout -b jolly/testing origin/jolly/testing
172
autoreconf -i
173 1 jolly
./configure
174
(sometimes it is necessary to point to different .../lib/pkgconfig/ path: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....)
175 2 jolly
make
176 1 jolly
make install
177
cd ../..
178 3 jolly
}}}
179 1 jolly
180
181 3 jolly
=== OsmoBTS ===
182
183 1 jolly
osmo-bts: (BTS software)
184
185 3 jolly
This package installs the open source base transceiver station.
186
187
The latest version can downloaded via git:
188
{{{
189
git clone git://git.osmocom.org/osmo-bts.git
190
}}}
191
192
Finish the installation:
193
{{{
194 1 jolly
cd osmo-bts
195 2 jolly
change repository: git checkout -b jolly/trx origin/jolly/trx
196 1 jolly
autoreconf -i
197
./configure --enable-trx
198
(sometimes it is necessary to point to different .../lib/pkgconfig/ path: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....)
199 2 jolly
make
200 1 jolly
make install
201
cd ..
202 3 jolly
}}}
203 2 jolly
204
205 3 jolly
== Configuration examples ==
206 2 jolly
207 10 jolly
=== OsmoBTS ===
208 3 jolly
209
{{{
210 2 jolly
mkdir ~/.osmocom
211 3 jolly
edit ~/.osmocom/osmo-bts.cfg
212
}}}
213 2 jolly
214 3 jolly
{{{
215 2 jolly
bts 0
216
 band DCS1800
217
 ipa unit-id 1801 0
218
 oml remote-ip 127.0.0.1
219
 rtp bind-ip 127.0.0.1
220
 rtp jitter-buffer 0
221
 paging lifetime 0
222
 radio-link-timeout 32
223
 gsmtap-sapi bcch
224
 gsmtap-sapi ccch
225 1 jolly
 gsmtap-sapi rach
226 2 jolly
 gsmtap-sapi agch
227
 gsmtap-sapi pch
228
 gsmtap-sapi sdcch
229
 gsmtap-sapi pacch
230
 gsmtap-sapi pdtch
231
 gsmtap-sapi sacch
232
 fn-advance 20
233
 ms-power-loop -10
234
 timing-advance-loop
235
 trx 0
236
  rxgain 0
237 1 jolly
  power 0
238
}}}
239 4 jolly
240
241
=== OpenBSC ===
242
243
{{{
244
mkdir ~/.osmocom
245
edit ~/.osmocom/open-bsc.cfg
246
}}}
247
248 5 jolly
'''Be sure to change 'arfcn' to a frequency you have license for!'''
249
250 4 jolly
{{{
251
e1_input
252
 e1_line 0 driver ipa
253
 e1_line 0 port 0
254
network
255
 network country code 262
256
 mobile network code 42
257
 short name OpenBSC
258
 long name OpenBSC
259
 auth policy accept-all
260
 location updating reject cause 13
261
 encryption a5 0
262
 neci 1
263
 paging any use tch 0
264
 rrlp mode ms-based
265
 mm info 1
266
 handover 0
267
 handover window rxlev averaging 10
268
 handover window rxqual averaging 1
269
 handover window rxlev neighbor averaging 10
270
 handover power budget interval 6
271
 handover power budget hysteresis 3
272
 handover maximum distance 9999
273
 timer t3101 10
274
 timer t3103 0
275
 timer t3105 0
276
 timer t3107 0
277
 timer t3109 0
278
 timer t3111 0
279
 timer t3113 60
280
 timer t3115 0
281
 timer t3117 0
282
 timer t3119 0
283
 timer t3122 10
284
 timer t3141 0
285
 dtx-used 0
286
 subscriber-keep-in-ram 0
287
 bts 0
288
  type nanobts
289
  band DCS1800
290
  cell_identity 0
291
  location_area_code 1
292
  training_sequence_code 7
293
  base_station_id_code 63
294
  ms max power 0
295
  cell reselection hysteresis 4
296
  rxlev access min 0
297
  periodic location update 30
298
  channel allocator descending
299
  rach tx integer 9
300
  rach max transmission 7
301
  channel-descrption attach 1
302
  channel-descrption bs-pa-mfrms 5
303
  channel-descrption bs-ag-blks-res 1
304
  ip.access unit_id 1801 0
305
  oml ip.access stream_id 255 line 0
306
  neighbor-list mode automatic
307
  trx 0
308
   rf_locked 0
309
   arfcn 869
310
   nominal power 0
311
   max_power_red 0
312
   rsl e1 tei 0
313
    timeslot 0
314
     phys_chan_config CCCH+SDCCH4
315
     hopping enabled 0
316
    timeslot 1
317
     phys_chan_config TCH/F
318
     hopping enabled 0
319
    timeslot 2
320
     phys_chan_config TCH/F
321
     hopping enabled 0
322
    timeslot 3
323
     phys_chan_config TCH/F
324
     hopping enabled 0
325
    timeslot 4
326
     phys_chan_config TCH/F
327
     hopping enabled 0
328
    timeslot 5
329
     phys_chan_config TCH/F
330
     hopping enabled 0
331
    timeslot 6
332
     phys_chan_config TCH/F
333
     hopping enabled 0
334
    timeslot 7
335
     phys_chan_config TCH/F
336
     hopping enabled 0
337 5 jolly
}}}
338 4 jolly
339
340
=== LCR ===
341
342
==== interface.conf ====
343
344
The simplest configuration uses only the GSM interface. It allows LCR to forward calls from GSM to GSM or from GSM to a call test feature.
345
346
{{{
347
edit /usr/local/etc/lcr/interface.conf
348
}}}
349
350
You can remove (or comment out) everything and just add this interface:
351
352
{{{
353
[gsm]
354
gsm-bs
355
tones yes
356
earlyb no
357
extern
358
}}}
359
360
==== routing.conf ====
361
362
{{{
363
edit /usr/local/etc/lcr/routing.conf
364
}}}
365
366
You can remove (or comment out) everything and just add these rulesets:
367
368
{{{
369
[main]
370
interface=gsm                           : goto ruleset=gsm
371
                                        : disconnect cause=31
372
373
[gsm]
374
dialing=99                              : test
375
                                        : extern interfaces=gsm
376
}}}
377
378
Look at the main rule set. All calls from interface 'gsm' are forwarded to rule set 'gsm'.
379
380 1 jolly
Look at the gsm rule set. All calls that dial '99' prefix, will be test calls. All other calls will be forwarded back to 'gsm' interface.
381 6 jolly
382
383
== Running ==
384
385
I suggest to have one shell for every process to run, rather than stating all processes as damon from one shell. Not starting as deamon allows to easily see the debugging output.
386
387
=== OpenBSC ===
388
389
Open a shell and start OpenBSC:
390
391
{{{
392 9 jolly
osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -m -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM
393 6 jolly
}}}
394
395 1 jolly
OpenBSC runs as a stand-alone network with given config file and data base. It allows forwarding of RTP data and connection to LCR, if the options above are used.
396 8 jolly
397
Very important is the option '-C'. On certain machines, osmo-nitb will halt from time to time while writing counters to database. This Without this option, audio might interrupt several seconds from time to time.
398 1 jolly
399 9 jolly
The debugging is usefull for early tests, because you will quickly see what happens if a mobile requests something.
400
401 6 jolly
{{{
402
<0005> bsc_init.c:422 
403
WARNING: You are running an 'accept-all' network on a BTS that is not barred.  This configuration is likely to interfere with production GSM networks and should only be used in a RF shielded environment such as a faraday cage!
404
405
<0019> input/ipaccess.c:925 enabling ipaccess BSC mode
406
DB: Database initialized.
407
DB: Database prepared.
408
<001d> sms_queue.c:220 Attempting to send 20 SMS
409
}}}
410
411
412
=== OsmoBTS ===
413
414
Open a shell and start OsmoBTS:
415
416
{{{
417
osmobts-trx -c ~/.osmocom/osmo-bts.cfg
418
}}}
419
420
{{{
421
((*))
422
  |
423
 / \ OsmoBTS
424
Using MAC address of eth0: 'xx:xx:xx:xx:xx:xx'
425
...
426
<000a> trx_if.c:176 No response from tranceiver
427
<000a> trx_if.c:176 No response from tranceiver
428
<000a> trx_if.c:176 No response from tranceiver
429
}}}
430 7 jolly
431
432
=== Transceiver ===
433
434
Now start your OpenBTS transceiver.
435
436
==== UmTRX ====
437
438
The installation/setup/calibration of UmTRX is beyond the scope of this document. Please refer to:
439
440
 * https://github.com/fairwaves
441
 * http://files.ettus.com/uhd_docs/manual/html/build.html
442
 * http://wush.net/trac/rangepublic/wiki/BuildInstallRun
443
444
==== calypso-BTS ====
445
446
TBD
447
448
449
=== LCR ===
450
451
Run LCR with debugging output.
452
453
{{{
454
lcr start
455
}}}
456
457
{{{
458
** LCR  Version 1.14
459
460
LCR 1.14 started, waiting for calls...
461
}}}
462 1 jolly
463
464 9 jolly
== Test ==
465
466
=== Location Updating ===
467
468
Switch on the phone.
469
470
If you have a SIM card for your network 262 42, you can use it and do automatic network search. If not, do a manual network and select this network. You should see debugging output on OpenBSC like this:
471
{{{
472
...
473
 <0002> gsm_04_08.c:424 -> LOCATION UPDATE ACCEPT
474
...
475
}}}
476
477
478
=== Call the music ===
479
480
Now enter phone number 995 to select the test function 5 of LCR. This test function just plays the hold music.
481
482
483
=== Echo and BFI test ===
484
485
Enter phone number 993 to select the test function 3 of LCR. This test function echoes back everything that is received. Note that it will re-transcode the speech data, so the audio from your voice is compressed and decompressed twice until you can hear a fraction of a second later.
486
487
You may experience short beeps. These beeps represent all bad frames that could not be decoded or got lost over the air. (Without this test, the missing frames will be extrapolated from previous frame, so some loss rate will not be recognized by the remote end.)
Add picture from clipboard (Maximum size: 48.8 MB)