Commit Graph

24 Commits

Author SHA1 Message Date
Harald Welte a7263b6474 Fix license headers.
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-02-17 10:21:30 +01:00
Pau Espin 6be13437b7 Merge gsm_network into gsm_bts_sm and place gsm_bts under it
This way the data model in TS 12.21 (Figure 1) is followed, where
there's a BTS Site Manager containing one or more BTS. In our case we
only support 1 BTS (cell) so far.

Change-Id: Ideb0d458ec631008223f861cf8b46d09524a1a21
Related: OS#5994
2023-04-11 11:11:45 +02:00
Vadim Yanitskiy 50de553a1f tests: use -no-install libtool flag to avoid ./lt-* scripts
This option should be used for any executables which are used only
for testing, or for generating other files and are consequently never
installed.  By specifying this option, we are telling Libtool that
the executable it links will only ever be executed from where it is
built in the build tree.  Libtool is usually able to considerably
speed up the link process for such executables.

Change-Id: I06d3d5ab1dd21400a72f76eecc508886617ef4c6
2023-03-14 20:09:44 +00:00
Pau Espin 1176d1a626 tests/*/Makefile.am: Fix typo in LIBOSMONETIF_CFLAGS
Change-Id: I29d52bdacdebc0495d11425399e796fa7aef3ac4
2022-09-12 12:51:30 +02:00
Pau Espin a2dc808acc Depend on libosmo-netif
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-09-06 09:14:40 +02:00
Pau Espin d9f2cf2df6 Clean up osmo-bts-*/Makefile.am
Make them more easy to read and edit by splitting to one element per
line when several elements are present.

Change-Id: I24ecfa1167b806dcb3a5a0c00343299df842a78b
2022-08-11 21:02:00 +02:00
Vadim Yanitskiy c350b9a9f6 tests: use 'check_PROGRAMS' instead of 'noinst_PROGRAMS'
When using 'check_PROGRAMS', autoconf/automake generates smarter
Makefiles, so that the test programs are not being compiled during
the normal 'make all', but only during 'make check'.

Change-Id: I18ebb7395024a490da743c0bcb20959e6e9c7017
2022-04-15 01:01:16 +03:00
Pau Espin b1571af864 tests: Replace deprecated API log_set_print_filename
Change-Id: Ifd1ee307252d19ae535d2234523036c319e4c0ec
2021-02-19 13:51:54 +01:00
Pau Espin 3abbb67ded tests: Explicitly drop category from log
Let's disable category here since we don't care about its formatting here.

In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.

Change-Id: I8713f4e04e92b4d7e211c499fc6e78983edfb139
Related: OS#5034
2021-02-19 13:51:18 +01:00
Pau Espin 67e5a72a51 common: tx_power: Fix bug in power ramp up below max-initial value
See previous commit adding the unit test about the error description and
expected behavior.

The wrong behavior appeared due to step_size_mdB being unsigned and the
whole addition at the left side of the comparison being turned too as
unsigned, hence a small negative value turning into a big positive
value, and tpp->p_total_cur_mdBm not being updated to speed up the power
ramping.

Change-Id: I36a34362ebc90226fd8e1e190f898c3718fd923a
2020-08-18 17:22:38 +02:00
Pau Espin 1565d16a0a tests: tx_power: Extend and add extra power_ramp buggy case
The test code is extended to support testing more than one ramping loop.

A new test ramping test is added, which shows buggy behavior, since
being in -10dBm and targeting 10dBm with  max_initial_pout_mdBm=0 should
immediatelly jump -10->0 and then slowly ramp up (2dB) 0->10dB.
The issue will be fixed in next commit.

Change-Id: I5adc9008ac415eb23274755fc8270df8eebdc6fb
2020-08-18 17:22:01 +02:00
Pau Espin 7bda77928c tx_power_test: Disable using color in log output
It's really not used and only adds unneeded variabilities to output.

Change-Id: I5aa95997c8df4ce5ba8271acae99c45f68b96e11
2020-07-20 16:57:20 +02:00
Pau Espin f5e22703e7 power_ramp: Add support to get callback when ramping process completes
It will be used in forthcoming commits to feed FSM events once the
ramping process completes.

Change-Id: I778dc215cf6055b93658670cc12e78ad2e51f85e
2020-06-18 19:11:55 +02:00
Pau Espin d819a57c60 Introduce LOGPTRX macro and use it in tx_power.c
Rename OCTPHY specific LOPGTRX macro to avoid redefine conflicts.

