aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
6 dayscbsp_link.c: Update somo_stream read_cb2 functions to accommodate for new ↵HEADpespin/streammasterPau Espin Pedrol1-2/+35
API param libosmo-netif (not yet released) stream_{cli,srv} osmo_io read_cb API was updated to provide read result status. Hence, now API users can account for lower layer errors and act properly, like it used to do with the previous ofd backend. This commit partially reverts some error code paths removed in 85687bf176e4b9663f2396a27c28b49221c72fa3 when converting code to use osmo_io osmo_stream backend. Change-Id: I4cce5cb6ca98bc28a67dd6e927e9cdfd2312851a Depends: libosmo-netif.git Change-Id I395c75ff1e9904757ce1d767a9ac2f779593c4c8
7 dayslb: Log name of unhandled sigtran primitivePau Espin Pedrol1-2/+3
Change-Id: I2d71fd347af404c025fc6b13e96f1964e685db05
2024-03-04CBSP: Port over to use osmo_io via libosmo-netifHarald Welte1-44/+11
Change-Id: Icce412e6ee69366c7b131c9bc1d51e8d44204917 Depends: libosmocore.git Change-Id I5e922c54b3431d759b38e81e55076125c5a34008 Related: OS#5755
2024-02-24ctrl: Add lchan show to all ctrl levelsMatan Perelman5-29/+204
This new commands show information about logical channels: net.btsN.trxM.tsI.show-lchan.full net.btsN.trxM.show-lchan.full net.btsN.show-lchan.full net.show-lchan.full Change-Id: I23c1a7e6f6679e3964e359fb202ffe6781a07e8a
2024-02-20ctrl: Add lchan showMatan Perelman1-0/+77
This new command shows information about a logical channel using net.btsN.trxM.tsI.lchanL.show.full Change-Id: I5432800eae452b6df71a151a7649f228704ed0da
2024-02-19bsc_ctrl_lookup.c: Use AGPLv3, not GPLv2Harald Welte1-3/+3
I guess it must have been a mistake when introducing this file. The entire project is under AGPLv3, it doesn't make sense to have one single file under GPLv2. As th entire git commit history only contains sysmocom employees, I have the authority to re-license it even if GPLv2 was done intentionally at the time. Let's change it. Change-Id: I5e5385f7630b41f1c4ad9534dbb4551e597ad596
2024-02-19Fix license header in various source code files.Harald Welte10-10/+10
IF we say "... under the terms of the GNU Affero General Public License" then we cannot say "see the GNU General Public license" later on, that's misleading and likely a copy+paste error somewhere. The project license has always been AGPLv3-or-later. Change-Id: I6b8ad5147ca76052213809e67856dcb80bff2b93
2024-02-17ctrl: Add ms powerMatan Perelman4-0/+95
This new command allows to control MS power level for a specific logical channel using net.btsN.trxM.tsI.lchanL.ms-power This patch also adds a lchan node to the ctrl interface. Depends: libosmocore.git Ibf2786f668ee7e4f5b6a9ef43f2141cd2d79b4e2 Change-Id: I6f556b66011be6126d6bac31a14101ba37f81cc4
2024-02-08ctrl: Split bts_trx_ts_ctrl from bts_trx_ctrlMatan Perelman3-98/+107
Besides from making the ts ctrl interface follow the convention of being in its own file, it will be used in the next patch to add a ctrl interface for lchan. Change-Id: I9840bddd4eae409bc8373912d54b6bbfc9fc1c1a
2024-02-07ctrl: Remove unused vty includesMatan Perelman2-6/+0
Change-Id: Ib464d0be9df839740a648ff6747130c18d33455d
2024-02-05abis_nm: fix -Wunused-but-set-variable (bug)Vadim Yanitskiy1-1/+1
clang warns us about 'len' being set, but not used: And this is abis_nm.c:2172:10: warning: variable 'len' set but not used [-Wunused-but-set-variable] uint8_t len = attr_len; ^ This is actually a bug, because in the case of NACK we append 2 more bytes {NM_ATT_NACK_CAUSES, NM_NACK_OBJCLASS_NOTSUPP}, and we need to pass the final length to fill_om_fom_hdr(), including those optional two bytes. Passing 'attr_len' (length of 'attr') is wrong. Change-Id: I3ca8e761fdf99dd498a979ccc9d53c6c3e03e2cc
2024-02-05abis_nm_sw_act_req_ack: attr_len should be unsignedPau Espin Pedrol1-2/+7
Change-Id: I5c0ba76b5cc2464c7e362a850325c94770f38397
2024-02-03abis_nm: misc/cosmetic changes to abis_nm_sw_act_req_ack()Vadim Yanitskiy1-7/+6
Change-Id: I2849a22647805e7477d66055c18614a3a9f80748
2024-02-03lchan_fsm: fix -Wgnu-designator warnings printed by clangVadim Yanitskiy1-2/+2
Change-Id: I48baef2e2b31f639281a455b2c3b07fd4f7af591
2024-02-03bsc_ctrl: do not overwrite rc in bsc_base_ctrl_cmds_install()Vadim Yanitskiy1-1/+1
Change-Id: Ie4242be1d3e58d7e37938d9ccbeffcb2b442632f
2024-01-24Add vty commands "no gprs nsvc ..."Andreas Eversberg2-0/+31
A switch (bool) is used to enable or disable NSVC 0 or 1. It is enabled via any "gprs nsvc 0|1" command and disabled via "no gprs nsvc 0|1" command. If it is disabled, it is treated as unconfigured, similar when no remote IP or port has been defined. Related: OS#6006 Change-Id: Ia112e86aa35f6a245d98ef1b3720c18835faeda6
2024-01-24VTY: Add command `show bts brief`Andreas Eversberg2-9/+32
This line shows all BTS an their OML states in a single line. Additionally the uptime or downtime is displayed, if there was a connect or disconnect of the OML link. Related: OS#6018 Change-Id: I003fd32e589ddf53b7dd42089f904cfb598e3625
2024-01-24Also track downtime when OML link is lostAndreas Eversberg5-10/+14
This will be used in a later patch to dertemine when a BTS became offline. Related: OS#6018 Change-Id: I1776099cbfef51af1d5a3a056fb0654abd7366a9
2024-01-16vty: show mscs: add BSSMAP stateOliver Smith2-2/+6
New output: OsmoBSC> show mscs MSC 0: RI=SSN_PC,PC=0.23.3,SSN=BSSAP <-> RI=SSN_PC,PC=0.23.1,SSN=BSSAP ASP protocol: m3ua BSSMAP state: CONNECTED Closes: OS#6741 Change-Id: I23ddba7d935e5cc5dae041458207c674ccb9d013
2024-01-16vty: show mscs: tweak outputOliver Smith1-2/+4
Make the output more readable and split it over two lines, in preparation to add more information in the next patch. Before: OsmoBSC> show mscs 0 m3ua RI=SSN_PC,PC=0.23.3,SSN=BSSAP RI=SSN_PC,PC=0.23.1,SSN=BSSAP After: OsmoBSC> show mscs MSC 0: RI=SSN_PC,PC=0.23.3,SSN=BSSAP <-> RI=SSN_PC,PC=0.23.1,SSN=BSSAP ASP protocol: m3ua Related: OS#6741 Change-Id: I70ad1b0f44f2a923248f4e3259747cb3fec98fd2
2024-01-14ctrl: Add ms max powerMatan Perelman1-0/+2
Change-Id: I703057b0ad15ca56abf2b6223d5a5f4b33d944d8
2024-01-14ctrl: Add rach max transmissionMatan Perelman1-0/+34
Change-Id: I34c92cbbcaa46235481a491f4c6ff723b671fff1
2024-01-10vty: disallow combination of early-IA and frequency hoppingNeels Hofmeyr2-3/+32
Related: osmo-bts Id9a930e5c67122812b229dc27ea2bfe246b67611 Related: SYS#6655 Change-Id: I8d375e5155be7b53034d5c0be5566d2f33af5db0
2024-01-08fix spelling s/omso/osmo/ in bts_variant_namesHarald Welte1-1/+1
Change-Id: I37949c286498d99ecfdd3c36961226fefdc000ec
2024-01-06ctrl: Fix missing reply in set_bts_cell_reselection_offsetMatan Perelman1-0/+1
Change-Id: Iacdb192dc15ab7e10e06c0dfe0984fc8a5727ecc
2024-01-04vty: Ensure radio-link-timeout is a multiple of 4Matan Perelman1-1/+8
According to Table 10.5.2.3.1 in TS 144.018, radio-link-timeout values are between 4 to 64 in steps of 4. Change-Id: I733591d5f72f2e4f822761ca9eda85de7a4c6c81
2024-01-04ctrl: Add radio link timeoutMatan Perelman1-0/+51
Change-Id: Ic9532d4b051d34e71c91aaff545fb3dfa7d7c8b2
2024-01-02ctrl: Add rach expiry timeoutMatan Perelman1-0/+2
Change-Id: I74a402a3800d245e4bc3052ccb53d8d2660e9f52
2024-01-02abis_rsl: Add rach expiry timeoutMatan Perelman3-3/+18
This allows controlling the RACH DoS attack protection without increasing call drops rate. Change-Id: Iff7266672dd8bc9ce2b34b0478d98fb70691f425
2023-12-27VTY: fix config indentation for pcu-socket paramsKeith Whyte1-2/+2
osmo-bsc would not start with a config written from the vty due to incorrect identation on the pcu-socket parameters. Change-Id: I36a66794e654989b4b8bf54bb3727ccbfc2131fa
2023-12-27ctrl: Add rxlev access min controlMatan Perelman1-0/+36
Change-Id: I25bf4bb11bf8e34e80f740fb89a467fc6e491962
2023-12-12vgcs_fsm: fix NULL pointer dereference in vgcs_call_fsm_busy()Vadim Yanitskiy1-1/+3
Change-Id: I14ad41bfa1ab3455a6a175cfb05341ca12c8d73e Fixes: CID#322299
2023-12-11Only check for intersecting AMR codec support on matching TS rateAndreas Eversberg1-14/+20
Only check for intersecting full rate AMR codec, if the BTS has at least one full rate or dynamic time slot configured. Only check for intersecting half rate AMR codec, if the BTS has at least one half rate or dynamic time slot configured. Related: OS#5926 Change-Id: Ia4a8e7f22dc652655ee7c5458624df8ae136dd95
2023-12-09gsm_data: use ABIS_RSL_CHAN_NR_CBITS_* in gsm_pchan2chan_nr()Vadim Yanitskiy1-11/+7
Change-Id: Ic9370d8d7f13cce0f9c6e60a920d04161a7d6844
2023-12-09gsm_data: fix wrong variable set in gsm_pchan2chan_nr()Vadim Yanitskiy1-2/+2
I believe the actual intention was to reset the 'lchan_nr' variable, and not the 'chan_nr'. The 'lchan_nr' is used to compose the 'cbits': cbits = 0x04; cbits += lchan_nr; If the value is 4, then the result is: cbits = 0x04 + 4 = 0x08 which corresponds to SDCCH8 (not SDCCH4), and is clearly wrong. Change-Id: Ic9c7c2e46e24dab0b721221e9adcbbae2ca56d23 Fixes: ec1b5a0e9 "gsm_ts2chan_nr(): add assertions for lchan_nr" Fixes: CID#336586
2023-11-27recover BORKEN lchans for missing ACK scenariosOliver Smith2-0/+101
We already recover broken lchans where an ACTIV ACK or REL ACK arrives late. Now add a recovery path for lchans that are broken because no ACTIV ACK or REL ACK arrives at all. Add a timeout of X28 = 30s to the lchan BORKEN state. On timeout, attempt both a Channel Activation and a Channel Release. If any of them is ACKed, we have successfully synced BTS and BSC's state. After successful recovery, place the lchan back in the UNUSED state, available for servicing subscribers. If recovery is unsuccessful, just continue to attempt recovery every further X28 seconds. Patch-by: osmith, nhofmeyr Related: osmo-ttcn3-hacks I9b4ddfc4a337808d9d5ec538c25fd390b1b2530f Related: OS#5106 Related: SYS#6655 Change-Id: Ic4728b3efe843ea63e2a0b54b1ea8a925347484a
2023-11-27ASCI: Repeat notification after assigning MS to VGCS/VBS channelAndreas Eversberg1-0/+2
The assignment is repeated because the calling subscriber may not receive the notification on the DCCH, during handover process. After the assignment is complete, the calling subscriber will receive notification. This cannot be done automatically by the BTS, because the BTS has no relation between the notifications and the channels. The notification is required, so that the MS knows the channel to listen to when leaving the uplink the first time. If no notification is received, the MS will abort the call. Change-Id: Ife568b8c2756be332c0b8de21111f66f6e537c4d
2023-11-24bsc: Make socket queue max. length configurablearehbein3-4/+30
Title refers to the maximum length of the osmo_wqueue used for the PCU socket connection. Related: OS#5774 Change-Id: Ic5f19f4613bccaf582997a4d02b689adee083a0b
2023-11-22use X6 timer for REL ACK, not T3111Neels Hofmeyr1-1/+1
The lchan FSM timers were originally implemented to model earlier code as closely as possible. Now it has come up that T3111 is used in the wrong place: 3GPP TS 44.018 says: T3111: This timer is used to delay the channel deactivation after disconnection of the main signalling link. Its purpose is to let some time for possible repetition of the disconnection. Its value is equal to the value of T3110. Before this patch, we use it also to time the RF REL ACK message. That is pretty bad, because T3111 is only 2 seconds by default, making RF CHAN REL vulnerable for timeout. When a user increased T3111 to alleviate the problem, the result is that each lchan also delays its normal channel release procedure by the configured amount of time. Very inelegant. Instead, use the X6 timer for REL ACK, because X6 already times the CHAN ACTIV ACK, which is semantically identical. Compatibility / user impact: No negative impact expected. We can assume that every user out there has X6 configured to work for CHAN ACTIV ACK. From that logic, switching channel release ACK to the same timer is guaranteed to be what the user intends. We could instruct users in the release notes that they may now choose T3111 freely (as short as 2 seconds) without jeopardising channel release anymore. Related: SYS#6655 Change-Id: Ibd118fa23e5deb4381bc31b11a7b495f57901d6c
2023-11-21pcuif_proto: signal BTS model via PCUIFPhilipp Maier1-0/+8
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: I4b58912ad7be3070829614853901aa19108ba2c0
2023-11-07ctrl: Add cell barredMatan Perelman1-0/+34
Change-Id: I6dc45fa1d76707be0d9f9d4391550be598ed0a6d
2023-11-06SI10: Fix uninitialized last_i indexAndreas Eversberg1-3/+2
Not only l_bts must be declared outside the for-loop, but also last_i. This is a fixup of I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c. Related: CID#330311 Change-Id: Ia10c5e68cb2940d9360d78f606af25bb207ee55f
2023-11-01SI10: Fix uninitialized l_bts pointerAndreas Eversberg1-2/+3
l_bts must be declared outside the for-loop. If the loop is passed with n_bts set the first time, l_bts is set. If the loop is passed with n_bts set next time(s), l_bts is used to encode additional neighbor cell infos. Related: CID#330310 and CID#330311 Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
2023-10-24osmo-bsc: Have PCU socket connection use osmo_wqueuearehbein1-63/+36
Close PCU socket on write queue overflow. Related: OS#5774 Change-Id: Ifd9741045a87338e17eec3492590a5de9c308cb5
2023-10-24pcuif_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: Iebb3a634fee680bdc3636a61f3ccaa1e97e54a64
2023-10-23ASCI: Add System Information 10 supportAndreas Eversberg2-2/+307
For each BTS, an SI 10 is generated with the informations about all neighbor BTS that have the same group/broadcast call. The SI 10 will only define neighbor cells within the same BSC, because it does not know about neighbor cells within other BSCs. When multiple channels are used for a group/broadcast call, the SI 10 is generated after all channels have been activated. Subsequent channel activations result in an update of SI 10 on all channels. Change-Id: Icd3101e6dd935a57f003253aaef400c2cf95a0c3
2023-10-09ASCI: Make neigh_list_get_arfcn() available to other usersAndreas Eversberg1-9/+32
The error logging message within this function is moved to the user neigh_list_get_arfcn(). In case of an error, which results in measurement report with cell index that does not exist in the list of neigbor cells, the measurement report is truncated to 0 neighbor cell measurements. Change-Id: Ia8a1dca4837536129d17e7784b892bcb75b9ca4b
2023-10-09Select correct neighbor list for measurement report decodingAndreas Eversberg1-1/+8
System Information 2 (bis/ter) uses BA_IND of 0. This refers to "neigh_list". System information 5 (bis/ter) uses BA_IND of 1. This may refer to "neigh_list" or optionally "si5_neigh_list", depending on the VTY settings. If BA_IND of 1 is received in measurement report and if the optional "si5_neigh_list" is used, this list is chosen to decode the measurement report. Change-Id: Ie9123928fb3ae6f10921ecf01d1b50330661da38
2023-10-09Do not generate 'bit map 0' neighbor lists with R-GSM ARFCNAndreas Eversberg1-2/+2
Before this patch, neighbor cells with ARFCN 955 to 974 were ignored in the GSM 900 band. This resulted an empty 'bit map 0' list in SI2/SI5 messages. This patch includes R-GSM ARFCN in range 955 to 974. A different encoding is chosen, if neigboring cells fall within this range. Change-Id: I40d024290fa4be2ba8d3149ec841b182d0cc8c1f
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: I23df067df99b76048667131905c4448d32d80640