Project

General

Profile

CalypsoBTS » History » Version 4

msuraev, 05/31/2016 09:31 AM

1 1 fixeria
2 3 fixeria
h1. [[CalypsoBTS]]
3 1 fixeria
4
5 3 fixeria
This tutorial describes how to turn cheap Calypso based phone(s) into a BTS. Due to hardware limitations the [[CalypsoBTS]] setup cannot provide normal quality of service and only can be used to learn how the base stations works. Because Calypso based phone cannot perform BTS functionality itself, in this tutorial we consider how to use it with "OsmoBTS":http://openbsc.osmocom.org/trac/wiki/OsmoBTS and "OpenBTS":http://openbts.org/ front-ends.
6
7
8
h2. Requirements
9
10
11 1 fixeria
First of all you have to understand what you're doing and possible consequences. You can use the frequencies you have valid license for. In many countries you cannot operate any GSM RF equipment unless you have obtained a proper license from the regulatory authority. Accomplishing to operate a BTS without having such a license and/or interfering with a public telecommunications network is a crime and punishable under applicable law! 
12
13 3 fixeria
Also you need to have a "working setup":http://bb.osmocom.org/trac/wiki/Software/GettingStarted of [[OsmocomBB]]. And finally some things can be differ in your distribution, so you should be able to solve possible problems yourself because it's your machine.
14 1 fixeria
15
16 3 fixeria
h2. TRX preparation
17
18
There are two [[OsmocomBB]] branches provide the transceiver firmware and application. I advice you to use the jolly/testing branch because it have multiple phones support. The transceiver app is an external interface of [[CalypsoBTS]] which abstracts a BTS software from the L1 physical layer. It needs libosmo-dsp as a dependency:
19
20
<pre>
21
<code class="sh">
22 1 fixeria
git clone git://git.osmocom.org/libosmo-dsp.git
23
cd libosmo-dsp/
24
autoreconf -i
25
./configure
26
make
27
sudo make install
28
cd ..
29 3 fixeria
</code></pre>
30 1 fixeria
31
Then clone and compile the jolly/testing branch:
32
33 3 fixeria
<pre>
34
<code class="sh">
35 1 fixeria
# Get the sources	
36
git clone git://git.osmocom.org/osmocom-bb.git trx
37
cd trx/
38
git checkout jolly/testing
39
cd src/
40
41
# It needs TX support
42
# Just uncomment 'CFLAGS += -DCONFIG_TX_ENABLE' in target/firmware/Makefile
43
44
# And make with transceiver support
45
make HOST_layer23_CONFARGS=--enable-transceiver
46 3 fixeria
</code></pre>
47 1 fixeria
48
And at this step your transceiver is ready. Let's check how it works!
49
50
51 3 fixeria
h4. A bit of theory
52
53
54 1 fixeria
It is very important to have a good clock synchronization between the BTS and mobile phones. Time-division (TDMA) systems require very accurate counting of the time segments and when they start and stop. If the towers clocking were out of sync, then communications would falter as each node would be trying to deal with segments that were slightly offset and this would introduce errors. The GPS signals can be used as clock source. But there is more simple way to grab the clock from existing public mobile networks.
55
56 3 fixeria
Using [[rssibin|RSSI]] or cell_log find the strongest cell and remember it's ARFCN number.
57 1 fixeria
58
59 3 fixeria
h4. Usage
60
61
62
<pre>
63 1 fixeria
Usage: ./transceiver -a arfcn_sync
64
Some useful options:
65
  -h   --help             this text
66
  -d   --debug MASK       Enable debugging (e.g. -d DL1C:DTRX)
67
  -e   --log-level LOGL   Set log level (1=debug, 3=info, 5=notice)
68
  -D   --daemonize        For the process into a background daemon
69
  -s   --disable-color    Don't use colors in stderr log output
70
  -a   --arfcn-sync ARFCN Set ARFCN to sync to
71
  -p   --arfcn-sync-pcs   The ARFCN above is PCS
72
  -2   --second-phone     Use second phone for TS 1
73
  -r   --realtime PRIO    Set realtime scheduler with given prio
