aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-10-25trx_if: Allow calling trx_if_flush/close from within TRXC callback (v2)pespin/trxcPau Espin Pedrol2-7/+31
- If the llist is flushed during rx rsp callback, when the flow is returned to trx_ctrl_read_cb() it would access tcm which was in the llist and end up in use-after-free. - We need to store state on whether code path is inside the read_cb in order to: -- Delay transmission of new message if callback calls trx_if_flush() followed by trx_ctrl_send(), since the trx_ctrl_send() at the end of trx_ctrl_read_cb would retransmit it again immediatelly. -- Avoid accessing tcm pointer if the callback called trx_if_flush(), since it has been freed. Related: OS#6020 Change-Id: Ibdffa4644aa3a7d219452644d3e74b411734f1df
2023-10-25Revert "trx_if: Allow calling trx_if_flush/close from within TRXC callback"Pau Espin Pedrol1-9/+6
This reverts commit 4444262a6ab1e1e231ea81c4ec990f1a1f571a1f. This commit introduced several side effects: - tcm is left out of the l1h->trx_ctrl_list and hence won't be ever retransmitted. - Since tcm is removed before rsp callback, the llist may become empty and if somehwere in the rsp callback a new message is enqueud it will be sent immediatelly, and will be retransmitted again when trx_ctrl_read_cb() calls trx_ctrl_send() at the end. Change-Id: Ideb2d08ac8a2902bceeabfb055c59c9a13dbe3c0 Related: OS#6020
2023-10-09Increase RR scheduler priority to 20, to avoid dropped burstsAndreas Eversberg1-1/+1
If frames are not deliverd fast enough to the DSP, bursts will get dropped. The osmo-bts-sysmo process must have priority over other processes, so it can deliver frames fast enough. Related: OS#6199 Change-Id: I2394e6bbc00a1d47987dbe7b70f4b5cbedf69b10
2023-10-05Drop use of deprectated vty callback is_config_nodePau Espin Pedrol5-88/+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 Maier2-2/+2
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 Yanitskiy2-547/+370
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 Yanitskiy2-747/+736
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-10-04meas: also match stderr logging for meas_testVadim Yanitskiy4-3/+8428
Change-Id: Id1ce154a65b194ce5fd9257c9c1b26d62aad1e0d Related: OS#6168
2023-10-03osmo-bts-trx: rx_tchh_fn(): fix copy-pasted commentVadim Yanitskiy1-2/+2
Change-Id: Idba18c217187f7aacc2fcb0c330814f3802a9306
2023-10-03cosmetic: oc2g_mgr: fix trailing whitespacePau Espin Pedrol1-2/+2
Change-Id: I918cbe32d1be692a1747c9721f680ed8a336bf6f
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-27systemd: remove RestartPreventExitStatus=1Oliver Smith3-3/+0
Fix OsmoBTS not restarting if e.g. an external gsmtap IP is configured that is currently not available. Also make the service files more consistent with other Osmocom projects. Partial revert of ae2473c2 ("systemd: Do not restart with a broken config file or such"). Related: SYS#6581 Change-Id: Ieeed858c159839ebaa27b2be35a597fb86874c4b
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 Yanitskiy14-1/+308
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 Pedrol8-28/+27
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 Pedrol4-7/+18
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-15osmo-bts-{oc2g,lc15}: signal CBCH support to BSCVadim Yanitskiy2-0/+2
The model specific code seems to have everything needed for CBCH. Change-Id: I6b4d82223dc0bdcd94cd1269bfb02047cbebe480
2023-09-12Bump version: 1.6.0.210-8a1f-dirty → 1.7.01.7.0Pau Espin Pedrol5-28/+258
Change-Id: I3137362f3933aad20e3000a2fab4af82fe4fb649
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 Pedrol2-9/+16
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 Maier6-8/+47
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 Maier2-5/+4
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 Yanitskiy3-3/+80
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 Maier2-2/+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 Maier2-17/+17
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-08pcuif_proto: remove unnecessary members from gsm_pcu_if_data_cnf_dtPhilipp Maier1-9/+0
The struct gsm_pcu_if_data_cnf_dt was added when the first experiments mit Ericsson RBS base stations were made. It is essentially a copy of gsm_pcu_if_data, where the mamber "data" was replaced with a member "msg_id" (which was originally called "tlli"). Since we didn't know back then which parameters we would still need at some later point we kept all the other parameters. However, to this day we never used the parameters below fn. Even fn was only used for logging purposes, but is now also unused. Let's remove all those unused members. (Since all removed members are at the tail of the struct, compatibility with other programs that use the PCUIF should not break.) Related: OS#5927 Change-Id: I779605858648e2a1c202c37e197a6e32e6ea3786
2023-08-08pcu_sock: get rid of fn parameter in pcu_tx_pch_data_cnfPhilipp Maier3-4/+3
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 Maier5-15/+15
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
2023-08-04Fix incorrect order of params passed to logging macroKeith1-1/+1
Stops log lines like: 'DOML unknown 0x239616 (bts=0,trx=0,ts=1,ss=0) [....]' Change-Id: Ie1ad41210280ae5dbe693de6bdc4378ff34621b7
2023-07-30osmo-bts-trx: bts_supports_cm_data(): allow non-transparent modesVadim Yanitskiy1-0/+3
The rate adaptation algorithm is the same for both transparent and non-transparent channel modes. The only difference is that the E-bits in the modified CSD frames carry data, like the D-bits. Change-Id: Ib0d9346d7a8e30b8a8e4b08ee04846ba7d12b3fb Related: OS#1572
2023-07-30csd_v110_rtp_encode(): properly set E1/E2/E3 bitsVadim Yanitskiy4-19/+46
The E1/E2/E3 bits are set based on out-of-band knowledge of the current user data rate. The actual bit values are defined in 3GPP TS 44.021, Figure 4 "Coding of data rates". TODO: this is only valid for transparent services, for non-transparent services see 3GPP TS 48.020. TODO: lchan->csd_mode is never set to the actual CSD mode... Change-Id: I1a14597dff746cf975140b294400a2cc05badccd Related: OS#1572
2023-07-30l1sap: proper rate adaptation for CSD (RFC4040 'clearmode')Vadim Yanitskiy13-14/+475
Since 95407f3f osmo-bts-trx supports scheduling all CSD specific channel rates, however the rate adaptation was missing. On the radio interface we deal with CSD-modified V.110 frames, which need to be converted to normal 80-bit V.110 frames (RA1'/RA1), which in turn need to be batched and sent in RFC4040 "clearmode" 160 octet RTP payloads (RA1/RA2 as per I.460). Note that this patch comments out TCH/F14.4 in bts_supports_cm_data(), so that all channel allocations for this mode would be NACKed. The reason for this is that the rate adaptation functions for TCH/F14.4 are different than the RA1'/RA1 and the RA1/RA2. For more information, see: * 3GPP TS 44.021, section 8 (functions RA1'/RA1) * ITU-T I.460, section 1.1 "Rate adaption of 8, 16 and 32 kbit/s streams" Change-Id: I5e3701ad52d5d428fd02caff037881045f2d0a02 Related: OS#1572
2023-07-21ASCI: Enable UPLINK ACCESS on various BTS modelsAndreas Eversberg4-4/+8
UPLINK ACCESS (RACH on TCH) was enabled for osmo-bts-sysmo only. Now it is also enabled for: * osmo-bts-lc15 * osmo-bts-oc2g * osmo-bts-trx * osmo-bts-virtual Change-Id: Iae0db6bfcf6629c114436a79648e832c82835abe
2023-07-21Add test cases for rest octets of Paging RequestsAndreas Eversberg3-52/+224
The abstract representation of the rest octets are moved to the header file, so that the test case can include it. append_p*_rest_octets() function become externally available for test. Change-Id: Ifa5be8998b671160e38af1be707e040b00d407b8 Related: OS#5781
2023-07-21ASCI: Repeat UPLINK FREE message until uplink becomes busyAndreas Eversberg4-0/+37
According to TS 44.018 the UPLINK FREE message must be repeated when the uplink is marked as free. The BSC sends the UPLINK FREE message once and the BTS repeats it until UPLINK BUSY (uplink blocked by BSC) or VGCS UPLINK GRANT (talker accesses the uplink) is sent. It is important to stop sending UPLINK FREE message when a talker accesses the uplink and before the VGCS UPLINK GRANT message is sent, so that stopping must be controlled by the BTS. Related: OS#5781 Change-Id: Ia23c59f5e9a73bbc384fbc317a2cfcf707e3c28f
2023-07-21ASCI: Add Notification/FACCH supportAndreas Eversberg3-0/+81
When a VGCS/VBS call is established in a cell, NCH is used to notify about ongoing calls to idle subscribers. Additionally Notification/FACCH is used to notify subscribers in dedicated mode. This is performed by broadcasting this messages to all active dedicated channels. The mobile station can then indicate the call, so the user can join the call. More importaint is the notification of the calling subscriber's MS, which initiated the call. This is done on the early assigned channel. The MS must know on which channel the call is placed. After leaving the uplink, it must know where to access the uplink the next time. Change-Id: I3ed14fa54a907891e492a7ada8e745a2c56cd46d Related: OS#4851, OS#5781