Project

General

Profile

CalypsoBTS » History » Version 3

fixeria, 02/19/2016 10:49 PM

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 3 fixeria
If you want to manage/route calls outside of [[NiTB]], you can replace internal call control by "Linux Call Router":http://isdn.eversberg.eu/.
337 2 fixeria
338 3 fixeria
339
h4. opencore-amr
340
341
This package installs GSM adaptive multirate codecs and the EFR codec. The Full-Rate and Half-Rate codecs are included in LCR's repository.
342
343
<pre>
344
<code class="sh">
345 2 fixeria
tar xvzf opencore-amr-x.x.x.tar.gz
346
cd opencore-amr-x.x.x
347 1 fixeria
./configure
348 2 fixeria
make
349 1 fixeria
sudo make install
350
sudo ldconfig
351
cd ..
352 3 fixeria
</code></pre>
353 2 fixeria
354 1 fixeria
355 3 fixeria
h4. Sip-Sofia
356
357
358 1 fixeria
This package installs the open source SIP stack of Nokia Research Center.
359 2 fixeria
360 3 fixeria
It can downloaded at [http://sourceforge.net/projects/sofia-sip/files/sofia-sip/":http://sourceforge.net/projects/opencore-amr/files/opencore-amr/]..
361 1 fixeria
362 3 fixeria
<pre>
363
<code class="sh">
364 1 fixeria
tar xvzf sofia-sip-x.xx.xx.tar.gz
365
cd sofia-sip-x.xx.xx
366
./configure
367 2 fixeria
make
368
sudo make install
369 1 fixeria
sudo ldconfig
370 2 fixeria
cd ..
371 3 fixeria
</code></pre>
372 1 fixeria
373 2 fixeria
374 3 fixeria
h4. LCR
375
376
377 1 fixeria
This package installs the open source PBX software to bridge ISDN (DSS1) / SIP / GSM (MNCC protocol).
378
379
The latest version can downloaded via git:
380 2 fixeria
381 3 fixeria
<pre>
382 1 fixeria
383
Now configure, as described here:
384
385 3 fixeria
<pre>
386
<code class="sh">
387 2 fixeria
cd lcr
388 1 fixeria
autoreconf -i
389 2 fixeria
./configure --with-sip --with-gsm-bs --with-gsm-ms
390 3 fixeria
</code></pre>
391 2 fixeria
392
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.
393
394
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:
395
396 3 fixeria
<pre>
397 2 fixeria
398 1 fixeria
The configure result should include:
399
400 3 fixeria
<pre>
401 1 fixeria
configure: Compiled with GSM network side support 
402
configure: Compiled with GSM mobile side support
403
configure: Compiled with GSM AMR codec support
404 2 fixeria
configure: Compiled with SIP support
405 3 fixeria
</code></pre>
406 1 fixeria
407 2 fixeria
Finish the installation:
408
409 3 fixeria
<pre>
410
<code class="sh">
411 1 fixeria
make
412
sudo make install
413
sudo ldconfig
414
cd ..
415 3 fixeria
</code></pre>
416 1 fixeria
417
418 3 fixeria
h3. LCR configuration (optional)
419 1 fixeria
420
421 3 fixeria
422
h4. options.conf
423
424
425
<pre>
426
427 1 fixeria
Add a line to show logging to the console:
428
429 3 fixeria
<pre>
430 1 fixeria
431
432 3 fixeria
h4. interface.conf
433
434
435 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. 
436 1 fixeria
437 3 fixeria
<pre>
438 2 fixeria
439
You can remove (or comment out) everything and just add this interface:
440 1 fixeria
441 3 fixeria
<pre>
442 2 fixeria
[gsm]
443 1 fixeria
gsm-bs
444
tones yes
445
earlyb no
446
extern
447 3 fixeria
</code></pre>
448 1 fixeria
449 2 fixeria
450 3 fixeria
h4. routing.conf
451 1 fixeria
452 3 fixeria
453
<pre>
454
455 2 fixeria
You can remove (or comment out) everything and just add these rulesets:
456
457 3 fixeria
<pre>
458 1 fixeria
# All calls from interface 'gsm' are forwarded to rule set 'gsm'.
459
[main]
460
interface=gsm                           : goto ruleset=gsm
461
                                        : disconnect cause=31
462 2 fixeria
463
# All calls that dial '99' prefix, will be test calls. All other calls will be forwarded back to 'gsm' interface.
464
[gsm]
465
dialing=99                              : test
466
                                        : extern interfaces=gsm
467 3 fixeria
</code></pre>
468 2 fixeria
469
470 3 fixeria
h2. Running
471
472
473 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.
474
475
476 3 fixeria
h4. 1. Transceiver
477
478
479 2 fixeria
First load the TRX firmware. In case of one phone:
480
481 3 fixeria
<pre>
482
<code class="sh">
483
# Shell #1424
484 2 fixeria
cd trx/src/
485
sudo host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -c target/firmware/board/compal_e88/trx.highram.bin -r 99
486
487 3 fixeria
# Shell #1425
488 1 fixeria
cd trx/src/host/layer23/src/transceiver/
489
sudo ./transceiver -a <ARFCN to sync> -r 99
490 3 fixeria
</code></pre>
491 1 fixeria
492
In case of two phones you should run two osmocon applications:
493
494 3 fixeria
<pre>
495
<code class="sh">
496
# Shell #1424
497 1 fixeria
cd trx/src/
498 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
499
500 3 fixeria
# Shell #1425
501 2 fixeria
cd trx/src/
502
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
503
504 3 fixeria
# Shell #1426
505 1 fixeria
cd trx/src/host/layer23/src/transceiver/
506 2 fixeria
sudo ./transceiver -a <ARFCN> -2 -r 99
507 3 fixeria
</code></pre>
508 1 fixeria
509
Make sure that transceiver successfully synchronized to the clock source BTS.
510
511
512 3 fixeria
h4. 2. [[OpenBSC]]
513 2 fixeria
514 1 fixeria
515 3 fixeria
Open another shell and start [[OpenBSC]]:
516 2 fixeria
517 3 fixeria
<pre>
518 1 fixeria
519 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.
520
521
<pre>
522
523 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.
524 2 fixeria
525 1 fixeria
The debugging is useful for early tests, because you will quickly see what happens if a mobile requests something.
526
527 3 fixeria
<pre>
528 2 fixeria
<0005> bsc_init.c:423 
529
WARNING: You are running an 'accept-all' network on a BTS that is not barred. This configuration is
530
likely to interfere with production GSM networks and should only be used in a RF shielded environment 
531
such as a faraday cage!
532
533
<001a> input/ipaccess.c:831 enabling ipaccess BSC mode
534
DB: Database initialized.
535
DB: Database prepared.
536 3 fixeria
</code></pre>
537 2 fixeria
538
539 3 fixeria
h4. 2.1 LCR (optional)
540
541
542 2 fixeria
Start the LCR:
543
544 3 fixeria
<pre>
545
<code class="sh">
546 2 fixeria
sudo lcr start
547 3 fixeria
</code></pre>
548 2 fixeria
549
You should see following output:
550
551 3 fixeria
<pre>
552 2 fixeria
** LCR  Version 1.14
553
554
000000 DEBUG (in sip.cpp/sip_init() line 1997): SIP globals initialized
555
LCR 1.14 started, waiting for calls...
556
000000 TRACE 05.02.16 00:05:03.444 --: LCR 1.14 started, waiting for calls...
557 3 fixeria
</code></pre>
558 2 fixeria
559 3 fixeria
And following message at [[OpenBSC]] log:
560 2 fixeria
561 3 fixeria
<pre>
562 2 fixeria
<0006> mncc_sock.c:273 MNCC Socket has connection with external call control application
563 3 fixeria
</code></pre>
564 2 fixeria
565
566 3 fixeria
h4. 3. [[OsmoBTS]]
567 2 fixeria
568
569 3 fixeria
And finally start the [[OsmoBTS]] instance:
570
571
<pre>
572
573
<pre>
574 2 fixeria
((*))
575
  |
576 3 fixeria
 / \ [[OsmoBTS]]
577 2 fixeria
Using MAC address of eth0: 'xx:xx:xx:xx:xx:xx'
578
...
579
<000a> trx_if.c:176 No response from tranceiver
580
<000a> trx_if.c:176 No response from tranceiver
581
<000a> trx_if.c:176 No response from tranceiver
582 3 fixeria
</code></pre>
583 2 fixeria
584
585 3 fixeria
h2. Test
586 2 fixeria
587 3 fixeria
588
589
h3. Location Updating
590
591
592 2 fixeria
Switch on the phone.
593
594 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:
595 2 fixeria
596 3 fixeria
<pre>
597 2 fixeria
...
598
 <0002> gsm_04_08.c:424 -> LOCATION UPDATE ACCEPT
599
...
600 3 fixeria
</code></pre>
601 2 fixeria
602
603 3 fixeria
h3. USSD
604 2 fixeria
605
606 3 fixeria
<pre>
607
608
609
h3. Call the music (LCR required)
610
611
612 2 fixeria
Now enter phone number 995 to select the test function 5 of LCR. This test function just plays the hold music.
613
614
615 3 fixeria
h3. Echo and BFI test (LCR required)
616
617
618 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.
619
620
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.)
621
622
623 3 fixeria
h2. VTY control interface
624 2 fixeria
625 3 fixeria
626
It is possible (of course) to control your working setup manually. Connect the [[OpenBSC]] VTY telnet interface (port 4242 by default):
627
628
<pre>
629 2 fixeria
telnet localhost 4242
630
en
631
632
# Type 'list' for help
633
# Go to 'configure terminal' if you want to change some configuration params
634
635 3 fixeria
[[OpenBSC]]#
636 2 fixeria
  help        Description of the interactive help system
