Commit Graph

2648 Commits

Author SHA1 Message Date
arehbein ea388e1db1 meas_feed: Use osmo_io instead of write queue
Related: OS#6170
Change-Id: Ib0570a3242e2846062e24c93cbbbbd31137acdee
2023-10-04 08:38:12 +00:00
Pau Espin 9bb4b22152 Drop unused local var
Change-Id: I6da89b8861c0bd17fc011b55d5f4979ad6787f80
2023-10-03 14:12:09 +02:00
Oliver Smith dea8aa8e61 vty: make NCC Permitted (SI2) configurable
Related: SYS#6579
Change-Id: I71bb855c35378f8f0598bc11a42bd274b7232a5e
2023-09-28 17:04:23 +00:00
Pau Espin eb5ac9dca4 sccplite: Support multiple MGW in MGW pool
Before this patch, the MGW was selected at startup, and the MGCP data
was always forwarded to that same MGW.
If several MGW were configured in the MGW pool, then osmo-bsc would
select any of those from the pool, and start configured the BTS-side
connection on an endpoint in that MGW. However, when the MSC submitted
the MGCP encapsulated in IPA to the BSC, the BSC would always forward
the MGCP message to that same MGW selected at startup.
As a result, multiple MGWs configured with osmo-bsc using SCCPlite was
broken.

This commit fixes support for multiple MGWs by looking up the already
selected MGW (to setup the BTS-side conn on the endpoint), based on the
CIC (MGCP Endpoint) which was provided by the MSC upon AssignReq.

Related: OS#6189
Depends: libosmocore.git Change-Id Iee361d740845257fa62c9093e30e8079fa933827
Depends: osmo-mgw.git Change-Id I18d7bdf650c0ec87ae16ed4944aed9f495400137
Change-Id: Ia106a21b7692eb5b2ac3b5ac2b358bedbc3b9da6
2023-09-27 18:28:16 +02:00
Matan Perelman eff19b55b0 si2quater: Invalidate thresh_lo, prio and qrxlm when needed
Change-Id: I5910ce8db2d085295b327b12096ba129369eb532
2023-09-24 16:05:29 +00:00
Vadim Yanitskiy 8fcd6ab174 abis_nm: send Get Attributes to GPRS Cell MO(s)
Change-Id: Ib6d87da49217f1c8d76445ce623a511a07daedbf
Related: OS#4505
2023-09-23 17:56:49 +07:00
Vadim Yanitskiy a84f30d7c5 abis_nm: send Get Attributes to Rado Carrier MO(s)
Change-Id: If7b75689c12a253377f2747babd4d7ebd1db5f87
Related: OS#4505
2023-09-23 17:56:49 +07:00
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
Harald Welte c992bda3cd oml: ipacc: print all supported versions of MOs
The first byte is the default version, the other bytes describe the
optional other versions supported by the MO.  Print them all.

Change-Id: I01da4883cf59101ddaef575979519ac48fcf54b0
2023-09-23 17:45:24 +07:00
Vadim Yanitskiy 392cfc6a2a abis_nm: delay configure_loop() until NM_MT_SW_ACTIVATED_REP
Even though the Abis/OML message flow looks the way it should look
on the wire, it does not actually reflect the sequence/flow of events
and actions in the NM FSMs.  For example (extracted from a PCAP):

    GPRS Cell(00,00,ff) State Changed Event Report
    GPRS Cell(00,00,ff) Software Activate Request
    GPRS Cell(00,00,ff) Software Activate Request ACK
    GPRS Cell(00,00,ff) Activate Software
    GPRS Cell(00,00,ff) Activate Software ACK
[a] GPRS Cell(00,00,ff) State Changed Event Report
[b] GPRS Cell(00,00,ff) Software Activated Report
[c] GPRS Cell(00,00,ff) Get Attributes
    GPRS Cell(00,00,ff) Get Attributes Response
[d] GPRS Cell(00,00,ff) IPA Set Attributes
    GPRS Cell(00,00,ff) IPA Set Attributes ACK
    GPRS Cell(00,00,ff) Change Administrative State
    GPRS Cell(00,00,ff) Change Administrative State ACK
    GPRS Cell(00,00,ff) State Changed Event Report
    GPRS Cell(00,00,ff) Opstart
    GPRS Cell(00,00,ff) Opstart ACK

A follow-up patch [1] changes the logic generating message [d],
so that the IPA Object Version of the GPRS Cell MO is taken into
account when adding the attributes.

The problem is that both messages [c] and [d] are generated and
queued for transmission on the receipt of message [a], but *before*
message [b] has been processed.  So the IPA Object Version is not
known and assumed to be 0 at that point in time.

This patch delays configure_loop() until message [b] is received.
So far only for nanoBTS and only for those MOs, for which Figure 2
in 3GPP TS 52.021 explicitly mentions that the SW downloading and
activation procedures may be required, plus for the ip.access
specific MOs which all seem to support the SW activation.

osmo-bts does send SW Activated Report only for a subset of MOs,
which does not include Baseband Transceiver, Radio Carrier, and
Radio Channel.  3GPP TS 52.021 is not clear on whether this
message shall be sent by all MOs either, so we consider it
optional and delay configure_loop() only for nanoBTS.

