aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_init.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-14dyn PDCH: send PDCH ACT for each TCH/F_PDCH on TS EnableNeels Hofmeyr1-3/+1
Add dyn_pdch_init() in new file bsc_dyn_pdch.c (new file to avoid linking issues; bsc_init.c would create undefined references, and putting in a new file is the easiest solution). Call dyn_pdch_init() from nm_statechg_event() whenever a TS is enabled. Revert the |= TS_F_PDCH_MODE chunk from previous commit, since this flag will now be set after dyn_pdch_init() sent out the PDCH ACT and when subsequently the PDCH ACT ACK messages are received in rsl_rx_pdch_act_ack(). Change-Id: I0cad93dec59d546b3f3b19e332e0833496031575
2016-06-14dyn PDCH: Automatically deactivate/activate PDCH on TCH/F+PDCH channelAndreas Eversberg1-1/+3
Handle shared TCH/F+PDCH channels as regular TCH/F channels. Prior to activation, deactivate PDCH mode. After deactivation, restore PDCH mode. Change-Id: I59712b8769cc3959ef114a6e12e77801816fe8b6
2016-05-17Move DTX settings to BTSMax1-6/+0
* Add per-BTS DTX settings * Configure Uplink and Downlink DTX separately * Deprecate global DTX option (it was never tested/used anyway) * Use libosmocore function for DTX indicator in System Information (previously it was incorrectly assigned for half-rate channels) Related: OS#22 Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Reviewed-on: https://gerrit.osmocom.org/40 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther <holger@freyther.de>
2016-04-16Add basic SI2quater supportMax1-3/+3
* support for sending arbitrary static SI2quater. * vty interface for neightbor EARFCNs specific to SI2quater. * dynamic generation of SI2quater messages. * unit test for SI2quater messages. Fixes: OS#1630
2016-04-16Add SI2quater support to SI3Max1-0/+1
Advertise SI2 quater presence and location (if available) using SI3 according to 3GPP TS 44.018 § 10.5.2.34
2016-04-11Fix segfault with broken configMax1-0/+3
Fixes OS#1691
2016-02-25enable telnet VTY bind address config for various programsNeels Hofmeyr1-1/+5
Following the 'line vty'/'bind A.B.C.D' command added in libosmocore, use the configured address to set the telnet bind for the VTY line. It is now possible to publish the VTY on a specific local interface (including 0.0.0.0 aka "any"). Implement in all of: osmo-gbproxy osmo-gtphub osmo-sgsn osmo-bsc osmo-bsc_nat osmo-bsc_mgcp osmo-nitb In some of these main programs, move the telnet initialization below the configuration parsing. Historically, this was not a good idea for programs using bsc_init.c (aka bsc_bootstrap_network()), since they expected a gsm_network struct pointer in ((struct telnet_connection*)vty->priv)->priv, so that telnet had to be either initialized or replaced by a dummy struct. In the meantime, the gsm_network struct is not actually looked up in a priv pointer but in the static bsc_vty.c scope (bsc_gsmnet), so this limitation is mere legacy (even though said legacy is still there in an "#if 0" chunk). In the other binaries I have briefly looked at the init sequence dependencies and found no reason to initialize telnet above the config file parsing. In any case, I have tested every single one of abovementioned binaries to verify that they still parse the example config successfully and launch, allowing VTY connections on the configured address(es). I hope this suffices. In all of the above, log VTY address and port. LOGL_INFO is disabled by default in some of the logging scopes, and since it is a single log message right at program launch, I decided for the slightly more aggressive LOGL_NOTICE.
2015-11-20Fix TSC/BSIC handling bug and remove bts->tscHarald Welte1-2/+2
This fixes a bug in the following circumstances: * BSIC is set to 0 in the config file * No TSC is explicitly specified at the BST level in the config file In this case, we ended up using BSIC=0 and TSC=7, as TSC=7 is our default initialization value. The TSC of the CCCH/BCCH must always be the BCC, which is the lower 3 bits of the BSIC. Having configuration options for both the BSIC _and_ the TSC at the BTS level therefore makes no sense, as it only adds ways in which users can configure non-oprational configurations. So we remove the bts->tsc member, and keep only the ts->tsc members that allow us to configure a timeslot-specific TSC that's different from the BTS TSC (= BCC).
2015-08-17Add option to set RADIO LINK TIMEOUT value via VTYAndreas Eversberg1-3/+0
2015-06-20bts: Arfcn can never be smaller than 0Holger Hans Peter Freyther1-2/+1
Remove the condition because it can never be true. Fixes: Coverity CID#1307793
2015-06-19Fix GSM900 ARFCN range checkMichael McTernan1-2/+2
Allow ARFCN 0 to be used in GSM900 band.
2015-06-02libbsc: Move SIs update/generation for a BTS into a separate function.Alexander Chemeris1-1/+21
The code to do that doesn't belong to the control interface, so abstract it out to a separate function gsm_bts_set_system_infos(). [hfreyther: Fix the coding style...]
2014-11-21bsc: Allow to generate new system information onlineHolger Hans Peter Freyther1-2/+2
Increase the bcch_change_mark and generate a new copy of the system information. Make the method public, add a small test case. Manually verified using the FakeBTS. I don't know if the MS will re-read these SIs. Related: SYS#739
2014-08-24Use port number #defines for VTY and CTRL portsHarald Welte1-1/+2
.. as defined in libosmocore
2013-07-03hsl: Remove the support for the HSL bts from OpenBSCHolger Hans Peter Freyther1-22/+3
The support has been implemented for an old model, we were told that newer versions would be made incompatible with OpenBSC. Ther are various warnings in the code and coverity has found some new ones. Just remove the code as we don't know of anyone using this code.
2013-01-08si: Do not schedule SI1 to SI4 on the second TRXAndreas Eversberg1-3/+5
2012-11-11bts: Really drop the BTS in case of an OML NACKHolger Hans Peter Freyther1-7/+5
The previous code didn't work as expected. The trx and dst pointer are located in an union and in the case of the Abis code the dst is used to point to the signalling link timeslot and not the TRX. The is_ipaccess_bts always returned false because the dst was casted to a trx while it was no trx. This fix was tested with the nack_test/NACKTest.st of the test repo.
2012-10-18Allow setting of Control Channel Description parameters via VTYAndreas Eversberg1-4/+4
2012-10-09bsc: Do not print "SI 18" but SI2ter when the SI generation failsHolger Hans Peter Freyther1-2/+2
2012-10-08bsc_init: Don't drop all BTSs because a single BTS had an errorHarald Welte1-6/+8
2012-09-11bsc_init: Initialize rc on all paths to address a compiler warningHolger Hans Peter Freyther1-0/+1
bsc_init.c:203:6: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized] bsc_init.c:101:6: note: ‘rc’ was declared here
2012-03-01Improved generation of SYSTEM INFORMATIONs 2* and 5* for neighbour bandsAndreas Eversberg1-20/+43
In addition to SI 2 and SI 5, the SI 2ter and 2bis is generated, if neighbour cells in other bands exist. Also it is indicated in the rest octets of SI3, that SI 2ter is used. If no neighbour cell in a different band exists, the SI 2ter and SI 5ter is omitted. A special case is P-GSM range (channels 1-124). To be compatible with older phones, SI 2bis and SI 5bis is used. If the BCCH lays inside the P-GSM band, only neighbour cells of the P-GSM range are included in SI 2 and SI 5. If neighbour cells exist in the same band (900), but lay outside the P-GSM range, the SI 2bis and SI 5bis is used to extend the list of neighbour cells. The extension is also indicated in SI 2 and SI 5. If the BCCH lays inside the P-GSM range, but no neighbour cell exists in the same band outside the P-GSM range, the SI 2bis ans SI 5bis are omitted.
2012-01-29ARFCNs are in the range of 0..1023, not 0..1024Harald Welte1-2/+2
I'm sure I read somewhere that it actually was 0..1024, as I kept wondering how stupid it was to use 10bit+1. However, that source was incorrect, as GSM TS 05.05 quite clearly states 0..1023
2011-10-12bsc: Drop the BTS instead of exiting the applicationHolger Hans Peter Freyther1-7/+12
When the BTS reboots it might not want to accept our BTS Attr, do not leave the bsc_msc_ip/bsc_nitb but simply drop the BTS connection. Manually cherry-picked from: 54e6c8b3400b376ed36fe84f28f7930d2d9ff24b
2011-09-06fix some "implicit declaration" warnings in libbscAlexander Huemer1-0/+2
2011-08-19src: port openBSC over libosmo-abis0.9.15Pablo Neira Ayuso1-14/+7
This is a big patch that ports openBSC over libosmo-abis. Sorry, the changes that are included here are all dependent of libosmo-abis, splitting them into smaller pieces would leave the repository in some intermediate state, which is not desired. The main changes are: - The directory libabis/ has been removed as it now lives in libosmo-abis. - new configuration file format for nanoBTS and HSL femto, we need to define the virtual e1_line and attach it to the OML link. - all the existing BTS drivers (nanoBTS, hsl femto, Nokia site, BS11 and rbs2000) now use the new libosmo-abis framework. - use r232 input driver available in libosmo-abis for bs11_config. - use ipa_msg_recv instead of old ipaccess_read_msg function. - delete definition of gsm_e1_subslot and input_signal_data. These structures now lives in libosmo-abis. Most of this patch are deletions of libabis/ which has been moved to libosmo-abis. This patch also modifies openBSC to use all the new definitions available in libosmocore and libosmo-abis. In order to do that, we have replaced the following: - DINP, DMI, DMIB and DMUX by their respective DL* correspondences. - SS_GLOBAL by SS_L_GLOBAL - SS_INPUT by SS_L_INPUT - S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN - SS_INPUT by SS_L_INPUT - S_INP_* by S_L_INP_* sub-signals - E1INP_NODE by L_E1INP_NODE vty node This patch has been tested with: - one nanoBTS - the HSL femto with the examples available under libosmo-abis - BS11 with both dahdi and misdn drivers.
2011-08-10Initial version of Support for Nokia *Site BTSDieter Spaar1-0/+29
This includes the MetroSite, but also other Nokia BTS models.
2011-07-18bts-init: Initialize the BTS like it will look after a resetHolger Hans Peter Freyther1-0/+3
Reset the BTS MO State on BTS bootstrap. This way we will always test the BTS disconnect/reconnect case of the BTS. Do not reset the administrative state of objects. The BSC might have set these and wants to maintain them across disconnect/ reconnect. Right now this is true for the TRX state.
2011-06-29properly reset the MO state of all MO on Abis disconnect0.9.14Harald Welte1-7/+1
When we loose the A-bis link, we should properly re-set the administrative, operational and availability state of all MOs
2011-06-03gsm_data_shared: introduce 'struct gsm_abis_mo'Harald Welte1-6/+6
... as a common wrapper around nm_attr and nm_state
2011-05-24Move system information related defines and code to libosmocoreHarald Welte1-6/+6
This brings openbsc in sync with the following libosmocore commit: b5503136fa234690d5493b19a8aee3a4ef74190d
2011-05-22bsc: on-demand setup of nanoBTS and HSL femto socketsPablo Neira Ayuso1-5/+8
The daemons set up nanoBTS and HSL femto sockets by default, ie. the three sockets to support these two drivers are open even if we have no BTS of that kind. This patch enables on-demand socket creation, ie. we only enable them if we have one BTS at least that requires it. I added two new attributes to the gsm_bts object, they are: * the start() function includes the code that we need to run to start the BTS. This new function contains the socket creation in the particular case of nanoBTS and HSL femto. * the started boolean, which is used to know if we have already started the BTS, ie. we have already invoked start(). Note that, I have splitted the bts_model_*_init() function into two functions, the _init() functions that register the BTS driver and the _start() functions that start BTS driver on-demand. While I was at it, I added several changes/cleanups to this patch: * Group all bts_model_*_init() calls into one function bts_init(), which is called in the initialization path of osmo-nitb and osmo-bsc. * Add openbsc/bss.h that contains the declaration of bsc_bootstrap_network, bsc_shutdown_net and bts_init. * Add missing e1inp_init() in osmo-bsc. * Fix missing declaration of hsl_setup in openbsc/e1_input.h
2011-05-22bsc: fix bail out in case of problems bootstrapping BTS or E1 inputPablo Neira Ayuso1-4/+6
The error message was missing in case of problems bootstrapping the BTS. The E1 input driver initialization was displayed in the standard output, now this error is reported via logs.
2011-05-07src: use namespace prefix osmo_* for misc utilsPablo Neira Ayuso1-1/+1
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
2011-05-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-2/+2
Summary of changes: s/struct counter/struct osmo_counter/g s/counter_inc/osmo_counter_inc/g s/counter_get/osmo_counter_get/g s/counter_reset/osmo_counter_reset/g s/counter_alloc/osmo_counter_alloc/g s/counter_free/osmo_counter_free
2011-05-06src: use namespace prefix osmo_signal*Pablo Neira Ayuso1-3/+3
Summary of changes: s/signal_cbfn/osmo_signal_cbfn/g s/register_signal_handler/osmo_signal_register_handler/g s/unregister_signal_handler/osmo_signal_unregister_handler/g s/dispatch_signal/osmo_signal_dispatch/g
2011-05-02paging: Initialize structs internally to avoid a crashHolger Hans Peter Freyther1-2/+0
The code to create the struct gsm_bts is in libcommon right now and we can not call paging_init from there. Right now it appears to be the easiest of doing the init internally.
2011-04-07misc: Fix compiler warnings in the codeHolger Hans Peter Freyther1-2/+1
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-2/+2
libosmogsm is a new library that is distributed in the libosmocore. Now, openbsc depends on it. This patch gets openbsc with this change. This patch also rewrites all include path to the new osmocom/[gsm|core] Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-04fix erroneous modification of DTX parameter introduced in previous HSL commitHarald Welte1-1/+1
2011-03-04Implement the HSL SR1.0.1 protocolHarald Welte1-1/+1
It seems HSL has fixed most of their obvious issues in the SR1.0.1 release. However, this creates quite an incompatibility of the protocol, and we have to adapt accordingly
2011-03-04[HSL] initial support for the HSL 2.75G FemtocellHarald Welte1-5/+31
The HSL Femtocell seems to be a poor man implementation of the ip.access Abis/IP protocol, but cutting corners wherever possible. We try to workaround those corners wherever possible...
2011-03-04prefix sub-directories containing libraries with 'lib'Harald Welte1-0/+440
... and make sure tests work again after restructuring