637
  list        Print command list
638
  write       Write running configuration to memory, network, or terminal
639
  show        Show running system information
640
  exit        Exit current mode and down to previous mode
641
  disable     Turn off privileged mode command
642
  configure   Configuration from vty interface
643
  copy        Copy configuration
644
  terminal    Set terminal line parameters
645
  who         Display who is on vty
646
  logging     Configure log message to this terminal
647
  drop        Debug/Simulation command to drop Abis/IP BTS
648
  bts         BTS related commands
649
  sms         SMS related comamnds
650
  subscriber  Operations on a Subscriber
651
  sms-queue   SMS Queue
652
  meas-feed   Measurement export related
653
654
# Example: sending an SMS
655
subscriber imsi <IMSI> sms sender imsi <IMSI2> send Hello, world!
656 3 fixeria
</code></pre>
657 2 fixeria
658 3 fixeria
See "VTY reference":http://openbsc.osmocom.org/trac/wiki/osmo-nitb_VTY for details.
659 2 fixeria
660
661 3 fixeria
h1. [[CalypsoBTS]] with [[OpenBTS]]
662 2 fixeria
663
664 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.
665 2 fixeria
666 3 fixeria
667
h3. Installation and configuration
668
669
670
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):
671
672
<pre>
673 2 fixeria
Control.GSMTAP.TargetIP = 127.0.0.1
674
GSM.Radio.NeedBSIC = 1
675
GSM.Radio.Band = 1800
676
GSM.CellSelection.Neighbors =   (set to empty string)
677
GSM.RACH.MaxRetrans = 3
678
GSM.RACH.TxInteger = 8
679
GSM.Radio.C0 = <your ARFCN>
680
Control.LUR.OpenRegistration = ^26242.*$ (see note)
681 3 fixeria
</code></pre>
682 2 fixeria
683
**Note:** in this example only IMSIs with MCC 262 and the MNC 42 will be allowed to register to the network, change that accordingly.
684
685
686 3 fixeria
h3. TRX executable
687 2 fixeria
688 3 fixeria
689
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:
690
691
<pre>
692 2 fixeria
#!/bin/bash
693
exec <your path to osmocom-bb>/src/host/layer23/src/transceiver/transceiver -a <ARFCN> -r 99
694 3 fixeria
</code></pre>
695 2 fixeria
696
Where ARFCN is the channel of clock source cell.
697
And make it executable:
698
699 3 fixeria
<pre>
700
<code class="sh">
701 2 fixeria
sudo chmod +x transceiver
702 3 fixeria
</code></pre>
703 1 fixeria
704
705 3 fixeria
h2. Running
706
707
708 1 fixeria
Run TRX application on the phone as described above.
709
710 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. 
711 1 fixeria
712 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.
713 1 fixeria
714
Have a fun!
Add picture from clipboard (Maximum size: 48.8 MB)