aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-06-14release 1.2.0-fw.2fairwaves/1.2.0-fw.2fairwaves/productionKirill Zakharenko1-0/+6
Change-Id: I86d94547f13f0da7c2c6024f4a9d8641952b9766
2020-06-07osmo-bts-trx/trx_if: fix memleak in trx_ctrl_cmd_cb()Vadim Yanitskiy1-11/+12
If we do not enqueue a TRXC message, we should release memory. Change-Id: Ie2cdf547befbc0fafdb82b10b45ad85a9b188b88
2020-05-01release 1.2.0-fw.1fairwaves/1.2.0-fw.1Kirill Zakharenko1-0/+6
2020-04-26osmo-bts-{sysmo,oc2g,lc15}: fix segfault on 'dsp-trace-flag'Vadim Yanitskiy3-6/+6
== How to reproduce? phy 0 instance 0 dsp-trace-flag error dsp-trace-flag debug == What happens? Program received signal SIGSEGV, Segmentation fault. 0x432dbe64 in strcasecmp () from /lib/libc.so.6 (gdb) (gdb) bt #00x432dbe64 in strcasecmp () from /lib/libc.so.6 #10xb6ed69ec in get_string_value () from /usr/lib/libosmocore.so.12 #20x0001bcf0 in cfg_phy_dsp_trace_f () #30xb6fc1080 in ?? () from /usr/lib/libosmovty.so.4 Backtrace stopped: previous frame identical to this frame (corrupt stack?) Change-Id: I23137930f81bfa8adbb62828f341470c11202b5e
2020-04-25measurement: remove unecessary is_amr_sid_update parameterPhilipp Maier3-8/+4
The function ts45008_83_is_sub rougly decides if a frame is a SUB frame or not. This works by checking the frame number against against lookup tables. This works fine for codecs where the occurrence of SUB frames is fixed. However for AMR this is not the case as the DTX periods are dynamic. Here it is the responsibility of the lower layers (phy, frame decoding) to tag SUB frames early since making the decision later based on the frame number is not possible. The parameter is_amr_sid_update was probably added as a placeholder. It is set to falls by the callers of the function. Lets remove this parameter as a late decision if an AMR frame is a SUB frame will never work. Change-Id: I125d5ff592218a9e98130a6a7b6bbc6378ce4132 Related: OS#2978
2020-04-25dtx: add detection of AMR DTX frames for osmo-bts-trxPhilipp Maier4-13/+107
Currently we do not detect any of the DTX frames (SID_FIRST, SID_UPDATE etc.) Detecting and tagging those frames as is_sub is important for measurement processing. Also the RTP marker bit must be set on each ONSET frame. - Add detection of DTX frames - Tag DTX frames as is_sub and set frame type to AMR_SID - Set RTP marker bit when ONSET frames are received Change-Id: I5afe730fff2fa3199a5913b0de4f5c7b23a39f31 Depends: libosmocore I2bbdb39ea20461ca08b2e6f1a33532cb55cd5195 Related: OS#2978
2020-04-25oc2g: Fix mismatching signature in callback providedPau Espin Pedrol1-1/+2
Similar to what's done for lc15 in Id80d5a52cbccce54456205dec230a0b546b8b310. Change-Id: I06747d5992d09a506d26089391ef130418506333
2020-04-25oc2g: Fix returning values on void functionPau Espin Pedrol1-6/+5
Similar to what's done in I7a944c0636933c0389db9aabd8b5e6c173052f12 for lc15. Change-Id: I6f5e976969af994011bc9282ede115606f0f0d20
2020-04-25lc15: Fix mismatching signature in callback providedPau Espin Pedrol1-1/+2
Fixes following compilation warning: /osmo-bts/src/osmo-bts-litecell15/l1_if.c: In function ‘dsp_alive_timer_cb’: /osmo-bts/src/osmo-bts-litecell15/l1_if.c:1643:33: warning: passing argument 3 of ‘l1if_req_compl’ from incompatible pointer type [-Wincompatible-pointer-types] 1643 | rc = l1if_req_compl(fl1h, msg, dsp_alive_compl_cb, NULL); | ^~~~~~~~~~~~~~~~~~ | | | void (*)(struct gsm_bts_trx *, struct msgb *, void *) /osmo-bts/src/osmo-bts-litecell15/l1_if.c:220:21: note: expected ‘int (*)(struct gsm_bts_trx *, struct msgb *, void *)’ but argument is of type ‘void (*)(struct gsm_bts_trx *, struct msgb *, void *)’ 220 | l1if_compl_cb *cb, void *data) | ~~~~~~~~~~~~~~~^~ Change-Id: Id80d5a52cbccce54456205dec230a0b546b8b310
2020-04-25lc15: Fix returning values on void functionPau Espin Pedrol1-5/+4
Fixes following warnings: /osmo-bts/src/osmo-bts-litecell15/l1_if.c:1722:36: warning: assignment to ‘void (*)(void *)’ from incompatible pointer type ‘int (*)(void *)’ [-Wincompatible-pointer-types] 1722 | fl1h->hw_alive.dsp_alive_timer.cb = dsp_alive_timer_cb; | ^ Change-Id: I7a944c0636933c0389db9aabd8b5e6c173052f12
2020-04-25osmo-bts-litecell15: Implement missing features.Rafael Diniz8-13/+569
Many hardware parameters of the LC 1.5 were not exposed to the user. This change introduces most of the features, being very similar to osmo-bts-oc2g code. Mostly based on commit 653e974fec00414ba85baf258ccc46ea778a53bd from NuRAN's osmo-bts fork at: https://gitlab.com/nrw_noa/osmo-bts Change-Id: Ib16e7d423fc7030573acd86fbd356ae96697ed5d
2020-04-21osmo-bts-virtual: Avoid rejecting AMR in uplinkHarald Welte1-41/+2
Change-Id: Ib527a9fe02c49f6129c376424480aa1004f9ee8f
2020-04-20fix compilation with gcc-10Harald Welte6-42/+43
/usr/bin/ld: /home/laforge/projects/git/osmo-bts/tests/sysmobts/../../src/osmo-bts-sysmo/tch.c:584: undefined reference to `femtobts_tch_pl_names' /usr/bin/ld: l1_transp_hw.o:/home/laforge/projects/git/osmo-bts/src/osmo-bts-sysmo/femtobts.h:108: multiple definition of `pdch_msu_size'; main.o:/home/laforge/projects/git/osmo-bts/src/osmo-bts-sysmo/femtobts.h:108: first defined here /usr/bin/ld: l1_transp_hw.o:/home/laforge/projects/git/osmo-bts/src/osmo-bts-sysmo/femtobts.h:71: multiple definition of `femtobts_l1prim_type'; main.o:/home/laforge/projects/git/osmo-bts/src/osmo-bts-sysmo/femtobts.h:71: first defined here see also: https://alioth-lists.debian.net/pipermail/debian-mobcom-maintainers/Week-of-Mon-20200413/000651.html Change-Id: I4a9896153876fcda496365776883827746205f00
2020-04-14logging: use only LOGL_NOTICE as defualt loglevelPhilipp Maier4-20/+20
some of the log categories in logging.c are set to LOGL_INFO or even to LOGL_DEBUG. This is too verbose. Lets set those categories to LOGL_NOTICE. Also the BTS manager programs (...bts_mgr.c) use LOGL_INFO by default. This should be set to LOGL_NOTICE as well Related: OS#2577 Change-Id: I6e7a635f9b4a93529661dafc591d512d7b7e8c75
2020-04-11configure.ac: fix libtool issue with clang and sanitizerEric1-0/+5
As pointed out at https://github.com/libexpat/libexpat/issues/312 libtool does not play nice with clang sanitizer builds at all. For those builds LD shoud be set to clang too (and LDFLAGS needs the sanitizer flags as well), because the clang compiler driver knows how linking to the sanitizer libs works, but then at a later stage libtool fails to actually produce the shared libraries and the build fails. This is fixed by this patch. Addtionally LD_LIBRARY_PATH has no effect on conftest runs during configure time, so the rpath needs to be set to the asan library path to ensure the configure run does not fail due to a missing asan library, i.e.: SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan' export CC=clang-10 ASANPATH=$(dirname `$CC -print-file-name=libclang_rt.asan-x86_64.so`) export LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS" Change-Id: I9b18ac186d5870e3a6b46678ab7fb2154c9cae07
2020-04-04scheduler: always call Uplink burst handler on NOPE.indPhilipp Maier2-36/+11
When a NOPE indication is received from the TRX normally a separate handler (.nope_fn) is called. It turned out that calling the Uplink handler (.ul_fn) on NOPE indications is the usual case, so let's remove the .nope_fn member and call the Uplink handler directly. Since a NOPE.ind comes without burst bits, the Uplink handlers must check bi->burst_len to avoid uninitialized memory access. For some logical channels (in particular RACH, PDTCH/U, and PTCCH/U) it does not make sense to call the Uplink handler, so we ignore them. Change-Id: Ice45d5986610d9bcef2a7e41f0a395ec779e3928 Related: OS#4461
2020-04-03cosmetic: remove dead code from logging.cHarald Welte1-17/+0
Change-Id: Ib70313d8f837ebac39ed8caaa80b01ffafe879d5
2020-04-01l1sap: fix gsmtap_ph_rach(): properly pack 8-bit and 11-bit RAVadim Yanitskiy1-2/+12
According to 3GPP TS 44.004, section 7.4a, two alternative RACH block formats are specified: 8 bit (1 octet) and 11 bit. The bit order is little-endian (right to left). In L1SAP PH-RACH.ind structure (see ph_rach_ind_param) we use a field of type uint16_t to store RA values regardles of the block format. Thus when packing it to bytes, we cannot just cast uint16_t* to uint8_t*, we need to do some bit shifting. Change-Id: I0e91d825bb2e1897647dd5403c311d833a89ff2e
2020-03-24VTY: add "test send-failure-event-report"Oliver Smith1-0/+20
Send test failure event report OML message to the BSC. I found this useful while manually testing related handling code in OsmoBSC. Related: OS#1605 Change-Id: I0c4eba1636d8faf5012db26643bdf1d9fb6bfa1e
2020-03-23osmo-bts-trx: do not set rx-gain to 1 by defaultPhilipp Maier2-2/+0
The sample configs supplied within the doc/trx directory set the rx-gain parameter to 1. A low value like this may cause a noticeable degration of rx performance (For an USRP B200 an rx-gain of 38dbm is recommended). Lets remove this seting from the sample configuration to allow the default settings in osmo-trx to be applied. Change-Id: I76be1739b638b3c1b0de5ac667eed53397631caa Related: OS#4467
2020-03-22trx: Use NOPE indications on SDCCHHarld Welte1-0/+12
Without using the NOPE indication it might happen that we get into the following situation: * bursts 0,1,2 of a given block are received * burst 3 is lost on the radio interface, OsmoTRX sends NOPE * osmo-bts-trx doesn't pass the NOPE the the rx_tch*_fn() * we never detect the end of the block, never perform decoding and even if the burst could be fully decoded, we loose the block Related: OS#4661 Related: OS#2975 Change-Id: Idfc5c9a23db808c5f87ef5646c7e1d1cd3127371
2020-03-22trx: Use NOPE indications from OsmoTRX for TCH/F and TCH/HHarld Welte2-4/+13
Without using the NOPE indication it might happen that we get into the following situation: * bursts 0,1,2 of a given block are received * burst 3 is lost on the radio interface, OsmoTRX sends NOPE * osmo-bts-trx doesn't pass the NOPE the the rx_tch*_fn() * we never detect the end of the block, never perform decoding and even if the burst could be fully decoded, we loose the block For voice, it can lead to lost RTP frames in uplink, which is also problematic. Let's deal with burst_len=0 in rx_tch*_fn() and use it as nope_fn. Closes: OS#4661 Related: OS#2975 Change-Id: I0fbf4617daf24bd8aecfd9cfe1efd66cf73a277a
2020-03-22trx: Fix reported BER for TCH/HHarld Welte1-2/+3
This fixes a regression introduced in I710d0b7cf193afa8515807836ee69b8b7db84a84 We (obviously!) cannot compute the BER before performing convolutional decoding. Change-Id: I4e57f45d49cb513e4843e56f50c8de6980958fdc Related: OS#2977 Related: OS#4667
2020-03-10osmo-bts-virtual: Fix "virtual-um net-device NETDEV"Harald Welte3-6/+21
The VTY option to bind the virtual Um multicast to a specific network interface has existed ever since osmo-bts-virtual was first merged to the repo. However, embarrassingly, until today it never did anything, i.e. the code to actually perform the bind was missing. Depends: libosmocore.git Ib52d22710020b56965aefcef09bde8247ace4a9c Change-Id: I303f2e616d2d32b5a8005c3dcf0f5fad19ad3445 Related: OS#2966
2020-03-10osmo-bts-virtual: Add "virtual-um ttl <0-255>" VTY optionHarald Welte6-3/+39
This can be used to determine the multicast TTL packet and hence how far the packet will propagate in the network. If you want to operate the virtual Um only on your own machine, a TTL of 0 would prevent the packets from ever being transmitted on your local ethernet segment. Change-Id: I18a9f93b764aee4e1dc68a1c6ac4d078e52ca61d Related: OS#2966
2020-03-08rsl: make IP DSCP configurableOliver Smith4-2/+27
Related: OS#4438 Depends: libosmo-abis I41603db8c1286660ad57ac1c78a8fb393a2b080b Change-Id: Icdef5d40243fefdeae23f3bcf9c6702e8487928a
2020-03-08osmo-bts-virtual: implement GSMTAP_CHANNEL_VOICEHarald Welte2-12/+79
GSMTAP_CHANNEL_VOICE is the mechanism by which GSMTAP can [finally!] be used to transport circuit-switched voice codec payload, and not just signalling. Original patch by Neels Hofmeyr, heavily extended by Harald Welte. Depends: libosmocore.git I952044a17334f35712e087dc41781805000aebc1 Change-Id: I1cd9a251ce0b87181a0822d7940bbfc9f1428543
2020-03-08l1sap: Use msgb_pull_l2() and unify l1sap_tch_ind + l1sap_ph_data_indHarald Welte1-3/+2
In l1sap_ph_data_ind() we can use msgb_pull_l2() which is an exact implementation of the functionality there. In l1sap_tch_ind(), the existing code is actually wrong by making the assumption that the msgb contains exactly an entire osmo_phsap_prim. Better to also dynamically compute the number of bytes to ensure we only pull those ahead of the L2 header, no matter what their exact count. Change-Id: I13f7f8ba93795e40b1fb4a306fe765e059f642cf
2020-03-04osmo-bts-virtual: do not log GSMTAP message sending failure twiceVadim Yanitskiy2-2/+5
Change-Id: I39e9edf35240ef31e3432412b459c2b8fb0de054
2020-03-02osmo-bts-virtual: do not print redundant info in tx_to_virt_um()Vadim Yanitskiy1-13/+2
LOGL1S() already prints enough context information. Change-Id: I29adf9360b96544b7f58766d5cd26d97117884d9
2020-02-29osmo-bts-virtual: fix wrong endianness in gsmtap_hdr_stringify()Vadim Yanitskiy1-1/+3
Change-Id: Ic9e84dc4adc44df735cba102bdace2fb1993ac8e
2020-02-29common/sysinfo: reduce criticality of a logging messageVadim Yanitskiy1-1/+1
During the process of bootstrapping, it may happen that System Information Type 3 is not yet received from the BSC, while the BTS already needs to transmit a block on AGCH or PCH. Since the RSL link is established later than the OML link, it's kind of expected, so we should not log it as error. Change-Id: I41aa3dbe375cf42c39032bafa80dba94d6219d35
2020-02-27vty: fix left shift by 31 cannot be represented in type 'int'Vadim Yanitskiy1-1/+1
Change-Id: I3e5940e8f360bf6563f4c1b5ebd09579f9108c81
2020-02-26virtual: Fix VTY commands to specify GSMTAP multicast groupsHarald Welte1-2/+2
osmo-bts-virtual uses GSMTAP over multicast groups to communicate with one or more virtphy instances. There are some well-known default multicast groups, but those can also be overridden via the VTY. The problem is: If you actually try that, osmo-bts-virtual will abort, as we try to talloc_free() when using osmo_talloc_replace_string() on the constant default string. The proper solution is to talloc_strdup() the constant default string when setting the default value in bts_model_phy_link_set_defaults(). Change-Id: Ia96fea891a22e5a3c47ce658eda130ba8d4fc411
2020-02-25cosmetic: Fix some typos with codespellPau Espin Pedrol4-5/+5
Change-Id: I1bbb4871f764816dcbba86d833194be601fa9228
2020-02-25bts-trx: trx_if.c: Fix some printf formatsPau Espin Pedrol1-3/+3
Compiler from raspberrypi4 warns/errors about those. Change-Id: I4f973eb4ffdf8869b522d14e25853357fcd1e984
2020-02-17osmo-bts-sysmo: merge measurement data and payloadPhilipp Maier8-31/+28
For osmo-bts-sysmo the MPH INFO MEAS IND indication is still sent separately. Lets merge the measurement information into the PH DATA Change-Id: Iffe7865727fbf9bca8eb32a96e8ea05cf718a948 Related: OS#2977
2020-02-17Do not depend on pcu_direct flag when populating ph_data_indPhilipp Maier3-15/+12
The struct members ber10k, ta_offs_256bits and lqual_cb in ph_data_ind are only populated when the pcu_direct flag is not set. The pcu_direct flag is set when the pcu is directly attached to the phy and all pcu related traffic (pdtch) is handled without sending it through osmo-bts-sysmo. For those cases osmo_bts_sysmo will not make use of those struct members, even if they were populated. When the PCU is not directly attached the data is needed because it is sent through the pcu_sock to the PCU. Lets remove the check because it is not required. Also in future patches where measurement indications and data / tch indicatins are merged the struct members are also needed to carry the measurement information for SACCH as well. Change-Id: Iaa37bb62af4f5eb4b6e684cb754e68d11e6fd676
2020-02-12l1sap: Change loglevel of Rx TCH.ind INFO->DEBUGPau Espin Pedrol1-1/+1
This line appears tens of times per second when a call is ongoing, making it impossible to follow logs on INFO level. Change-Id: Iadb1baf55df2f6d96f85260f2e8d03627fef7e66
2020-02-12l1_if: Fix strange formatting of Meas info loggingPau Espin Pedrol4-40/+27
Some use LOGPC, but were used after a LOGP with a trailing newline. Let's simply add some defines/macros to be able to include it into a normal LOGP easily insted of having a function. Change-Id: Ie082b11c9d6d00ff2206184f03f6e3647c3da18c
2020-01-21osmo-bts-sysmo/Makefile.am: fix: do not overwrite bin_PROGRAMSVadim Yanitskiy1-1/+1
src/osmo-bts-sysmo/Makefile.am:25: warning: bin_PROGRAMS was already defined in condition TRUE, which includes condition ENABLE_SYSMOBTS_CALIB src/osmo-bts-sysmo/Makefile.am:10: ... 'bin_PROGRAMS' previously defined here Change-Id: Ib2334dccefd507eaaa6d33e58d4c1e029d7fd540
2020-01-20l1sap: merge MEAS IND into PRIM PH DATA / PRIM TCHPhilipp Maier9-98/+127
The MPH INFO MEAS IND indication, which contains the uplink measurement data is sent in parallel to the PH DATA and TCH indications as a separate indications. This makes the overall uplink measurement data processing unnecessarly complex. So lets put the data that is relevant for measurement into the PH DATA and TCH indications directly. This change only affects osmo-bts-trx at the moment. In order to keep the upper layers (l1sap.c) compatible we add an autodection to switch between separate measurement indications and included measurement data. Related: OS#2977 Depends: libosmocore I2c34b02d329f9df190c5035c396403ca0a4f9c42 Change-Id: I710d0b7cf193afa8515807836ee69b8b7db84a84
2020-01-20measurment: write irssi_full_sum variable correctlyPhilipp Maier3-5/+5
The variable irssi_full_sum is not populated with a dummy value when we are not able to compute irssi_full_sum. Instead we mistakenly write MEASUREMENT_DUMMY_IRSSI to ber_full_sum, which is wrong Change-Id: I44d7cb48e3c68ab1b48c78cceb9381ce3e39d7e8 Related: OS#2987
2020-01-20ta_control: move timing advance code from osmo-bts-trx to commonPhilipp Maier18-81/+773
The timing advance controller that is implemented in loops.c of osmo-bts-trx only works for osmo-bts-trx and not for any of the phy based bts. Lets move the timing advance controller into the common part and make it available for every bts. Also lets add a unit-test. Change-Id: If7ddf74db3abc9b9872abe620a0aeebe3327e70a Related: SYS#4567
2020-01-14L1SAP: use LOGL_DEBUG for logging from rach_pass_filter()Vadim Yanitskiy1-3/+3
Due to relatively small training sequence of Access Bursts, there can be frequent false-positives (basically noise). Fortunately, we can distinguish them from the real Access Bursts by checking the signal measurements attached to them (BER, ToA and C/I). Let's reduce verbosity of logging messages as they are mostly useful for debugging and may confuse the users / operators. Change-Id: I7ab6727ffff00140a7f9e762b299b711481393f1
2020-01-12rsl.c: Fix compiler error on gcc-9.2.1Harald Welte1-1/+1
rsl.c: In function ‘rsl_rx_ipac_XXcx’: rsl.c:2147:39: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 28 [-Werror=format-truncation=] 2147 | snprintf(cname, sizeof(cname), "bts@%s", ipstr); | ^~ rsl.c:2147:3: note: ‘snprintf’ output between 5 and 260 bytes into a destination of size 32 2147 | snprintf(cname, sizeof(cname), "bts@%s", ipstr); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Id982a814f401e304327d25c77666f039bc156c1f
2020-01-11common/abis.c: make use of RSL TEI from OML IPA RSL ConnectVadim Yanitskiy2-2/+5
Change-Id: I5927f59a49724170a63e87be604973f7c9d5d8be
2020-01-11common/vty.c: get rid of generic exit / end commandsVadim Yanitskiy1-42/+0
Those commands are now handled by libosmovty itself. Change-Id: I425f9058ae15de929e2ba0283d4057bdf767aeeb
2020-01-06measurement: use signed integer for division of ta256b_sumMichael McTernan1-1/+1
The variable ta256b_sum is int32_t and num_ul_meas_actual is unsigned int. When ta256b_sum is negative the division produces the wrong result. This is beacuse the division is performed unsigned as the usual arithmetic conversions promote to unsigned where both both operands are the same width. Lets fix this by casting num_ul_meas_actual to signed. (Note that in the same function there are various other averages computed in the same pattern, but they have unsigned operands and so are correct.) Related: SYS#4728 Change-Id: I37e3f69109c5ca2948bd4cdb7aa017bf2fcb8172
2020-01-03Bump version: 1.1.0.95-24e7-dirty → 1.2.01.2.0Pau Espin Pedrol2-6/+117
Change-Id: Id132c615f7398402ac20d179e5917bea58ef3334