Commit Graph

29 Commits

Author SHA1 Message Date
Vadim Yanitskiy 029ab2326a oml: ipacc: fix sending hard-coded GPRS Cell attributes
Change-Id: I7d90ca3d6a660af8e953e890c7919194f5d297d2
Related: OS#4505
2023-09-23 17:56:47 +07:00
Vadim Yanitskiy daf7b28387 oml: ipacc: send GPRS Cell attributes based on IPA Object Version
Change-Id: Ie0fb3eaf76e1f70e5a19bb088e1674b7e553d32a
Related: OS#4505
2023-09-23 17:54:05 +07:00
Vadim Yanitskiy bf7b457f1c oml: ipacc: fix copy-pasted talloc chunk names
Change-Id: Ib0858c0d84b9bd2d3a4d732cfedb045862d2efed
Related: OS#4505
2023-09-15 19:21:22 +07:00
Vadim Yanitskiy 362c040e16 oml: ipacc: log supported features using LOGL_INFO
Change-Id: Ie0b05bc9e3739b5a38b32a676641e64f2cf698ac
Related: OS#4505
2023-09-15 19:21:22 +07:00
Vadim Yanitskiy 9ac3459a00 abis_nm: parse feature flags in NM_ATT_IPACC_SUPP_FEATURES
Since change [1], among with the other attributes we started requesting
NM_ATT_IPACC_SUPP_FEATURES from the BTS.  This patch adds the logic for
parsing the response (so far only printing supported features).

Change-Id: I64cffa0bdead3617cc169c83b0f6ddf74f0866a7
Related: [1] 43440e1fc5
Depends: libosmocore.git Ia4208e10d61843dd6ae77398f6624c918dc81ea4
Related: OS#4505
2023-09-13 10:40:45 +00:00
Pau Espin 94878456e2 oml: ipacc: Use new packed struct abis_nm_ipacc_att_rlc_cfg from libosmcore
This way it becomes a lot clearer what kind of content is expected to be
transmitted over the wire.

It is expected that in the future the nowadays hardcoded values will be fed
into struct abis_nm_ipacc_att_ns_cfg come from osmo_tdef, etc.

Change-Id: I4b4dfac9fd36378b20889fb90135be74f8968d5f
Depends: libosmocore.git Change-Id I60e17dedd1fadce0f705616e3ed96cabb318bcec
Related: OS#5335
2023-09-01 20:45:13 +02:00
Pau Espin a473c260ff oml: ipacc: Use new packed struct abis_nm_ipacc_att_ns_cfg from libosmcore
This way it becomes a lot clearer what kind of content is expected to be
transmitted over the wire.

It is expected that in the future the bts_sm->gprs.nse.timer will
disappear and the values fed into struct abis_nm_ipacc_att_ns_cfg
come from osmo_tdef, etc.

Change-Id: I610ca34babc0b0ac9477622aa7b8360be8f3f59f
Depends: libosmocore.git Change-Id Ie477b0e6d79e6d408e0004fd60307afc5feaa3b6
Related: OS#5335
2023-09-01 20:45:13 +02:00
Pau Espin 9e5b3ad687 oml: ipacc: Use new packed struct abis_nm_ipacc_att_bssgp_cfg from libosmcore
This way it becomes a lot clearer what kind of content is expected to be
transmitted over the wire.

It is expected that in the future the bts->gprs.cell.timer will
disappear and the values fed into struct abis_nm_ipacc_att_bssgp_cfg
come from osmo_tdef, etc.

Depends: libosmocore.git Change-Id Ibfd759cb8a252f801bb3a758ea7960072c96f254
Related: OS#5335
Change-Id: Ie659879c548b29a08eeb8bf3fc023bf3d7d52aa1
2023-09-01 20:44:50 +02:00
Pau Espin 6d4c1d84e5 oml: ipacc: Remove BSSGP value assignment being overwritten afterwards
bts->gprs.cell.timer is initialized during BTS allocation from
bts_cell_timer_default.