74 3 fixeria
</code></pre>
75 1 fixeria
76 3 fixeria
Where --arfcn-sync or --arfcn-sync-pcs indicates the *ARFCN of clock source cell*. High priority scheduling required for handling bursts (-r 99). Just try to sync:
77 1 fixeria
78 3 fixeria
<pre>
79
<code class="sh">
80 1 fixeria
# Load the TRX firmware in first terminal
81
cd trx/src/
82
sudo host/osmocon/osmocon -r 99 -m c123xor -p /dev/ttyUSB0 -c target/firmware/board/compal_e88/trx.highram.bin
83
84
# In second terminal run the transceiver
85
cd trx/src/host/layer23/src/transceiver/
86
sudo ./transceiver -a <ARFCN> -r 99
87 3 fixeria
</code></pre>
88 1 fixeria
89
And you should see something like this:
90
91 3 fixeria
<pre>
92 1 fixeria
<0012> l1ctl.c:383 Reset received: Starting sync.
93
<0012> l1ctl.c:338 Sync acquired, setting BTS mode ...
94
<0011> trx.c:194 TRX CLK Indication 1255520
95
<0011> trx.c:194 TRX CLK Indication 1255571
96
<0011> trx.c:194 TRX CLK Indication 1255622
97
<0011> trx.c:194 TRX CLK Indication 1255673
98
<0011> trx.c:194 TRX CLK Indication 1255724
99
<0011> trx.c:194 TRX CLK Indication 1255775
100
<0011> trx.c:194 TRX CLK Indication 1255826
101
<0011> trx.c:194 TRX CLK Indication 1255877
102
<0011> trx.c:194 TRX CLK Indication 1255928
103
<0011> trx.c:194 TRX CLK Indication 1255979
104
<0011> trx.c:194 TRX CLK Indication 1256030
105
<0011> trx.c:194 TRX CLK Indication 1256081
106 2 fixeria
...
107 3 fixeria
</code></pre>
108 1 fixeria
109
If something goes wrong, find another ARFCN and try again.
110
111
112 3 fixeria
h1. [[CalypsoBTS]] with [[OsmoBTS]]
113 1 fixeria
114 3 fixeria
"OsmoBTS":http://openbsc.osmocom.org/trac/wiki/OsmoBTS is a software implementation of Layer2/3 of a BTS. Currently it supports a few hardware back-ends only:
115 1 fixeria
116 3 fixeria
* Multiple indoor and outdoor BTS products called ​sysmoBTS which is sold by ​"sysmocom":http://sysmocom.de/.
117
* Multiple indoor and outdoor ​fairwaves BTSs, like [[UmDESK]] and [[UmSITE]].
118
* Wideband SDR transceiver hardware supported by [[OpenBTS]] transceiver or "OsmoTRX":http://openbsc.osmocom.org/trac/wiki/OsmoTRX PHY layer software, including the [[UmTRX]], the USRP family, etc.
119
* A pretty crazy experimental BTS hardware based on several [[OsmocomBB]] phones.
120 1 fixeria
121 3 fixeria
The simplest way to test how it works is to use [[OsmoBTS]] with [[OpenBSC]] in [[NiTB]] mode. Refer "project home":http://openbsc.osmocom.org/trac/wiki/OpenBSC for details. [[NiTB]] is a simple core network implementation - network in the box. It emulates basic core elements like MSC, HLR, VLR, etc.
122
123
124
h3. Dependences
125
126
Make sure that you have installed "libosmocore":http://bb.osmocom.org/trac/wiki/libosmocore.
127
128 1 fixeria
Install/update the following packages in your distribution:
129
130 3 fixeria
<pre>
131 1 fixeria
132
133 3 fixeria
h4. oRTP
134
135
This package installs the open source RTP protocol required for libosmo-abis. It can be downloaded at "Current [[OsmoBTS]] source works fine with **0.22.0 oRTP** version only. Otherwise there may be problems with voice support.
136
137
<pre>
138
<code class="sh">
139 1 fixeria
wget http://download.savannah.gnu.org/releases/linphone/ortp/sources/ortp-0.22.0.tar.gz
140
tar -xvf ortp-0.22.0.tar.gz
141
cd ortp-0.22.0/
142
./configure
143
make
144
sudo make install
145
sudo ldconfig
146
cd ..
147 3 fixeria
</code></pre>
148 1 fixeria
149
150 3 fixeria
h4. libosmo-abis
151 1 fixeria
152 3 fixeria
153
<pre>
154
155 1 fixeria
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: 
156
157 3 fixeria
<pre>
158 1 fixeria
159 3 fixeria
<pre>
160
<code class="sh">
161 1 fixeria
cd libosmo-abis
162
autoreconf -i
163
./configure
164
(sometimes it is necessary to point to different .../lib/pkgconfig/ path: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....)
165
make
166
sudo make install
167
sudo ldconfig
168
cd ..
169 3 fixeria
</code></pre>
170 1 fixeria
171
172 3 fixeria
h4. libosmo-netif
173 1 fixeria
174 3 fixeria
175
This package is dependency of [[OsmoNITB]].
176
177
<pre>
178
<code class="sh">
179 1 fixeria
git clone git://git.osmocom.org/libosmo-netif.git
180
cd libosmo-netif/
181
autoreconf -i
182
./configure
183
make
184
sudo make install
185
sudo ldconfig
186
cd ..
187 3 fixeria
</code></pre>
188 1 fixeria
189
190 3 fixeria
h3. [[OsmoNITB]]
191
192
193 1 fixeria
The latest version can downloaded via git:
194
195 3 fixeria
<pre>
196 1 fixeria
197
Finish the installation:
198
199 3 fixeria
<pre>
200
<code class="sh">
201 1 fixeria
cd openbsc/openbsc/
202
autoreconf -i
203
./configure
204
make
205
sudo make install
206
cd ../..
207 3 fixeria
</code></pre>
208 1 fixeria
209
210 3 fixeria
h3. [[OsmoBTS]]
211
212
213 1 fixeria
The latest version can downloaded via git:
214
215 3 fixeria
<pre>
216 2 fixeria
217 1 fixeria
Finish the installation:
218
219 3 fixeria
<pre>
220
<code class="sh">
221 1 fixeria
cd osmo-bts
222
autoreconf -i
223
./configure --enable-trx
224
make
225
sudo make install
226
cd ..
227 3 fixeria
</code></pre>
228 1 fixeria
229
230 3 fixeria
h3. Basic configuration
231 1 fixeria
232 3 fixeria
233
Now wee need to configure [[OpenBSC]] and [[OsmoBTS]] to work together with [[CalypsoBTS]].
234
235
<pre>
236
<code class="sh">
237 1 fixeria
# Create the configuration folder if it isn't exist yet
238
mkdir ~/.osmocom
239
240
cd ~/.osmocom
241
touch ~/.osmocom/open-bsc.cfg
242
touch ~/.osmocom/osmo-bts.cfg
243 3 fixeria
</code></pre>
244 1 fixeria
245
Then init default configuration:
246
247 3 fixeria
<pre>
248
<code class="sh">
249
# Run [[OpenBSC]]
250 1 fixeria
osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM
251
252
# In another terminal
253
telnet localhost 4242
254
en
255
write file
256
exit
257
258 3 fixeria
# Kill [[OpenBSC]]
259 1 fixeria
Ctrl + C
260 3 fixeria
</code></pre>
261 1 fixeria
262 3 fixeria
Configure [[OsmoBTS]] manually:
263 1 fixeria
264 3 fixeria
<pre>
265 1 fixeria
bts 0
266
 band DCS1800
