Commit Graph

38 Commits

Author SHA1 Message Date
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Holger Hans Peter Freyther fb0b6fcaea [bsc] Allow to set a EGSM900, RGSM900 ARFCN
For R-GSM900 the channels 955-1023 are within the 900er band. The
System Information Type generation can not cope with these channels yet.
2010-02-09 17:40:49 +01:00
Sylvain Munaut 7de67960e7 [bsc_init] Send OPSTART if SITE_MANAGER reports off-line
The exact sequence the states the BTS goes through is slightly
different for one of the nanoBTS 139 I have and it needs this
to start.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:07:11 +01:00
Holger Hans Peter Freyther f31e4745bb [misc] Utilize rf_locking by setting the nm_state.administrative
* On start the vty code will call the abis_nm method and this
  will set the administrative state to unlock/lock
* During startup the BTS will report its state as well and would
  possible overwrite the set administrative. We are only going
  to update the administrative if it was 0 before. This appears
  to work on all of my tests. In case this will not be the case
  for others we will have to split the administrative into two
  sets one for the BTS and one for the BSC.
2009-12-31 03:05:52 +01:00
Harald Welte 19a3f0b120 print ARFCN, LAC and CID when bootstrapping RSL 2009-12-24 13:39:34 +01:00
Harald Welte b7bcb79bea Fix segfault in case BTS has more TRX than we have configured 2009-12-23 18:24:31 +01:00
Sylvain Munaut 4010f1e6f4 bts: Allow config of RACH control parameters tx-integer & max retrans
Tweaking theses can be useful especially tx-integer that influence
both the spread of rach attemps and the delay between two attemps.

Looking up GSM 04.08 3.3.1.1.2 & 10.5.2.29 can help determine good
values. The default are choosed with a wide spacing between attemps
(tx integer = 9 -> T=12 & S=217 (non-combined CCCH/SDCCH) or 115 (for
combined CCCH/SDCCH)). This alleviates the problem of responding to
several RACH attempts by a same MS, allocating several RF channels when
only 1 is needed.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2009-12-22 13:43:26 +01:00
Harald Welte 9c4f6b5dca missing semicolon at end of statement 2009-12-22 13:16:27 +01:00
Harald Welte a992a36d5f it's LOGL_ERROR, not LOG_ERROR 2009-12-21 23:44:40 +01:00
Harald Welte 73d4fce151 make sure bootstrap_bts() only contains static initialization
values that might change at runtime are moved to set_system_infos()
which we might now also call at runtime to update the BTS with
changes in the SI
2009-12-21 23:12:19 +01:00
Harald Welte 713550120c remove duplicate flag for cell barring
it's sufficient if we keep the state of cell barring in one place
2009-12-21 23:08:18 +01:00
Harald Welte 6a22c0135a [gprs] SI 13 should only be generated on C0 (BCCH-carrying TRX) 2009-12-21 19:10:55 +01:00
Harald Welte f88c8a02fc remove hand full of 'extern ipacc_rtp_direct' definitions
and instead declare it in gsm_data.h
2009-12-20 14:18:11 +01:00
Harald Welte 50e7fec9b8 system_information: DEBUGP() SI13/5/6 during startup 2009-12-19 21:29:00 +01:00
Harald Welte b1d4c8ed9d logging: introduce log levels at caller site
This introduces a new LOGP() macro together with LOGL_* definition to
support multiple log levels (severities) throughout the codebase.

Please note that the actual logging system does not use them yet,
in this patch we simply introduce the new macros at the caller site.
2009-12-17 23:10:46 +01:00
Harald Welte 8d77b9540a [handover] first functional handover implementation
With this commit, we can successfully hand over a channel from one cell to
another cell.  We implement asynchronous intra-BSC (but inter-BTS) handover.

Changes:
* introduce new DHO log category
* extend rsl_chan_activate_lchan() with argument for HO reference
* introduce actual minimal handover decision making in handover_decision.c
* various fixes to bsc_handover_start() in  handover_logic.c
2009-12-17 00:31:10 +01:00
Harald Welte 152b6261f8 [system_information] Print more debugging about what's going on 2009-12-16 11:57:48 +01:00
Harald Welte ade7a14e75 make sure BSIC is patched into NM tables before initializing BS11 2009-12-14 17:49:52 +01:00
Harald Welte 7322528ca1 [VTY] add more cell reselection parameters to VTY
allow setting of 'cell reselection hysteresis' and 'rxlev access min' from VTY
for experiments with cell reselection.
2009-12-12 18:17:25 +01:00
Harald Welte d6aa52488a add warning about accept-all network on non-barred cells 2009-12-12 13:44:19 +01:00
Harald Welte a43f789a0a Replace template-based SYSTEM INFORMATION with real implementation
Before this commit, OpenBSC used templates for the SYSTEM INFO
1, 2, 3, 4, 5 and 6 messages.  Those templates were patched in
various places to reflect the network config like ARFCN.