Later on, during nanobts_gen_set_nse_attr(), the same default values are
applied to an internal buffer and immedately later overwritten by the
content of bts->gprs.cell.timer.

Hence, drop the temporary assignment since it gets overwritten and is
basically a NO-OP.

This is only an intermediate one-step-at-a-time commit, since anyway
that arrive has to be convertd to osmocom tdef, etc.

Change-Id: I2a170093e62f726e594d3b9c456087f47d2b4198
2023-09-01 20:14:55 +02:00
arehbein fd6b81a042 vty: Add check against sensible default value for Ny1
Related: OS#5475
Change-Id: If3f96a6bd4f9ae32b6421de43c1c5a5d64482089
2023-01-23 09:59:36 +00:00
arehbein 9ff26123b3 vty: Add support for Ny1 configuration
Related: OS#5475

Change-Id: I6318cceb4ebdce50005e39e2e9323c1c8433250a
2023-01-23 09:59:36 +00:00
Alexander Couzens 315af2f9ea bts: ipa/osmo-bts/sysmobts: MO: add support for the second NSVC
The second NSVC MO has been explicit skipped and never been interacted with.
osmo-bts is already supporting it for a long time as well the PCU is
supporting it at least since the NS2 code migration.
Fixes the ttcn3 test case BTS_Tests.TC_pcu_socket_two_nsvc.

Closes: OS#5835
Change-Id: I3486a7cc9a424602b73f8adc2fefce169213e46b
2023-01-03 09:13:52 +00:00
Pau Espin c3487dd19d Introduce VTY command 'ccch load-indication-period <0-255>'
Change-Id: Id9d23238863c02a72bcf32942f6b0d40be127904
2022-04-27 10:03:01 +00:00
Pau Espin 201eb29616 Rename functions generating OML SetAttr messages
Its name is totally misleading, since they seem to be related to
GetAttributes messages rather than SetAttributes.

Change-Id: I306cb407dbd9b98e301b5d93046bdadcb466b82b
2022-04-25 17:06:22 +02:00
Pau Espin 3a46ae5962 cosmetic:: Document TLVs in nanobts_attr_bts_get()
Change-Id: I7e9cbf84edb6bdcbaf38f03552103236ea1cef6c
2022-04-25 16:58:59 +02:00
Pau Espin 8f1597135d ipa oml: Fix encoding of T3105
As the comment above the fix suggest, the encoding is in 10ms units.
osmo-bts is also doing the proper:
"""
uint8_t t3105 = *TLVP_VAL(&tp, NM_ATT_BTS_AIR_TIMER);
bts->t3105_ms = t3105 * 10;
"""

Related: SYS#5838
Change-Id: Ie190514ee35d1ca81b70e9180bf7393b973d3504
2022-03-02 17:34:43 +01:00
Neels Hofmeyr ae0b737c62 separate 'interference-meas level-bounds' cfg and used
The VTY defun already indicates BSC_VTY_ATTR_RESTART_ABIS_OML_LINK
correctly, but so far we would immediately start using the new values
internally, and wrongly interpret interference levels. Fix that.

Have bts->interf_meas_params twice: interf_meas_params_cfg for the VTY
configured values, and interf_meas_params_used for the values that the
BTS actually knows about, after they were sent via OML.

In a running BSC, when changing the interference level boundaries on the
telnet VTY, the BTS is not immediately told about the change. That would
require a BTS restart. Hence store the cfg values separately in
interf_meas_params_cfg. For comparing/printing interference levels in a
running BTS, only employ the values that were actually sent via OML and
placed in interf_meas_params_used.

