SDR OsmoTRX network from scratch » History » Revision 5
Revision 4 (jolly, 02/19/2016 10:47 PM) → Revision 5/48 (jolly, 02/19/2016 10:47 PM)
[[PageOutline]] = Installing a GSM network from scratch = This document describes how to install, configure and run BTS transceiver, OsmoBTS, OpenBSC and LCR. In order to use this quick howto, you must have basic knowledge about GIT and be familiar with compiling packages from source. == Prerequisite == === opencore-amr === This package installs GSM adaptive multirate codecs It can downloaded at [http://sourceforge.net/projects/opencore-amr/files/opencore-amr/] {{{ tar xvzf opencore-amr-x.x.x.tar.gz cd opencore-amr-x.x.x ./configure make make install ldconfig cd .. }}} === Sip-Sofia === This package installs the open source SIP stack of Nokia Research Center. It can downloaded at [http://sourceforge.net/projects/sofia-sip/files/sofia-sip/]. {{{ tar xvzf sofia-sip-x.xx.xx.tar.gz cd sofia-sip-x.xx.xx ./configure make make install ldconfig cd .. }}} === oRTP === This package installs the open source RTP protocol required for libosmo-abis. It can downloaded at [http://download.savannah.gnu.org/releases/linphone/ortp/sources/]. {{{ tar xvzf ortp-x.xx.x.tar.gz cd ortp-x.xx.x ./configure make make install ldconfig cd .. }}} === others === sqlite3 and libdbi should be available from your distribution. == Installing == === Linux-Call-Router (LCR) === This package installs the open source PBX software to bridge ISDN (DSS1) / SIP / GSM (MNCC protocol) The latest version can downloaded via git: {{{ git clone git://git.misdn.eu/lcr.git/ }}} Now configure, as described here: {{{ cd lcr autoreconf -i ./configure --with-sip --with-gsm-bs --with-gsm-ms --enable-gsm-hr }}} 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: {{{ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure ..... }}} The configure result should include: {{{ configure: Compiled with GSM network side support configure: Compiled with GSM mobile side support configure: Compiled with GSM half rate codec support configure: Compiled with GSM AMR codec support configure: Compiled with SIP support }}} Finish the installation: {{{ make make install ldconfig cd .. }}} === libosmocore === This package installs the core utility library for various Osmocom projects. The latest version can downloaded via git: {{{ git clone git://git.osmocom.org/libosmocore.git }}} Finish the installation: {{{ cd libosmocore git checkout -b autoreconf -i ./configure make make install ldconfig cd .. }}} === libosmo-abis === This package installs the core utility library for various Osmocom projects. The latest version can downloaded via git: {{{ git clone git://git.osmocom.org/libosmo-abis.git }}} 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: {{{ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure ..... }}} Finish the installation: {{{ cd libosmo-abis autoreconf -i ./configure (sometimes it is necessary to point to different .../lib/pkgconfig/ path: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....) make make install ldconfig cd .. }}} === OpenBSC === This package installs the open source base station controller. The latest version can downloaded via git: {{{ git clone git://git.osmocom.org/openbsc.git }}} Finish the installation: {{{ cd openbsc/openbsc/ change repository: git checkout -b jolly/testing origin/jolly/testing autoreconf -i ./configure (sometimes it is necessary to point to different .../lib/pkgconfig/ path: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....) make make install cd ../.. }}} === OsmoBTS === osmo-bts: (BTS software) This package installs the open source base transceiver station. The latest version can downloaded via git: {{{ git clone git://git.osmocom.org/osmo-bts.git }}} Finish the installation: {{{ cd osmo-bts change repository: git checkout -b jolly/trx origin/jolly/trx autoreconf -i ./configure --enable-trx (sometimes it is necessary to point to different .../lib/pkgconfig/ path: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure .....) make make install cd .. }}} == Configuration examples == === OpenBTS === {{{ mkdir ~/.osmocom edit ~/.osmocom/osmo-bts.cfg }}} {{{ bts 0 band DCS1800 ipa unit-id 1801 0 oml remote-ip 127.0.0.1 rtp bind-ip 127.0.0.1 rtp jitter-buffer 0 paging lifetime 0 radio-link-timeout 32 gsmtap-sapi bcch gsmtap-sapi ccch gsmtap-sapi rach gsmtap-sapi agch gsmtap-sapi pch gsmtap-sapi sdcch gsmtap-sapi pacch gsmtap-sapi pdtch gsmtap-sapi sacch fn-advance 20 ms-power-loop -10 timing-advance-loop trx 0 rxgain 0 power 0 }}} === OpenBSC === {{{ mkdir ~/.osmocom edit ~/.osmocom/open-bsc.cfg }}} '''Be sure to change 'arfcn' to a frequency you have license for!''' {{{ e1_input e1_line 0 driver ipa e1_line 0 port 0 network network country code 262 mobile network code 42 short name OpenBSC long name OpenBSC auth policy accept-all location updating reject cause 13 encryption a5 0 neci 1 paging any use tch 0 rrlp mode ms-based mm info 1 handover 0 handover window rxlev averaging 10 handover window rxqual averaging 1 handover window rxlev neighbor averaging 10 handover power budget interval 6 handover power budget hysteresis 3 handover maximum distance 9999 timer t3101 10 timer t3103 0 timer t3105 0 timer t3107 0 timer t3109 0 timer t3111 0 timer t3113 60 timer t3115 0 timer t3117 0 timer t3119 0 timer t3122 10 timer t3141 0 dtx-used 0 subscriber-keep-in-ram 0 bts 0 type nanobts band DCS1800 cell_identity 0 location_area_code 1 training_sequence_code 7 base_station_id_code 63 ms max power 0 cell reselection hysteresis 4 rxlev access min 0 periodic location update 30 channel allocator descending rach tx integer 9 rach max transmission 7 channel-descrption attach 1 channel-descrption bs-pa-mfrms 5 channel-descrption bs-ag-blks-res 1 ip.access unit_id 1801 0 oml ip.access stream_id 255 line 0 neighbor-list mode automatic codec-support fr hr efr afs ahs trx 0 rf_locked 0 arfcn 869 nominal power 0 max_power_red 0 rsl e1 tei 0 timeslot 0 phys_chan_config CCCH+SDCCH4 hopping enabled 0 timeslot 1 phys_chan_config TCH/F hopping enabled 0 timeslot 2 phys_chan_config TCH/F hopping enabled 0 timeslot 3 phys_chan_config TCH/F hopping enabled 0 timeslot 4 phys_chan_config TCH/F hopping enabled 0 timeslot 5 phys_chan_config TCH/F hopping enabled 0 timeslot 6 phys_chan_config TCH/F hopping enabled 0 timeslot 7 phys_chan_config TCH/F hopping enabled 0 }}} === LCR === ==== interface.conf ==== 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. {{{ edit /usr/local/etc/lcr/interface.conf }}} You can remove (or comment out) everything and just add this interface: {{{ [gsm] gsm-bs tones yes earlyb no extern }}} ==== routing.conf ==== {{{ edit /usr/local/etc/lcr/routing.conf }}} You can remove (or comment out) everything and just add these rulesets: {{{ [main] interface=gsm : goto ruleset=gsm : disconnect cause=31 [gsm] dialing=99 : test : extern interfaces=gsm }}} Look at the main rule set. All calls from interface 'gsm' are forwarded to rule set 'gsm'. 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.