[[bts-examples]]
== OsmoBSC example configuration files

The `osmo-bsc/doc/examples/osmo-bsc` directory in the OpenBSC source
tree contains a collection of example configuration files, sorted by BTS
type.

This chapter is illustrating some excerpts from those examples

[[bts_example_nbts]]
=== Example configuration for OsmoBSC with one single-TRX nanoBTS

.OsmoBSC with one single-TRX nanoBTS
====

----
e1_input
 e1_line 0 driver ipa <1>
network
 network country code 1
 mobile network code 1
 encryption a5 0
 neci 1
 handover 0
 bts 0
  type nanobts <2>
  band DCS1800 <3>
  cell_identity 0
  location_area_code 1
  training_sequence_code 7
  base_station_id_code 63
  ms max power 15
  cell reselection hysteresis 4
  rxlev access min 0
  channel allocator ascending
  rach tx integer 9
  rach max transmission 7
  ip.access unit_id 1801 0 <4>
  oml ip.access stream_id 255 line 0
  gprs mode none
  trx 0
   rf_locked 0
   arfcn 871 <5>
   nominal power 23
   max_power_red 20 <6>
   rsl e1 tei 0
    timeslot 0
     phys_chan_config CCCH+SDCCH4
    timeslot 1
     phys_chan_config SDCCH8
    timeslot 2
     phys_chan_config TCH/F
    timeslot 3
     phys_chan_config TCH/F
    timeslot 4
     phys_chan_config TCH/F
    timeslot 5
     phys_chan_config TCH/F
    timeslot 6
     phys_chan_config TCH/F
    timeslot 7
     phys_chan_config TCH/F
----
====

<1> You have to configure one virtual E1 line with the
    IPA driver in order to use Abis/IP.  One e1_line is
    sufficient for any number of A-bis/IP BTSs, there is no
    limit like in physical E1 lines.
<2> The BTS type must be set using `type nanobts`
<3> The GSM band must be set according to the BTS hardware.
<4> The IPA Unit ID parameter must be set to what has been configured on
    the BTS side using the __BTS Manager__ or `ipaccess-config`.
<5> The ARFCN of the BTS.
<6> All known nanoBTS units have a nominal transmit power of 23 dBm.  If
    a `max_power_red` of 20 (dB) is configured, the resulting output
    power at the BTS Tx port is 23 - 20 = 3 dBm.

[NOTE]
====
The `nominal_power` setting does __not__ influence the transmitted power
to the BTS!  It is a setting by which the system administrator tells the
BSC about the nominal output power of the BTS.  The BSC uses this as
basis for calculations.
====


[[bts_example_nbts_multi]]
=== Example configuration for OsmoBSC with multi-TRX nanoBTS

.OsmoBSC configured for dual-TRX (stacked) nanoBTS
====

----
e1_input
 e1_line 0 driver ipa
network
 network country code 1
 mobile network code 1
 encryption a5 0
 neci 1
 handover 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 15
  cell reselection hysteresis 4
  rxlev access min 0
  channel allocator ascending
  rach tx integer 9
  rach max transmission 7
  ip.access unit_id 1800 0 <1>
  oml ip.access stream_id 255 line 0
  gprs mode none
  trx 0
   rf_locked 0
   arfcn 871
   nominal power 23
   max_power_red 0
   rsl e1 tei 0
    timeslot 0
     phys_chan_config CCCH+SDCCH4
    timeslot 1
     phys_chan_config SDCCH8
    timeslot 2
     phys_chan_config TCH/F
    timeslot 3
     phys_chan_config TCH/F
    timeslot 4
     phys_chan_config TCH/F
    timeslot 5
     phys_chan_config TCH/F
    timeslot 6
     phys_chan_config TCH/F
    timeslot 7
     phys_chan_config TCH/F
  trx 1
   rf_locked 0
   arfcn 873
   nominal power 23
   max_power_red 0
   rsl e1 tei 0
    timeslot 0
     phys_chan_config SDCCH8
    timeslot 1
     phys_chan_config TCH/F
    timeslot 2
     phys_chan_config TCH/F
    timeslot 3
     phys_chan_config TCH/F
    timeslot 4
     phys_chan_config TCH/F
    timeslot 5
     phys_chan_config TCH/F
    timeslot 6
     phys_chan_config TCH/F
    timeslot 7
     phys_chan_config TCH/F
----
====

<1> In this example, the IPA Unit ID is specified as `1800 0`. Thus, the
    first nanoBTS unit (`trx 0`) needs to be configured to 1800/0/0 and
    the second nanoBTS unit (`trx 1`) needs to be configured to 1800/0/1.
    You can configure the BTS unit IDs using the `ipaccess-config`
    utility included in OsmoBSC.

[NOTE]
====
For building a multi-TRX setup, you also need to connect the TIB cables
between the two nanoBTS units, as well as the coaxial/RF AUX cabling.
====