Related: SYS#5313
Change-Id: Iad8cf4151ff7f86dc0549158ed5d91d788d40b1f
2021-07-16 16:04:18 +00:00
Vadim Yanitskiy cdaf3ec006 Make interference measurement parameters configurable
According to 3GPP TS 45.008, the BSS shall monitor the levels of
interference on its IDLE traffic channels.  The actual measurements
are performed in the BTS and then reported to the BSC over the
A-bis/RSL link(s) in RF RESource INDication messages.

3GPP TS 45.008 defines the following measurement parameters:

  * Intave: Interference Averaging period (see table A.1),
  * Interference level Boundaries (see table A.1).

Both parameters are sent to the BTS over the A-bis/OML, and can
now be configured via the VTY interface.  Only those BTS models
which 'speak' the OML protocol defined in 3GPP TS 52.021 will
actually get the configured parameters, others will keep using
the hard-coded parameters.

Change-Id: I99ebf57aac1f3ca7e0497c3b4f6b0738c6ed7e47
Related: SYS#5313, OS#1866
2021-06-04 19:42:43 +00:00
Pau Espin Pedrol 396eb76fcd Fix typo in function nanobts_attr_nsvc_get
Change-Id: I50235ba7b045ab7fba2112e61191d2756a67dfdc
2020-12-04 14:44:43 +01:00
Pau Espin ee9f02f2df Introduce NM GPRS NSE FSM
Related: OS#4870
Change-Id: I91a5f40324d5373eac885032295690cec97214a6
2020-12-03 18:46:27 +01:00
Pau Espin 64c422858d Store GPRS MOs directly under BTS SiteMgr object
The only real 1-1 relationship between BTS NM objects is the one between
GPRS Cell and BTS (which is actually a BTS cell).
In our current osmo-bts implementation we don't care much since we only
handle 1-cell BTSses, but let's make the data structure organization
more generic.

Implementation notes:
The gsm_bts_sm is moved to its own file, APIs to allocate are added and
the new public object is hooked correctly in the allocation process of
osmo-bsc.

Change-Id: I06461b7784fa2a78de37383406e35beae85fbad8
2020-12-03 16:31:36 +01:00
Alexander Couzens 60e3280372 bts_ipaccess_nanobts: check if msgb_alloc fails
Change-Id: Ib7867fa29d62eeea2cbc5603b28e5b00d0f62222
2020-11-28 01:03:38 +01:00
Alexander Couzens 2f9df96eba oml: encode IPv6 NSVC using the new OML attribute NM_ATT_OSMO_NS_LINK_CFG
The old IE NM_ATT_IPACC_NS_LINK_CFG didn't support IPv6 NSVC.

Depends: Ic261bc43a07fa741b97a9c6ec5a9ed6f5ecae588 (libosmocore)
Depends: I9e279bb20940c66eea5196f281184cb4f8a5cc5f (libosmocore)
Change-Id: I6529876a3c1116a79dd624312243d8ae48a41fe2
2020-10-05 14:06:26 +00:00
Pau Espin 388ed58482 Move struct gsm_bts: gsm_data.* => bts.*
Place all code related to the object into the related file.

Having all the data model in one file made sense in early stage of
development to make progress quickly, but nowadays it hurts more than
helps, due to constantly growing size and more and more bits being
added to the model, gaining in complexity.

Currently, having lots of different objects mixed up in gsm_data.h is a hole
of despair, where nobody can make any sense were to properly put new stuff
in, ending up with functions related to same object in different files
or with wrong prefixes, declarations of non-existing functions, etc.
because people cannot make up their mind on strict relation to objects
in the data model.
Splitting them in files really helps finding code operating on a
specific object and helping with logically splitting in the future.

Change-Id: I00c15f5285b5c1a0109279b7ab192d5467a04ece
2020-07-18 21:45:32 +00:00
Harald Welte 1540025181 Allow VTY to set the CCCH Load Indication Threshold
Add a new VTY command "ccch load-indication-threshold <0-100>"
by which the user can configure the threshold after which the BTS
shall send CCCH LOAD IND.  It used to be hard-coded to a
default value of 10.

