Commit Graph

7632 Commits

Author SHA1 Message Date
Keith Whyte cae79e920c Show BTS Channel Load on Ericsson BTS
On the RBS, the TRX NM State is always NULL.

Change-Id: I8bf6efc7f950246e0a836eceea834575a38a2d48
2021-04-02 09:27:21 +02:00
Keith Whyte 3161a9c959 Ignore CHANnel ReQuireD with Access Delay IE > 63
It is observed that a CHANnel ReQuireD with access delay
greater than 63 can be received from the Ericsson RBS.
This results in osmo-bsc sending back a CHANnel ACTIVation with
a Timing Advance IE containing the access delay value.
The RBS NACKs this, leading to a BORKEN Channel.

This patch makes the maximum acceptable access delay vty-configurable
and Ignores CHANnel ReQuireD RSL Messages with Access Delay IE greater
than that configured. Default value is 63.

Change-Id: Ie8987bcc0e43921bc753162b77a0efc68799b3ce
2021-04-02 08:47:23 +02:00
Neels Hofmeyr 764449ec2e fix/refactor neighbor config
The neighbor configuration storage is fundamentally broken: it requires
all local cells to be configured before being able to list them as
neighbors of each other. Upon config write-back, the neighbor config
however is placed back inline with the other config, and hence a
written-out neighbor config no longer works on program restart.

The cause of this problem is that the config is stored as explicit
pointers between local cells (struct gsm_bts), which of course requires
the pointer to exist before being able to reference it.

Instead, store the actual configuration that the user entered as-is,
without pointers or references to objects that need to be ready. Resolve
the neighbors every time a neighbor is needed.

