Commit Graph

73 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 6f615551a4 abis_nm: Band aid on OML initialisation by queuing messages
Instead of sending many messages we will queue the OML
messages and wait for the ACK/NACK before sending the
next message from the queue. We tag the msgb to remember
if we need to wait for an ack or not.

We keep the order of all messages, on ACKs and similiar
occassions we will drown the queue until we reach a message
that needs to be acked and then wait for that ack again.

Possible breakage can appear when we send an OML (e.g.
BS11 specific message) msg which does not need to be acked
through the abis_nm_sendmsg call. The fix will be to use
the _direct version of this method.

Re-Enable as it might have fixed something... who knows.

Conflicts:

	openbsc/include/openbsc/abis_nm.h
	openbsc/include/openbsc/gsm_data.h
	openbsc/src/abis_nm.c
	openbsc/src/gsm_data.c
2010-12-21 13:53:41 +01:00
Holger Hans Peter Freyther 39e6ba09c2 oml: In case we get a NACK, drop the OML connection and hope for the best
Assume that a NACK is a onetime failure and that on the next
attempt it will work better. If that is not the case we might
even send a reboot to the BTS.
2010-12-21 13:53:41 +01:00
Holger Hans Peter Freyther c7a1a1fd2e oml: Another band aid for reliable BTS init...
Sometimes the operative change for the NSE is getting nacked,
this might be due that we send it before we get the OPSTART ACK
for this object class. Send it from the CELL availability as
a workaround. This init code needs to be changed to make these
dependencies work more reliable.
2010-12-21 13:53:41 +01:00
Holger Hans Peter Freyther 5a3a61d88f bsc_init: Allow DTXu and enable DTXd on RSL (experimental)
Allow the MS to use uplink discontinous transmission by
setting the right bit in the SystemInformation and set
DTXd/DTXu on the RSL channel commands.

This is configurable via dtx-used (0|1) on the network
level and still considered as experimental.
2010-09-06 09:26:27 +08:00
Holger Hans Peter Freyther 4dc025b4a8 bsc_init: Compare it with the right enum type
In both cases the int value was zero, so it actually worked
2010-08-25 12:33:57 +08:00
Harald Welte 9fbff4adac [BSC] Add support for configfile-hardcoded System Information messages 2010-07-30 11:50:09 +02:00
Holger Hans Peter Freyther 6d2b66e89a abis_nm: Create a signal data structure for the NACK message
Provide the message type and the msgb of the NACK message.
2010-07-14 02:08:35 +08:00
Holger Hans Peter Freyther ec4bfdc435 bsc_api: Move the API init into the main function.
The BSC API will not be used until the first iteration through
the event loop so it is safe to call it after the bootstrap.
2010-06-30 15:11:29 +08:00
Holger Hans Peter Freyther 34949ae924 bsc_init: Avoid unaligned access to nanobts_attr_nsvc0
nanobts_attr_nsvc0 + 10 is unlikely to be 32 bit aligned
and will trigger an alignment error on ARM..
2010-06-21 16:40:09 +08:00
laforge abeb951426 [BSC] Fix off-by-one error in computing mobile allocation 2010-06-20 15:56:50 +02:00
Harald Welte 29aca17ed0 [BSC] Hopping: Add MA IE to ASS CMD, IMM ASS CMD and HO CMD
Also, make sure the bit ordering in the pre-computed MA is correct,
as well as the cell channel description of the target cell being
present in the HO CMD.
2010-06-20 10:44:53 +02:00
Harald Welte 7401ae6a79 [BSC] Keep a SYSTEM INFORMATION cache for each BTS
This will later be useful for handover where we need to copy the cell
channel allocation into a normal 04.08 message
2010-06-20 10:44:53 +02:00
Harald Welte fd3708976a [BSC] Generate MA for each timeslot that has hopping enabled
The MA is used in 04.08 channel assignment related messages
2010-06-20 10:44:53 +02:00
Holger Hans Peter Freyther 43b0909394 bsc_api: Create osmo_msc, and initialize the MSC API in the bsc_init. 2010-06-15 12:04:34 +08:00
Harald Welte 71b822b986 Add ARFCN range check for GSM 850 band
This should make OpenBSC work with a nanoBTS in GSM 850 band.
2010-05-26 17:14:42 +02:00
Harald Welte 4b037e4117 Migrate VTY code to libosmovty 2010-05-25 23:40:38 +02:00
Holger Hans Peter Freyther aef49cc510 bsc_init: Do not use magic numbers for GSM 12.21 states. 2010-05-22 22:10:53 +08:00
Harald Welte dcccb1818d VTY: decouple telnet_interface from 'struct gsmnet'
We want the VTY and telnet code to be independent from the BSC
application(s).  As a side note, we also like to eliminate static
global variables for 'struct gsm_network' all over the code.

