Commit Graph

58 Commits

Author SHA1 Message Date
Max e81347f216 Allow specifying sysmocom headers explicitly
Add configure option --with-sysmobts=$INCDIR (like for LC1.5).

Use to fix the jenkins build to fix the build after migration to stow, where we
can no longer use a commin -I to include the sysmobts headers as well.

Tweaked-by: neels
Change-Id: I0416a9f4c428189cd9c3909c8bd016ca2908128a
2018-01-19 15:06:15 +01:00
Max bef6eae05b Move sysmobts-calib into osmo-bts-sysmo
It's prerequisite for jenkins tests fix after migration to stow. The
sysmobts-calib uses hand-coded Makefile instead of automake which makes
it hard to properly propagate build flags. Also, make it optional to
enable excluding it from certain jenkins tests.

Change-Id: I3b54bfa5ef1d89092f6cf13dc27de10874b31b18
2018-01-16 15:53:00 +01:00
Max a11d8e95ee Add --enable-sanitize configure option
Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1
2017-12-21 17:29:53 +01:00
Harald Welte 6bf97927f1 configure.ac: Fix Mailing list address
We've had openbsc.org ages ago but have moved everything to osmocom.org
at some point in 2010/2011.  This should have been updated back then

Change-Id: I5da8e9fba8f15719414fa81e2a6211f906329c2e
2017-10-28 20:52:58 +02:00
Harald Welte 2757cbc2a8 update dependencies to latest libosmo-*
We can either try to really build with those old versions or find the
minimum version, or we can simply require latest version of all
libosmo*, which is the safeest choice for now.

Change-Id: I08915540b92d5135b0c325e30b5b6e24f88e6282
2017-10-27 22:53:43 +02:00
Max fe291a97c2 Move power loop to generic tests
There's nothing sysmobts specific in this test so let's move it into
separate directory and run unconditionally. The test itself is unaltered
except for intro text.

Change-Id: I0d1957cd9cf5497826be095c7a42b7bb4fa10397
Related: OS#2223
2017-10-23 18:13:13 +00: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
Max 0ebf985492 lc15: port lc15bts-mgr dependency changes
That's mostly changes related to lc15bts-mgr from
https://gitlab.com/nrw_noa/osmo-bts branch nrw/litecell15 based on
eb5b7f80510b603579f7af6d7d5ead296c2fa260 commit:

* adjust comments to simplify further diffs
* add libsystemd dependency to lc15bts-mgr
* add software watchdog which uses it
* ocxo calibration and gps related code

Change-Id: I475a330af771891ba3c897294ce0dd57ec2ba8db
Related: SYS#3732
2017-07-22 09:07:44 +00:00
Harald Welte 5eb17e28ac VIRT-PHY: Initial check-in of a new virtual BTS
This patch adds a virtual physical layer designed to simulate the
Um air interface between BTS and MS.  It does so by encapsulating MAC
blocks (Layer 2 PDUs) via GSMTAP and sending them through multicast UDP
streams, both in uplink and in downlink.

The purpose of this is enable testing without any radio hardware or
related licenses.

OsmocomBB has recently received as similar patch-set, adding a virty_phy
executable that can be run on a PC instead of the classic 'layer1'
firmware on a real phone.

Using GSMTAP means that one can use unmodified wireshark to decode the
messages exchanged on the virtual Um layer.

This code was originally started by Harald in January 2016, continued
by Sebastian Stumpf in late 2016 and early 2017, and finally completed
by Harald in July 2017.

Change-Id: I1bf7670975b1e367c1c62983020865a043542622
2017-07-13 19:34:17 +00:00
Philipp Maier 65db0f5c41 measurement: fix measurment report
The end of the measurement reporting period is not aligned with the
SACCH block where the results are reported. The tables that are
used to detect the end of the measurement period are therefore
wrong. The frame number of the SACCH block must be used and not the
TDMA frame number (modulo 104) of the measurement reporing interval.

The tables are oriented to the frame number of the first SACCH block,
at the beginning of an interval. However, when a SACCH block is received
it will always contain the result of the recently passed measurement
reporting period.

To match the tables, introduce another lookup table to remap each
SACCH block that ends to the matching beginning block number.