Hence the user may enter any config at any place in the config file,
even non-working config (like a BTS number that doesn't exist), and the
relation to actual local or remote neighbor cells is made at runtime.

Abort program startup if the initial neighbor configuration contains
errors.

Related: OS#5018
Change-Id: I9ed992f8bfff888b3933733c0576f92d50f2625b
2021-03-24 21:22:21 +01:00
Neels Hofmeyr dc60505bc5 drop neighbor_ident_test.c
This tests the opaquely designed neighbor config storage. However, a
subsequent patch will refactor the neighbor config storage, and this
neighbor ident API will change fundamentally. No need to test this.

The new storage will use the usual scheme of transparent struct and
llist, the opaque design is not necessary and just bloats. There is no
need to test a plain llist, so this test needs no replacement.

Related: OS#5018
Change-Id: I6522796bf0bbb9ab83e49168bcbff7bc70fd6c6d
2021-03-24 10:02:29 +01:00
Neels Hofmeyr d88f9a5384 refactor handover penalty timers
So far the list of penalty timers was stored for an opaque target
pointer. That was either a gsm_bts pointer for a local BTS, or a cell
identifier list pointer for a remote-BSS cell.

Reasons to refactor penalty timers:

- The cell identifier list pointer came from the neighbor configuration
  storage, but the way cell neighbor config is stored will change in a
  subsequent patch. There will be no more cell identifier lists there.

- Storing object pointers is inherently unsafe -- if an object gets
  removed and another gets allocated, the penalty timer could
  theoretically remain in force for an unrelated object.

Rather store penalty timers for specific Cell IDs. Since remote-BSS
neighbors can be requested by a cell identifier *list*, use a
gsm0808_cell_id_list2 as key in the list of penalty timers.

Fix handover_test.c: have different CI for each local BTS. So far it was
the same LAC+CI for all BTSes, which now would make the test fail,
because any penalty timer would appear to apply to all local cells.

Related: OS#5018
Change-Id: I72dd6226a6d69c3f653a3174c6f55bf4eecc6885
2021-03-24 10:02:29 +01:00
Oliver Smith 3ac1278dcf stats: T3122 related: num_values 16 -> 60
Increase the number of values saved in the FIFO from 16 to 60, so there
is more time to read them out.

Related: SYS#4877
Change-Id: Ic5fd7c0fa030004fd88fee74f0028fb93c9f2d10
2021-03-17 16:21:21 +01:00
Javi 2d168bd1d7 Add command to enable RX diversity to RBS2000
Allow selection of RX diversity from VTY
Options are a,ab,b
Default is 'a' so there is no change from previous behavior

Change-Id: I430762b8cfa51060841d90ba4446de73bd557c6c
2021-03-15 18:50:32 +00:00
Javi 0a3913ee71 Add vty command for Ericsson RBS2000 sync
This commit adds support for Selection of syncronization source.
Options are internal for E1 and external for GPS

Change-Id: Ia3d1acd6b3442238b35fc911092e12a6ac989adb
2021-03-13 07:43:17 +01:00
Harald Welte 0ed69da597 remove obsolete dependency on libosmo-sccp
We only use libosmo-sigtran these days, so we can remove the depdency
to the old libosmo-sccp from osmo-bsc.  We don't use LIBOSMO_SCCP_*
variables in any Makefile.am, nor do we #include <osmocom/sccp/...>
anywhere [anymore].

Change-Id: Ie478016ffb6e767ba10968c1ee2ab98db15a45a3
Related: OS#2601
2021-02-23 20:18:50 +01:00
Pau Espin 6505f692d4 Bump version: 1.6.0.558-f5d07-dirty → 1.7.0
Change-Id: I0afcb06f8a7466f98cac26ff939a3813d4add1cc
2021-02-23 18:43:04 +01:00
Harald Welte f5d0733e44 CBSP: document rate counters and their mapping to basic/extended CBCH
Change-Id: Id298d547a90bb5d8e40f2cd300b7e1303bb43fdc
2021-02-22 13:44:32 +00:00
Vadim Yanitskiy 3991ae5b87 abis_nm: enrich debug messages with contextual info
Change-Id: I68f64e6cae061a49733c4885ba383d2b9b4cfca9
2021-02-20 23:24:09 +01:00
Pau Espin 679eeca824 tests: Replace deprecated API log_set_print_filename
Change-Id: I4e0eb8842333c89d15fb6728a34716ea1eb4935d
2021-02-20 17:14:49 +00:00
Pau Espin f25a45abea tests: Explicitly drop category from log
Let's disable category here since we don't care about its formatting here.

In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.

Change-Id: I4d48c0c0aa46065560a020369e3b0544385f173e
Related: OS#5034
2021-02-20 17:14:49 +00:00
Keith Whyte e4b52dff39 Disallow changing the type of an existing BTS from the vty
Changing the BTS type is not supported, so don't allow it.

For example, Changing from type sysmobts to type rbs2000
may hit an OSMO_ASSERT in om2k_bts_fsm_alloc()

The default BTS type if osmo-bsc is started with an empty
configuration and the operator issues config terminal->network->bts 0
will be "unknown". This type and only this type can be
changed from the vty config node.

Change-Id: I0df97ef128a1bbd84c787654d1d842dce4dad819
2021-02-19 08:29:32 +01:00
Pau Espin Pedrol cdbd7e3bf2 SI13: Enable sending GPRS Cell Options Extension Information on GPRS-only BTS
The EGPRS bits are anyway conditionally enabled by egprs_supported.

Change-Id: Ie7a438419eb416ce3d29794febab5f952661e5c5
2021-02-18 00:56:13 +00:00
Michael Iedema 456a962c7e stats: add SIGN/SPEECH assignment subcategories
Change-Id: I73f4dab6edb0951180f2bbcfc352ff34de647679
2021-02-17 15:13:25 +00:00
Pau Espin Pedrol 0cfed38f07 Fix neigh resolution service on local neighbours
Change-Id: I217e3550aa6d7f3c3cab4e545641d790ae12b23f
Related: SYS#4909
2021-02-13 08:15:01 +00:00
Pau Espin Pedrol a27e8a5c9a Move bts_ident_key to neighbor_ident.c
The function is not really handover specific, and will be used in other
places in subsequent patches.

Change-Id: Icae8b9045e497f850f22cb3b6f93acbf61b84746
2021-02-13 08:15:01 +00:00
Philipp Maier ff5dcf7fd3 bts.adoc: describe ACCH repetition settings
The manual currently does not mention ACCH repetition yet. Lets
add some info on how to set up ACCH repetition correctly.

Change-Id: I1e27ac955882497bbeefac0c830708dd18ad46b3
Related: SYS#5114
2021-02-11 23:16:50 +01:00
Philipp Maier a2f21b3bc4 bsc_vty: mark repeat rxqual 4 (BER >= 1.6) as default
Change-Id: Iecc2395efab703cf3de8f8e16b9e4bc8c8baf260
Related: SYS#5114
2021-02-11 12:45:36 +01:00
Pau Espin Pedrol d01bc3e4c7 Introduce VTY cmd to configure Alpha in SI13
Related: SYS#5358
Change-Id: I8b97ea11bad5fe05f2f634945b5703ee9abde81d
2021-02-09 13:31:48 +01:00
Harald Welte c72c853a96 hide the "smscb-command" vty command; people should use osmo-cbc
Many years prior to the implementation of osmo-cbc, we introduced
a way how raw RSL SMSCB COMMANMD can be injected from the VTY.

These days, people should use the CBSP interface with osmo-cbc or any
other CBC.  We should not advertise the VTY command hack
as a standard feature anymore.

Change-Id: If5ddc3db989763a1f47d4cbc026e293e3134d8ef
Related: OS#4753
2021-02-08 17:21:20 +00:00
Vadim Yanitskiy ea8d6939e6 power_control: make P_CON_INTERVAL parameter configurable
Change-Id: I6e0fae81cc60f708e49d5eb8dfc0bbcad926b18f
Related: SYS#4918
2021-02-07 19:20:12 +01:00
Vadim Yanitskiy e1d2691e69 power_control: enable Uplink DPC by default if format is known
So far osmo-bsc would enable Uplink DPC (Dynamic Power Control) only
for osmo-bts, and the 'static' mode for all other BTS models.  This
decision dates back to the time when ip.access specific encoding for
dynamic power control parameters was not implemented, and the MS
Power Parameters IE was sent empty in the RSL messages.

Let's make a step forward by enabling Uplink DPC by default for
all BTS models which declare the API for vendor-specific encoding
of the power control parameters.  Currently this includes osmo-bts
and nanoBTS, both supporting ip.access specific format.

Change-Id: If86d27d4332af3d82f862737340d061e42e34eba
Related: SYS#4918
2021-02-07 04:38:15 +01:00
Vadim Yanitskiy d5a03a59b0 power_control: check BTS model in cfg_power_ctrl_avg_osmo_ewma()
Change-Id: I1c454f447d37cbc4d44b242dc4b2c62297ee3f67
Related: SYS#4918
2021-02-06 20:19:38 +01:00
Neels Hofmeyr b03e73f27b lchan activation: indicate whether TA is known
On lchan activation, we already know the Timing Advance in most
situations: from the Channel Request RACH, or from a previous lchan in
the same cell. Place this information in lchan->activate.info.ta.

So far, the lchan->last_ta (until recently called rqd_ta) was used to
store the initial TA for channel activation -- move the initial TA to
lchan->activate.info.ta, for proper scoping.

Only an inter-cell handover does not yet know a Timing Advance (until
the Handover Detection RACH is received), so indicate
activate.info.ta_known = false for that case.

If ta_known is false, do not include an Access Delay IE in the Channel
Activation message, ensuring that the BTS does not use an arbitrary TA
that is likely inaccurate.

The effect for OsmoBTS is that we will *not* start the downlink SACCH on
channel activation for inter-cell handover, but will wait for a HO RACH
first, and then use the correct TA when enabling downlink SACCH.

Related: OS#4008 SYS#5192
Change-Id: I986bf93e8acd6aef7eaf63ac962480b680aa894f
2021-02-05 20:24:43 +01:00
Neels Hofmeyr 980a28fdcb rename lchan->rqd_ta to last_ta
Originally, the lchan stored only the Timing Advance from the initial
channel request, hence it was called rqd_ta.

Since quite a while now, rqd_ta also stores the most recent Timing
Advance from each received Measurement Report. So rename to last_ta.

This is cosmetic preparation for an upcoming patch that clarifies
whether the Timing Advance is already known for Channel Activation.

Change-Id: I1049526a173819baeb4978db5bf018ba3f1006a0
2021-02-05 20:24:43 +01:00
Neels Hofmeyr 71b1bc4964 lchan assignment when RTP is set up: don't break on Mode Modify
Change-Id: I06d3f35fcc71d77e1f30c2b15ab221ef7d5f7f27
2021-02-05 20:24:40 +01:00
Michael Iedema 9a66b3f200 cosmetic: shorten deref chains where possible
Change-Id: Ic42db1a2d768c8ee7e07406ac5f77af757e52cdb
2021-02-04 20:25:52 +00:00
Vadim Yanitskiy e511c99052 assignment_fsm: assert the result of conn_get_bts()
Change-Id: I036f2d895e3569bd050ce574759f8371bd19cec9
Fixes: CID#216933
2021-02-04 14:22:50 +01:00
Harald Welte f1c82b8e12 BS-11: Send proprietary MRPCI message after assignment + HO complete
This is a non-standard RSL message that must be sent after each traffic
channel has been established.  Without it, any voice call will be
disconnected within seconds.

This is a hack; we need to store the subscribers classmark2 value and
use it here.

Change-Id: I6cb6d25e405aa888c4df4022d897330a6af9e946
Related: OS#2389
2021-02-03 08:50:07 +00:00
Neels Hofmeyr b4364a4adc hodec2: fix intra-cell congestion balancing with source lchan on dyn TS
Related: SYS#5301
Change-Id: I332477cbddf32cf6f057007b45cda8477227f0b1
2021-02-02 21:53:53 +01:00
Pau Espin Pedrol 1475aac8ed Allow configuring SI13 CCN_ACTIVE bit from VTY, enable by default on osmo-bts
This is required in order to tell MS that osmo-pcu now supports
Network Assisted Cell Change (NACC).

Other BTS are not enabled by default since NACC support is not known to
work nor tested there.

Depends: libosmocore.git Change-Id I61991266b95d0c13d51b47906cc07846e9cf1390
Related: SYS#4909
Change-Id: If91d85331d402c3ab9c32b70c2c66cd7ba6ceb28
2021-01-30 19:16:18 +00:00
Michael Iedema e3d0b93986 stats: Add granularity to chan:rf_fail stat.
Add additional counters to track TCH and SDCCH RF failures in separate subcategories.

Change-Id: I91fe6659fe9df33763f4070b4f505561b2005d38
2021-01-30 14:15:16 +00:00
Harald Welte 5e01039d79 select_best_cipher(): Prefer A5/1 over A5/2
We cannot simply use the highest 'x' in A5/x codecs.

For A5/7 through A5/3, larger 'x' means better.
But: A5/1 is better than A5/2, so we need to prefer the former
over the latter.

Change-Id: I399fff8d07d1bfcbc6b385e90914ff6d9e00eb73
Closes: OS#4975
2021-01-29 21:24:36 +00:00
Neels Hofmeyr 6d32c92e4f show bug: add test_dyn_ts_amr_tch_{f,h}_to_{h,f}_congestion_assignment_2.ho_vty
Name both new tests with suffix '_2' even though the first h_to_f does
not exist (yet?), to indicate the complementary nature of those two
tests.

Related: SYS#5301
Change-Id: I8c8d9d5936f713f7d02e4246eeb373916e62510b
2021-01-29 21:17:01 +00:00
Pau Espin f4db24c731 cosmetic: bts-sysmo: Fix whitespace indentation
Change-Id: Ia4594d8a98aee19f14e75449cfdfdc0fbcaf6e9f
2021-01-29 17:10:31 +01:00
Pau Espin f93f1dfec2 cosmetic: doc: wrap line too long
Change-Id: I2da6f58d84521289f86840b1da191a9faf76a1a8
2021-01-29 16:01:23 +01:00
Oliver Smith e66e7c32f7 configure.ac: set -std=gnu11
Change-Id: I61ee711de5303691c2f8881b66d4614d11850be2
2021-01-28 09:28:52 +00:00
Philipp Maier 80184ae171 abis_rsl: check if emergency calling is disabled before premption
If an emergency call arrives at the BSC while all TCH are busy, one TCH
is cleared in favor of the emergency call. However, if emergency calls
are disabled (system information), it is still possible that an MS might
try an emergency call anyway or that due to interference a regular call
might look like an emergency call (channel request reason). In those
cases the preemption must not happen and the emergency call must be
rejected.

Change-Id: I1af1f4fefcbe6a886bb5396901ce0cb2368a0e19
Related: OS#4976
2021-01-26 22:42:06 +01:00
Philipp Maier 20a90a9b86 bsc_vty: fix acch_repetition ber threshold strings
When setting the BER threshold for ACCH repetition the VTY displays
wrong threshold values in the online help.

Change-Id: I4c89ad130da328aba99663e5a2931a4007772bca
Related: SYS#5114
2021-01-22 20:46:48 +00:00
Neels Hofmeyr f7e25a1010 hodec2: fix congestion balancing on dyn TS
When balancing congestion, not only look at TCH/F or TCH/H separately,
but also to take into account the effects on the other TCH kind from
using/freeing dynamic TS.

Related: OS#5298
Change-Id: I433df6f343650f9056b1bab926bc19ac1d867ad5
2021-01-19 11:49:07 +01:00
Neels Hofmeyr abbcfc252f show bug: add test_dyn_ts_balance_congestion.ho_vty
Related: SYS#5298
Change-Id: I34471fbd490a95253bd0709308a42cde2af6481c
2021-01-19 11:49:07 +01:00
Neels Hofmeyr 2eeef70310 lchan_avail(): omit logging for handover decision 2
Add bool log argument to lchan_avail_by_type() and omit logging when
passed as false. From handover_decision_2.c, pass 'log' as false, from
all other callers pass true, i.e. for unchanged behavior.

Rationale:

Usually, we use lchan_avail_by_type() to select a new lchan to initiate
actual service. For that, it is interesting to see how osmo-bsc decides
which lchan will be used.

For handover decision 2, we since recently call lchan_avail_by_type()
for each and every handover candidate, to determine whether it will
occupy a dynamic timeslot or not (to know whether we would congest the
other TCH kind). So this happens for each permutation of source lchan
and target cell. That produces a lot of logging, out of proportion of
being useful to the maintainer.

Change-Id: Ia403f8fc853ca9ea9e81f7a7395df6b23845ebed
2021-01-19 11:49:07 +01:00
Neels Hofmeyr 499e02c546 add test_dyn_ts_congestion_tch_f_vs_tch_h_2.ho_vty
Change-Id: Ib11d10f35f72a3dff65bb0c5e185fdda602ccd63
2021-01-19 11:49:07 +01:00
Neels Hofmeyr 3025e69814 hodec2: fix congestion resolution on dyn TS
For handover algorithm 2, properly figure out what effects the target
cell will see for the *other* TCH kind when a handover would occupy a
dynamic timeslot.

Before this, only TCH/F or TCH/H would be regarded at a time. This
introduces detection of whether a dynamic timeslot would be occupied by
a handover, and how losing one unused dynamic timeslot affects the
congestion situation for the TCH kind that is not targeted by the
handover.

In other words, if a handover to TCH/F causes congestion in TCH/H
because of a dynamic timeslot becoming occupied, the handover will not
be performed. Before this, oscillation situations could occur.

A subsequent patch will do the same for congestion balancing.

Related: SYS#5297
Change-Id: I1536b60f03cb0aeb6ba14a72b518aec82fa572fe
2021-01-19 11:49:07 +01:00
Neels Hofmeyr 434d3ae2ed fixate test_dyn_ts_congestion_tch_f_vs_tch_h.ho_vty
The test shows a cascade of failures. When we fix the first failure, it
will change the sequence of events that follow after that. But it will
still be interesting to evaluate all the situations currently shown.

Hence fixate each stage's initial situation, by duplicating the
expect-ts-use with an identical set-ts-use. Then, when each individual
scenario gets fixed, subsequent scenarios still remain unchanged.

Change-Id: Ifeaec39ecb64b476ff1438cf987ba0403489c43b
2021-01-19 11:49:07 +01:00
Neels Hofmeyr 3c7bc7aa1e show bug: add test_dyn_ts_congestion_tch_f_vs_tch_h.ho_vty
Related: SYS#5297
Change-Id: I3002797dea02dd0c10cfdd091ce73834a753e3a6
2021-01-19 11:49:07 +01:00
Neels Hofmeyr e2543cb182 cosmetic: in a ho test, use '*' instead of pdch
The idea is to avoid confusion between the static PDCH and the dynamic
timeslots. The PDCH is always in 'pdch' mode, while the dynamic
timeslots are 'pdch' when they are not occupied by any TCH.

Change-Id: I1a12518d85ed891c491723e7f03f5bdd4fad980f
2021-01-19 10:50:41 +00:00