Commit Graph

61 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
Daniel Willmann 604d851b89 Register GSM_BTS_TYPE_UNKNOWN in bsc_hack.c
The way the VTY configuration sytem works is that it first registers a
BTS of type GSM_BTS_TYPE_UNKNOWN and then sets the type correctly (after
encountering the type statement). This makes sure that registering a BTS
of type UNKNOWN succeeds.
2010-01-14 21:52:34 +01:00
Harald Welte 0677061757 update copyright statements
* include 2010
* add Andreas Eversberg and Sylvain
2010-01-12 10:46:27 +01:00
Harald Welte 39315c4798 [OML] parse attributes depending on BTS type
Some NM attributes are defined differently depending on
the BTS type.  Having one big nm_att_tlvdef[] table for
all BTS types is no longer sufficient.  This patch

* introduces 'struct gsm_bts_model' to describe a BTS model
* adds definitions of gsm_bts_model for BS-11 and nanoBTS
* changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-10 18:01:52 +01:00
Harald Welte 3cefa9aaa0 vty: sub-divide talloc contexts and include them in talloc report
The VTY code makes so many allocations that a full report is
simply too long to provide any useful information.  So we sub-divide
it in multiple contexts, and report only one level deep at SIGURS1.

We also introduce SIGUSR2 for the full detailed VTY report.
2009-12-24 10:51:56 +01:00
Holger Hans Peter Freyther 079353ad1f [statistics] Do the syncing to db from within the bsc_hack
Change the counters_store_db function to be a generic for_each
function taking a function pointer and data. Use that in bsc_hack
to store it to the DB.

This is removing the DB requirement and will allow to handle
the counter values in different ways without making the counter
list public.

I verified that the syncing is still taking place.
2009-12-23 05:30:47 +01:00
Holger Hans Peter Freyther b61e3b2158 Import the new logging architecture
This is the new logging architecture, including

* support for multiuple logging targets like stderr and vty
* log levels in addition to categories/subsystems
* filtering based on imsi, i.e. only see events for one subscriber
* dynamically change log level for each category for each vty
2009-12-22 22:32:51 +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 f314f6899b add --help message about --rtp-proxy argument 2009-12-19 18:35:56 +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 1085c097e3 location updating reject cause now specified on VTY rather than command line argument 2009-12-06 12:22:59 +05:30
Holger Hans Peter Freyther f49fac2785 [bsc_hack] Ignore the sigpipe...
We might read or write on the OML link when the BTS is
reset and will get SIGPIPE interrupt and be gone... Just
ignore the SIGPIPE we will get the "exception" on the next
run of bsc_select and kill the (old) OML link.
2009-12-06 04:25:05 +01:00
Harald Welte 3961fcc031 Introduce new S_GLOBAL_SHUTDOWN signal
This is used to notify various parts of OpenBSC that we're shutting
down.
2009-12-01 17:58:26 +05:30
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
Harald Welte (local) ee4410a4f3 actual code running at end of har2009 2009-08-17 09:39:55 +02:00
Harald Welte (local) b8afe81e96 trigger RRLP position requests after paging succeeded and after subscriber attach 2009-08-16 13:18:51 +02:00
Harald Welte (local) d19e58b13c move talloc context creation out of on_dso / constructors
the various constructors get called in a non-obvious, linker determined
order, which makes certain objects disappear from the talloc report.

This change moves the talloc context creation into a new talloc_ctx.c file
2009-08-15 02:30:58 +02:00
Harald Welte (local) efc92311e2 allow vty to set periodic location updating timer t3212 2009-08-14 23:09:25 +02:00
Daniel Willmann bc9e9f856b Merge commit 'har/laforge' 2009-08-13 20:30:46 +02:00
Harald Welte 7f69816144 disable emergency call bit (i.e. cell does not support emergency call) 2009-08-13 20:26:10 +02:00
Harald Welte (local) 50d127199d fix token auth implementation 2009-08-13 13:52:14 +02:00
Jan Luebbe 06513f26a1 replace the command line option -a with the auth-policy config option 2009-08-13 10:14:59 +02:00
Harald Welte (local) 0e451d0f2e add 'ms max power' vty command to set the maximum MS power in dBm 2009-08-13 10:14:26 +02:00
Harald Welte c70979a337 add help message about timestamp option 2009-08-12 21:52:11 +02:00
Harald Welte 61cd8831eb patch power reduction into NM attributes 2009-08-12 21:50:41 +02:00
Harald Welte 000c0f44f3 patch the SI and NM attr tables independently 2009-08-12 21:45:02 +02:00
Harald Welte (local) 7f28cd559a set nominal TRX power for BS-11 and nanoBTS 2009-08-12 20:56:16 +02:00
Harald Welte (local) 5dececfa41 implement bts->cell_barred feature, configurable in VTY 2009-08-12 20:55:00 +02:00
Harald Welte d069deabe4 Merge commit 'origin/master' 2009-08-10 14:45:08 +02:00
Holger Hans Peter Freyther 557ca78b49 bsc_hack.c: Unconditionally listen for the nanoBTS
As proposed on the mailinglist, initialize the socket once
and wait for the nanoBTS to connect.
2009-08-10 14:16:08 +02:00
Harald Welte e991c26387 BS11: send measurement report every 5 SACCH frames 2009-08-10 14:09:28 +02:00
Harald Welte 349aba603c perform A-bis OML configuration based on config file
This means that the config file is now finally the central source of not only
the E1 configuration on the BSC, but also the E1 and GSM channel configuration
on the BTS.
2009-08-10 12:31:31 +02:00
Holger Hans Peter Freyther 100325a87e bsc_hack.c: Explain why the program will exit... 2009-08-10 10:36:06 +02:00
Holger Hans Peter Freyther d5d1cef7c2 bsc_hack.c: Allow to use a different file for the config file 2009-08-10 08:39:27 +02:00
Harald Welte 89e9d5927e chane TRX0/TS0 channel combination to not include a CBCH
We don't support CBCH anyway, and using CBCH will reduce the number of uesable
SDCCH/4 channels to 3 on TS0
2009-08-09 22:01:26 +02:00
Harald Welte 1e0a8ea4d5 Merge branch 'master' into config_file
Conflicts:
	openbsc/src/vty_interface.c