Change-Id: I1eef894e6f15b4449fc8926bebb118624efc7924
2017-07-10 15:30:59 +00:00
Max 0bd7a19114 Use release helper from libosmocore
Change-Id: Ib8efd2095fcf759276299b516d495219105c1f2b
Related: OS#1861
2017-07-10 08:24:40 +00:00
Max 3aeb9301f4 Remove redundant test
After switching to libosmocoding there's no need in low-level bursts
test which is part of libosmocoding anyway.

Change-Id: Icb8caf62ac653a39a7a82f2225e8edeab7f5afb5
2017-05-22 09:37:27 +00:00
Max efbef50efc osmo-bts-trx: use libosmocoding
Remove built-in functions and use libosmocoding instead.

Change-Id: I1b41bb1a8de655639107ec1f3b75afc240fd316f
2017-05-22 09:37:26 +00:00
Philipp Maier 25742a5929 octphy: set tx/rx antenne IDs via VTY
add support for the TX/RX antenna-id feature that has been
introduced with release OCTSDR-2G-02.07.00-B1314-BETA. The
user can now set individual ID numbers for the TX and for
the RX antenna.

Change-Id: I872fe3c4d7b593358a4ce2f02cf0726611b9f3aa
2017-04-13 19:08:47 +02:00
Philipp Maier e4403464ed octphy: add conditional compilation to support latest octasic header release
With octasics latest release (octsdr-2g-02.07.01-B1351-beta), some struct
members are moved or renamed. This patch adds ifdef-logic and configure
checks to restore compatibilty.

Change-Id: I73287983e8bed8bf64b2ab87e6b810c2c59ea6fd
2017-04-13 19:03:56 +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
Philipp Maier 8ea93a8a7d octphy: multi-trx support: fix AC_CHECK order
The header file octphy/octvc1/gsm/octvc1_gsm_default.h is not
visible to the configure script when the octphy header files
are referenced via --with-octsdr-2g instead having them
installed in /usr/local/include. This results in a failed
AC_CHECK_MEMBER check for tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn,
even if header files with multi-trx support are used.

The configure.ac script manipulates the CPPFLAGS in order to
make the octphy include files visible to AC_CHECK_ and restores
the original CPPFLAGS when done. This is required when
--with-octsdr-2g is used. AC_CHECK_MEMBER is executed
before the CPPFLAGS are manipulated. This causes no issues
if the headers are properly installed to /usr/local/include,
but does not work when --with-octsdr-2g is used.

This commit moves the AC_CHECK_MEMBER command into the section
where the manipulated CPPFLAGS are valid in order to fix the
problem described above

See also commit: f5494e84e8

Change-Id: I7bdfa4449cd6061c395cce315b372c2833520e37
2016-11-27 18:28:24 +00:00
Philipp Maier f5494e84e8 octphy: reintroducing multi-trx support
The multi-trx had to be removed because of build conflicts
with octphy header that lack the struct members for needed
to support multi-trx.

For details see the following revert-commits:
ed6b48e4a5
c9a1f284ac

This commit reintroduces multi trx support and ads an ifdef
decision to ensure that header files without multi-trx
support still work.

Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0
2016-10-06 09:48:02 +00:00
Neels Hofmeyr 3f192f2291 configure: check for pkg-config presence
Change-Id: Ifee0434dfa275f9faa517c740fd8577930f37188
2016-10-02 13:29:21 +00:00
Neels Hofmeyr fac02d3d75 build: be robust against install-sh files above the root dir
Explicitly set AC_CONFIG_AUX_DIR.

To reproduce the error avoided by this patch:

  rm install-sh        # in case it was already generated.
  touch ../install-sh  # yes, outside this source tree
  autoreconf -fi

This will produce an error like

  ...
  configure.ac:16: error: required file '../ltmain.sh' not found
  configure.ac:5: installing '../missing'
  src/Makefile.am: installing '../depcomp'
  autoreconf: automake failed with exit status: 1

See also automake (vim `which automake`) and look for 'sub locate_aux_dir'.

