Commit Graph

38 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
Andreas Eversberg 467d63e387 Add test cases for rest octets of Paging Requests
The abstract representation of the rest octets are moved to the header
file, so that the test case can include it. append_p*_rest_octets()
function become externally available for test.

Change-Id: Ifa5be8998b671160e38af1be707e040b00d407b8
Related: OS#5781
2023-07-21 13:20:12 +02:00
Andreas Eversberg 6fa1dfce61 ASCI: Add Notification CHannel (NCH) support
The location of the NCH is defined by the rest octet of System
Information 1. If NCH is defined, the given CCCH blocks are used for NCH
instead of AGCH/PCH.

The current list of VGCS/VBS call notifications is transmitted on the
NCH. If there is no notification, an empty notification is transmitted
on the NCH.

The Notification List Number (NLN) is used to indicated new
notificaitons. Only the last notification (or empty notification)
indicates NLN. This way the MS can determine after two equal NLN that
the complete list has been recevied.

Change-Id: I82fdaba3faaced76267a99ae14a5458a1b41fdaa
Related: OS#5781
2023-07-21 13:20:06 +02:00
Andreas Eversberg 65c8f0de94 ASCI: Retrieve NCH position from System Information 1
When BCCH INFO is received via RSL message, the rest octet of the System
Information 1 message is parsed to get the position of the NCH. The
position is stored in the gsm_bts structure. If the position is not
present int the rest octet, the stored value is set to negative.

Change-Id: I799a27179d478d4ff577d8bc47ae524834851e85
Related: OS#5781
2023-07-21 13:20:05 +02: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 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
Harald Welte f53fde91a3 ETWS Primary Notification via P1 Rest Octets
The ETWS (Earthquake and Tsunami Warning System) uses a so-called
ETWS Primary Notification which is sent
* to phones in dedicated mode (via DCCH from the BSC)
* to phones in idle mode (via P1 Rest Octets on PCH/CCCH)

This patch implements the second part of the functionality, i.e.
transmitting the related ETWS Primary Notification via PCH.  As
3GPP doesn't specify how this is communicated over Abis, we use
a new, vendor-specific RSL message type.

Closes: OS#4047
Depends: libosmocore I89c24a81ada6627694a9632e87485a61cbd3e680
Depends: libosmocore I36fc2ffc22728887d1cb8768c7fcd9739a8ec0fc

Change-Id: I18c60cdb86b9c19e09f5ec06d66e9b91608880e6
2019-09-05 14:30:17 +02:00
Stefan Sperling 20284c4dbc properly initialize si3 in test_is_ccch_for_agch_setup()
Prevent potential use of uninitialized memory in paging test.

Change-Id: Ie8f8fc3c4a9e4cc18fc85b6822110de79da4246b
Related: CID#188828
2018-11-19 11:10:37 +00:00
Harald Welte 2c1a46a2dd paging_test: Fix AGCH/PCH split test for second half of 102 multiframe
* we have to use modulo 51, not 50
* the check for FACCH/SCH has to be applied to to the fn % 51 result

Change-Id: I540a7eeef3ea3ed7347f0f1b5a5a6fe7ce0ec8bb
2018-09-30 15:50:00 +02:00
Philipp Maier bd3462f355 paging: add unit-test to check different bs_ag_blks_res settings
The parameter bs_ag_blks_res, which is loaded into the BTS via the SI3
setting, defines how many of the CCCH blocks shall be used for AGCH. The
remaining CCCH blocks will then be available as PCH for paging.
Unfortunately there is no unit-test yet that verifies that all of the 8
different settings for bs_ag_blks_res.

- Separate the the decision logic that checks if a given fn is part of
  an AGCH into a function to have it available in the unit-test.
- Add a test that checks all possible bs_ag_blks_res settings.

Change-Id: Ib9652f4013a4da3766852f8f03ce9ec5590f6989
Related: OS#1575
2018-08-31 12:44:31 +00:00
Pau Espin 500b7945f0 Remove unneeded direct libortp dependency
All code in osmo-bts goes through APIs in libosmotrau (osmo_ortp.h),
hence direct dependency is not needed. Fixes OBS warnings:

dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-bts-trx/usr/bin/osmo-bts-trx was not linked against libortp.so.9 (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-bts-virtual/usr/bin/osmo-bts-omldummy debian/osmo-bts-virtual/usr/bin/osmo-bts-virtual were not linked against libortp.so.9 (they use none of the library's symbols)

Change-Id: I96a9b5f0678331dcf66c007928866a124d8700de
2018-07-02 16:36:14 +02:00
Pau Espin 261b6fdc8f Include missing headers for osmo_init_logging2
Fixes implicit declaration warning messages at compile time.

Change-Id: I753ed49cdcbd1301ba7ea38dcea9113d99fecb06
2018-04-17 19:36:51 +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
Harald Welte d8cd756da4 Get rid of 'struct gsm_bts_role_bts'
gsm_bts_role_bts was introduced at a time when we still shared
gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently
needed a BTS-private structure.  Since that sharing was abandoned quite
some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away
with the bts/btsb dualism in a lot of the code.

Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
2018-03-17 13:40:03 +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
Max 57b5fb8819 Fix tests linking with libosmocodec
Change-Id: I051302f867d70dfbc39bd52d75101eb262f87459
2016-11-08 10:26:40 +00:00
Neels Hofmeyr 21142f7898 msgb ctx: use new msgb_talloc_ctx_init() in various main()s
Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a
2016-10-14 01:23:28 +02:00
Harald Welte 94da045be5 Don't blindly link against '-lortp' but use pkg-config for that
This also ensures that a missing ortp library dependency is discovered
at configure time already
2015-11-05 22:52:50 +01:00
Holger Hans Peter Freyther b3d1779b96 tests: Move the "pcu_direct" symbol into the stubs to be shared 2014-07-31 14:55:03 +02:00
Jacob Erlbeck 7503540959 agch/pch: Use PCH for AGCH msgs
This patch extends paging_gen_msg() by adding an output parameter
is_empty that is true, if only a paging message with dummy entries
has been placed into buffer. This feature is then used by
bts_ccch_copy_msg() to insert an AGCH message if is_empty is true.

Ticket: SYS#224
Sponsored-by: On-Waves ehf
2014-03-10 09:22:24 +01:00
Holger Hans Peter Freyther e968c4224d bts: Fix typos in the log messages 2013-11-27 10:43:01 +01:00
Harald Welte 6d5dc060ea migrate away from our own abis.c code to libosmoabis
libosmoabis has a BTS-side implementation of the IPA protocol for years,
and osmo-bts should have used that all the time.  Unfortunately it had
its own local hack, this patch is migrating to the libosmocore
implementation.
2013-10-06 15:50:36 +02:00
Alexander Huemer d07ee75fc6 Makefile.am: Use AM_CPPFLAGS
Since automake 1.13 INCLUDES is depricates and causes a warning
2013-06-12 08:01:00 +02:00
Holger Hans Peter Freyther dd2a51ed32 tests: Share the stub between the paging and ciphering tests 2013-02-27 10:44:43 +01:00
Holger Hans Peter Freyther faba73a812 sysmobts: Improve the shutdown of the DSP on exit
Issue the RfDeactivate.REQ before sending the MphClose.REQ. Ideally
we would issue MphClose.REQ after the RfDeactivate.CNF but this is
not possible right now.

The current approach makes the following warning of the DSP go away
on shutdown. This was tested with my E71 and an active silent-call
using a SDCCH.

DSP Warning:
[ERROR] : DeviceMng_ValidateL1Handle() => Invalid layer 1 handle
2013-02-27 10:44:01 +01:00
Holger Hans Peter Freyther 20c5702e0f paging: Update the test output to make the test pass 2012-12-22 14:44:00 +01:00
Holger Hans Peter Freyther bcae2abff8 openbsc: Prepare to allow to have the OpenBSC directory somewhere else
Right now osmo-bts requires access to one OpenBSC header file and
this requires that openbsc and osmo-bts git are in the same directory.
Begin with making the location of the OpenBSC sourcecode configurable.

This approach will allow to build osmo-bts on our Jenkins installation
but now has the risk of more code including the openbsc/*.h header files.
2012-12-20 19:02:37 +01:00
Andreas Eversberg 7daa093df7 PCU: Removed -P option, so GPRS support is always enabled 2012-07-26 21:14:02 +02:00
Holger Hans Peter Freyther 93c087892c tests: Use the right name for the struct (not that it matters) 2012-07-25 12:03:52 +02:00
Harald Welte e729a3d595 add missing stub functions to ensure paging_test compiles
FIXME: hlayer1 and l1if function calls are not acceptable in src/common !
2012-07-22 22:19:56 +02:00
Andreas Eversberg 1195148fc6 Send RR paging requests to PCU, in order to page on PACCH 2012-07-21 13:19:43 +02:00
Andreas Eversberg 744f745d7a PCU: Add PCU socket interface to BTS.
A special command line option "-P" is used to enable socket interface
and signal available GPRS MO object to BSC.
2012-07-08 20:50:02 +02:00
Holger Hans Peter Freyther b19592f713 paging: Update the unit test that would have caused the previous
The unit test created and used the paging request in the same
second and was passing because of that. Add a second test with
a delay to force now to not be equal to the expiration time.
2012-07-05 23:31:18 +02:00
Holger Hans Peter Freyther b0985e3fa5 test: Introduce a very simple test for the paging subsystem
Check that adding a paging command works, check that it is expired
after the first call to paging_gen_msg. The test will be extended
to test the scheduling and selection of the various paging messages.
2011-12-01 09:14:32 +01:00