Commit Graph

898 Commits

Author SHA1 Message Date
Max bb0cc685f1 Add utility to check proper scheduling of SI
There are several types of System Information messages with tricky
scheduling rules described in 3GPP TS 05.02 § 6.3.1.3. This GNU Awk
script takes in .csv file with sequence of scheduled SI messages (for
example generated using tshark from GSMTAP capture - see usage note
inside the script) and check the scheduling rules compliance.
2016-03-17 13:51:09 +01:00
Max 6044785a22 Ignore binary and backup files
Add missing entries to .gitignore
2016-03-17 13:50:51 +01:00
Max b2b1112a6e Add explicit check for SI2quater index and count
Right now we do not support multiple SI2quater messages, so return error
if either index or count is non-zero.
2016-03-17 13:50:31 +01:00
Max f3ee66207d Fix SI2ter scheduling
According to 3GPP TS 05.02 § 6.3.1.3 SI2ter messages should be scheduled
in FN with TC=4 only if SI2bis messages are also available.
2016-03-17 13:48:16 +01:00
Holger Hans Peter Freyther 0be80aa2d1 octphy: Enable TCH/H mode and begin testing
Upcoming releases will support TCH/H and we should start to test
the DSP->RTP code.
2016-03-16 09:17:04 +01:00
Holger Hans Peter Freyther 710e99c2e3 misc: Attempt to fix make distcheck and dumping docs
The file has been renamed, attempt to catch up
2016-03-15 20:09:49 +01:00
Harald Welte 40e8365854 Update configuration examples
Add SysmoBTS-specific example.
Remove outdated generic example which is no longer working.
2016-03-14 18:36:11 +01:00
Max d5c658b22e Fix copy-paste issue
This issue prevented scheduling of SI 2quater messages.
2016-03-11 22:10:21 +07:00
Holger Hans Peter Freyther 91565b2d51 octphy: Use the event defaults as base
Bad parameters are passed to the event structure and the default
initialization should happen.
2016-03-10 16:15:51 +01:00
Holger Hans Peter Freyther 2278fdc580 pcuif: Do not bump the PCU_IF version
I had accidently bumped the version as I thought that osmo_ph_pres_info_type
was part of the ABI. It is not an only internal to the BTS. Revert
this part of the change.
2016-03-10 16:10:11 +01:00
Max cb20c83323 Fix ocmo-bts-octphy interaction with OsmoPCU
Previously osmo-bts-octphy have not provided in-band presence
information which cause off-by-one errors and misinterpretation of
ph_data_ind by PCU. This fixed now by adding support for explicitly
passing PH-DATA presence info. Corresponding check and in-band passing
of presence information are removed.

Note: this requires libosmocore version with osmo_ph_pres_info_type
support integrated.

[hfreyther/max: Remove + 1 from the decoded length]
2016-02-22 13:57:54 +01:00
Harald Welte 94bb3769f3 scheduler: Fix ARRAY_SIZE() in trx_sched_init()
We want the size of the array, not of the pointer to the array.

Found by coverity (CID 1351422).
2016-02-15 20:16:07 +01:00
Harald Welte e81cc6a158 use unsigned int to compare wih ARRAY_SIZE
This is not really an issue, but makes coverity happy (CID 1351422).
2016-02-15 20:13:04 +01:00
Harald Welte 69b959e557 sysmobts_vty: Fix null-check for pinst
There was a copy+paste error, checking for plink but we should check for
pinst.

This was found by coverity (CID 1351424).
2016-02-15 20:11:43 +01:00
Harald Welte ad7f7a7117 Merge branch 'laforge/litecell15' 2016-02-15 14:28:50 +01:00
Harald Welte 81cc8cdba5 LC15: remove bogus check_for_ciph_cmd() copy 2016-02-15 14:28:19 +01:00
Harald Welte e634fd256b LC15: set nominal transmit power of 37dBm for all TRX 2016-02-15 14:28:05 +01:00
Harald Welte 433863e4c9 LC15: Fix 'make dist' (missing include files) 2016-02-15 14:28:00 +01:00
Harald Welte 634c3e4648 Use consistent naming of binaries accross BTS models
Let's use one systematic naming schemes for all BTS models.

