aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
5 daysREADME.md: Add Forum + Issue Tracker sectionsHEADmasterHarald Welte1-0/+14
Change-Id: I2a25ae51cd5c9fdd48575715f3fa11c8631af32d
5 daysAdd funding link to github mirrorHarald Welte1-0/+1
see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository Change-Id: Ib500e79ae7cc93ff0fc24db47f76d27109eb01f9
10 dayscommon: Add RTP related rate countersHarald Welte4-4/+43
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
12 daysosmo-bts-virtual: Port over to osmo_ioHarald Welte4-91/+100
osmo_io permits us to use the io_uring backend, which should significantly speed up the many small read/writes we're doing on virt-um. Change-Id: Icfe42da00fd446c38090055e2baa5d5e0ae5b70c
2024-03-02sysmobts_mgr_temp: Migrate to ctrl_cmd_send2()Harald Welte2-1/+2
ctrl_cmd_send() is now a deprecated API function. Change-Id: I663669a1bcf7b58d6a6175cbb51c333f5cfaedd7 Depends: libosmocore.git Change-Id Ic81af56e7ea6921ba39168727ef64c308e9c6754
2024-02-17Fix license headers.Harald Welte143-143/+143
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-28doc/examples: fix missing config files in release tarballsVadim Yanitskiy1-7/+16
All config file examples must be listed in EXTRA_DIST unconditionally. Adding them conditionally results in incomplete release tarballs, containing only 'osmo-bts-virtual.cfg' and failing to build. Change-Id: I167027afde3cee40a3b52adfaec7bde91ba896da Related: OS#6349
2024-01-23osmo-bts-trx: add test VTY command to send arbitrary TRXC messagesVadim Yanitskiy3-3/+41
Change-Id: Iabc9b702e5f1513187e24f45d9ffe06ea940c3ec
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 Welte5-5/+24
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 Welte5-4/+111
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 Eversberg6-72/+90
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-11Handle empty (idle) PDCH blocks gracefullyAndreas Eversberg4-4/+4
An empty PDCH block contains no payload, sysmo-bts and similar BTS models crash, because they expect the msg->l2h to be set. The function l1sap_pdch_req() will not set msg->l2h for empty PDCH blocks, so these models crash. The current osmo-pcu does not send empty PDCH blocks to these BTS models. But there shouldn't be a crash, if we receive empty PDCH blocks over the PCU socket interface. Change-Id: Icb52c896766425fcf453c65530c4c0b8d06b8821
2023-12-11LAPDm: Reject (release) establishment on DCCH, SAPI 0 without L3 payloadAndreas Eversberg2-0/+22
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-12-06Transmit invalid AMR speech blocks instead of dummy FACCHAndreas Eversberg2-8/+36
Every BTS needs to have some graceful handling for the scenario where it is time to send out a speech frame on TCH DL, but there is no frame to be sent. One possible solution is to transmit dummy FACCH, but this option is unattractive for TCH/AHS where FACCH displaces two speech frames rather than one. A more elegant solution is to emit a speech frame that is bad, causing the MS receiver to declare a BFI condition to trigger substitution and muting procedure. A bad frame is generated by gsm0503_tch_{afs,ahs}_encode() by setting the payload length to 0. Depends: libosmocore.git I82ce2adf995a4b42d1f378c5819f88d773b9104a Related: OS#6049 Change-Id: I056f379715c91ad968f198e112d363a9009dc1c3
2023-12-01Use uniform log format for default config filesAndreas Eversberg11-7/+44
Related: OS#6272 Change-Id: I08b297ea78e7cd60f28f0df79f2096f70c0692c6
2023-11-21pcuif_proto: signal BTS model via PCUIFPhilipp Maier2-1/+34
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 Yanitskiy3-14/+7
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-11-14osmo-bts-trx: use BPLEN macro instead of magic numbersVadim Yanitskiy1-3/+3
Change-Id: I7d89b2e50c7eeb54b734c4959eeeb1c63a51a315
2023-11-14osmo-bts-trx: add_sbits(): simplify, improve coding styleVadim Yanitskiy1-7/+3
Change-Id: I518a8ea268a9a6d48b04c291a03e5efbed5f571d
2023-11-10osmo-bts-trx: tx_tch[fh]_fn(): fix sending idle CSD framesVadim Yanitskiy2-20/+44
In accordance with 3GPP TS 44.021, sections 8.1.6 and 10.2.3, the transmission of idle frames to the DTE is mandated when no data is received from the radio interface. An idle frame has all data, status, and E-bits to binary '1' (excluding the alignment pattern). This requirement is currently implemented for the Uplink, see function csd_v110_rtp_encode(). However, 3GPP TS 44.021 does not explicitly specify whether the same rule is applicable to the Downlink, perhaps assuming a continuous stream of bits on the CSD-over-TDM link. Currently, we transmit a sequence of binary '0' on the Downlink instead of idle frames. * In non-transparent (RLP) mode, whether all bits in a block are set to binary '0' or '1' has no impact, as both scenarios lead to an incorrect FCS. * In transparent sync mode, any filling be it binary '0' or '1' is perceived as incorrect or unexpected. * In transparent async mode, it is more logical to transmit a sequence of binary '1,' which will be interpreted as a sequence of stop bits. Let's align the Downlink with the Uplink for consistency and transmit idle frames when no data is available for transmission. The modified 60-bit V.110 frames exclude the alignment pattern, so sending a sequence of binary '1' is enough to achieve the intended goal. Change-Id: I0b25cfac41b6d8dcf3bfd9d46d51a9665f1b047a Related: OS#1572
2023-11-10osmo-bts-trx: tx_tch[fh]_fn(): rework generation of dummy FACCHVadim Yanitskiy2-28/+43
Even though it might have a somewhat higher performance impact, opting for the common code path for FACCH by allocating a msgb on heap is more favorable for both readability and maintainability. This choice is preferred over directly calling gsm0503_tch_fr_encode() and then using a 'goto' statement. A similar strategy will be adopted in an follow up patch for CSD. Change-Id: I67cb5c6f4d15149996e17c78a59d66db396da8ff Related: OS#1572
2023-11-09osmo-bts-trx: tx_tch[fh]_fn(): use BUFPOS macro everywhereVadim Yanitskiy2-3/+3
For the sake of consistency. Change-Id: I16ce4c979c5b44fd67324eb2ed3da28a4b78221b Related: OS#1572
2023-10-27ASCI: Add library requirements for uplink access to TODO-RELEASEAndreas Eversberg1-0/+1
Related: OS#4851 Depends: libosmocore.git Ibd6a1d468a70126a8f67e944fcb916969cc3c36b Change-Id: Ic7807b69bbecd84b7a30d45b599b688acfd2ddc0
2023-10-27ASCI: Control uplink access bursts detection of physical interfaceAndreas Eversberg6-11/+62
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: Enable voice group/broadcast call feature at osmo-bts-trxAndreas Eversberg1-0/+2
Related: OS#4851 Change-Id: I3a2e3f94812cec0bbf7e3674172437fa359d014c
2023-10-27ASCI: Add control of uplink access to osmo-bts-sysmoAndreas Eversberg3-2/+22
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: I61f232aa91191dae08404c1f08cad91964d74568
2023-10-27ASCI: Add control of uplink access to osmo-bts-trxAndreas Eversberg3-4/+47
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-25trx_if: Allow calling trx_if_flush/close from within TRXC callback (v2)Pau 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-16pcuif_proto: clean up last remains of old PCUIF v10Philipp Maier2-6/+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-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