267
 ipa unit-id 1801 0
268
 oml remote-ip 127.0.0.1
269
 rtp jitter-buffer 0
270
 paging queue-size 200
271
 paging lifetime 0
272 2 fixeria
 fn-advance 30
273 1 fixeria
 ms-power-loop -60
274
 timing-advance-loop
275
 settsc
276
 setbsic
277
 trx 0
278
  rxgain 0
279
  power 0
280
  slotmask 1 0 0 0 0 0 0 0
281 3 fixeria
</code></pre>
282 1 fixeria
283
**NOTE: "ms-power-loop" at osmo-bts.cfg should be set to -65, in order to prevent saturating the input. Also if the phone is only one or few meters away, "ms max power" should be set to 0. In case of long distance test it can be set to 30 (DCS) or 33 (GSM 900).**
284
285 3 fixeria
In case of one phone as TRX only one timeslot will be available for [[OsmoBTS]]. This is enough for basic network functionality including Location Update, SMS and USSD support. For the voice calls support you need one more phone serving a TCH channel. In case of two phones change slotmask to:
286 1 fixeria
287 3 fixeria
<pre>
288 1 fixeria
289 3 fixeria
Now find and change following initial config parameters of [[OpenBSC]]:
290 2 fixeria
291 3 fixeria
<pre>
292 2 fixeria
# In network section
293 1 fixeria
network country code <MNC (for test use 001)>
294 2 fixeria
mobile network code <MCC (for test use 01)>
295
short name <NAME>
296 1 fixeria
long name <NAME>
297 2 fixeria
298 3 fixeria
# In trx[0":http://download.savannah.gnu.org/releases/linphone/ortp/sources/]. section
299 2 fixeria
arfcn <your BTS ARFCN (see note)>
300 3 fixeria
</code></pre>
301 2 fixeria
302 3 fixeria
*Warning:* Only use an ARFCN you have a *valid license* for.
303 1 fixeria
304 3 fixeria
For other configuration parameters description, see "OpenBSC VTY reference":http://openbsc.osmocom.org/trac/wiki/osmo-nitb_VTY.
305 2 fixeria
306
307 3 fixeria
h3. Voice calls support
308
309
By default [[NiTB]] has built-in voice call routing support. In this case you need at least one timeslot serving TCH/H or TCH/F. If you do a call from one phone to another, you will need one channel for each phone. However, it is possible to allow two traffic channels on a single timeslot. To do this configure second timeslot (TS1) as TCH/H at open-bsc.cnf:
310
311
<pre>
312 1 fixeria
...
313
trx 0
314
   rf_locked 0
