aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2024-03-31vty info: MS power levels in dBm are not negativeHEADmasterKeith1-2/+2
Change-Id: Ib928a1378bc00b8ccb0365e5536f010e1f8a3d43
2024-03-18common: Add RTP related rate countersHarald Welte3-4/+34
Let's add some rate counters to add visibility to the BTS on what is happening in terms of received and/or transmitted RTP packets. This should help during debugging any RTP related issues. Change-Id: Ide674bde10b0e4b501d6a48947b983090342dfec
2024-02-17Fix license headers.Harald Welte39-39/+39
We have licensed the code under GNU Afffero Public License, and state that in the first paragraph as well as in the link to the license. However, a paragraph in the middle stated "see the GNU General Public License", which is somewhat misleading. Let's fix that. Change-Id: I37e503b195fe43e1da42c080900504ca8e682e76
2024-01-10early-IA: use the correct TRXNeels Hofmeyr1-10/+35
In early-Immediate-Assignment, the BSC sends the IMM ASS message directly after it sent the Channel Activation message, and osmo-bts should cache it until the Channel Activation is complete. So far the code had a bug: it assumed that the lchan was on the same TRX where the IMM ASS is transmitted -- but actually, 'trx' refers to the BCCH channel's TRX, i.e. always c0. Instead, look up the correct TRX by the ARFCN in the IMM ASS message. Now, when frequency hopping is enabled, there will be no ARFCN in the IMM ASS message, hence this fix does not work with frequency hopping. Related osmo-bsc patch disallows this combination. (To also support frequency hopping, osmo-bsc would need to modify the RSL protocol: send the IMM ASS message as a custom IE directly as part of the Channel Activation. Then it is always possible to correllate the IMM ASS with a specific trx and lchan, no matter what information it contains. However, early-IA is a "bad" feature in itself as it "promotes" having high latency on Abis. It seems unnecessary to do extra work to also support this odd use case for frequency hopping.) Related: osmo-bsc I8d375e5155be7b53034d5c0be5566d2f33af5db0 Related: SYS#6655 Change-Id: Id9a930e5c67122812b229dc27ea2bfe246b67611
2024-01-06l1sap: fix logic error in gsmtap_csd_rlp_process()Vadim Yanitskiy1-2/+6
Current code evaluates as follows: (trx->arfcn | is_uplink) ? GSMTAP_ARFCN_F_UPLINK : 0 while we want it to be evaluated as follows: trx->arfcn | (is_uplink ? GSMTAP_ARFCN_F_UPLINK : 0) Change-Id: Ida3d684968a3e4a45531d4b6d7b6af170e3e39f4 Fixes: CID#338165
2024-01-04ctrl: Add max ber10k rachMatan Perelman1-0/+33
Change-Id: I466ee7ab0f8b24f14a91875ae2c720da3e506bd1
2023-12-21gsmtap-rlp: Add support for skipping generating NULL framesHarald Welte2-4/+21
If there's nothing to transmit over a CSD NT channel, both ends generate NULL frames. Let's add an option to suppress GSMTAP output for those, creating pcap files with less noise. Change-Id: I85a2159cfaa01bfb4205c1462e3a9dbda68e4bad Depends: libosmocore.git I2d9bd8eb4f0cd0f72c436996767b199429596917
2023-12-21Add GSMTAP encapsulation of RLP frames in CSD NT modeHarald Welte2-3/+102
In CSD (Circuit Switched Data) NT (Non-Transparent) mode, there are RLP (Radio Link Protocol) frames inside the modified V.110. wireshark alrady has a dissector for this, and we've introduced a GSMTAP type for RLP some time ago. So with this patch, we now generate such GSMTAP RLP frames. Change-Id: I6a258458822bcb3fe7290a9b9b3d104beecda219
2023-12-19OML: Add Get Attributes for supported MOs for Channel Object ClassAndreas Eversberg1-3/+92
Get Attributes of Channel Object class that osmo-bts supports are added: * ARFCN List * Channel Combinations * TSC * HSN * MAIO Related: OS#6172 Change-Id: I56e067be9e5c17625c7da4e982b90927802f57b4
2023-12-19OML: Add Get Attributes for supported MOs for Radio Carrier Object ClassAndreas Eversberg1-0/+41
Two Get Attributes of Radio Carrier Object class that osmo-bts supports are added: * RF Max Power Reduction * ARFCN List Note: Only one ARFCN is reported, because synthesizer hopping is not supported. The NM_ATT_ARFCN_LIST in the Set Radio Carrier Attributes message currently allowes one ARFCN only. Related: OS#6172 Change-Id: I49ab516c38a986520f1d3f6e26ddd20ee16688ac
2023-12-16OML: Add Get Attributes for supported MOs for BTS Object ClassAndreas Eversberg1-0/+178
Most Get Attributes of BTS Object class that osmo-bts supports are added. Not supported attributes are: * T200 * Starting Time * HW Configuration Related: OS#6172 Change-Id: I067c6bdea3c44d5a731bcfdcfe304c14629eb3db
2023-12-11Use polling based LAPDm with frame numbersAndreas Eversberg4-70/+88
Osmo-bts uses the new polling based LAPDm implementation. The OML message NM_ATT_T200 is ignored, because T200 timeouts are set to the minimal response time. Longer timeouts would cause lower throughput in case of lost frames. Shorter timeouts would cause LAPDm to fail. Related: OS#4074 Depends: libosmocore.git I6ebe83f829d7751ea9de1d90eb478c7a628db64c Change-Id: Ic6d7902b13cf491daaa8752db78f9875387aeffd
2023-12-11LAPDm: Reject (release) establishment on DCCH, SAPI 0 without L3 payloadAndreas Eversberg1-0/+20
If the channel is activated for immediate assignment, the initial data link establishment on main signaling link with SAPI 0 must have L3 infomation included in the SABM message. If this is not the case, release the data link without notifying BSC. Related: OS#5971 Change-Id: I6819b51a876b8743c2d4a04165b7900723a1631c
2023-11-21pcuif_proto: signal BTS model via PCUIFPhilipp Maier1-0/+21
At the moment the PCU has no way of knowing with which BTS model it is used with. However, some BTS models may require slightly different behaviour by the PCU, depending on which BTS model is used. So, lets add an additional bts_model field to struct gsm_pcu_if_info_ind in order to convey the exact BTS model to the PCU. Related: OS#6191 Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047 Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
2023-11-14osmo-bts-trx: eliminate ul_bursts_prev, use the primary bufferVadim Yanitskiy1-5/+1
When adding support for Circuit Switched Data calls, we had to enlarge the burst buffer size to accommodate bits for a maximum of 24 bursts. Let's take advantage of this by utilizing the currently unused part of the Uplink burst buffer for storing bits of previously decoded blocks. This eliminates the need to allocate additional memory for SACCH. Change-Id: I15047cd1df4476054b36f05616e41f5297d9bfe5 Related: SYS#5114, OS#4794, OS#4795, OS#4796
2023-10-27ASCI: Control uplink access bursts detection of physical interfaceAndreas Eversberg4-10/+58
An MPH-INFO message is used to turn detection of uplink access bursts on or off. Whenever the uplink on a voice group channel is free, the uplink access burst detection is turned on. When the uplink access is granted to a talker or when the calling subscriber has been assigned to the channel, the uplink access burst detection is turned off until the uplink becomes free again. Related: OS#4851 Depends: libosmocore.git Ibd6a1d468a70126a8f67e944fcb916969cc3c36b Change-Id: I92d6773a3a463eb747143c85aa149e54c1fda122
2023-10-27ASCI: Add control of uplink access to osmo-bts-trxAndreas Eversberg1-0/+27
An MPH-INFO message is used to turn detection of uplink access bursts on or off. This is required for voice group/broadcast channels. Related: OS#4851 Depends: libosmocore.git Ibd6a1d468a70126a8f67e944fcb916969cc3c36b Change-Id: I9045437d52984b7abe00fbc815d7f83c62c0fb5a
2023-10-16pcuif_proto: clean up last remains of old PCUIF v10Philipp Maier1-2/+0
There are still some remains that are related to the old PCUIF v10 protocol version. Let's clean those up. Related: OS#5927 Depends: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8 Change-Id: I04f7108c94c99c9920192177087748e8b89b3106
2023-10-05Drop use of deprectated vty callback is_config_nodePau Espin Pedrol1-15/+0
While compiling: vty.c:169:3: warning: 'is_config_node' is deprecated: Implicit parent node tracking has replaced the use of this callback. This callback is no longer called, ever, and can be left NULL. [-Wdeprecated-declarations] .is_config_node = bts_vty_is_config_node, ^ Change-Id: I54c5aa5911611b181f80e76556b150f25dd5b60c
2023-10-04pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHYPhilipp Maier1-1/+1
The PCUIF flag PCU_IF_FLAG_SYSMO was originally used by osmo-bts-sysmo to signal to the PCU that the direct PHY access for the sysmo-bts DSP should be enabled. With time, support for other BTS models was added and the flag became a synonym for "direct PHY access", so it makes sense to rename it to "PCU_IF_FLAG_DIRECT_PHY" Related: OS#6191 Depends: osmo-pcu.git I29b7b78a3a91d062b9ea3cd72623d30618cd3f0b Change-Id: Ib556a93f7d7d7dbe1e96c4a0802bc802241b2b2d
2023-10-04meas: lchan_meas_sub_num_expected(): handle CSD modesVadim Yanitskiy1-0/+6
Change-Id: Iba5314dc89d65ab4a3706b6ef11994b6fa95162c Related: OS#6168
2023-10-04meas: ts45008_83_is_sub(): properly handle CSD modesVadim Yanitskiy1-13/+20
Change-Id: Ic3b1e27be2dece3605657fd91d7addebb1e554e8 Related: OS#6168
2023-10-04meas: fix ts45008_83_is_sub(): DTX is permitted on TCH/F signVadim Yanitskiy1-4/+1
DTX is not allowed for TCH/H in signalling mode, but *is* allowed for TCH/F in signalling mode. Change-Id: I91cfd8f561eb47a5fc48c0682d56331a1d69aded Related: OS#6168
2023-10-04meas: handle VAMOS specific chan modesVadim Yanitskiy1-0/+9
Treat the VAMOS channel modes same as their non-VAMOS counterparts. Change-Id: I8ecaf87c7cda4c10dd411e7539382274715bce57 Related: OS#6168
2023-10-04meas: lchan_meas_check_compute(): fix -SUB frame substitutionVadim Yanitskiy1-1/+1
The current implementation does substitute all missing meas samples with dummy -SUB measurements and then complain about exceeding amount of -SUB samples. Change-Id: Iab84f4b64b645486e2f115b0f82ee2f27eb992bc Related: OS#6168
2023-10-04meas: lchan_meas_sub_num_expected(): proper cmode enforcementVadim Yanitskiy1-52/+41
3GPP TS 45.008, section 8.3 defines TDMA Fn subsets, which shall always be transmitted when DTX is employed, only for: * TCH/F in signalling mode (but not for TCH/H), * TCH/H and TCH/F in data mode (CSD) [*], * TCH/FS, TCH/EFS, and TCH/HS. For channel modes employing AMR codec, in particular: * TCH/AFS, TCH/WFS, O-TCH/WFS, * TCH/AHS, O-TCH/AHS, O-TCH/WHS, there exist no fixed TDMA Fn subsets, but DTX is still permitted. For those we expect at least one SACCH frame, plus a variable number of speech frames (0 or more). [*] Handling of data modes is fixed in a follow-up patch. Change-Id: Ied477528d77871dd7e3b5b7b433a4e33bca40011 Related: OS#6168
2023-09-28l1sap: l1sap_tch_ind(): fix segfault on stale TCH.indVadim Yanitskiy1-0/+1
It was reported that osmo-bts-sysmo is crashing due to a TCH.ind primitive being received by l1sap_tch_ind() for an lchan, which is operating neither in speech nor data, but in signalling mode. It's not clear which scenario is causing this situation. My best guess is that one or more TCH.ind primitive(s) remain waiting in the lower layers and bob up right after the channel mode change. This can happen, for instance, when a dynamic timeslot gets switched from TCH/F or TCH/H to PDCH or SDCCH/8. Change-Id: I2d270ab654fdd9d19d1708ff6c4b4e902bd5d0a3 Fixes: d1f8f3429 "l1sap: proper rate adaptation for CSD" Closes: OS#6180
2023-09-25Do not prefix UI header to System Information Type 10Andreas Eversberg1-0/+9
System Information Type 10 uses short L2 header that is transmitted as Bter UI frame. The complete frame is sent by BSC, including short L2 header. Only the SACCH layer 1 header is added by the BTS. A switch() statement is used, so other System Information with short L2 header can be added in the future. Change-Id: Ifede42bfd84ea5914b559a20ae68f594d2ee1a5c
2023-09-25ASCI: Ignore LAPD frames from MS, while the uplink is not activeAndreas Eversberg1-3/+14
Do not forward any message that is received on the uplink to LAPD while the uplink is not active. If the MS did not recognize (fast enough) that the uplink is free, it may continue to transmit LAPD messages. A response by LAPD to these messages is not desired and not required. If LAPD would respond, it would cause stopping transmission of UPLINK FREE messages. No MS could access the uplink anymore. Note: UPLINK FREE messages are repeated automatically until a different message is transmitted. Related: OS#5781 Change-Id: I5075115123055b2997481f56ddf473430a1dc9e3
2023-09-21oml: implement handling of NM_ATT_IPACC_SUPP_FEATURESVadim Yanitskiy2-1/+71
Change-Id: I88c6c6af18be054bd152832e60c8afbbd16098a3 Depends: libosmocore.git Ia4208e10d61843dd6ae77398f6624c918dc81ea4 Depends: libosmocore.git I85316af9b57e8113077305798cb2d82a24e48e00
2023-09-19nm: delay RSL connect until BBTRANSC object is OPSTARTedPau Espin Pedrol2-12/+16
Have same behavior as nanoBTS. Related: OS#5253 Change-Id: Idefc65a8812abd49fb5f0cd7b0bef423536b86e0
2023-09-19Move trx->rsl_link to trx->bb_transc.rsl.linkPau Espin Pedrol5-12/+12
The RSL link is configured/set up by the BBTRANSC NM object, hence move it to the appropiate substruct. Related: OS#5253 Change-Id: I62937cbd81c27274b9f5f70d454d5319a6898c7b
2023-09-19oml: Store RSL connect related fields in bb_transcPau Espin Pedrol3-6/+12
This is a preparation commit towards delaying connection of RSL tcp socket until the BBTRANSC object is OPSTARTed, as it is the case already in nanoBTS. Related: OS#5253 Change-Id: Ia571ec19e9e8f8a6d7c2554642aab0afe1b4b917
2023-09-15oml: oml_tx_attr_resp(): handle common nm_state attributesVadim Yanitskiy1-0/+12
These attributes are listed in 3GPP TS 52.021, Table 2/GSM 12.21. Many attributes are still unhandled, but at least something. Change-Id: I94702c503fea5b42d84673ccd7065c9323b733b8 Related: OS#4505
2023-09-15oml: refactor generation of Get Attribute ResponseVadim Yanitskiy1-113/+51
Change-Id: I531e88e789d09f8828a53813e3b2863faf0cc572 Related: OS#4505
2023-09-15oml: oml_tx_attr_resp(): pass *mo to handle_attrs_{bts,trx}()Vadim Yanitskiy1-14/+8
Change-Id: I78555d7226afd0c25efc100d95642634323a7b95
2023-09-07rsl: Improve logic reactivating CCCH upon SI3 BS_AG_BLKS_RES changePau Espin Pedrol1-3/+15
The previous logic was wrong, since it was only reactivating the channel if the provided BS_AG_BLKS_RES was != 1. Example previously broken scenario: 1- osmo-bsc user sets "channel-descrption bs-ag-blks-res 2" during osmo-bsc startup in osmo-bsc.cfg 2- osmo-bsc user uses VTY to change it to "channel-descrption bs-ag-blks-res 1" 3- osmo-bsc user uses VTY to deploy the new config: "bts <0-255> resend-system-information" Step 3 would fail beforehand, ending up in a NO-OP. Change-Id: Ibc118e11c64f04de55cb7b94d8bf2c84b431774d
2023-09-07bts-trx: Fix CCCH not enabled if BS_AG_BLKS_RES!=1 is provided by BSCPau Espin Pedrol1-2/+4
Other bts models like sysmo,lc15,oc2g properly handled rel_act_kind=LCHAN_REL_ACT_REACT under the bts_model_lchan_deactivate() implementation, but bts-trx didn't. As a result, when BCCH_INFO(SYSINFO_TYPE_3) coming from BSC (RSL) containing a different BS_AG_BLKS_RES triggers CCCH re-activation, it would only deactivate it but not re-activate it. That means no SIs were being scheduled if bts was configured with "channel-descrption bs-ag-blks-res 2" in osmo-bsc.cfg, and phones would not see the cell. Related: OS#1575 Change-Id: I61e1681fbaa2c993b529d58b581c99166b62bda3
2023-08-31pcu_sock: print SAPI and msg_id when sending confirmationPhilipp Maier1-1/+2
At the moment we do not print the SAPI, nor the msg_id when we send a confirmation back to the PCU Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602 elated: OS#5927
2023-08-31pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCHPhilipp Maier3-7/+26
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. In both cases we send a confirmation back to the PCU. For details see coresponding patch in osmo-pcu.git (see Depends) CAUTION: This patch breaks compatibility to current master osmo-pcu (See also "Depends") Related: OS#5927 Depends: osmo-pcu.git I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292 Depends: osmo-ttcn3-hacks.git Iec00d8144dfb2cd8bcee9093c96a3cc98aea6458 Change-Id: I29858fa20ad8bd0aefe81a5c40ad77a2559a8c10
2023-08-29pcuif_proto: use confirm flag in struct gsm_pcu_if_pchPhilipp Maier1-5/+1
The PCU now sets a confirm flag in struct gsm_pcu_if_pch in case the MAC block (data) requires a confirmation when sent. Use this confirm flag instead of making the decision locally based on the MAC block contents. Related: OS#5927 Depends: osmo-pcu.git Ia202862aafc1f0cb6601574ef61eb9155de11f04 Change-Id: I3364d2268bdef9c4d2feeb8e3d51a64e34bca68c
2023-08-26csd_v110: handle empty/incomplete Uplink frames gracefullyVadim Yanitskiy1-3/+9
Change-Id: I7cbf868df3ba5d390cea3d529eef26d18dbe55ab Related: OS#1572
2023-08-26csd_v110: properly set E1/E2/E3 for non-transparent dataVadim Yanitskiy1-3/+11
Change-Id: Ie38c12e462654cd9fe83a0420bc8ea8b476214b8 Related: OS#1572
2023-08-26csd_v110: fix comments in csd_v110_rtp_{en,de}code()Vadim Yanitskiy1-4/+4
Change-Id: I6fee665e587bfa76058187e13f0cdafaea991940 Related: OS#1572
2023-08-22bts: make bts_agch_dequeue staticPhilipp Maier1-1/+1
The function bts_agch_dequeue() is not used outside of bts.c, so it can be a static function. Change-Id: If86293ebbd99d6550022aeb8721d40bca5fc04fc Related: OS#5927
2023-08-10pcuif_proto: get rid of _DT, _dt (Direct TLLI)Philipp Maier1-11/+11
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: Icf85f60ae86fbe1f3b98e1457c0598bb09cb08c5 Related: OS#5927
2023-08-08pcu_sock: get rid of fn parameter in pcu_tx_pch_data_cnfPhilipp Maier2-3/+2
The function pcu_tx_pch_data_cnf() gets a parameter fn (frame number). This parameter is then used to populate the member fn in gsm_pcu_if_data_cnf_dt of the PCUIF protocol. However, the PCU only uses this parameter for logging and nothing else. Hence it it is not needed and we can remove it. Related: OS#5927 Depends: osmo-pcu.git I35bc99eaec5d0287ae3916bc668f0babaddfd6ce Change-Id: Id1c8fa77725129ec2ea7e92e1df493f35a277659
2023-08-08pcuif_proto: rename tlli to msg_idPhilipp Maier2-7/+7
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: Ie6b34d5df64f4bed6b14581c7957dcba6af44136
2023-08-07rsl: rsl_handle_chan_mod_ie(): do not use legacy definesVadim Yanitskiy1-7/+7
Change-Id: I4e8f9ff5189af80bce13cfd1b27585aabda03f7a Related: OS#1572
2023-08-07rsl: rsl_handle_chan_mod_ie(): set lchan->csd_modeVadim Yanitskiy1-0/+18
Change-Id: I6b1b44cffae1484098709efe496efafacbd354a8 Related: ca418643 "csd_v110_rtp_encode(): properly set E1/E2/E3 bits" Related: OS#1572