osmobts-trx -> osmo-bts-trx
sysmobts -> osmo-bts-sysmo
lc15bts -> osmo-bts-lc15
2016-02-15 14:27:57 +01:00
Harald Welte a9a7120c82 make PCU socket and telnet port configurable
In some cases we'd like to run multiple instances of osmo-bts on a
single machine.  This is the case where we a multi-TRX PHY is to be used
for several BTSs, or in case osmo-bts-trx has multple SDRs attached.

This wa currently prevented by having a hard-coded PCU socket path
and telnet port, which are now configurable via VTY / config file
itself.
2016-02-15 14:27:52 +01:00
Harald Welte 5dfb115eaf declare pcu_direct in pcu_if.h 2016-02-15 14:27:47 +01:00
Harald Welte c6723c8206 move auto-band configuration commands to common/vty.c
It remains up to the individual BTS hardware models to decide
whether or not to register those commands (depending on whether they
support the feature) via cfg_bts_auto_band_cmd / cfg_bts_no_auto_band_cmd
2016-02-15 14:27:43 +01:00
Harald Welte 3b4d9e7c07 LC15: Call l1if_reset() after l1if_open()
We want to start talking to the L1 from the point the PHY link has
been opened, and not only once an OML connection has been established.
2016-02-15 14:27:36 +01:00
Harald Welte 53e0291df6 LC15: Remove clk_cal (another unused struct member) 2016-02-15 14:27:32 +01:00
Harald Welte e9a17292e8 LC15/sysmobts: Don't try to refer to fl1h from PHY config
At the time the phy link / phy instance level VTY configuration
commands are parsed, we did not yet call l1if_open() and thus
pinst->u.{lc15,sysmobts}.hdl == NULL.

PHY or PHY instance specific configuration must thus be stored inside
the phy_link or phy_instance itself, and not inside the (not yet
existing) handle.

We solve this by moving around some parameters:
* clk_use_eeprom/clk_cal/clk_src/calib_path get replicated in
  phy_instance
* min_qual_{rach,norm} are moved into the generic part (which means
  that osmo-bts-octphy and osmo-bts-trx should also implement them)
2016-02-15 14:27:29 +01:00
Harald Welte 9b5cff87ec LC15: Remove unused clk_use_eeprom and clk_src fields
this is part of the copy+paste legacy from sysmobts and can be removed
as it is not used.
2016-02-15 14:27:25 +01:00
Harald Welte 9684099ae9 sysmobts/LC15: Fix startup-time DSP trace flage configuration
Due to the changes introduced by the phy_link API, it's not easy to set
the default DSP trace flags via a command line argument anymore.  We now
rather introduce a persitent VTY configuration command, by which the
default DSP tracing configuration can be set (for each PHY).

The persistent trace flags are stored in the phy_instance, while the
current operational run-time flags are in fl1h->phy_instance.
2016-02-15 14:27:20 +01:00
Harald Welte 38933afdd9 introduce + use new generic vty_get_phy_instance()
this function is intended to be used by VTY commands that need to
resolve a given PHY interface.
2016-02-15 14:27:16 +01:00
Harald Welte 6a0f0f9e21 LC15: fix compiler warning against more recent libosmovty 2016-02-15 14:27:12 +01:00
Harald Welte 4dd8bd84a4 LC15: Fix printed msgq file names in error messages 2016-02-15 14:27:08 +01:00
Harald Welte 8f0266b885 LC15: cosmetic whitespace fixes 2016-02-15 14:27:04 +01:00
Harald Welte 234309878e LC15: Add example configuration file for Litecell 1.5 2016-02-15 14:26:58 +01:00
Harald Welte 1dcb97eaa3 LC15: port litecell 1.5 support to recent osmo-bts master
This includes changes required for
* shared main() function accross all BTS models
* use of the new phy_link / phy_instance infrastructure as the basis
  for true multi-TRX operation
