aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-lc15
AgeCommit message (Collapse)AuthorFilesLines
2024-02-17Fix license headers.Harald Welte26-26/+26
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
2023-12-11Handle empty (idle) PDCH blocks gracefullyAndreas Eversberg1-1/+1
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-10-05Drop use of deprectated vty callback is_config_nodePau Espin Pedrol1-29/+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-09-21oml: implement handling of NM_ATT_IPACC_SUPP_FEATURESVadim Yanitskiy2-0/+37
Change-Id: I88c6c6af18be054bd152832e60c8afbbd16098a3 Depends: libosmocore.git Ia4208e10d61843dd6ae77398f6624c918dc81ea4 Depends: libosmocore.git I85316af9b57e8113077305798cb2d82a24e48e00
2023-09-15osmo-bts-{oc2g,lc15}: signal CBCH support to BSCVadim Yanitskiy1-0/+1
The model specific code seems to have everything needed for CBCH. Change-Id: I6b4d82223dc0bdcd94cd1269bfb02047cbebe480
2023-07-21ASCI: Enable UPLINK ACCESS on various BTS modelsAndreas Eversberg1-1/+1
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-05-27all models, HR1 codec: select RTP output format via vty optionMychaela N. Falconia1-0/+6
The new vty option "rtp hr-format (rfc5993|ts101318)" selects the RTP output format to be used for HR1 codec, consistently across all models. The default is set to match legacy behavior: ts101318 on osmo-bts-{lc15,oc2g,sysmo} and rfc5993 on osmo-bts-trx. On models where no legacy behavior is applicable, the default is set to rfc5993 as a forward-looking measure - see OS#6036. Closes: OS#5688 Change-Id: I168191874a062429a57904511a1e89e3f588732e
2023-05-10all models, FR/EFR UL: change SID check to _is_any_sid()Mychaela N. Falconia1-2/+2
In all OsmoBTS models in FR and EFR speech modes, as the UL traffic frame stream is passed from the PHY to l1sap and ultimately to RTP output, all passed frames are checked for SID. The Boolean result of this SID check is used in two ways: * RFC 3551 instructs that the Marker bit in the RTP header SHOULD be set in the first packet of a talkspurt after a period of silence suppression. OsmoBTS implements this recommendation by setting the Marker bit in the first RTP-transmitted non-SID UL packet that was preceded by SID. * In osmo-bts-trx only, this same SID check serves a second purpose: handling of BFI conditions depends on whether or not the last received good traffic frame was a SID. If a BFI condition is received after a non-SID traffic frame, the ECU is invoked, and if this ECU fails or when libosmocodec does not provide an ECU for the codec in use, a special FR (EFR) BFI frame of 260 (244) zero bits is emitted. Both the ECU call and the peculiar form of BFI are skipped when the last received good traffic frame was a SID. For both of the above purposes, in all BTS models, change the SID check from osmo_{fr,efr}_check_sid() to osmo_{fr,efr}_is_any_sid(). The effect of this change is that "what counts as a SID" for the just-listed purposes changes from recognizing only perfectly uncorrupted SID frames without any bit errors to recognizing all frames which the rules of GSM 06.31 (FR) or 06.81 (EFR) classify as either valid or invalid SID. Change-Id: I5c24b379deda8ae551f9924d10770da50e6acbbd
2023-05-09lc15,oc2g: fix handling of SID in EFRMychaela N. Falconia1-7/+6
Commit 32682c63f672 fixed EFR SID handling in osmo-bts-sysmo, but that fix was never propagated into osmo-bts-{lc15,oc2g} versions, which are essentially copies of osmo-bts-sysmo. Fix that oversight. Change-Id: I509c1ea374e640d819952d58592b12fa884ad9d8
2023-04-11Introduce NM FSM for GPRS NSVC objectPau Espin Pedrol1-4/+1
Change-Id: I684482064136a461d01cace3cd37afc8b68458cc Related: OS#5994
2023-04-09cosmetic: Change LOGPLCFN argument orderHarald Welte2-15/+14
As it has come up during code review of Change-ID I214af0448652a9f321ccbab77977b67663ba28f9 introducing LOGPLCNF, my approach to the strict preserval of argument order (lchan first from LOGPLCHAN and fn *after* loglevel from LOGPFN) was considered sub-optimal. I used the following spatch rule to clean this up: @@ expression lc, ss, logl, fn; expression list trailer; @@ -LOGPLCFN(lc, ss, logl, fn, trailer); +LOGPLCFN(lc, fn, ss, logl, trailer); Change-Id: Iba4a8416545673d03cb057e4855f8b1ecae3e1ec
2023-04-06Introduce NM FSM for GPRS Cell objectPau Espin Pedrol1-1/+1
Change-Id: I5fd1d17da09a5f0eee3d69fcb4788c106a240e21 Related: OS#5994
2023-04-06Introduce NM FSM for GPRS NSE objectPau Espin Pedrol1-1/+1
Related: OS#5994 Change-Id: I01eadc63214a2eb5e1bce455c7e5b62bd41905ea
2023-04-06Simplify implementation of bts_model_opstart() in all bts typesPau Espin Pedrol1-7/+2
Use mo->fi directly to avoid repeating code paths for each obj_class. Change-Id: I54632201afe87eb3e02bc75cbade163917239ab6
2023-04-06lc15,oc2g,sysmo: Update GPRS NM object state at the right timePau Espin Pedrol1-7/+1
Change-Id: I2f331954835496504f1fafa572bd46ee83b03a63
2023-04-06bts_model_apply_oml(): Improve definition of parameterPau Espin Pedrol1-1/+2
The param is usually called obj_class, but here it is called kind. In any case, change the param to pass the related struct gsm_abis_mo (which still contains mo->obj_class), similar to what's done in other bts_model functions such as bts_model_opstart(). Change-Id: Ife2e98a791455d5f7e7052356d559af2f1d4d185
2023-04-06oml: Get rid of unused tlv_parsed param in bts_model_apply_oml()Pau Espin Pedrol1-2/+1
This way we simplify the common lower level interface. It can be added in the future again if it is really required at any point to pass/use specific TLV values in the device-specific code. Change-Id: I64c6c6834e277b1d75a97d6f408e7e1b7ca85832
2023-04-06nm: Drop NM_EV_SETATTR_{ACK/NACK}Pau Espin Pedrol1-11/+2
Simply return error codes from lower layer implementations, and do the OML handling in the common NM TS 12.21 FSMs. As a result, we simplify the logic in the lower layers. Change-Id: I281c07bb5ad88ee03542f092141cebe036d10aee
2023-04-05nm: Apply BTS/TRX/TS OML Attributes through NM FSMsPau Espin Pedrol1-2/+1
This way we have further control on how to handle the SetAttr meessages received. For instance, NACK them if the NM object FSMs are not at the expected correct state. The originating msgs are now kept owned and freed by the OML layer (oml.c), and the NM FSMs only uses them and create new OML msgb when answering with ACK/NACK. Related: OS#5992 Change-Id: Id68868e25bbf96227ab6459fcd3c9181852ed28e
2023-04-04bts_model_apply_oml(): Drop unneded codePau Espin Pedrol1-8/+0
Calls to bts_model_apply_oml() are done only for BTS, RCARRIER and RCHANNEL NM Objects in their respective Rx code paths (and they will be moved to respective FSMs in follow up patches). This function is never called with any of the GPRS NM objects. These NM Objectes have the NM_MT_IPACC_SET_ATTR msg ACKED/NACKED in its own path: oml_ipa_set_attr() rc = oml_ipa_mo_set_attr() return oml_fom_ack_nack(msg, rc); Change-Id: I1a0d38a122f50ffe749ebc4f1cc11235ca516586
2023-03-31Replace explicit gsm_lchan_name() calls with LOGPLCHANHarald Welte1-69/+34
There was a surprising number of explicit gsm_lchan_name() calls from within log message code. Let's avoid that whenever possible and use a LOGPLCHAN() or related macro. Change-Id: If4f4f555f5ca61dfa624b298805f5375efc0b137
2023-03-29lc15: fix compiler warning about unused variable cell_sizeHarald Welte1-3/+4
oml.c: In function ‘bts_model_apply_oml’: oml.c:1814:17: error: variable ‘cell_size’ set but not used [-Werror=unused-but-set-variable] 1814 | uint8_t cell_size; | ^~~~~~~~~ Change-Id: I0bf1542f613f613d03609d50836137ff440401af
2023-03-29cosmetic: Remove "FIXME?" from Odd AMR CMI phaseHarald Welte1-1/+3
This default phase of the Codec Mode Indication in downlink direction is called "odd", which is defined by starting with CMC in every 26 multiframe. At call set-up, after every successful handover and after a channel mode modify, the default phase (odd) shall be used in downlink direction. During a call, the phase of Codec Mode Indication may be changed in downlink by using a RATSCCH message. As we don't implement RATSCCH, odd is always correct. Change-Id: Ia64767fbfdc3fb067d72dbf5eabb1d84e3868ce5
2023-03-29lc15/oc2g: remove unused variablesHarald Welte1-3/+0
oml.c: In function ‘l1if_rsl_chan_mod’: oml.c:1980:22: error: unused variable ‘i’ [-Werror=unused-variable] 1980 | unsigned int i; | ^ oml.c:1979:35: error: unused variable ‘s4l’ [-Werror=unused-variable] 1979 | const struct lchan_sapis *s4l = &sapis_for_lchan[lchan->type]; | ^~~ oml.c: In function ‘l1if_rsl_chan_mod’: oml.c:1985:22: warning: unused variable ‘i’ [-Wunused-variable] 1985 | unsigned int i; | ^ oml.c:1984:35: warning: unused variable ‘s4l’ [-Wunused-variable] 1984 | const struct lchan_sapis *s4l = &sapis_for_lchan[lchan->type]; | ^~~ Change-Id: Ieb8882bbade7f6d6628c9c00150bcf54e3a9dc75
2023-03-29lc15: Remove unused warningHarald Welte1-1/+0
l1_if.c: In function ‘activate_rf_compl_cb’: l1_if.c:1251:22: error: unused variable ‘i’ [-Werror=unused-variable] 1251 | unsigned int i; | ^ Change-Id: I23270dfe6779321e514c71184b3c71f52a9b4c4a
2023-03-29lc15: fix compiler warning about wrong indentHarald Welte1-2/+2
l1_if.c: In function ‘activate_rf_compl_cb’: l1_if.c:1280:17: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 1280 | if (bts_lc15->led_ctrl_mode == LC15_LED_CONTROL_BTS) | ^~ In file included from ../../include/osmo-bts/dtx_dl_amr_fsm.h:3, from ../../include/osmo-bts/msg_utils.h:8, from l1_if.c:55: l1_if.c:1282:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 1282 | osmo_fsm_inst_dispatch(trx->mo.fi, NM_EV_DISABLE, NULL); | ^~~~~~~~~~~~~~~~~~~~~~ Change-Id: I00ae3faf0f85fecf6e15e71dff071165725e547c
2023-03-29cosmetic: use __func__ instead of __FUNCTION__Harald Welte1-1/+1
Our linter would complain about this these days: __func__ should be used instead of gcc specific __FUNCTION__ Change-Id: I80bf6d0a89ce6454ae063759d6088a28b04670c0
2023-03-28bts-{sysmo,oc2g,lc15}: Dump logical channel params during MPH-ACTIVATE.reqHarald Welte1-0/+3
So far we only printed it during later modification. Let's print it also during initial activation of a logical channel. Change-Id: I6982a52905e4719e2e9c40630252ffef2ff9fbed
2023-03-28bts-{sysmo,oc2g,lc15}: Fix RTP of AMR SID_FIRST_P1Harald Welte1-8/+2
When we receive a SID_FIRST_P1 frame from the PHY (during AMR/HR DTXu), we must generate a SID frame on the RTP side. The existing code * ignored that the Amr_SidFirstP1 PHYIF message actually contains the RTP payload * manually generated the same content using osmo_amr_rtp_enc() * forgot to prefix that with the AMR CMR+TOC * in the end, sent a completely broken (too short) AMR SID frame over RTP Let's fix this by simply using the 7-byte RTP payload with CMR+TOC that the PHY is providing to us. Change-Id: I90479efcc002d497648a71e73847af54e6208358 Related: OS#5944
2023-03-28Introduce LOGPLCFN() for logging lchan-name + frame numberHarald Welte2-24/+22
So far, we've had LOGPLCHAN() and LOGPFN(). This resulted in a number of log lines containing frame numbers *not* containing the lchan context, which makes it difficult to deterine which of potentially many concurrently active lchans is logging. Let's introduce LOGPLCFN() for a FN-extended version of LOGPLCHAN(), and convert all callers that have the related context. Change-Id: I214af0448652a9f321ccbab77977b67663ba28f9
2023-03-27DTX: bts-{sysmo,oc2g,lc15}: Print DEBUG messages about ONSETHarald Welte1-0/+2
We're printing DEBUG messages for all other DTX frames, but not for ONSET. This made me think that we never received any ONSET frames when looking at log output. Let's add ONSET for completeness. Related: OS#5944 Change-Id: I9a1511d9929444cef96388492d907e8f3a082311
2023-03-24osmo-bts-{sysmo,lc15,oc2g}: fix segfault in ph_tch_req()Vadim Yanitskiy1-2/+1
ph_tch_req() is a recursive function and conditionally calls itself at the very bottom. The recursive call happens iff all of the following conditions are met: * DTXd is enabled, * AMR codec is in use, * DTX DL AMR FSM state is recursive. The problem is that ph_tch_req() may pull sizeof(*lsap) from the given msgb twice: during the initial and the recursive calls. The second attempt to pull sizeof(*lsap) causes the process to abort, because the remaining room is less than it's attempting to pull. AFAICT, doing msgb_pull() is not really necessary, given that l1sap_tch_rts_ind() thankfully does set msg->l2h before pushing the lsap header in front of the actual frame. Update osmo-bts-sysmo and its copy-pasted siblings, which are likely affected too, except osmo-bts-octphy which does not do the recursion. Change-Id: Ib349b74a9e4bd48c902286f872d3b0e9a068256c Related: OS#5925
2023-01-02osmo-bts: Transition to use of 'telnet_init_default'arehbein1-1/+1
Related: OS#5809 Change-Id: I2da7d7bf2b07b6736ab09a11ec37afc12f5ec075
2022-09-06Depend on libosmo-netifPau Espin Pedrol1-0/+2
This library will be used soon when adding Osmux support to osmo-bts. Furthermore, it nice to have it available to make use of other general interfaces to create connections, primitives, RTP and AMR related functionalities, etc. Related: SYS#5987 Change-Id: I49db4de715065c083e1249cbeae6298d6868e229
2022-08-11Clean up osmo-bts-*/Makefile.amPau Espin Pedrol1-16/+78
Make them more easy to read and edit by splitting to one element per line when several elements are present. Change-Id: I24ecfa1167b806dcb3a5a0c00343299df842a78b
2022-04-25src/common/bts.c: set BTS_FEAT_PAGING_COORDINATIONOliver Smith1-1/+0
I did not realize with my previous patch that there's a common place where features available for all backends should be enabled. So move it there. Related: SYS#5922, OS#5538 Change-Id: Id688ddae5cd714355fcc5324f33c9397fecae261
2022-04-21model_init: set BTS_FEAT_PAGINATION_COORDINATIONOliver Smith1-0/+1
According to osmo-bsc I0e80ca5afc06737273b6699bde6e325e454b57f6, the PAGING_COORDINATION feature should be well supported in osmo-bts. Adjust the bts_model_init functions to report this to the BSC, so it properly sets this in SI13 and so we can avoid this notice in the log: Get Attributes Response: reported feature 'PAGING_COORDINATION' is not supported, while we thought it is. Related: SYS#5922, OS#5538 Change-Id: Ib06829501f4221a7f7b0344ec7991ceba74e7641
2022-04-21model_init: order features alphabeticallyOliver Smith1-5/+6
Make it easier to compare the lists of features. Related: SYS#5922, OS#5538 Change-Id: I67887d89912d963fbbe90590c8467cbbd2566e09
2021-11-25[lc15,oc2g,octphy] Fix memory leak on write queue overflowHarald Welte1-1/+6
Callers of osmo_wqueue_enqueue must always check the return value and free the message themselves in the error case. Change-Id: Ic67fbef23e419c0c8a7bcfb16d134e1bf649de72 Related: OS#5329
2021-10-14Move lchan_init_lapdm inside lchan_set_state(LCHAN_S_ACTIVE)Pau Espin Pedrol1-4/+0
osmo-bts-trx/l1_if.c lchan_init_lapdm() for CCCH is already done when trx_set_ts_as_pchan() calls: "lchan_set_state(&ts->lchan[CCCH_LCHAN], LCHAN_S_ACTIVE);" Change-Id: I7a9c3660b9aab57ff8765e2f1526349599630cd9
2021-09-30lc15, oc2g, sysmo: fix show dsp-trace-flagsEric1-1/+1
This was colliding with the global "show trx" command introduced a few years ago, and prevented both command from working. Change-Id: I57f9515292f7bd906599e2cc277542bfaf3b657b Related: OS#5080
2021-09-22nm_*fsm: Make FSMs aware of object being properly configured or notPau Espin Pedrol1-6/+31
This will allow in the future advertising children objects that the parent object has been configured. It is useful for instance to let TRX know that the BTS is configured. Change-Id: Ie319465fd0e991bab8451ea34ec72ff3702533d2
2021-09-20Allow setting administrative state through oml_mo_state_chg()Pau Espin Pedrol1-5/+5
This way it can be changed together with operative/availability state, and changes announced to the BSC if present. This commit presents no real change in osmo-bts behavior, since the only place where adm_state is passed different than -1 is in st_op_disabled_notinstalled_on_enter(), which is actually never called (yet) since it's the initial state and no other states transition later to it. However, this will change in the future once we support re-connecting to a (possibly different) BSC, which means objects will need to be moved to that state to restart the whole OML install procedure on the new BSC. Change-Id: Ifdc6a1dfb673c0ab915ddf2a9d372928f4f86b4c
2021-07-05Rename osmo dyn ts enums to contain SDCCH8Pau Espin Pedrol2-7/+7
They will gain support to be activated as SDCCH/8 soon too. Related: SYS#5309 Depends: libosmocore.git I56dcfe4d17899630b17f80145c3ced72f1e91e68 Change-Id: Ia617d20fc52f09dbab8f4516c06fa1efac08e898
2021-06-04[VAMOS] common/oml: generalize checking BTS_FEAT_MULTI_TSCVadim Yanitskiy1-15/+0
Change-Id: Iaa5aced70e166963106c27ebdb09adaae22daea4 Related: SYS#4895, OS#4941
2021-05-23[VAMOS] gsm_data.h: introduce and use BTS_TSC macroVadim Yanitskiy1-3/+3
Change-Id: I0cf915d2d3a640aa1442cf6abe9a314261b4a64e Related: SYS#5315, OS#4940
2021-05-17sysmo,oc2g,lc15: Make RadioChannel MO depend on RadioCarrier MOPau Espin Pedrol1-0/+1
lower layer specific APIs require first to enable the TRX object (GsmL1_PrimId_MphInitReq, which requires ARFCN received during Set Radio Carrier Attributes) before enabling the per-TS structure. Hence, OPSTART must happen in RCARRIER MO before OPSTART can be sent to the Radio Channel MOs, otherwise the initialization of the TS objet will fail and OPSTART for the RadioChannel MO will send back a NACK. In order to avoid this, we need to keep the RadioChannel MO announced as "Disabled Dependency" until RCARRIER is OPSTARTed. Related: OS#5157 Change-Id: I8c6e5ff98c32a3cd5006f5e5ed6875bcabb1d85f
2021-05-09osmo-bts-{lc15,oc2g}: drop redundant checks in VTY commandsVadim Yanitskiy1-46/+4
Change-Id: I4fea6d661b7193c3a04e88c9399a9e2bc402254f
2021-04-20lchan2lch_par(): fix missing default branch in switchVadim Yanitskiy1-6/+17
New channel mode values have recently been added with change [1] to 'enum gsm48_chan_mode'. The lack of default branch in lchan2lch_par() caused build failures on Jenkins: oml.c:956:2: error: enumeration value ‘GSM48_CMODE_SPEECH_V2_VAMOS’ not handled in switch [-Werror=switch] oml.c:956:2: error: enumeration value ‘GSM48_CMODE_SPEECH_V3_VAMOS’ not handled in switch [-Werror=switch] oml.c:956:2: error: enumeration value ‘GSM48_CMODE_SPEECH_V5_VAMOS’ not handled in switch [-Werror=switch] This function is duplicated in osmo-bts-{lc15,oc2g,octphy,sysmo}, so we unfortunately need to apply the same fix to all copy-pasted files. Change-Id: I557ff8cac6564d22485c101fba9212f5f0e95bb7 Related: [1] Ie0ea592da5610ae70290106d004e549cf3212a89
2021-02-03Use osmo_fd_*_{disable,enable}Harald Welte1-4/+4
Depends: libosmocore.git Idb89ba7bc7c129a6304a76900d17f47daf54d17d Change-Id: I0da17d851ccb83c28a70c9039d0a4d1fe63da0ec