Now, we actually generate those SI messages ourselves, using
values from the configuration file, and even calculating neighbor
cell lists.

All bts'es that you have configured in OpenBSC will end up in
the neighbor cell list - which should be more than sufficient for
the current small-single-site networks.
2009-12-01 18:04:30 +05:30
Holger Hans Peter Freyther 2d501ea26a [vty] Add option to disable RF on a given TRX.
- Make sure that on runtime the Radio Carrier can be
  locked and unlocked. The vty code calls into the
  Abis NM to lock/unlock the channel and the state is
  stored there.

- Make sure that on start the Radio Carries remains
  offline and we are not starting it. On start the
  radio carrier is either locked or unlocked. This means
  the RSL will not connect until the RF is unlocked. It
  will connect then. To see RSL bringup failures one
  needs to parse the RSL nack message.

- When the TRX is locked on startup the RSL link will
  only be established after it will be unlocked.
2009-11-24 13:08:50 +01:00
Holger Hans Peter Freyther 1ce10f3854 [bsc_init] Activate the RC and the RSL link from the Software Activated Callback
On cold start the RSL link will not be brought up. Wait for the
Software to be Activated before starting the RSL link. This is
working reliable on the BTS I have tested with.

This is a partial revert of 8406ec2437 and
was discussed on the mailinglist.
2009-11-24 10:49:59 +01:00
Holger Hans Peter Freyther f7d752f7ac [si] Make it possible to set the NECI value...
Allow to configure the NECI value... and change code
that is relying on the NECI value.
2009-11-17 09:46:33 +01:00
Harald Welte d8cfc90e22 [abis_nm] avoid integer-to-pointer casting and associated gcc warnings 2009-11-17 06:09:56 +01:00
Harald Welte 65bdc914f6 Fix segfault, use trx->bts rather than bts in patch_nm_tables() 2009-10-26 20:14:33 +01:00
Harald Welte 0f890b02f6 ip.access: Use Channel Combination from config file
bsc_init.c still contained a hard-coded channel configuration,
i.e. CCCH_combined on TS0 of C0, and TCH/F on all other channels.

Now it correctly uses the value as specified in the config file.
2009-10-24 10:31:28 +02:00
Holger Hans Peter Freyther 555eba140d Fix spelling of default 2009-10-22 15:46:16 +02:00
Harald Welte 8406ec2437 [nanoBTS] move nanoBTS initialization completely into state event handler 2009-10-20 17:31:00 +02:00
Harald Welte 77a838dff7 ip.access: use correct stream identifier when connecting RSL 2009-10-20 00:51:01 +02:00
Harald Welte 746d6091d9 [abis_nm] introduce and use abis_nm_ipaccess_rsl_connect() 2009-10-19 22:11:11 +02:00
Harald Welte d004a6462a ip.access / multi-TRX: correctly identify TRX number on SW ACT REP 2009-10-19 21:47:54 +02:00
Harald Welte af7b2faf71 ip.access maximum output power depends on GSM band 2009-10-19 21:47:31 +02:00
Harald Welte 4d0481dbe9 [bsc_init] use new NM_AVSTATE_* enum instead of hard-coded numbers 2009-10-08 20:53:42 +02:00
Mike Haben e2d8227499 [ipaccess] Add nanoBTS 1900 support
Add support for 1900 nanoBTS by using unified bts_type
GSM_BTS_TYPE_NANOBTS for 900, 1800 and 1900 versions.

Reduce the nanoBTS enum values to one and derive the
version from the user supplied band. In the future we
might want to do auto band detection.

The configuration file needs to be changed to refer
to nanobts instead of nanobts900/nanobts1800.

Signed-off-by: Mike Haben <michael.haben@btinternet.com>
Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
2009-10-05 12:12:54 +02:00
Holger Hans Peter Freyther c4a49e3e2d [bsc] Store the cell_identity in gsm_bts and set it on the SI3 and SI6
Transfering the cell_identity from BSC to MSC is required for the
on-waves.com support. Allow to set the cell_identity in the cfg
file and patch the system information tables to set it.
2009-09-28 06:04:40 +02:00
Holger Hans Peter Freyther 5ce73fed26 [bsc] Remove HAR feature to advertize neighbor cells
Do not advertize to broadcast on a different frequency, this
was only useful for the HAR2009. The frequency list of the cell
probably needs to migrate into the vty config file.

Revert of ee4410a4f3
2009-08-17 15:56:38 +02:00
Holger Hans Peter Freyther 8b457fb350 [bsc_init] Create a bsc_init.c that can be used for setting up hings.
Share the initialization and bootstraping of the network by moving
the code to a new file and making boostrap_network and shutdown_net
external.

Cleanup the header list after the move and remove trailing whitespace.
2009-08-17 09:52:42 +02:00