2016-02-15 14:26:55 +01: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 b936bd7162 LC15: use talloc pool for msgb and ortp library
by using a talloc pool, we avoid having to go back to the libc
malloc pool all the time.  The msgb allocations and libortp allocations
happen quite frequently during processing and show up as one of the
high priority items in osmo-bts profiles on sysmoBTS with 14 concurrent
TCH/H calls (highest load scenario).

talloc still consumes significant CPU, this is mostly due to the
zero-initialization of all the associated buffers.  Strictly speaking
we shouldn't need this, but any change there would require lots of
testing, as there might be hidden assumptions in the code?

In some percentage of cases, talloc still seems to fall back on malloc
for msgb allocations, which is currently a bit of a mystery.  The pools
certainly are large enough, talloc_reprt() rarely reports more than a
few tens of kilobytes used by the msgb pool.

From 2ecbf87130
2016-02-15 14:26:44 +01:00
Yves Godin 6e1aed4b23 LC15: Disable DSP trace flags by default 2016-02-15 14:26:38 +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 5a945dad0c sysmobts: make clock calibration eeprom default (again?) 2016-02-15 14:23:57 +01:00
Harald Welte b1d2dd316f abis.c: Fix segfault on OML link loss
When the OML signalling link is lost, first set bts->oml_link = NULL,
then iterate over the RSL links and close them.  Closing the RSL link
will cause a OML state change message to be sent, which in turn tries
to use the no-longer-existing OML link.

The code should be cleaned up further to distinguish which signalling
link was lost, and actually communicate a RSL(only) loss to OML.

But for now, it's best to simply close down all links and terminate
osmo-bts to ensure all state is properly reset and recovered.
2016-02-15 14:23:18 +01:00
Harald Welte f5b42c3421 Merge branch 'laforge/phy-link'
this introduces the new phy_link / phy_instance interface, which is the
basis of clean support for all kinds of multi-trx configurations with
various BTS modules.

WARNING: This breaks configuration file compatibility.  You will need to
introduce config nodes for 'phy' and 'instance', as well as the link
from the 'trx' nodes towards the phy instance.
2016-02-15 14:19:46 +01:00
Harald Welte a02bf125ac port sysmobts to phy_link/phy_instance abstraction 2016-02-15 14:18:59 +01:00
Harald Welte fcef6b2b52 don't touch OML MO when PHY link is established
It seems the right thing to do: Once we know a PHY link is established,
the associated OML managed objects should change their state
accordingly.  However, given all the hackery we do with MO states, this
actually breaks things, rather than helping.  So I'm disabling that part
for now, but this needs to be re-visited at some point.
2016-02-15 14:18:59 +01:00
Harald Welte d784e50747 Introduce new phy_link and phy_instance abstraction
This way we can model a flexible mapping between any number of PHYs,
each having multiple instances, and then map BTSs with TRXx on top of
those PHYs.
2016-02-15 14:18:59 +01:00
Harald Welte f58542899a Merge branch 'laforge/trx-split'
This splits the TRX scheduler into a generic part and an osmo-bts-trx
specific part.  It is the basis for re-using the scheduler from other
bts modules such as the upcoming osmo-bts-virtual.
2016-02-15 14:18:06 +01:00
Harald Welte 1a5b00ebe2 TRX: Move scheduler to src/common
This is the final step to make the L1 scheduler generally available
to other BTS models than OsmoTRX.
2016-02-15 14:17:55 +01:00
Harald Welte 48726242ad TRX: scheduler: Remove dependency to trx_if.[ch] 2016-02-15 14:17:55 +01:00
Harald Welte 67311cc1f2 TRX: scheduler: Move trx_sched_clock() to scheduler_trx.c
This funciton (and associated static functions) are TRX specific,
and scheduler.c should only contain generic code.
2016-02-15 14:17:55 +01:00
Harald Welte b6b42d150d TRX: scheduler: don't access l1h->config from scheduler 2016-02-15 14:17:55 +01:00
Harald Welte 11db925f15 TRX: call trx_loop_sacch_clock from TRX scheduler backend
this removes the dependency of scheduler.c on loops.h
2016-02-15 14:17:55 +01:00