315
   arfcn <ARFCN>
316 2 fixeria
   nominal power 23
317 1 fixeria
   max_power_red 0
318 2 fixeria
   rsl e1 tei 0
319 1 fixeria
   timeslot 0
320
    phys_chan_config CCCH+SDCCH4
321
    hopping enabled 0
322 2 fixeria
   timeslot 1
323 1 fixeria
    phys_chan_config TCH/H
324 2 fixeria
    hopping enabled 0
325
    ...
326 1 fixeria
327 2 fixeria
mncc-int
328
 default-codec tch-f amr
329
 default-codec tch-h amr
330
...
331 3 fixeria
</code></pre>
332 1 fixeria
333 2 fixeria
334 3 fixeria
h3. LCR (optional)
335 1 fixeria
336 4 msuraev
If you want to manage/route calls outside of [[NiTB]], you can replace internal call control by 
337
"Linux Call Router": http://isdn.eversberg.eu/
338 2 fixeria
339 3 fixeria
340
h4. opencore-amr
341
342
This package installs GSM adaptive multirate codecs and the EFR codec. The Full-Rate and Half-Rate codecs are included in LCR's repository.
343
344
<pre>
345
<code class="sh">
346 2 fixeria
tar xvzf opencore-amr-x.x.x.tar.gz
347
cd opencore-amr-x.x.x
348 1 fixeria
./configure
349 2 fixeria
make
350 1 fixeria
sudo make install
351
sudo ldconfig
352
cd ..
353 3 fixeria
</code></pre>
354 2 fixeria
355 1 fixeria
356 3 fixeria
h4. Sip-Sofia
357
358
359 1 fixeria
This package installs the open source SIP stack of Nokia Research Center.
360 2 fixeria
361 3 fixeria
It can downloaded at [http://sourceforge.net/projects/sofia-sip/files/sofia-sip/":http://sourceforge.net/projects/opencore-amr/files/opencore-amr/]..
362 1 fixeria
363 3 fixeria
<pre>
364
<code class="sh">
365 1 fixeria
tar xvzf sofia-sip-x.xx.xx.tar.gz
366
cd sofia-sip-x.xx.xx
367
./configure
368 2 fixeria
make
369
sudo make install
370 1 fixeria
sudo ldconfig
371 2 fixeria
cd ..
372 3 fixeria
</code></pre>
373 1 fixeria
374 2 fixeria
375 3 fixeria
h4. LCR
376
377
378 1 fixeria
This package installs the open source PBX software to bridge ISDN (DSS1) / SIP / GSM (MNCC protocol).
379
380
The latest version can downloaded via git:
381 2 fixeria
382 3 fixeria
<pre>
383 1 fixeria
384
Now configure, as described here:
385
386 3 fixeria
<pre>
387
<code class="sh">
388 2 fixeria
cd lcr
389 1 fixeria
autoreconf -i
390 2 fixeria
./configure --with-sip --with-gsm-bs --with-gsm-ms
391 3 fixeria
</code></pre>
392 2 fixeria
393
Please note, that Half-Rate codec (--enable-gsmhr) codec is so slow, that only one or two calls may occupy CPU completely. So avoid it's usage except for testing.
394
395
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:
396
397 3 fixeria
<pre>
398 2 fixeria
399 1 fixeria
The configure result should include:
400
401 3 fixeria
<pre>
402 1 fixeria
configure: Compiled with GSM network side support 
403
configure: Compiled with GSM mobile side support
404
configure: Compiled with GSM AMR codec support
405 2 fixeria
configure: Compiled with SIP support
406 3 fixeria
</code></pre>
407 1 fixeria
408 2 fixeria
Finish the installation:
409
410 3 fixeria
<pre>
411
<code class="sh">
412 1 fixeria
make
413
sudo make install
414
sudo ldconfig
415
cd ..
416 3 fixeria
</code></pre>
417 1 fixeria
418
419 3 fixeria
h3. LCR configuration (optional)
420 1 fixeria
421
422 3 fixeria
423
h4. options.conf
424
425
426
<pre>
427
428 1 fixeria
Add a line to show logging to the console:
429
430 3 fixeria
<pre>
431 1 fixeria
432
433 3 fixeria
h4. interface.conf
434
435
436 2 fixeria
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. 
437 1 fixeria
438 3 fixeria
<pre>
439 2 fixeria
440
You can remove (or comment out) everything and just add this interface:
441 1 fixeria
442 3 fixeria
<pre>
443 2 fixeria
[gsm]
444 1 fixeria
gsm-bs
445
tones yes
446
earlyb no
447
extern
448 3 fixeria
</code></pre>
449 1 fixeria
450 2 fixeria
451 3 fixeria
h4. routing.conf
452 1 fixeria
453 3 fixeria
454
<pre>
455
456 2 fixeria
You can remove (or comment out) everything and just add these rulesets:
457
458 3 fixeria
<pre>
459 1 fixeria
# All calls from interface 'gsm' are forwarded to rule set 'gsm'.
460
[main]
461
interface=gsm                           : goto ruleset=gsm
462
                                        : disconnect cause=31
463 2 fixeria
464
# All calls that dial '99' prefix, will be test calls. All other calls will be forwarded back to 'gsm' interface.
465
[gsm]
466
dialing=99                              : test
467
                                        : extern interfaces=gsm
468 3 fixeria
</code></pre>
469 2 fixeria
470
471 3 fixeria
h2. Running
472
473
474 2 fixeria
I suggest to have one shell for every process to run, rather than stating all processes as daemon from one shell. Not starting as daemon allows to easily see the debugging output.
475
476
477 3 fixeria
h4. 1. Transceiver
478
479
480 2 fixeria
First load the TRX firmware. In case of one phone:
481
482 3 fixeria
<pre>
483
<code class="sh">
484
# Shell #1424
485 2 fixeria
cd trx/src/
486
sudo host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -c target/firmware/board/compal_e88/trx.highram.bin -r 99
487
488 3 fixeria
# Shell #1425
489 1 fixeria
cd trx/src/host/layer23/src/transceiver/
490
sudo ./transceiver -a <ARFCN to sync> -r 99
491 3 fixeria
</code></pre>
492 1 fixeria
493
In case of two phones you should run two osmocon applications:
494
495 3 fixeria
<pre>
496
<code class="sh">
497
# Shell #1424
498 1 fixeria
cd trx/src/
499 2 fixeria
sudo host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -s /tmp/osmocom_l2 -c target/firmware/board/compal_e88/trx.highram.bin -r 99
500
501 3 fixeria
# Shell #1425
502 2 fixeria
cd trx/src/
503
sudo host/osmocon/osmocon -m c123xor -p /dev/ttyUSB1 -s /tmp/osmocom_l2.2 -c target/firmware/board/compal_e88/trx.highram.bin -r 99
504
505 3 fixeria
# Shell #1426
506 1 fixeria
cd trx/src/host/layer23/src/transceiver/
507 2 fixeria
sudo ./transceiver -a <ARFCN> -2 -r 99
508 3 fixeria
</code></pre>
509 1 fixeria
510
Make sure that transceiver successfully synchronized to the clock source BTS.
511
512
513 3 fixeria
h4. 2. [[OpenBSC]]
514 2 fixeria
515 1 fixeria
516 3 fixeria
Open another shell and start [[OpenBSC]]:
517 2 fixeria
518 3 fixeria
<pre>
519 1 fixeria
520 3 fixeria
[[OpenBSC]] runs as a stand-alone network with given config file and data base. In order to use LCR, add '-m' option. In this case the LCR replaces the built-in call control.
521
522
<pre>
523
524 1 fixeria
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.
525 2 fixeria
526 1 fixeria
The debugging is useful for early tests, because you will quickly see what happens if a mobile requests something.
527
528 3 fixeria
<pre>
529 2 fixeria
<0005> bsc_init.c:423 
530
WARNING: You are running an 'accept-all' network on a BTS that is not barred. This configuration is
531
likely to interfere with production GSM networks and should only be used in a RF shielded environment 
532
such as a faraday cage!
533
534
<001a> input/ipaccess.c:831 enabling ipaccess BSC mode
535
DB: Database initialized.
536
DB: Database prepared.
537 3 fixeria
</code></pre>
538 2 fixeria
539
540 3 fixeria
h4. 2.1 LCR (optional)
541
542
543 2 fixeria
Start the LCR:
544
545 3 fixeria
<pre>
546
<code class="sh">
547 2 fixeria
sudo lcr start
548 3 fixeria
</code></pre>
549 2 fixeria
550
You should see following output:
551
552 3 fixeria
<pre>
553 2 fixeria
** LCR  Version 1.14
554
555
000000 DEBUG (in sip.cpp/sip_init() line 1997): SIP globals initialized
556
LCR 1.14 started, waiting for calls...
557
000000 TRACE 05.02.16 00:05:03.444 --: LCR 1.14 started, waiting for calls...
558 3 fixeria
</code></pre>
559 2 fixeria
560 3 fixeria
And following message at [[OpenBSC]] log:
561 2 fixeria
562 3 fixeria
<pre>
563 2 fixeria
<0006> mncc_sock.c:273 MNCC Socket has connection with external call control application
564 3 fixeria
</code></pre>
565 2 fixeria
566
567 3 fixeria
h4. 3. [[OsmoBTS]]
568 2 fixeria
569
570 3 fixeria
And finally start the [[OsmoBTS]] instance:
571
572
<pre>
573
574
<pre>
575 2 fixeria
((*))
576
  |
577 3 fixeria
 / \ [[OsmoBTS]]
578 2 fixeria
Using MAC address of eth0: 'xx:xx:xx:xx:xx:xx'
579
...
580
<000a> trx_if.c:176 No response from tranceiver
581
<000a> trx_if.c:176 No response from tranceiver
582
<000a> trx_if.c:176 No response from tranceiver
583 3 fixeria
</code></pre>
584 2 fixeria
585
586 3 fixeria
h2. Test
587 2 fixeria
588 3 fixeria
589
590
h3. Location Updating
591
592
593 2 fixeria
Switch on the phone.
594
595 3 fixeria
If you have a SIM card for your network MCC/MNC, 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:
596 2 fixeria
597 3 fixeria
<pre>
598 2 fixeria
...
599
 <0002> gsm_04_08.c:424 -> LOCATION UPDATE ACCEPT
600
...
601 3 fixeria
</code></pre>
602 2 fixeria
603
604 3 fixeria
h3. USSD
605 2 fixeria
606
607 3 fixeria
<pre>
608
609
610
h3. Call the music (LCR required)
611
612
613 2 fixeria
Now enter phone number 995 to select the test function 5 of LCR. This test function just plays the hold music.
614
615
616 3 fixeria
h3. Echo and BFI test (LCR required)
617
618
619 2 fixeria
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.
620
621
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.)
622
623
624 3 fixeria
h2. VTY control interface
625 2 fixeria
626 3 fixeria
627
It is possible (of course) to control your working setup manually. Connect the [[OpenBSC]] VTY telnet interface (port 4242 by default):
628
629
<pre>
630 2 fixeria
telnet localhost 4242
631
en
632
633
# Type 'list' for help
634
# Go to 'configure terminal' if you want to change some configuration params
635
636 3 fixeria
[[OpenBSC]]#
637 2 fixeria
  help        Description of the interactive help system