Change-Id: I02878611501aca51039e2ac7e35784ccb93b1db6
2020-06-18 19:11:55 +02:00
Vadim Yanitskiy df26770d41 A-bis/RSL: refactor handling of BS Power IE (power reduction)
According to 3GPP TS 08.58, section 9.3.4, BS Power IE indicates
the transmission power attenuation on a particular channel:

  +--------------+---------+-----------------+
  | Reserved (3) | FPC (1) | Power level (4) |
  +--------------+---------+-----------------+

so let's change handling of this IE as follows:

  - s/bs_power/bs_power_red/g, so it reflects 'reduction';
  - store power attenuation value in dB, not in 2 db steps;
  - get rid of ms_power_ctrl.bts_tx_pwr, it's always 0 anyway;
    - fix rsl_tx_meas_res(): use lchan->bs_power_red;
  - always check if FPC (Fast Power Control) flag is set;
    - we don't support it, so reject messages containing it;
    - fix rsl_rx_chan_activ(): properly apply the bitmask.

Change-Id: I16cc50dfca102030380a06e16c234d5f6698f38f
2020-06-15 22:51:20 +07:00
Pau Espin ed4ed9e5d0 tests/tx_power: Speed up test
Otherwise test takes around 5 seconds due to each power ramping step
waiting for 1 sec.

Change-Id: I703e1137f30e4874ef40785bec6100b50b9633a7
2020-06-01 20:15:54 +00:00
Martin Hauke b378fccef1 Fix common misspellings and typos
Change-Id: I403b9029f57fec3fdec2c1e2cbeac0f6eab53f24
2019-10-17 08:05:35 +00:00
Neels Hofmeyr 113e30cb06 use osmo_init_logging2() with proper talloc ctx
Completely drop bts_log_init(), call osmo_init_logging2() directly instead: all
callers of bts_log_init() passed NULL as category string, so all it ever did
was call osmo_init_logging(). The bts_log_info is already declared in the .h.

Here and there also define a proper talloc root context instead of using NULL.

Change-Id: Ic049f77bef74123b95350bcae182a468e0086b9c
2018-04-04 17:54:37 +02:00
Alexander Huemer 0e176264f4 various Makefile.am: add missing CFLAGS
Change-Id: I0717aaaf062a7c3c8b35520fa837b51fd6aed47f
2018-01-25 01:44:51 +01:00
Alexander Huemer d6d4b50911 cosmetic: Makefile.am whitespace
Change-Id: I480fbf85912de2ea3518a906b9edf23b1485e936
2018-01-25 01:39:06 +01:00
Max ec33b0397f Remove build dependency on legacy OpenBSC
* copy-paste gsm_data_shared.* from OpenBSC master
* remove corresponding configure check and option
* remove .deb dependency

Actual refactoring with removal of unnecessary structures/parts, moving
common OpenBSC/OsmoBSC parts into libraries etc. are left for further
patches.

Current patch will make coexistence with *BSC easier and will simplify
our build infrastructure.

Change-Id: I9f004fb5c4c1db29d4792dfd281d388c7063da13
Related: OS#1923
2017-10-08 18:40:09 +02:00
Harald Welte fb78397cbd Fix build after recent gsm_bts_alloc() change
In openbsc.git Change-Id I61c18a7f021fcb1ec00d34a745f4e3ab03416c2d
we changed the gsm_bts_alloc() function signature to include
a second argument (the BTS number).  This broke omso-bts, and this
commit is intended to make it build again.

Change-Id: I7ef7654d48c1cfc7e4ecb0b771553ec0740ce2bf
2017-08-14 01:22:12 +02:00
Harald Welte bbe90fd651 sysmobts: Don't start with 0dBm TRX output power before ramping
In case a system has a high-gain external PA (like a 40dB PA) connected
externally, we cannot simply switch the transceiver to 0 dBm in
trx_init() only to then start the ramping at much lower levels once the
PHJ completes in trx_init_compl_cb().  The result would be a short
0 + 40 dBm spike followed by later ramping.  We want to avoid that
spike, particularly its associated inrush current, so let's bring up the
board with smething very conservative like -50 dBm, and then ramp from
there.

Change-Id: I0ad91fce64f65e0213c9fcfde3390ace519055db
Fixes: SYS#3259
2017-04-06 18:41:01 +02:00
Harald Welte 69d297ce75 Add new unit-test for transmit power computation code
This tests the computations of the tx_power.c code using sysmoBTS 1002,
1020, 1100 and 2050 values, as well as the power ramping code.

Change-Id: I1cc88d4c6edff326e2e67d4f869aa02c9b2b1ac5
2017-02-07 20:33:18 +00:00