2009-08-09 19:55:21 +02:00
Harald Welte 66b6a8dde0 move ms_pwr utility function to gsm_utils.c
also, they should both take the gsm_band parameter, not a BTS
2009-08-09 14:45:18 +02:00
Harald Welte 31f03a6df6 configure MS CCH max power IEI of SI3 and SI4 to 20dBM (100mW) 2009-08-09 14:38:49 +02:00
Harald Welte 42581829ec the actual config file code (not just config files)
this was missing from commit a08a9acdb6
2009-08-08 16:12:58 +02:00
Harald Welte 31c3d34e61 in case of SIGABRT, don't exit(0) and thus prevent creating a core file 2009-08-07 00:29:44 +02:00
Harald Welte 5146006df2 introduce '-2' commandline option for second BS-11
Using this option, you can use two BS-11 connected to the same E1
link.  The first BS-11 needs to have BPORT0 and BPORT1 objects created with E1
Line Configuration attribute "multi-drop".  The second BS-11 is configured with
only BPORT0 in star configuration, and needs to have the OML signalling on TS6
instead of TS1.  Also, a kernel patch providing a second virtual E1 interface
is needed.
2009-08-06 17:54:21 +02:00
Harald Welte f294f45ca6 shut down the OML (and thus the BTS) when bsc_hack is terminated with ctrl+c 2009-08-06 17:43:50 +02:00
Harald Welte d158605db1 only set BCCH INFO on first TRX (C0) of BTS 2009-08-06 17:41:19 +02:00
Harald Welte ac56e8b442 use HARDCODED_BTSn_TS defines from bsc_hack.c 2009-08-06 17:40:24 +02:00
Harald Welte fad0559aee fix initialization of TRX1 / TS0
also fix a minor error when printing BTS/TRX number
2009-08-04 01:31:53 +02:00
Harald Welte 67b4c30a9d complete TRX1 support for BS11
* remove old HAVE_TRX1 definition, replace it with '-1' commandline argument
* make sure we actually configure the OML TRX attributes with a different
  ARFCN than TRX0
* make sure we configure timeslot 0 of TRX1 also in TCH/F mode

This code is untested, but if you have a dual-trx BS-11, and the second TRX
is activated, you should be able to run bsc_hack with the -1 option to enable
and use the second trx.  It works like this:
* TRX1 shares E1 timeslot 0 for signalling
* TRX1 RSL link uses TEI2 (TRX0 uses 1)
* TRX1 on ARFCN+2, i.e. if you have TRX0 on 122, TRX1 will be 124
2009-07-29 16:42:16 +02:00
Harald Welte 805f64486b add RTP proxy mode for ip.access
Up until now, we only supported direct RTP streams between ip.access BTS.
With this commit, the user can specify '-P' to the command line to enable
a RTP/RTCP proxy inside OpenBSC.  The nanoBTS will then send all their voice
data to OpenBSC, which will relay it to the respective destination BTS (which
can be the same BTS).

The default behaviour remains unchanged.  Without '-P' on the command line,
RTP/RTCP is exchanged directly.
2009-07-28 18:25:29 +02:00
Harald Welte f8d536def9 allow user to set BSIC and TSC from command line 2009-07-21 22:13:36 +02:00
Harald Welte 565547171c some more comments for BS11 attributes 2009-07-18 16:18:11 +02:00
Holger Hans Peter Freyther 03582a8bdc bsc_hack.c: Make adding of (nano)BTS to the network dynamic
Fix the FIXME and replace the hardcoded site_id's of the
nanoBTS with a command line option. You can use -i DEVICE_X
for every BTS you want to handle.
2009-07-16 15:27:09 +02:00