Change-Id: I3953a5e41eb27165f9ff203cac7447ee9d311abf
Related: [1] Ie0fb3eaf76e1f70e5a19bb088e1674b7e553d32a
2023-09-23 17:04:41 +07:00
Vadim Yanitskiy a1745e3bdd abis_nm: handle NM_EV_SW_ACT_REP in ST_OP_DISABLED_{DEPENDENCY,OFFLINE}
3GPP TS 52.021 does not strictly mandate that the SW Activated Report
can only be received in state DISABLED/OFFLINE.  The only requirement
is that the software load procedure (if needed) and activation is to
be performed in this state.

The successful outcome of software activation procedure is indicated
by the BTS using the above-mentioned SW Activated Report message,
which may be received in ST_OP_DISABLED_{DEPENDENCY,OFFLINE} too.

The MO state changes are triggered by the State Changed Event Report
messages, and happen asynchronously with the software activation.

This patch fixes the following warnings seen with a nanoBTS:

NM_BTS_OP(bts2){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_GPRS_NSE_OP(nse2){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_GPRS_CELL_OP(gprs-cell2){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_GPRS_NSVC_OP(nsvc0){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_GPRS_NSVC_OP(nsvc1){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_BB_TRANSC_OP(bts2-trx0){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts0){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts1){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts2){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts3){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts4){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts5){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts6){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_CHAN_OP(bts2-trx0-ts7){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted
NM_RCARRIER_OP(bts2-trx0){DISABLED_OFFLINE}: Event SW_ACT_REP not permitted

The following warning is still expected to show up though:

NM_BTS_SM_OP(bts_sm){ENABLED}: Event SW_ACT_REP not permitted

but is caused by a different problem, which is to be fixed later.

Change-Id: I00a423adcde5c34977f4c4dad920874687fa493c
2023-09-21 01:48:38 +07:00
Vadim Yanitskiy faf7592bf5 oml: ipacc: add missing is_ipa_abisip_bts() checks
These functions are called from a signal handler (SS_NM), and the
signal itself is sent from the generic OML logic whenever the
Software Activated Report is received from some BTS, which is not
necessarily a nanoBTS or osmo-bts.

It would be nice if we could check the BTS type once in the signal
handler, but the signal data is not always the same and depends on
the signal type, so unfortunately it's not possible.

Change-Id: I088ff75f2048e54e4bfd926a79c1dcf27b4fb3a4
2023-09-19 21:09:25 +07:00
Vadim Yanitskiy fc2fb0d1a4 abis_nm: fix bts->nr vs bts->bts_nr
Using bts->nr on the wire is wrong because:

* bts->nr is a BTS number in the BSC's config file,
* bts->bts_nr is a BTS number within the SITE-MANAGER MO.

The problem does not show up if there exists only one BTS node
in osmo-bsc.cfg.  Otherwise, the Software Load and BTS Restart
procedures are broken for nanoBTS.

Change-Id: I99d9c72752e55c4553e2e9c60df5caa8343b7be0
2023-09-16 22:56:40 +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 4454350b42 oml: ipacc: parse Object Version from SW Activated Report
Change-Id: I39105096a6b29bd7e4fb15287653074527c3e024
Related: OS#4505
2023-09-15 05:29:05 +07:00
Vadim Yanitskiy 5bdf6432f9 bts_ipaccess_nanobts: clean up, use gsm_objclass2mo()
Change-Id: Ic6c0dfe950459d07a8f506b5007a65fea1950c18
2023-09-15 05:29:05 +07:00
Vadim Yanitskiy ebffc84bf9 gsm_data: refactor/simplify and expose gsm_objclass2mo()
Change-Id: Ic03fdfabf84a1b5cd8046101c1575296914c6332
2023-09-14 16:26:19 +07:00
Vadim Yanitskiy c3446ef49e abis_nm: get rid of MAX_BTS_ATTR
This is a partial revert of commit [1], which defined a limit on the
number of attributes and SW Description IEs as a constant and added
a spec. reference.  The problem is that there is no such limit in the
referenced 3GPP TS 52.021.  The attributes and SW Description IEs are
using TL16V encoding, so there can be as many as the Length part can
represent.  It's actually the limitation of our side, since we
allocate a buffer of fixed size on the stack for parsing.

* Remove the MAX_BTS_ATTR and confusing spec. reference.
* For the SW Description IEs, define SW_DESCR_MAX locally.
* For the attributes, define the buffer size in place.

Change-Id: Idd8b971d32cf0f7a910a664d921e644b7c32d831
Related: [1] 1ebf23b7fe "Prepare for BTS attribute reporting via OML"
Related: OS#4505
2023-09-13 10:40:45 +00:00
Vadim Yanitskiy 9e1b54254c nm_{bb_transc,bts}_fsm: rework sending of Get Attributes
* Make it easier to append the attributes conditionally.
* Remove irrelevant comments about the order of attributes.
* Request NM_ATT_IPACC_SUPP_FEATURES from Abis/IP models only.

Change-Id: Ice5bddd51481a3ef9fcffd77a4c292ea211bf179
Related: OS#4505
2023-09-13 10:40:45 +00: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
Vadim Yanitskiy c8c4ac5659 abis_nm: separate parsing of osmo-bts features into a function
This commit prepares for adding handling of additional attributes.
The parse_attr_resp_info_attr() is already quite complex, so take
a chance to simplify it a bit.

Change-Id: Ia5919a8311cd6a7fc16d02d2196276881e96f4c5
Related: OS#4505
2023-09-13 10:40:45 +00:00
Vadim Yanitskiy 0ac03bd525 bts_siemens_bs11: remove ip.access nanoBTS specific code
This code is unreachable, because this file is all about Siemens BS11.
Take a chance to remove redundant BTS type check in nm_reconfig_bts().

Change-Id: I2db92fe448b1f4cd25c1e5c6e1bb9593795c9cb2
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
Philipp Maier e55a114e8a pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCH
In PCUIF v.11 we use PCU_IF_SAPI_AGCH_2 exclusively. We use this SAPI
to transfer IMMEDIATE ASSIGNMENT messages for uplink and downlink. One
new feature of PCU_IF_SAPI_AGCH_2 is that the PCU may ask to send a
confirmation when the MAC block is sent.

CAUTION: This patch breaks compatibility to current master osmo-pcu (See
also "Depends")

Related: OS#5927
Depends: osmo-pcu.git I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292
Change-Id: I709c27adaf09a6766cfde4d76d878626d30ebb3c
2023-08-31 11:03:20 +02:00
Philipp Maier 33a2a2fed5 pcuif_proto: check confirm flag in struct gsm_pcu_if_pch
Since osmo-bsc uses RSL (with a propritary Ericsson RBS specific
extension) to send a confirmed IMMEDIATE ASSIGNMENT messages via
PCH, we can not just forward the MAC blocks into the paging queue
without determining whether the MAC block is a PAGING message or an
IMMEDIATE ASSIGNMENT message. the reason for this is that RSL uses
two different message types (IMMEDIATE ASSIGNMENT COMMAND and PAGING
COMMAND) to process IMMEDIATE ASSIGNMENT and PAGING messages.

This means we have to look into the MAC block to make sure whether
the message is a PAGING message or an IMMEDIATE ASSIGNMENT message.

We also need to make sure that the confirm flag is properly executed.
In the case of the IMMEDIATE ASSIGNMENT this means we have to include
(confirm=true) or not include (confirm=false) the RSL_IE_ERIC_MOBILE_ID
into the IMMEDIATE ASSIGNMENT COMMAND message.

In the case of PAGING we directly echo a confirmation after sending
the PAGING COMMAND via RSL when a confirmation is requested.

Related: OS#5927
Depends: osmo-pcu.git Ia202862aafc1f0cb6601574ef61eb9155de11f04
Change-Id: I3d2842626b7e8325860ea3160c7d900d39e953a0
2023-08-31 08:29:58 +00:00
Pau Espin c1d7bb6908 meas_feed: Increase wqueue max_len to 100 and make it vty-configurable
The previous amount of 10 messages may be small if the BSC is processing
lots of measurements from lots of BTS connected to it.
Increase it to 100 by default, and allow changing the write_queue length
through the VTY.

Related: SYS#6550
Change-Id: Ib2e3591498c038b8e59f3ad447ac1f65928d6da8
2023-08-30 11:27:24 +02:00
Pau Espin 94426aae61 meas_feed: Refactor fd/wqueue lifecycle
The previous checks had several rough edges which may end up in
unexpected behaviors, specially with fd=0 vs fd=-1.
The new code is much more robust.

Change-Id: I96b0b5c4654970ba1c3e2aecfa896e310063ab6f
2023-08-29 17:39:57 +02:00
Andreas Eversberg 2ab39f7fa0 ASCI: Fix uninitialized values in vgcs_fsm.c, found by gcc 13.1.1.20230714
Change-Id: Iee4cc0fbf03e7ca4b53424f7f52ed9d599f96e49
2023-08-29 11:28:39 +00:00
Philipp Maier 5c9162980d pcuif_proto: get rid of _DT, _dt (Direct TLLI)
Since we now no longer refer to TLLI when we mean "message ID" (msg_id),
we should also remove the "_DT" / "_dt" suffix from structs and define
constants and replace it with "_2" if required.

Depends: osmo-pcu.git If641b507dcb6b176109c99dce7cff2a7561364b0
Change-Id: I628aaf19999a0004d0760d25ecd323cdbc0076f5
Related: OS#5927
2023-08-10 15:04:51 +02:00
Philipp Maier 4f53837528 pcuif_proto: rename tlli to msg_id
To confirm downlink IMMEDIATE ASSIGNMENT messages, we use the TLLI as an
identifier and the related struct member is also called "tlli".
Unfortunately this is misleading since the message identifier does not
necessarly have to be a TLLI. It is just an implementation detail that
osmo-pcu uses the TLLI as a message identifier.

To make that clear, lets rename the tlli member (and variable and
parameter names where it is passed on) to "msg_id".

(Since this change only renames variables and struct members it will not
break compatibility with other programs that use the PCUIF)

Related: OS#5927
Depends: osmo-pcu.git I4a25039dfe329e68879bc68936e49c4b190625e6
Change-Id: Ifb3f257099b52c50e525768484f9e93282089d0f
2023-08-08 17:40:22 +02:00
Vadim Yanitskiy b74b3ae38f fix send_assignment_complete(): proper SCE encoding for CSD
As stated in 3GPP TS 48.008, section 3.2.2.103, coding of the Speech
Codec Element for the CSData Codec Type differs from coding for the
actual speech codecs like FR/HR/AMR/etc.  However, osmo-bsc currently
encodes the "Speech Codec (Choosen)" IE regardless of the channel
mode, be it GSM0808_CHAN_SPEECH or GSM0808_CHAN_DATA.  This causes
failures at the establishment stage of modem-to-modem data calls.

Change-Id: I8b94c0292964f6d5f5ffa98ad8da03728f8bf6a0
Related: OS#6110, OS#4393
2023-07-26 11:15:17 +00:00
Andreas Eversberg 7200b01577 Select channel type by enum instead of three boolean
struct lchan_activate_info and struct lchan_modify_info use an enum to
define, if the channel type is for a normal channel, a VAMOS channel or
a VGCS/VBS channel.

Change-Id: I21167eb4192c02cd7b5e1574cddb382a3feaebe0
2023-07-21 13:33:55 +02:00
Andreas Eversberg 2d93d61fe3 ASCI: Add assignment to a VGCS/VBS channel
The assignment is triggered by the MSC by sending an ASSIGNMENT REQUEST
with a group call reference. The reference is used to find the VGCS/VBS
channel that belogs to the referenced call.

The existing VGCS/VBS channel is reactivated. This will put the channel
into a state where the MS can establish the link on it, to complete the
assignment. The old connection is released by the MSC and assignment
completion is handled by the VGCS FSM.

Change-Id: Idaa864cd5ce4df6c3193494ce12d91523c104d89
Related: OS#4852
2023-07-21 13:33:51 +02:00
Andreas Eversberg b0712a9f22 ASCI: Send release on VGCS/VBS channel via unit data
Channel release is sent to MS that is in dedicated mode on the main
DCCH. Additionally it is sent as unit data on a VGCS/VBS to notify all
listeners that the channel has been released. All listeners return to
IDLE mode.

Change-Id: Ib777fe98c8ce2342082d88d227b796167d92cfe1
Related: OS#4852
2023-07-21 13:33:46 +02:00
Andreas Eversberg b620a1d994 ASCI: Add support for reception of TALKER/LISTENER DETECTION
TALKER DETECTION and LISTENER DETECTION is used when the uplink is
accessed on the VGCS channel by a talker or listener.

Change-Id: I166d6d42c04337e669307943ecbb8eea6906b385
Related: OS#4852
2023-07-21 13:33:44 +02:00
Andreas Eversberg ded74dc220 ASCI: Indicate release of subscriber connection to VGCS FSM
If an SCCP connection or channel is released or fails, send indications
towards VGCS FSM, so that it can terminate the state machines belonging
to these connections.

Change-Id: Ia74db9ba47fea11b359ac01269f714482485d464
Related: OS#4852
2023-07-21 13:33:41 +02:00
Andreas Eversberg 55860eed89 ASCI: Forward lchan activation states to VGCS FSM
Change-Id: I757b562e02480c1a68446d91217910069f17d060
Related: OS#4852
2023-07-21 13:33:39 +02:00
Andreas Eversberg a0230990df ASCI: Forward RLL to VGCS FSM
RLL events are forwarded to VGCS FSM. Included L3 information are not
forwarded to gsm0408_rcvmsg(), but forwarded to VGCS FSM only.

Change-Id: I5e098a20225ba11206f43281f4da519a4086bae5
Related: OS#4852
2023-07-21 13:33:36 +02:00
Andreas Eversberg 62b9c83721 ASCI: Add decoding of VGCS/VBS A-interface messages
Change-Id: I77b4d072d76039b1889ae4bba4a602e956405eb8
Related: OS#4852
2023-07-21 13:33:34 +02:00
Andreas Eversberg 1f05282243 ASCI: Add processing and FSMs for VGCS/VBS
Change-Id: Id9e94fb4f27bb438b7093c031344a3400bfa34f1
Related: OS#4852
2023-07-21 13:33:31 +02:00
Andreas Eversberg 8ebf52ac76 ASCI: Add encoding of VGCS/VBS A-interface messages
Change-Id: Ic2203a5119a226ac859a91dc42d81cbd71027ec8
Related: OS#4852
2023-07-21 13:33:28 +02:00
Andreas Eversberg 1ad32f7430 ASCI: Forward UPLINK RELEASE on dedicated channel to MSC
If the phone is (still) on a dedicated channel, it may release the
uplink in case of a voice group call. It depends on the MSC how to
handle the situation. Currently it releases the call.

Generally the phone is assigned to the VGCS/VBS channel before it
releases the uplink.

Change-Id: Ib91c282ed36e82b38c0e738533e3a421de81a9a8
Related: OS#4852
2023-07-21 13:33:25 +02:00
Andreas Eversberg 1349c9c217 ASCI: Add TX support for UPLINK FREE/BUSY messages
Change-Id: Ia27e0ebb5bf7edb1b9f84999cafc028231b9489f
Related: OS#4852
2023-07-21 13:33:22 +02:00
Andreas Eversberg 353fa5a14d ASCI: Add support for sending RSL UNIT-DATA towards BTS
This is required to send UPLINK FREE and UPLINK BUSY messages to the
BTS.

Change-Id: I25e80f079989a4c7dede58c327c22b958784f3ff
Related: OS#4852
2023-07-21 11:15:27 +00:00
Andreas Eversberg d8a6a533a1 ASCI: Do not wait for RLL establishment
A VGCS channel is established, even if there is no RLL establishmnt.
RLL connection can be established or released by the talker, while
the channel is kept in established state all the time.

Change-Id: I96390924736029b92e54590157e38093be749dd9
Related: OS#4852
2023-07-21 11:15:27 +00:00
Andreas Eversberg fd35bc917a ASCI: Do not release channel, if SAPI 0 is released
A VGCS channel must not release, if all SAPIs (including 0) are
released. lchan FSM will ignore this.

Change-Id: Ief1e1894362c4917f6e0092268690f68c8193750
Related: OS#4852
2023-07-21 11:15:27 +00:00
Andreas Eversberg 0a2e79e946 ASCI: Add new debug category "ASCI" for VGCS/VBS state machines
Change-Id: I4714fa4ff2b1327183a365223a3e3d89ae0357f7
Related: OS#4852
2023-07-21 11:15:27 +00:00
Andreas Eversberg 87a6e6b651 ASCI: Prepare bssmap_handle_ass_req_ct_speech() for VGCS/VBS
bssmap_handle_ass_req_ct_speech() calls select_codecs(), which requires
a bts pointer.

An extra bts pointer is added to both function and used instead of
deiving it from the conn->lchan pointer. This funcion can then be called
if no channel is assigned (yet). (conn->lchan is NULL)

This function will be used by the VGCS/VBS call control also.
(Chg-Id: Id9e94fb4f27bb438b7093c031344a3400bfa34f1)

Change-Id: Ifc1e315d5282f01f8d1bd600d62476c2ae74eca9
Related: OS#4852
2023-07-21 11:15:27 +00:00
Andreas Eversberg b18cae1952 ASCI: Make function to add OSMUX IE public
Rename _gsm0808_ass_compl_extend_osmux() to gsm0808_extend_osmux().

This IE is also used for VGCS/VBS assignment command that is located in
a different file.

Change-Id: I1452cabb142f9e7a169f4ddfeac85908abaf8dfc
Related: OS#4852
2023-07-21 11:15:27 +00:00
Andreas Eversberg 2193f98f3e ASCI: Add TX support for UPLINK RELEASE message
Change-Id: Ie3d8ad1ea8325c13759838d8083c6e47a0f54497
Related: OS#4852
2023-07-21 11:14:44 +00:00
Andreas Eversberg 2436f40b4c ASCI: Add selection reason for VGCS/VBS channels
"enum lchan_select_reason" gets a new selection reason: "SELECT_FOR_VGCS"

The selection "direction" can also be changed via VTY.

Change-Id: I6b96d0a1df68efa5858b98297ebe0944b1473aaf
Related: OS#4852
2023-07-21 11:14:44 +00:00
Andreas Eversberg 4827437a26 ASCI: Add support for Group/Broadcast channel activation
"struct lchan_activate_info" is expanded to support flags for VGCS and
VBS. These are used to send the correct Channel Mode to the BTS.

"enum lchan_activate_for" is expanded to indicate and activation of
VGCS/VBS calls.

Change-Id: Ic0c0597d149d0758d6766937d99660fa02e0e139
Related: OS#4852
2023-07-21 11:14:44 +00:00
Andreas Eversberg bcb7b32f5a ASCI: Add support for NOTIFICATION COMMAND (RSL) message
This message will be sent to each BTS with a VGCS/VBS channel to notify
the served MSs about ongoing group/broadcast calls. It is also used to
remove the notification, if the call is terminated.

Change-Id: I96ec0ee5d1a772a45f1ebfd64210718c8bf5aa58
Related: OS#4852
2023-07-21 11:14:44 +00:00
Andreas Eversberg a7e3e0064d Cleanup code style of rate counters in osmo_bsc_msc.c
Change-Id: I7cfd4f20ebfee0c8df9305372977d6628d6337c5
2023-07-21 11:14:44 +00:00
Andreas Eversberg e45fdd42d7 Fix typo in rate counters ASSIGMENT->ASSIGNMENT
Change-Id: I73079948afbdde35594660959b5335118a810d7b
2023-07-21 11:14:44 +00:00
Andreas Eversberg aee1db9dc1 ASCI: Add new rate counters to support VGCS/VBS messages
Change-Id: I18e4ca3599e480de2d0f64cc1b6f4bb6ce8020d4
Related: OS#4852
2023-07-21 11:14:44 +00:00
Vadim Yanitskiy 121461669e lchan_select: fix lchan selection for GSM48_CMODE_DATA_{14k5,12k0}
Change-Id: I271ebf7e64e3d0861586e9bc63bec113cb5fb410
Fixes: d5eb0f1b5 "lchan_select: chan_mode_to_chan_type: support CSD"
Related: OS#4393
2023-07-20 08:01:17 +00:00
Oliver Smith e6337315d0 configure: add --enable-meas-udp2db/pcap2db/vis
Do not build these utils implicitly if libsqlite3/libpcap/libcdk are
installed. Add configure flags for explicit building and fail if
dependencies are missing.

Keep behavior in deb and rpm packaging:
* deb: build meas_vis
* rpm: build none of these (libcdk dependency for meas_vis is not
  available in most rpm-based distributions we build for)

Fixes: OS#5173
Depends: docker-playground I015b6d7cb834e99ea5d04206ba5f8c519c4e6af1
Change-Id: I8b3d5efb769437a5d3036e1e627b8d477275d93e
2023-07-20 07:20:05 +00:00
Matan Perelman 241e594f7a ctrl: Support adding si2quater earfcn neighbor
Change-Id: Ifd2740ee54db66742785437a278cb9244e1f76d0
2023-07-17 09:00:49 +00:00
Matan Perelman 1bae98e2d6 ctrl: Add getting si2quater earfcn neighbor list
Change-Id: Ib942bfa95aca2b514ac68f602545b9e7cbed097a
2023-07-17 09:00:49 +00:00
Matan Perelman 8b64e032e2 ctrl: Support adding si2quater uarfcn neighbor
Change-Id: I8116175b5dff1ee4bbff0dc3b4f93890ce4c975b
2023-07-17 09:00:49 +00:00
Matan Perelman 4e13aab269 ctrl: Add getting si2quater uarfcn neighbor list
Change-Id: Iab1d2e264c0deb75f03aec6ae38ac406bc7b58cb
2023-07-17 09:00:49 +00:00
Pau Espin bc8b61139d cosmetic: Document DRX_TIMER_MAX upper limit on BCCH smaller than possible range
Related: OS#6097
Change-Id: I5c8699bb5357a74805c25e8d02e982b25b47555d
2023-07-14 19:02:11 +02:00
Pau Espin 74b34b4395 SI13: Set DRX_TIMER_MAX value actually transmitted
The set of values in seconds which can be expressed in the 3-bit field
DRX_TIMER_MAX (0s, 1s, 2s, 4s,...64s) don't include the "3s" that where
being specified. Instead, libosmocore's encode_drx_timer() was
taking both upper boundary "4s" and encoding it "0b011".
Hence, better write the value actually being transmitted to MS, to avoid
users/readers confusion.

More related info can be found on TS 44.060 Table 12.24.2 and TS 45.002
6.5.6.

Related: OS#6097
Change-Id: Ibf01a50b258e197ba5e3173492513349ddffdb38
2023-07-14 19:01:44 +02:00
Oliver Smith 40f5b3ff97 Fix various typos
Change-Id: I2726f18156f96999159f7b5f7c6c5a2d93667131
2023-07-11 12:48:27 +02:00
Matan Perelman 08b7b008c2 ctrl: Add rach max delay
Change-Id: I113211cc7e7ef20fac7e9d30e156522406ad62f7
2023-06-30 17:59:12 +03:00
Matan Perelman 1dd9afe582 ctrl: Add bsic
Change-Id: I5c941770924e5373733c3a3939671fab518f7a58
2023-06-25 06:26:22 +00:00
Matan Perelman 03b7b76a9f ctrl: Add setting SI5 neighbor list
Change-Id: I1bab242cdbd0d7b39636d69027bf75794a5d5ba7
2023-06-25 06:26:22 +00:00
Pau Espin caad230e99 Use new libosmo-sccp APIs osmo_ss7_asp_get_{name,proto}()
Depends: libosmo-sccp.git Change-Id If9acfca1abc9ab7eb6d2388f548d7ee577b9c5ac
Change-Id: I0479f7bfb8337a6a955ba66c7b403db3565659d6
2023-06-21 11:01:35 +00:00
Harald Welte 6153c619fc prevent bogus NCH related error message if no NCH is configured
Back in Change-Id  Iefde0af44a663f22462a54d68a58caa560eceb2f I
introduced indication of the NCH position in the SI1 rest octets.

However, a related ERROR messages is accidentially also printed in
case no NCH is configured at all.

Let's split the already overly-complex if clause into a separate
function which then also handles the "bts->nch.num_blocks == 0"
case as permitted.

Change-Id: Iab2120a343cb0f6553f13a821b44b3c312587579
Related: OS#5781
2023-06-21 11:48:45 +02:00
Philipp Maier faff9f8fdc pcu_sock: use correct SAPI in message PCUIF PCU_IF_MSG_DATA_CNF_DT
The message PCU_IF_MSG_DATA_CNF_DT uses SAPI PCU_IF_SAPI_PCH, which is
formally not correct. It should use SAPI PCU_IF_SAPI_PCH_DT

Depends: osmo-pcu.git I0883b51fc232ec0267f1511c3a37c0bcd0967a08
Change-Id: Id5c799e625c56e57f7b51cd4fb57f5bea9c973d2
2023-06-16 15:20:48 +02:00
Daniel Willmann ee8205b46b cosmetic: Fix type in VTY description
Change-Id: I3301d1c84b3386e0a4e9c3f18f89aee62e9097d5
2023-06-15 18:42:16 +02:00
Pau Espin ea9a6a1aea Use new mgcp_client_conf_alloc() API to alloc mgcp_client_conf
Depends: osmo-mgw.git Change-Id Iba0853ed099a32cf1dde78c17e1b34343db41cfc
Change-Id: I9d342d2eff7b57b0c542ff0c1c579f708451637c
2023-06-13 19:53:30 +02:00
Harald Welte 43440e1fc5 nanobts: Request "supported features" attribute from BTS and BB_TRANSC
The nanoBTS feature reporting works significantly different from what
osmo-bts implements.  They have a "Supported Features" IE in potentially
each of their MOs, and within this have nested IEs expressing respective
feature sets.

Let's start by requesting those for at least those MOs where we already
implement a GET ATTRIBUTES call in the FSM.

Change-Id: I15116044fb354ec0a0682c62078fbfa907b318f3
2023-06-11 19:32:33 +00:00
Matan Perelman 633b7a9caf ctrl: Add getting SI5 neighbor list
Change-Id: I71f5f23473b94059ac64770ceb256b4df36c0ef7
2023-06-11 19:26:34 +00:00
Matan Perelman d76bc795f7 ctrl: Add getting neighbor list
Change-Id: Icba0b7d92f4c67e617d707ca651d674f0d1ba8a7
2023-06-11 19:26:34 +00:00
Harald Welte 8798689f3b Support (optional) indication of NCH position in SI1 rest octets
This adds the vty commands and respective logic to allow the user to
specify the NCH (notification channel) position in the SI1 rests octets.

Change-Id: Iefde0af44a663f22462a54d68a58caa560eceb2f
Related: OS#5781
Requires: libosmocore.git I24a0095ac6eee0197f9d9ef9895c7795df6cdc49
2023-05-31 09:19:53 +00:00
Philipp Maier a1ff30920d pcu_sock: fix PCUIF interface (PCH)
The PCUIF interface implementation in osmo-bsc provides two ways to
access the paging channel (PCH).

1) Under the SAPI PCU_IF_SAPI_PCH PAGING COMMAND messages are accepted
as whole MAC block but the format is in the style that we are going
to deprecate with PCUIF v.11. Also at the moment those PAGING COMMANDs
are not confirmed towards the PCU. This is also not necessary since
osmo-pcu would silently drop such confirmations. (see pcu_rx_data_cnf
in pcu_l1_if.cpp)

2) Under the SAPI PCU_IF_SAPI_PCH_DT messages are also accepded as
MAC blocks but the SAPI will only accept IMMEDIATE ASSIGNMENT messages.
The messages are encapsulated in a struct that holds IMSI (paging group)
and TLLI (used for confirmation) as separate struct members. The
messages are also confirmed towards the PCU as it should be.

Since we want to depreacete the older V.10 version of PCUIF and there is
not much benefit in maintaining two interfaces we should use
SAPI PCU_IF_SAPI_PCH_DT for both message types. This also requires small
adjustments to osmo-pcu (see Depends).

Depends: osmo-pcu.git I99cfe373fa157cfb32b74c113ad9935347653a71
Related: OS#5927
Change-Id: I82443f2b402aa2416469c8c50b1c050323ef3b8f
2023-05-24 12:29:00 +02:00
Vadim Yanitskiy 1f3bfff668 copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
Change-Id: I849a18a3bfd15aad00de3e103339540a7548e097
2023-05-18 17:22:26 +07:00
Max c1e2888050 pcu_connected(): constify parameter
Change-Id: I6d18ec0ad2bd6f71e0187ed70b03c3a2d0447f21
2023-05-11 18:19:23 +00:00
Harald Welte ea7b53850b cosmetic: Clarify language ip.access nanoBTS vs. all IPA Abis/IP
Don't explicitly mention ip.access/nanoBTS if we actually want to refer
to all BTSs implementing an IPA-style Abis/IP interface.

Also, remove some bogus "is_ipa_abisip_bts(bts) || is_osmobts(bts)".
is_ipa_abisip_bts includes osmobts.

Change-Id: I31696d9a21a799511741a561085686cfa0728f93
2023-05-08 06:28:52 +02:00
Harald Welte ceccba70a9 cosmetic: Rename is_ipaccess_bts() to is_ipa_abisip_bts()
This function is used to check if the BTS is using the IPA Abis-IP
transport, and not whether its manufacturer/vendor is ip.access.

Let's use a less confusing name.

Change-Id: I202c58341c1536489064d2671c0842c6f70b5429
2023-05-08 06:28:51 +02:00
Harald Welte 5d8ab13b34 abis_nm: Only osmo-bts re-purposes the MANUF_ID for BTS feature flags
The Manufacturer ID IE is normally used to indicate the [name of] the
manufacturer.  In case of ip.access nanoBTS it is, for example, "com.ipaccess".

Osmocom decided to re-pupose this IE to indicate bts-specific feature
flags.  Stop interpreting the string "com.ipaccess" as feature bitmap.

In fact, nanoBTS doesn't support runtime reporting of features (at
least not in this way), so let's mark features_get_reported = false,
resulting in the copy of bts_model->features to bts->features at the
time a BTS is initialized.

Change-Id: I76cee190dc1f074464df570cdfc3d38559f04846
Closes: OS#5959
2023-05-04 05:23:42 +00:00
Matan Perelman ba3fe2c908 ctrl: Add setting access control class
Change-Id: I7abbf0adc3798e9224834a68d7cdce4bbe03c9a3
2023-05-01 22:16:30 +03:00
Matan Perelman a8fcc1bb73 ctrl: Add getting access control class
Change-Id: I279249f9047f5edacc9edf3d231e3e74023fc84e
2023-05-01 22:16:30 +03:00
Matan Perelman f4d9dfe6bd ctrl: Add cell reselection hysteresis control
Change-Id: Ia96f6656d99381c039a4b3fd02674215fbbaec91
2023-05-01 22:15:33 +03:00
Matan Perelman 639cd00a22 ctrl: Add penalty time control
The penalty time gives the duration for which the temporary
offset is applied.

Change-Id: Idfdd54dec72fb5f52eee22df018161d75b8c48c8
2023-05-01 19:13:49 +00:00
Neels Hofmeyr 5d8d6d2079 fix mscpool for large msc NRs
Use the proper type that can handle the entire range of MSC numbers we
allow on the VTY, we have:
 #define MSC_NR_RANGE "<0-1000>"

Before this patch, MSC pool round robin would glitch around for any
'msc' numbers 'msc 256' thru 'msc 1000'.

Change-Id: I98bee022c1a78508554d2ff4a10fbce3c53f1128
2023-05-01 00:11:48 +00:00
Neels Hofmeyr a70d6b25c4 fix length check in abis_rsl_rx_rll()
In abis_rsl_rx_rll(), we do the following header length check -- quick
challenge, can you spot the two bugs hidden here?

  struct abis_rsl_rll_hdr *rllh;
  if (msgb_l2len(msg) >
      sizeof(struct abis_rsl_common_hdr) + sizeof(*rllh))
           msg->l3h = &rllh->data[3];

Fix these bugs:

- struct abis_rsl_common_hdr is already included as the first member of
  abis_rsl_rll_hdr, no need to add that.
- We are going to be accessing rrlh->data[3], so we must check for at
  least sizeof(*rllh) + 4.

Change-Id: Ie4aee615c8c904ae8308ec0074d8bc5208137061
2023-05-01 00:11:48 +00:00
Vadim Yanitskiy ea3e3c258d gsm_bts_send_c0_power_red(): check if BTS is online first
... and print a proper error message instead of "not supported".  We
don't know for sure whether it's supported before the BTS is connected.

Change-Id: I080aa7ef331b76918ae48d555eea6e4290c57120
Related: SYS#6435
2023-04-28 18:05:37 +07:00
Vadim Yanitskiy 16922c5017 bts: st_op_enabled_on_enter(): resume C0 power reduction
If power saving is enabled for a BTS, it should remain enabled even
if the BTS is restarted for whatever reason.  This persistence can be
achieved by re-sending the configured power reduction value whenever
the BTS NM FSM enters the ENABLED state again (i.e. reconnects).

Separate gsm_bts_send_c0_power_red() from gsm_bts_set_c0_power_red()
and call the former from st_op_enabled_on_enter().  All we need to do
is to send the value that was configured before, per-timeslot power
reduction limits remain and need not to be updated.

Take a chance to move logging from BTS specific to the generic code.

Change-Id: Ic3f8a2ab0ffd049a8ed84361a3a588c1e1b23ac6
Related: SYS#6435
2023-04-28 18:05:37 +07:00
Vadim Yanitskiy 05e2deb49c bootstrap_rsl(): cosmetic: cache trx->bts and use it directly
Change-Id: I736ebf185028976dad5ff6f61386b6d2eeab8fbd
Related: SYS#6435
2023-04-28 02:21:20 +07:00
Vadim Yanitskiy 253f67f625 struct gsm_bts_model: rename power_ctrl_{set->send}_c0_power_red
Change-Id: I13d9e6ea2a2b7b11f92532d377e71f0e83974622
Related: SYS#6435
2023-04-28 02:19:44 +07:00
Vadim Yanitskiy 856c6dc2f5 bts_is_online(): make the BTS pointer const, return bool
Change-Id: Idb4f9f8862041c5902df0e6e8d1ac2a60ada95df
2023-04-28 02:19:44 +07:00
Matan Perelman 1619a82825 ctrl: Remove dots from OOM
Change-Id: Ic2c6a052a9f9dcdca225225b38eb0ebdd05ac959
2023-04-25 15:52:09 +03:00