Change-Id: I02153ad52faf1465e9f7821378e04118f17352d2
2016-10-02 13:29:21 +00:00
Harald Welte 29a0197ead LC15: configure.ac: Allow specifying an alternate include-dir
The user can now use ./configure --with-litecell15=/my/local/path
2016-02-15 14:26:51 +01:00
Harald Welte ccc7a1bf46 LC15: configure.ac: use --enable-litecell15 insteda of --enable-litecell15-bts 2016-02-15 14:26:47 +01:00
Yves Godin 2a711887b7 LC15: Add initial support for the NuRAN Wireless Litecell 1.5
This commit adds basic support for the Litecell 1.5. Multi-TRX is not
supported yet. Instead, multiple instances of the BTS can be launched
using command line parameter -n <HW_TRX_NR> to specify if TRX 1 or
2 must be used by the bts. Note that only TRX 1 opens a connection to
the PCU. Full support for GPRS on both TRX will come at the same time
than the multi-TRX support.

The BTS manager has been adapted to match the new hardware but otherwise
it has not been improved or changed compared to the one used on the
SuperFemto/Litecell (sysmobts).
2016-02-15 14:26:33 +01:00
Harald Welte b92100ad36 Add support for Octasic OCTSDR-2G GSM PHY
This adds support for a new PHY to OsmoBTS, the Octasic OCTSDR-2G
PHY. This is a proprietary GSM PHY running on a familty of Octasic DSPs.
2016-01-16 17:23:10 +01: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
Harald Welte 33f234f278 Revert "configure.ac: Add subdir-objects to suppress warnings"
This reverts commit 94a05abb98.

The tests don't work well with subdir-objects, so we have to live with
the warnings meanwhile until somebody finds time to find the magic spell
to solve the autotools quest.
2015-11-05 22:48:24 +01:00
Harald Welte 55d89d17b2 configure.ac: Better description for --enable-sysmocom-bts and --enable-trx 2015-10-12 12:15:49 +02:00
Harald Welte 94a05abb98 configure.ac: Add subdir-objects to suppress warnings
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
2015-10-12 12:13:13 +02:00
Harald Welte 45e597cc16 configure.ac: Depend on libosmotrau 0.3.2 (ortp statistics) 2015-10-12 12:12:29 +02:00
Harald Welte 9a9ddc1203 configure.ac: Only require libgps if building for sysmoBTS 2015-10-12 12:12:22 +02:00
Andreas Eversberg da0c44a9db Add test case for successful handover and unsuccessful handover 2015-09-22 16:41:29 +02:00
Andreas Eversberg d692b6e054 TRX: Replaced GSM 06.10 ordering table by table in libosmocodec 2015-09-22 16:41:26 +02:00
Andreas Eversberg 1de7085d31 Add test code for testing GSM burst transcoding 2015-09-22 16:41:24 +02:00
Andreas Eversberg acc71ffb4b TRX: Introduce osmobts-trx, a layer 1 implementation for OpenBTS tranceivers
The code is quite complete, TCH and PDCH channels are not yet tested.
2015-09-22 16:41:24 +02:00
Holger Hans Peter Freyther 9acc82ce4a sysmobts: Initial version to use libgps to determine FIX state
We should only calibrate the clock if there is a GPS fix. Start
gpsd to determine if there is a fix or not. Work around trimble
decoding issues (sent an email upstream). We need to gain some
more experience to see if there memory leaks. We also need to
re-schedule the calibration depending on the outcome.
2015-01-09 21:57:13 +01:00
Harald Welte 8e4cc1cbb8 fix build problem introduced with control interface 2014-08-24 17:04:54 +02:00
Harald Welte e43feaf231 New generic transmit power handling
In order to support transmit power reduction by thermal management
as well as the variety of new internal / external PA configurations
of BTSs, we need a slightly more complex system.

Also, as at high power a single dB can be quite a big difference,
we are now doing all computations in milli-dB(m), i.e. 1/10000 bel.

Ramping is now used both for up and down ramping, as that is useful in
cases where you want to gracefully shut down a cell by shrinking its
radius, gradually handing over subscribers to neighboring cells.

Furthermore, this code is becoming part of the 'common' codebase, as it
is not really specific to how sysmobts is working.