As such, telnet_init() is now passed along a "private" pointer,
which getst stored in telnet_connection.priv.  This telnet_connection
is then stored in vty->priv, which in turn gets dereferenced if
anyone needs a reference to 'struct gsm_network' from the BSC vty
code.

Also:
 * vty_init() now calls cmd_init()
 * the ugliness that telnet_init() calls back into the application by means of
   bsc_vty_init() function has been removed.
 * telnet_init() now returns any errors, so the main program can exit
   e.g. if the port is already in use.
2010-05-16 20:52:23 +02:00
Holger Hans Peter Freyther aa0db809e2 abis: Pass the abis_om_obj_inst in the nm_state_event.. 2010-05-13 00:37:48 +08:00
Harald Welte 615e956328 [gprs] NS/BSSGP: Make all timers configurable from VTY 2010-05-11 23:50:21 +02:00
Holger Hans Peter Freyther a581136f73 [misc] Remove spaces, fix indention. 2010-04-30 13:34:15 +08:00
Sylvain Munaut 50f81b022f bsc_init: Fix ccch description in SI messages
The previous code just hardcoded RSL_BCCH_CCCH_CONF_1_C, but
we need to inspect the timeslot config to know what to use.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-28 22:08:36 +02:00
Holger Hans Peter Freyther 95c229006e [vty] Allow to set the RACH NM attributes on a per BTS basis
Be able to tune the RACH settings of the BTS via the vty interface,
by default they are initialized to -1 which means we will use the
content of the static array (BTS default) and can be changed via
the VTY interface. I have verified the setting on the nanoBTS with
wireshark and I have tested writing the config file.
2010-04-25 23:08:39 +08:00
Harald Welte 439bb828f9 GPRS: Enable EGPRS coding schemes in Cell Attributes if 'gprs mode egprs' 2010-04-18 21:25:56 +02:00
Harald Welte 4511d891dd GPRS: change 'gprs enabled <0-1>' to 'gprs mode (none|gprs|egprs)'
This causes some config file breakage but sounds like a much cleaner
approach than to have two separate config variables for this.
2010-04-18 21:25:56 +02:00
Holger Hans Peter Freyther bb110f91e8 [statistics] Keep track of OML/RSL failures of the BTS. 2010-04-17 06:48:43 +02:00
Holger Hans Peter Freyther 135f797a37 [bsc_init] When the RSL/OML connection drops, free all lchans
Free all allocated channels on the TRX that failed, go through
lchan_free to signal higher layers and then force a reset of
the channel. Make the TRX and TS unusable by setting the operational
set to 0 (not really defined) which should be reset once the
RSL is coming up again.
2010-04-15 11:24:53 +02:00
Holger Hans Peter Freyther f99f0930fd Move the version/copyright string to a separate file
It didn't really belong into the bsc_init.c... now we could
even easily autogenerate this file.
2010-03-24 10:24:38 +01:00
Holger Hans Peter Freyther 6552d0b596 Include bscconfig.h without ../ for the srcdir != build dir case 2010-03-24 10:20:27 +01:00
Holger Hans Peter Freyther a21a96f987 Move the copyright and version header to bsc_init.c
The copyright/version will be used from within the VTY code
which might be linked into binaries even when bsc_hack.c is
not linked into it.
2010-03-24 10:19:04 +01:00
Harald Welte a5731cffc4 GPRS: make NSEI configurable from VTY 2010-03-22 19:02:04 +08:00
Harald Welte 84c6f310ed GPRS: remove outdated FIXME about patching CGI 2010-03-22 19:02:04 +08:00
Harald Welte fa58625e3b GPRS: remove "#define GPRS" compile-time define
It is now possible to enable/disable GPRS support purely based on
the vty / config file.
2010-03-22 19:02:04 +08:00
Harald Welte af387633db GPRS: make NSVC parameters VTY-configurable 2010-03-22 19:02:04 +08:00
Harald Welte 97a282b037 Create new gprs-conf branch with the non-SGSN part of the gprs branch
This new gprs-conf branch is intended to contain everything needed
to configure GPRS in the nanoBTS, but without implementing the SGSN/GGSN
functionality.

The SGSN/GGSN development will happen in a branch based on this branch
called "gprs-sgsn"
2010-03-22 19:02:04 +08:00
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