Change-Id: I059fe4627438e26a06e00d84e342b736ab7af440
2019-05-26 09:10:32 +00:00
Neels Hofmeyr a6078fe1d8 use libosmocore osmo_tdef
Move the T_defs API to libosmocore as osmo_tdefs: remove the local T_defs API
and use libosmocore's osmo_tdef* API instead.

The root reason is moving the mgw_endpoint_fsm to libosmo-mgcp-client to be
able to use it in osmo-msc for inter-MSC handover.

When adding osmo_tdef, the new concept of timer groups was added to the API. It
would make sense to apply group names here as well, but do not modify the VTY
configuration for timers. The future might bring separate groups (or not).

Depends: Ibd6b1ed7f1bd6e1f2e0fde53352055a4468f23e5 (libosmocore)
Change-Id: I66674a5d8403d820038762888c846bae10ceac58
2019-04-23 21:57:44 +02:00
Max 85e29892e9 nanobts: use libosmocore's osmo_store*() for OML attr. patching
This slightly simplifies things by making endianness more obvious and
removing abstraction.

Change-Id: I28cfb09f224072db9889a89923a3da15a6070e2a
2019-03-27 12:26:32 +00:00
Neels Hofmeyr 596c402835 add gsm_timers, for Tnnn definitions usable by FSMs
Change-Id: If212fcd042051b6fa53484254223614c5b93a9c6
2018-07-28 12:18:23 +02:00
Neels Hofmeyr 958f259f95 dissolve libbsc: move all to src/osmo-bsc, link .o files
Move all of libbsc/ into osmo-bsc/, and separate/move some implementations to
allow linking from utils/* and ipaccess/* without pulling in unccessary
dependencies.

Some utilities use gsm_network and gsm_bts structs, which already include data
structures for fairly advanced uses. Move initialization that only osmo-bsc
needs into new bsc_network_init() and bsc_bts_alloc_register() functions, so
that the leaner tools can use the old gsm_* versions without the need to link
everything (e.g. handover and lchan alloc code).

In some instances, there need to be stubs if to cut off linking "just before
the RSL level" and prevent dependencies from creeping in.
- abis_rsl_rcvmsg(): the only program currently interpreting RSL messages is
  osmo-bsc, the utils are merely concerned with OML, if at all.
- paging_flush_bts(): ip.access nanobts models call this when the RSL link is
  dropped. Only osmo-bsc actually needs to do anything there.
- on_gsm_ts_init(): the mechanism to trigger timeslot initialization is related
  to OML, while this action to take on init would pull in RSL dependencies.
utils/ and ipaccess/ each have a stubs.c file to implement these stubs. Tests
implement stubs inline where required.

From src/utils/, src/ipaccess/ and tests/*/, link in .o files from osmo-bsc/.
In order for this to work, the osmo-bsc subdir must be built before the other
source trees. (An alternative would be to include the .c files as sources, but
that would re-compile them in every source tree. Not a large burden really, but
unless linking .o files gives problems, let's have the quicker build.)

Minor obvious cleanups creep in with this patch, I will not bother to name them
individually now unless code review asks me to.

Rationale:

1) libbsc has been separate to use it for osmo-nitb and osmo-bsc in the old
openbsc.git. This is no longer required, and spreading over libbsc and osmo-bsc
is distracting.

2) Recently, ridiculous linking requirements have made adding new functions
cumbersome, because libbsc has started depending on osmo-bsc/*.c
implementations: on gscon FSM and bssap functions. For example, neither
bs11_config nor ipaccess-config nor bts_test need handover_cfg or BSSMAP
message composition. It makes no sense to link the entire osmo-bsc to it, nor
do we want to keep adding stubs to each linking realm.

Change-Id: I36a586726f5818121abe54d25654819fc451d3bf
2018-06-07 19:09:06 +02:00