The user can specify a single aggregate value for external system
gain/attenuation.  Let's say you have 1dB loss of antenna cable, so you
can put that as 'user-gain -1' into the config, which means that a
'transmit power of 20dBm' will be compensatet for that and the TRX is
instructed to output 21dBm to compensate the cable loss.  Similarly,
external PAs can be described by a positive user-gain.

One of the next steps will be to communicate those values and the
nominal power capability of the specific BTS to the BSC, so the BSC will
automatically show correct signal levels in the VTY and log files.

The code includes provisions for future extensions regarding
* an external and an internal PA with calibration tables
* a thermal attenuation setting to be controlled by the site manager
2014-08-24 10:46:21 +02:00
Holger Hans Peter Freyther 7996134d2a common: Ignore "si.valid" outside of _MAX_SYSINFO_TYPE
Limit the range from 0 to (_MAX_SYSINFO_TYPE - 1) instead of
0 to 31. This way we will never access the lchan->si.buf[] out
of bounds. This is only a theoretical issue though as the code
filling the lchan->si.buf for the SACCH will not have valid
>= _MAX_SYSINFO_TYPE. Add a small regression test to check we
still schedule all SIs.

Fixes: CID 1040765
2014-05-22 21:17:49 +02:00
Holger Hans Peter Freyther 4e3aa93681 misc/sysmobts: Another small change to help in finding the header
We could have a dedicated configure/cflag for the header files
but for now search in the standard directories.
2014-03-12 16:51:27 +01:00
Álvaro Neira Ayuso e030dfd443 misc/sysmobts_misc.c: Read temperature from microcontroller
Add function for requesting the temperature information to the
microcontroller. I have added a function that we can extend
for requesting more information but in this case we only need to
know the temperature.
I have added to a microcontroller temperature handling function
in the manager for monitoring this information.

Signed-off-by: Alvaro Neira Ayuso <anayuso@sysmocom.de>
2014-03-12 16:27:38 +01:00
Jacob Erlbeck 2d725e77f7 agch/test: Add test for AGCH queue handling
The first test checks the AGCH may queue length computation.

The second test fills the queue by calling bts_agch_enqueue() with a
mix of IMM.ASS and IMM.ASS.REJ. Then it drains the queue by calling
bts_ccch_copy_msg(). After each of both steps, statistics are printed
out.

Sponsored-by: On-Waves ehf
2014-03-10 08:57:38 +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
Andreas Eversberg 971a95d259 Remove obsolete osmo-bts-bb code 2013-09-03 17:47:26 +02:00
Holger Hans Peter Freyther f169a75fc4 sysmobts: Introduce an auto-band config to ease DCS/DCS, PCS/PCS changes
During development one switches from GSM900 to GSM1800 and GSM850 to
GSM1900. This commit attempts to make this switch more easy.

GSM1800 and GSM1900 have overlapping ARFCNs. This means that the
mapping from bands to arfcn is not injective. Because of that I
removed the code to deduce the band from the ARFCN. This was done
in commit 8c3d807b3f. The auto-band
option allows to move between GSM900/GSM1800 and GSM850/GSM1900.

Add a simple testcase with these auto-band configurations.
2013-06-24 08:17:12 +02:00
Holger Hans Peter Freyther 19cf0e81b3 ciphering: Handle ciphering support for A5/3 correctly
This was found and debugged by Sylvain. The BTS will always support
A5/0 so we do not keep track of that, the first bit of the flags is
used for A5/1, second for A5/2... but for RSL there is an offset to
go from RSL to A5(x). Add a testcase and change the code.
2012-12-26 18:55:54 +01:00
Holger Hans Peter Freyther 359b2cf469 misc: Fix the make distcheck of the osmo-bts code
* Comment out the osmo-bts-bb/Makefile as we have removed it from
  the SUBDIRS and are not packaging the code right now
* Add missing include files for the build
2012-12-22 14:59:12 +01:00
Holger Hans Peter Freyther 56698b84e0 openbsc: Check for the presence of the gsm_data_shared.h header file 2012-12-20 19:18:13 +01:00
Holger Hans Peter Freyther db51f0d73e openbsc: Introduce autoconf support to set the OpenBSC include directory
Add autoconf support to set the path to the OpenBSC include directory
so that openbsc/gsm_data_shared.h can be found there.
2012-12-20 19:02:37 +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
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