aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libcommon/gsm_data.c
AgeCommit message (Collapse)AuthorFilesLines
2017-07-12move openbsc/* to repos rootNeels Hofmeyr1-473/+0
This is the first step in creating this repository from the legacy openbsc.git. Like all other Osmocom repositories, keep the autoconf and automake files in the repository root. openbsc.git has been the sole exception, which ends now. Change-Id: I9c6f2a448d9cb1cc088cf1cf6918b69d7e69b4e7
2017-06-18Add vty command "radio-link-timeout infinite" for uplink rx testingHarald Welte1-2/+38
When we are performing Rx sensitivity testing on a BTS, we want to deactivate the connection failure criterion / radio link timeout, i.e. no matter how many SACCH frames in uplink are failed to decode, the BTS should never close the channel. OsmoBTS Change-Id I736f21f6528db5c16fa80cdb905af20673797be5 covers a way how this behavior can be requested from the BTS via an OML attribute. This patch adds support to the BSC to actually set that attribute. Do not use this in production networks, as the BTS will keep open radio channels indefinitely even if the phone is gone and no longer transmitting anything. This is a pure testing feature. Change-Id: I6cb94e0f024934f7baeeb728ca9ed3042fbf16d2
2017-05-31Add remote BTS feature storage and helpersMax1-0/+2
In addition to compile-time defined BTS model features we also need run-time BTS features reported by BTS via OML. This should be shared by BSC and BTS. To accommodate for this, add following: * features bitvec to gsm_bts struct * features descriptions * comments to avoid confusion between 2 feature sets * helper functions to set/query particular feature * upper boundary on number of supported features and assertion for it Change-Id: I02bd317097ba66585c50ebd4e8fc348f6dc3dad9 Related: OS#1614
2017-05-31Adjust BTS model feature checkMax1-6/+6
Rename gsm_bts_has_feature() -> gsm_btsmodel_has_feature() and adjust type signature to match gsm_btsmodel_set_feature() function and avoid confusion with upcoming functions to check/set BTS features reported over OML. Change-Id: I97abdedbef568e0c2fbd37c110f7d658cf20e100 Related: OS#1614
2017-05-09Make BTS type and variant converters shareableMax1-20/+0
* move value_string definition and corresponding functions for BTS type to shared header to make it re-usable by OsmoBTS * use consistent function naming * add similar functions for BTS variant * add enum to be used by OML Attribute Reporting to distinguish between type, variant and other info Change-Id: Ida94725a6fce968443541e3526f48f13758031fd Related: OS#1614
2017-04-10gsm_bts: add version and variant detailsMax1-3/+3
* add version string to gsm_bts * add PCU version string to gsm_bts * rename GSM_BTS_TYPE_OSMO_SYSMO -> GSM_BTS_OSMOBTS to avoid confusion between BTS model and variant * add variant enum to gsm_bts_model using enum with variants for each hw vendor of OsmoBTS * show connected PCU version (if available) in vty via 'show bts' This will come in handy when logging details regarding particular BTS reported via OML, see: Related: OS#1614 Change-Id: I6710d53115f34634a7b70969cc05fd5c72ff8ab2
2017-02-24cosmetic: rename osmo_msc_data.h to bsc_msc_data.hNeels Hofmeyr1-1/+1
With the OsmoMSC program coming up, the name osmo_msc_data becomes even more confusing than it already is. Clearly indicate it as libbsc's data of a remote MSC by prefixing with bsc_. Also, the Osmocom community has in the meantime agreed to have the osmo_ prefix only in libosmocore, to avoid naming conflicts in case things are moved there. So while renaming anyway, also drop the osmo_ prefix. Change-Id: I13554563ce9289de126ba0d4cf329bafcda35607
2016-09-17Modify SI 13 field for control_ack_typeMax1-0/+1
Add vty function to explicitly set use of 4xRACH type of ack message for PACKET CONTROL ACKNOWLEDGMENT. Previous hardcoded value (use RLC/MAC control block) is used as a default. This is handy for debugging issues related to Timing Advance in context of GPRS. Change-Id: Ie869ac0a82055110f1e3b875e246750c4e113336 Related: OS#1526
2016-06-05Add regexp authorization policy for IMSIMax1-0/+1
* extend "auth policy" vty command with new option "regexp" * add vty command "authorized-regexp" for setting arbitrary POSIX regular expression * add basic vty test * add optional "regexp" argument to subscriber-create-on-demand vty command With those in place we can now set the regexp against which MS's IMSI will be matched. If IMSI match the regexp than MS is allowed to access the network. If subscriber is already marked as authorized in HLR than it'll be allowed regardless of IMSI matching. The same way we can decide whether to create subscribers on-demand basesd on IMSI regexp match. Similar to authorization this restriction can be overridden by manually creating subscriber via vty, ctrl interface or directly in HLR. Change-Id: I525f4b80676de47d1d422686da2ca012301b0129 Fixes: OS#1647
2016-05-17Move DTX settings to BTSMax1-2/+4
* 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-0/+5
* 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
2015-11-20Fix TSC/BSIC handling bug and remove bts->tscHarald Welte1-2/+1
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-0/+2
2015-02-07nokia: Allow to set the reset time for the nokia btsSipos Csaba1-0/+2
2015-01-31bsc/nitb: Allow to set the GPRS mode through the ctrl commandHolger Hans Peter Freyther1-2/+21
Create a control command to read and modify the gprs mode. Use the get_string_value to indicate if the value was found or not. This is useful for the ctrl interface where I didn't want to replicate "none", "gprs" and "egprs". Share code to verify that a BTS supports the mode. Related: SYS#591
2014-12-17bts: When one link drops.. check what needs to be droppedHolger Hans Peter Freyther1-1/+1
In case a BTS is dropped, iterate over the list of BTS and check if a dependency is now missing and then drop the BTS. This check could lead to check of 256*256 checks (e.g. all BTS on each other in the chain and the master is being dropped). The performance aspect of it doesn't matter for our usecase. We expect to have pairs of BTS right now.
2014-12-17bts: Add some simple dependency between different BTSHolger Hans Peter Freyther1-0/+58
E.g. for the sysmoBTS2050 we have the requirement that the first board connects before the second due clocking. The easiest point to enforce this is the BSC. Add a simple bitmask based system to allow to express dependencies for IP based systems.
2014-11-11bsc: Move gsm_network_init function to libbscJacob Erlbeck1-80/+0
Currently libcommon depends on libbsc, because gsm_network_init (libcommon/gsm_data.c) directly calls gsm_net_update_ctype (libbsc/gsm_04_08_utils.c). This patch moves gsm_network_init to a new file libbsc/net_init.c. Sponsored-by: On-Waves ehf
2014-08-24move gsm_bts_num() to gsm_data_shared.[ch]Harald Welte1-15/+0
this way we can drop a copy of this function from osmo-bts.
2013-07-03hsl: Remove the support for the HSL bts from OpenBSCHolger Hans Peter Freyther1-4/+0
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-02-08Fix of IMMIDIATE ASSIGNMENT REJECT messageAndreas Eversberg1-0/+1
The message was corrupt at several points. They are fixed now and successfully tested. A default T3122 timer value of 10 is defined by default now. If set to 0, the reject message will not be sent. Note that when using existing configs with T3122 value set to 0.
2013-01-15bsc: Auto RF Off in case of missing MSC connectionHolger Hans Peter Freyther1-0/+1
For short IP failures we want the RF to stay up and wait for the re-connect but in case the A-link is gone too long it is good to switch off the RF and wait for commands to enable it again.
2013-01-01Stricter limits for T3212 (location update period)Daniel Willmann1-0/+1
libcommon: Default to 30min location update period libbsc: Limit VTY value for periodic update and disallow the value 0 According to GSM 04.08 Table 10.5.33 "The value 0 is used for infinite timeout value i.e. periodic updating shall not be used within the cell." This was the default value until now, but the code that deals with expiring inactive subscribers in the next commit can't handle that case so this remains a TODO for now.
2012-10-18Allow setting of Control Channel Description parameters via VTYAndreas Eversberg1-0/+3
2012-09-11gsm_data: Include a structure for the geographical location in gsm_btsDaniel Willmann1-0/+2
2012-09-11gsm_data: Address compiler warning of unhandled switchHolger Hans Peter Freyther1-0/+1
gcc does not really know the _NR_OF_ELEMENTS_IN_ENUM approach, add the _NUM_GSM_BTS_TYPE to the handled cases. gsm_data.c: In function ‘gsm_set_bts_type’: gsm_data.c:349:2: warning: enumeration value ‘_NUM_GSM_BTS_TYPE’ not handled in switch [-Wswitch]
2012-08-17VTY: dynamically create BTS "type" command syntaxHarald Welte1-3/+14
2012-07-02BSC: introduce new "sysmobts" BTS modelHarald Welte1-0/+2
so far, osmo-bts/sysmobts used to be entered as "sysmobts" type in the configuration file. However, there are some differences in the protocol/behaviour and we should reflect that by a new BTS plugin (with lots of code reuse from the nanobts driver).
2012-06-03Allow VTY-based configuration of T3105Harald Welte1-0/+1
This timer will only be forwarded to BS11 and Ericsson Abis so far, not to Nokia and ip.access BTS yet.
2012-03-16bsc: Prepare to have multiple MSC connectionsHolger Hans Peter Freyther1-8/+1
We now have a list of MSCs but in the code we will try to access the MSC with the nr 0.
2012-03-16bsc: Create a osmo_bsc_data and embed osmo_msc_dataHolger Hans Peter Freyther1-9/+10
We want to have multiple MSCs but we also have some data that is only present on a per BSC basis. Right now the MSC data is not allocated with talloc, so we have some change in the talloc contexts.
2012-02-03misc: gsm_data.c address compiler warningHolger Hans Peter Freyther1-3/+4
Assume nothing special needs to be done for the Nokia *site hardware. GCC warning: gsm_data.c: In function ‘gsm_set_bts_type’: gsm_data.c:342:2: warning: enumeration value ‘GSM_BTS_TYPE_NOKIA_SITE’ not handled in switch [-Wswitch]
2011-08-22misc: Move the bsc_parse_reg to libcommom and name it gsm_parse_regHolger Hans Peter Freyther1-0/+26
Move the regexp parsing code from the NAT to libcommon as it will be used by the NAT and BSC code. This also adds the #include <regex.h> include to gsm_data. This header should be split up.
2011-08-10Initial version of Support for Nokia *Site BTSDieter Spaar1-0/+1
This includes the MetroSite, but also other Nokia BTS models.
2011-06-06gsm_data: don't free a bts that's not even allocated yetHarald Welte1-3/+1
2011-06-05split gsm_data.c in gsm_data_shared.c and gsm_data.cHarald Welte1-245/+63
This facilitates the use of gsm_data.c from osmo-bts
2011-06-03Introduce per-ts TSCHarald Welte1-0/+1
This allows us to configure a TSC for each timeslot, not just one globally for the entire BTS.
2011-06-03gsm_data_shared: introduce 'struct gsm_abis_mo'Harald Welte1-1/+1
... as a common wrapper around nm_attr and nm_state
2011-05-23abis_nm: fix some fallout regarding abis_nm migration to libosmocoreHarald Welte1-1/+2
Thanks to Holger for noticing this.
2011-05-22bsc: on-demand setup of nanoBTS and HSL femto socketsPablo Neira Ayuso1-0/+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-06src: use namespace prefix osmo_counter*Pablo Neira Ayuso1-30/+30
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-04-26bsc: Allow to have a list of MSCs/MUXs to connect toHolger Hans Peter Freyther1-2/+1
Be able to configure a list of destinations (duplicates allowed) that will be tried in a round robin fashion. The change is in the bsc_msc_connection to operate on a list. We achieve the round robin nature with the same trick used in the paging code to delete and append the current entry. The nat code was updated to compile but one can only configure one destination.
2011-04-26bsc: Point back from struct osmo_msc_data to struct gsm_networkDaniel Willmann1-0/+3
2011-04-18misc: Move from u_int to uint types of stdint.hHolger Hans Peter Freyther1-6/+6
This was done with sed on the files.
2011-03-23src: use new library libosmogsm and new path to headers in libosmocorePablo Neira Ayuso1-4/+4
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-04[HSL] initial support for the HSL 2.75G FemtocellHarald Welte1-0/+3
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/+589
... and make sure tests work again after restructuring