638
  list        Print command list
639
  write       Write running configuration to memory, network, or terminal
640
  show        Show running system information
641
  exit        Exit current mode and down to previous mode
642
  disable     Turn off privileged mode command
643
  configure   Configuration from vty interface
644
  copy        Copy configuration
645
  terminal    Set terminal line parameters
646
  who         Display who is on vty
647
  logging     Configure log message to this terminal
648
  drop        Debug/Simulation command to drop Abis/IP BTS
649
  bts         BTS related commands
650
  sms         SMS related comamnds
651
  subscriber  Operations on a Subscriber
652
  sms-queue   SMS Queue
653
  meas-feed   Measurement export related
654
655
# Example: sending an SMS
656
subscriber imsi <IMSI> sms sender imsi <IMSI2> send Hello, world!
657 3 fixeria
</code></pre>
658 2 fixeria
659 3 fixeria
See "VTY reference":http://openbsc.osmocom.org/trac/wiki/osmo-nitb_VTY for details.
660 2 fixeria
661
662 3 fixeria
h1. [[CalypsoBTS]] with [[OpenBTS]]
663 2 fixeria
664
665 3 fixeria
[[OpenBTS]] is another open source software project aimed to replace legacy telecommunication protocols and traditionally complex, proprietary hardware systems by IP a flexible software architecture. It implements the BTS side protocol stack and also some core network elements like [[OpenBSC]] in [[NiTB]] mode.
666 2 fixeria
667 3 fixeria
668
h3. Installation and configuration
669
670
671
Follow this "howto":https://github.com/RangeNetworks/dev/wiki in the project wiki. Once you have [[OpenBTS]] up and running, you need to change the following configuration parameters in the database (/etc/OpenBTS/OpenBTS.db):
672
673
<pre>
674 2 fixeria
Control.GSMTAP.TargetIP = 127.0.0.1
675
GSM.Radio.NeedBSIC = 1
676
GSM.Radio.Band = 1800
677
GSM.CellSelection.Neighbors =   (set to empty string)
678
GSM.RACH.MaxRetrans = 3
679
GSM.RACH.TxInteger = 8
680
GSM.Radio.C0 = <your ARFCN>
681
Control.LUR.OpenRegistration = ^26242.*$ (see note)
682 3 fixeria
</code></pre>
683 2 fixeria
684
**Note:** in this example only IMSIs with MCC 262 and the MNC 42 will be allowed to register to the network, change that accordingly.
685
686
687 3 fixeria
h3. TRX executable
688 2 fixeria
689 3 fixeria
690
Make sure that [[OpenBTS]] in not running. In the folder where the [[OpenBTS]] executable resides, create a script with the filename 'transceiver' with the following content:
691
692
<pre>
693 2 fixeria
#!/bin/bash
694
exec <your path to osmocom-bb>/src/host/layer23/src/transceiver/transceiver -a <ARFCN> -r 99
695 3 fixeria
</code></pre>
696 2 fixeria
697
Where ARFCN is the channel of clock source cell.
698
And make it executable:
699
700 3 fixeria
<pre>
701
<code class="sh">
702 2 fixeria
sudo chmod +x transceiver
703 3 fixeria
</code></pre>
704 1 fixeria
705
706 3 fixeria
h2. Running
707
708
709 1 fixeria
Run TRX application on the phone as described above.
710
711 3 fixeria
You now can start up [[OpenBTS]] and should hopefully see the BTS by performing a manual network search with your phone. Monitor the output of osmocon and the transceiver/OpenBTS to see if all goes well. If anything should fail, reboot the phone and start over. 
712 1 fixeria
713 3 fixeria
The [[OpenBTS]] CLI allows you to monitor system status and change many operating parameters of [[OpenBTS]] and the Transceiver in real time. Its executable is located at /OpenBTS/OpenBTSCLI.
714 1 fixeria
715
Have a fun!
Add picture from clipboard (Maximum size: 48.8 MB)