Compare commits

..

1 Commits

Author SHA1 Message Date
Harald Welte
d785da5943 Bump version: 0.8.1.199-5c93-dirty → 1.0.0
Change-Id: Ie33252aef4144f9bb825d7c234970fd4e6083bb2
2019-01-20 21:13:37 +01:00
373 changed files with 13977 additions and 44371 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1 +0,0 @@
open_collective: osmocom

29
.gitignore vendored
View File

@@ -35,10 +35,10 @@ src/osmo-bts-sysmo/osmo-bts-sysmo-remote
src/osmo-bts-sysmo/sysmobts-mgr
src/osmo-bts-sysmo/sysmobts-util
src/osmo-bts-lc15/lc15bts-mgr
src/osmo-bts-lc15/lc15bts-util
src/osmo-bts-lc15/misc/.dirstamp
src/osmo-bts-lc15/osmo-bts-lc15
src/osmo-bts-litecell15/lc15bts-mgr
src/osmo-bts-litecell15/lc15bts-util
src/osmo-bts-litecell15/misc/.dirstamp
src/osmo-bts-litecell15/osmo-bts-lc15
src/osmo-bts-trx/osmo-bts-trx
@@ -47,15 +47,8 @@ src/osmo-bts-octphy/osmo-bts-octphy
src/osmo-bts-virtual/osmo-bts-virtual
src/osmo-bts-omldummy/osmo-bts-omldummy
src/osmo-bts-oc2g/osmo-bts-oc2g
src/osmo-bts-oc2g/oc2gbts-mgr
src/osmo-bts-oc2g/oc2gbts-util
src/osmo-bts-oc2g/misc/.dirstamp
tests/atconfig
tests/package.m4
tests/amr/amr_test
tests/csd/csd_test
tests/agch/agch_test
tests/paging/paging_test
tests/cipher/cipher_test
@@ -64,9 +57,6 @@ tests/meas/meas_test
tests/misc/misc_test
tests/handover/handover_test
tests/tx_power/tx_power_test
tests/ta_control/ta_control_test
tests/power/ms_power_loop_test
tests/power/bs_power_loop_test
tests/testsuite
tests/testsuite.log
@@ -89,24 +79,15 @@ debian/*.substvars
debian/osmo-bts-trx-dbg/
debian/osmo-bts-trx/
debian/tmp/
/tests/power/power_test
# manuals
doc/manuals/*.html
doc/manuals/*.svg
doc/manuals/*.pdf
doc/manuals/vty/*.pdf
doc/manuals/*__*.png
doc/manuals/*.check
doc/manuals/generated/
doc/manuals/vty/osmobts-*-vty-reference.xml
doc/manuals/vty/osmobts-*-vty-reference.xml.inc.gen
doc/manuals/vty/osmobts-*-vty-reference.xml.inc.merged
doc/manuals/osmomsc-usermanual.xml
doc/manuals/common
doc/manuals/build
contrib/osmo-bts.spec
contrib/ber/rtp_ber
contrib/ber/rtp_gen_map
arm-poky-linux-gnueabi-libtool

View File

@@ -5,12 +5,10 @@ SUBDIRS = include src tests doc contrib
# package the contrib and doc
EXTRA_DIST = \
.version \
README.md \
contrib/dump_docs.py \
debian \
git-version-gen \
$(NULL)
contrib/dump_docs.py contrib/screenrc-l1fwd \
contrib/l1fwd.init contrib/screenrc-sysmobts contrib/respawn.sh \
git-version-gen .version \
README.md
AM_DISTCHECK_CONFIGURE_FLAGS = \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)

View File

@@ -20,50 +20,34 @@ Several kinds of BTS hardware are supported:
* sysmocom sysmoBTS
* Octasic octphy
* Nutaq litecell 1.5
* OpenCellular 2G (OC-2G)
* software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX, LimeSDR)
* software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX)
Homepage
--------
The official homepage of the project is
<https://osmocom.org/projects/osmobts/wiki>
https://osmocom.org/projects/osmobts/wiki
GIT Repository
--------------
You can clone from the official osmo-bts.git repository using
git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
git clone git://git.osmocom.org/osmo-bts.git
There is a web interface at <https://gitea.osmocom.org/cellular-infrastructure/osmo-bts>
There is a cgit interface at http://git.osmocom.org/osmo-bts/
Documentation
-------------
User Manuals and VTY reference manuals are [optionally] built in PDF form
as part of the build process.
Pre-rendered PDF version of the current "master" can be found at
[User Manual](https://ftp.osmocom.org/docs/latest/osmobts-usermanual.pdf)
as well as the VTY reference manuals
* [VTY Reference Manual for osmo-bts-sysmo](https://ftp.osmocom.org/docs/latest/osmobts-sysmo-vty-reference.pdf)
* [VTY Reference Manual for osmo-bts-trx](https://ftp.osmocom.org/docs/latest/osmobts-trx-vty-reference.pdf)
* [VTY Reference Manual for osmo-bts-lc15](https://ftp.osmocom.org/docs/latest/osmobts-lc15-vty-reference.pdf)
* [VTY Reference Manual for osmo-bts-oc2g](https://ftp.osmocom.org/docs/latest/osmobts-oc2g-vty-reference.pdf)
* [VTY Reference Manual for osmo-bts-octphy](https://ftp.osmocom.org/docs/latest/osmobts-octphy-vty-reference.pdf)
There also is an
[Abis reference Manual](https://ftp.osmocom.org/docs/latest/osmobts-abis.pdf)
We provide a
[User Manual](http://ftp.osmocom.org/docs/latest/osmobts-usermanual.pdf)
as well as a
[VTY Reference Manual](http://ftp.osmocom.org/docs/latest/osmobsc-vty-reference.pdf)
and a
[Abis refrence MAnual](http://ftp.osmocom.org/docs/latest/osmobts-abis.pdf)
describing the OsmoBTS specific A-bis dialect.
Forum
-----
We welcome any osmo-bts related discussions in the
[Cellular Network Infrastructure -> 2G RAN (GERAN)](https://discourse.osmocom.org/c/cni/geran)
section of the osmocom discourse (web based Forum).
Mailing List
------------
@@ -76,20 +60,13 @@ Please observe the [Osmocom Mailing List
Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
when posting.
Issue Tracker
-------------
We use the [issue tracker of the osmo-bts project on osmocom.org](https://osmocom.org/projects/osmobts/issues) for
tracking the state of bug reports and feature requests. Feel free to submit any issues you may find, or help
us out by resolving existing issues.
Contributing
------------
Our coding standards are described at
https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
We use a Gerrit based patch submission/review process for managing
We us a gerrit based patch submission/review process for managing
contributions. Please see
https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for
more details
@@ -100,7 +77,7 @@ https://gerrit.osmocom.org/#/q/project:osmo-bts+status:open
Known Limitations
=================
As of January 2021, the following known limitations exist in this
As of March 17, 2017, the following known limitations exist in this
implementation:
Common Core
@@ -110,6 +87,10 @@ Common Core
* System Information limited to 1,2,2bis,2ter,2quater,3,4,5,6,9,13
* No RATSCCH in AMR
* Will reject TS 12.21 STARTING TIME in SET BTS ATTR / SET CHAN ATTR
* No support for frequency hopping
* No reporting of interference levels as part of TS 08.58 RF RES IND
* No error reporting in case PAGING COMMAND fails due to queue overflow
* No use of TS 08.58 BS Power and MS Power parameters
* No support of TS 08.58 MultiRate Control
* No support of TS 08.58 Supported Codec Types
* No support of Bter frame / ENHANCED MEASUREMENT REPORT
@@ -136,3 +117,10 @@ osmo-bts-octphy
* no clear indication of nominal transmit power, various power related
computations are likely off
* no OML attribute validation during bts_model_check_oml()
osmo-bts-trx
------------
* TCH/F_PDCH cannel not working as voice (https://osmocom.org/issues/1865)
* No BER value delivered to OsmoPCU (https://osmocom.org/issues/1855)
* No 11bit RACH support (https://osmocom.org/issues/1854)

View File

@@ -1,9 +0,0 @@
# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
# according to https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
# In short: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
# LIBVERSION=c:r:a
# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a.
# If any interfaces have been added, removed, or changed since the last update: c + 1:0:a.
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line

View File

@@ -9,8 +9,6 @@ AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_CONFIG_TESTDIR(tests)
CFLAGS="$CFLAGS -std=gnu11"
dnl kernel style compile messages
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -24,11 +22,6 @@ AC_PROG_CC
AC_PROG_INSTALL
LT_INIT
dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang
AS_CASE(["$LD"],[*clang*],
[AS_CASE(["${host_os}"],
[*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])])
dnl check for pkg-config (explained in detail in libosmocore/configure.ac)
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
@@ -69,15 +62,14 @@ then
fi
dnl checks for libraries
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.11.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.11.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.11.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.11.0)
PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec >= 1.11.0)
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.11.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 2.0.0)
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 2.0.0)
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.6.0)
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.0.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.0.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.0.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.0.0)
PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec >= 1.0.0)
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.0.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0)
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 0.6.0)
AC_MSG_CHECKING([whether to enable support for sysmobts calibration tool])
AC_ARG_ENABLE(sysmobts-calib,
@@ -350,56 +342,6 @@ then
AC_SUBST([OSMO_GSM_MANUALS_DIR])
fi
AC_ARG_ENABLE([external_tests],
AC_HELP_STRING([--enable-external-tests],
[Include the VTY/CTRL tests in make check [default=no]]),
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
if test "x$enable_ext_tests" = "xyes" ; then
AC_CHECK_PROG(PYTHON3_AVAIL,python3,yes)
if test "x$PYTHON3_AVAIL" != "xyes" ; then
AC_MSG_ERROR([Please install python3 to run the VTY/CTRL tests.])
fi
AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes)
if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
AC_MSG_ERROR([Please install https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests to run the VTY/CTRL tests.])
fi
fi
AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
AC_MSG_RESULT([$enable_ext_tests])
AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
#
# SystemTap support
#
AC_MSG_CHECKING([whether to include systemtap tracing support])
AC_ARG_ENABLE([systemtap],
[AS_HELP_STRING([--enable-systemtap],
[Enable inclusion of systemtap trace support])],
[ENABLE_SYSTEMTAP="${enableval}"], [ENABLE_SYSTEMTAP='no'])
AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$ENABLE_SYSTEMTAP = xyes])
AC_MSG_RESULT(${ENABLE_SYSTEMTAP})
if test "x${ENABLE_SYSTEMTAP}" = xyes; then
# Additional configuration for --enable-systemtap is HERE
AC_CHECK_PROGS(DTRACE, dtrace)
if test -z "$DTRACE"; then
AC_MSG_ERROR([dtrace not found])
fi
AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
[SDT_H_FOUND='no';
AC_MSG_ERROR([systemtap support needs sys/sdt.h header])])
AC_DEFINE([HAVE_SYSTEMTAP], [1], [Define to 1 if using SystemTap probes.])
AC_ARG_WITH([tapset-install-dir],
[AS_HELP_STRING([--with-tapset-install-dir],
[The absolute path where the tapset dir will be installed])],
[if test "x${withval}" = x; then
ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"
else
ABS_TAPSET_DIR="${withval}"
fi], [ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"])
AC_SUBST(ABS_TAPSET_DIR)
fi
# https://www.freedesktop.org/software/systemd/man/daemon.html
AC_ARG_WITH([systemdsystemunitdir],
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
@@ -427,7 +369,7 @@ AC_OUTPUT(
src/osmo-bts-virtual/Makefile
src/osmo-bts-omldummy/Makefile
src/osmo-bts-sysmo/Makefile
src/osmo-bts-lc15/Makefile
src/osmo-bts-litecell15/Makefile
src/osmo-bts-oc2g/Makefile
src/osmo-bts-trx/Makefile
src/osmo-bts-octphy/Makefile
@@ -440,16 +382,12 @@ AC_OUTPUT(
tests/sysmobts/Makefile
tests/misc/Makefile
tests/handover/Makefile
tests/ta_control/Makefile
tests/tx_power/Makefile
tests/power/Makefile
tests/meas/Makefile
tests/amr/Makefile
tests/csd/Makefile
doc/Makefile
doc/examples/Makefile
doc/manuals/Makefile
contrib/Makefile
contrib/ber/Makefile
contrib/systemd/Makefile
Makefile)

View File

@@ -1 +1 @@
SUBDIRS = systemd ber
SUBDIRS = systemd

View File

@@ -1,28 +0,0 @@
AM_CPPFLAGS = \
$(all_includes) \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-I$(builddir) \
$(NULL)
AM_CFLAGS = \
-Wall \
$(LIBOSMOCORE_CFLAGS) \
$(LIBOSMOTRAU_CFLAGS) \
$(LIBOSMOCODEC_CFLAGS) \
$(NULL)
LDADD = \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOTRAU_LIBS) \
$(LIBOSMOCODEC_LIBS) \
$(NULL)
noinst_PROGRAMS = rtp_ber rtp_gen_map
rtp_ber_SOURCES = rtp_ber.c codec_bit_class.h
rtp_gen_map_SOURCES = rtp_gen_map.c
update_codec_bit_class_h: rtp_gen_map
$(AM_V_GEN)./$< > $(top_srcdir)/contrib/ber/codec_bit_class.h

View File

@@ -1,26 +0,0 @@
BER testing tool
----------------
* Check all configs (MSC/BSC/BTS) for proper codec support
- FR enabled
- EFR enabled
- AMR 12.2 enabled (and all other modes disabled !)
- Use `amr-payload octet-aligned` in BSC config
* Check BTS config
- Disable jitter buffer : `bts N / rtp jitter-buffer 0`
* Check BSC config
- Disable radio timeout : `network / bts n / radio-link-timeout infinite`
* Start BER testing tool
- `./rtp_ber 4000`
* On the MSC CLI, start a silent-call, then request GSM to test loop
- `subscriber imsi <XXX> silent-call start tch/f speech-amr`
- `subscriber imsi <XXX> ms-test close-loop b`
Don't forget to terminate the loop and terminate the silent call !
- `subscriber imsi <XXX> ms-test open-loop`
- `subscriber imsi <XXX> silent-call stop`

View File

@@ -1,59 +0,0 @@
static const int gsm_fr_bitclass[] = {
-1, -1, -1, -1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 2,
0, 0, 1, 2, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1,
2, 2, 0, 1, 2, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1,
1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1,
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2,
1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1,
1, 2, 1, 1, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1,
1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1,
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2,
1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1,
2, 2, 1, 2, 2, 1, 2, 2,
};
static const int gsm_efr_bitclass[] = {
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,
0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0,
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 1, 1, 1, 2, 2, 1, 2,
};
static const int gsm_amr_12_2_bitclass[] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, -1, -1, -1, -1,
};

View File

@@ -1,483 +0,0 @@
/* RTP based GSM BER testing for osmo-bts, implementing ideas described in
* https://osmocom.org/projects/osmobts/wiki/BER_Testing
*
* In short: The command transmits a PRBS sequence encapsulated in RTP frames, which are sent
* to the BTS, which transmits that data in the (unimpaired) downlink. The mobile station
* receives the data and is instructed to loop it back in the (possibly impaired) uplink.
* The BTS receives that uplink, puts in in RTP frames which end up being received back by this
* very tool. By correlating the received RTP with the PRBS sequence, this tool can compute
* the BER (Bit Error Rate) of the (possibly impaired) uplink. Doing this with different
* RF channel model simulators in the uplink allows to establish BER at different levels and
* channel conditions. */
/* (C) 2019 sysmocom - s.f.m.c. GmbH; Author: Sylvain Munaut
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <osmocom/codec/codec.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/prbs.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/utils.h>
#include <osmocom/trau/osmo_ortp.h>
#include <codec_bit_class.h>
struct app_state {
struct osmo_rtp_socket *rs;
enum {
WAIT_CONN = 0, /* Wait for incoming connection */
WAIT_LOOP, /* Wait for a somewhat valid packet to start measuring */
RUNNING, /* Main state */
} state;
int pt;
int ref_len;
uint8_t ref_bytes[GSM_FR_BYTES]; /* FR is the largest possible one */
ubit_t ref_bits[8*GSM_FR_BYTES];
struct osmo_timer_list rtp_timer;
uint16_t rx_last_seq;
uint32_t rx_last_ts;
uint32_t rx_idx;
uint32_t tx_idx;
const int *err_tbl; /* Classification table */
int err_frames; /* Number of accumulated frames */
int err_cnt[3]; /* Bit error counter */
int err_tot[3]; /* Total # bits in that class */
};
#define FLOW_REG_TX_MAX_ADVANCE 200
#define FLOW_REG_TX_MIN_ADVANCE 50
const struct log_info log_info;
static const uint8_t amr_size_by_ft[] = {
[0] = 12, /* 4.75 */
[1] = 13, /* 5.15 */
[2] = 15, /* 5.9 */
[3] = 17, /* 6.7 */
[4] = 19, /* 7.4 */
[5] = 20, /* 7.95 */
[6] = 26, /* 10.2 */
[7] = 31, /* 12.2 */
[8] = 5, /* SID */
};
static const char * const amr_rate_by_ft[] = {
[0] = "4.75",
[1] = "5.15",
[2] = "5.9",
[3] = "6.7",
[4] = "7.4",
[5] = "7.95",
[6] = "10.2",
[7] = "12.2",
[8] = "SID",
};
static void
_gsm_fr_gen_ref(struct app_state *as)
{
struct osmo_prbs_state pn9;
/* Length */
as->ref_len = GSM_FR_BYTES;
/* Marker */
as->ref_bits[0] = 1;
as->ref_bits[1] = 1;
as->ref_bits[2] = 0;
as->ref_bits[3] = 1;
/* PN */
osmo_prbs_state_init(&pn9, &osmo_prbs9);
pn9.state = 31;
osmo_prbs_get_ubits(&as->ref_bits[4], 260, &pn9);
/* Convert to bytes */
osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 8*GSM_FR_BYTES, 0);
/* Init error classes */
as->err_tot[0] = 50;
as->err_tot[1] = 132;
as->err_tot[2] = 78;
as->err_tbl = gsm_fr_bitclass;
}
static void
_gsm_efr_gen_ref(struct app_state *as)
{
struct osmo_prbs_state pn9;
/* Length */
as->ref_len = GSM_EFR_BYTES;
/* Marker */
as->ref_bits[0] = 1;
as->ref_bits[1] = 1;
as->ref_bits[2] = 0;
as->ref_bits[3] = 0;
/* PN */
osmo_prbs_state_init(&pn9, &osmo_prbs9);
pn9.state = 31;
osmo_prbs_get_ubits(&as->ref_bits[4], 244, &pn9);
/* Convert to bytes */
osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 8*GSM_EFR_BYTES, 0);
/* Init error classes */
as->err_tot[0] = 50;
as->err_tot[1] = 125;
as->err_tot[2] = 73;
as->err_tbl = gsm_efr_bitclass;
}
static void
_gsm_amr_gen_ref(struct app_state *as)
{
struct osmo_prbs_state pn9;
uint8_t hdr[2];
/* Length */
as->ref_len = 33;
/* Header */
hdr[0] = 0x70;
hdr[1] = 0x3c;
osmo_pbit2ubit_ext(as->ref_bits, 0, hdr, 0, 16, 0);
/* PN */
osmo_prbs_state_init(&pn9, &osmo_prbs9);
pn9.state = 31;
osmo_prbs_get_ubits(&as->ref_bits[16], 244, &pn9);
/* Unused bits */
as->ref_bits[260] = 0;
as->ref_bits[261] = 0;
as->ref_bits[262] = 0;
as->ref_bits[263] = 0;
/* Convert to bytes */
osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 264, 0);
/* Init error classes */
as->err_tot[0] = 81;
as->err_tot[1] = 163;
as->err_tot[2] = -1;
as->err_tbl = gsm_amr_12_2_bitclass;
}
static void
_gsm_gen_ref(struct app_state *as)
{
switch (as->pt) {
case RTP_PT_GSM_FULL:
_gsm_fr_gen_ref(as);
break;
case RTP_PT_GSM_EFR:
_gsm_efr_gen_ref(as);
break;
case RTP_PT_AMR:
_gsm_amr_gen_ref(as);
break;
default:
fprintf(stderr, "[!] Unsupported payload type for BER measurement\n");
}
}
static int
_gsm_ber(struct app_state *as, const uint8_t *payload, unsigned int payload_len)
{
ubit_t rx_bits[8*33];
int err[3]; /* Class 1a, 1b, 2 */
int ones;
int i, j;
if (payload) {
/* Process real-payload */
osmo_pbit2ubit_ext(rx_bits, 0, payload, 0, 8*payload_len, 0);
err[0] = err[1] = err[2] = 0;
ones = 0;
for (i = 0; i < 8 * payload_len; i++) {
j = as->err_tbl[i];
if (j >= 0) {
err[j] += rx_bits[i] ^ as->ref_bits[i];
ones += rx_bits[i];
}
}
if (ones < 32) { // This frames is probably us underrunning Tx, don't use it
fprintf(stderr, "[w] Frame ignored as probably TX underrun %d %d\n", as->tx_idx, as->rx_idx);
return 1;
}
} else {
/* No payload -> Lost frame completely */
err[0] = as->err_tot[0] / 2;
err[1] = as->err_tot[1] / 2;
err[2] = as->err_tot[2] / 2;
}
if (as->state == RUNNING) {
/* Update records */
if (err[0] != 0) {
/* Class 1a bits bad -> Frame error */
as->err_cnt[0]++;
}
as->err_cnt[1] += err[1]; /* Class 1b */
as->err_cnt[2] += err[2]; /* class 2 */
as->err_frames++;
/* Enough for a read-out ? */
if (as->err_frames == 200) {
printf("FBER: %4.2f C1b RBER: %5.3f C2 RBER: %5.3f\n",
100.0f * as->err_cnt[0] / as->err_frames,
100.0f * as->err_cnt[1] / (as->err_tot[1] * as->err_frames),
100.0f * as->err_cnt[2] / (as->err_tot[2] * as->err_frames)
);
memset(as->err_cnt, 0, sizeof(as->err_cnt));
as->err_frames = 0;
}
}
return err[0] != 0;
}
static int
_rtp_check_payload_type(const uint8_t *payload, unsigned int payload_len)
{
uint8_t ft;
int pt = -1;
switch (payload_len) {
case GSM_FR_BYTES: /* FR or AMR 12.2k */
/* Check for AMR */
ft = (payload[1] >> 3) & 0xf;
if (ft == 7)
pt = RTP_PT_AMR;
/* Check for FR */
else if ((payload[0] & 0xF0) == 0xD0)
pt = RTP_PT_GSM_FULL;
/* None of the above */
else
fprintf(stderr, "[!] FR without 0xD0 signature or AMR with unknwon Frame Type ?!?\n");
break;
case GSM_EFR_BYTES: /* EFR */
if ((payload[0] & 0xF0) != 0xC0)
fprintf(stderr, "[!] EFR without 0xC0 signature ?!?\n");
pt = RTP_PT_GSM_EFR;
break;
case GSM_HR_BYTES: /* HR */
pt = RTP_PT_GSM_HALF;
break;
default: /* AMR */
{
uint8_t cmr, cmi, sti;
cmr = payload[0] >> 4;
ft = (payload[1] >> 3) & 0xf;
if (payload_len != amr_size_by_ft[ft]+2)
fprintf(stderr, "AMR FT %u(%s) but size %u\n",
ft, amr_rate_by_ft[ft], payload_len);
switch (ft) {
case 0: case 1: case 2: case 3:
case 4: case 5: case 6: case 7:
cmi = ft;
printf("AMR SPEECH with FT/CMI %u(%s), "
"CMR %u\n",
cmi, amr_rate_by_ft[cmi],
cmr);
break;
case 8: /* SID */
cmi = (payload[2+4] >> 1) & 0x7;
sti = payload[2+4] & 0x10;
printf("AMR SID %s with CMI %u(%s), CMR %u(%s)\n",
sti ? "UPDATE" : "FIRST",
cmi, amr_rate_by_ft[cmi],
cmr, amr_rate_by_ft[cmr]);
break;
}
}
break;
}
return pt;
}
static void
rtp_timer_cb(void *priv)
{
struct app_state *as = (struct app_state *)priv;
/* Send at least one frame if we're not too far ahead */
if (as->tx_idx < (as->rx_idx + FLOW_REG_TX_MAX_ADVANCE)) {
osmo_rtp_send_frame(as->rs, as->ref_bytes, as->ref_len, GSM_RTP_DURATION);
as->tx_idx++;
} else {
fprintf(stderr, "Skipped\n");
}
/* Then maybe a second one to try and catch up to RX */
if (as->tx_idx < (as->rx_idx + FLOW_REG_TX_MIN_ADVANCE)) {
osmo_rtp_send_frame(as->rs, as->ref_bytes, as->ref_len, GSM_RTP_DURATION);
as->tx_idx++;
}
/* Re-schedule */
osmo_timer_schedule(&as->rtp_timer, 0, 20000);
}
static int
rtp_seq_num_diff(uint16_t new, uint16_t old)
{
int d = (int)new - (int)old;
while (d > 49152)
d -= 65536;
while (d < -49152)
d += 65536;
return d;
}
static void
rtp_rx_cb(struct osmo_rtp_socket *rs,
const uint8_t *payload, unsigned int payload_len,
uint16_t seq_number, uint32_t timestamp, bool marker)
{
struct app_state *as = (struct app_state *)rs->priv;
int pt, rc, d;
// printf("Rx(%u, %d, %d, %d): %s\n", payload_len, seq_number, timestamp, marker, osmo_hexdump(payload, payload_len));
/* Identify payload */
pt = _rtp_check_payload_type(payload, payload_len);
/* First packet ? */
if (as->state == WAIT_CONN) {
/* Setup for this payload type */
as->pt = pt;
osmo_rtp_socket_set_pt(as->rs, pt);
_gsm_gen_ref(as);
/* Timer every 20 ms */
osmo_timer_setup(&as->rtp_timer, rtp_timer_cb, as);
osmo_timer_add(&as->rtp_timer);
osmo_timer_schedule(&as->rtp_timer, 0, 20000);
/* Init our time tracking */
as->rx_last_seq = seq_number;
as->rx_last_ts = timestamp;
/* Now we wait for a loop */
as->state = WAIT_LOOP;
}
/* RX sequence & timstamp tracking */
if (rtp_seq_num_diff(seq_number, as->rx_last_seq) > 1)
fprintf(stderr, "[!] RTP sequence number discontinuity (%d -> %d)\n", as->rx_last_seq, seq_number);
d = (timestamp - as->rx_last_ts) / GSM_RTP_DURATION;
as->rx_idx += d;
as->rx_last_seq = seq_number;
as->rx_last_ts = timestamp;
/* Account for missing frames in BER tracking */
if (d > 1) {
fprintf(stderr, "[!] RTP %d missing frames assumed lost @%d\n", d-1, seq_number);
while (--d)
_gsm_ber(as, NULL, 0);
}
/* BER analysis */
rc = _gsm_ber(as, payload, payload_len);
if ((as->state == WAIT_LOOP) && (rc == 0))
as->state = RUNNING;
}
int main(int argc, char **argv)
{
struct app_state _as, *as = &_as;
int rc, port;
/* Args */
if (argc < 2)
return -1;
port = atoi(argv[1]);
/* App init */
memset(as, 0x00, sizeof(struct app_state));
log_init(&log_info, NULL);
osmo_rtp_init(NULL);
/* Start auto-connect RTP socket */
as->rs = osmo_rtp_socket_create(NULL, 0);
as->rs->priv = as;
as->rs->rx_cb = rtp_rx_cb;
/* Jitter buffer gets in the way, we want the raw traffic */
osmo_rtp_socket_set_param(as->rs, OSMO_RTP_P_JIT_ADAP, 0);
osmo_rtp_socket_set_param(as->rs, OSMO_RTP_P_JITBUF, 0);
/* Bind to requested port */
fprintf(stderr, "[+] Binding RTP socket on port %u...\n", port);
rc = osmo_rtp_socket_bind(as->rs, "0.0.0.0", port);
if (rc < 0) {
fprintf(stderr, "[!] error binding RTP socket: %d\n", rc);
return rc;
}
/* We 'connect' to the first source we hear from */
osmo_rtp_socket_autoconnect(as->rs);
/* Main loop */
while (1)
osmo_select_main(0);
return 0;
}

View File

@@ -1,145 +0,0 @@
/* utility to generate codec_bit_class.h, a file with structures
* describing which [protection] class each bit of a given codec frame belongs to */
/* (C) 2019 sysmocom - s.f.m.c. GmbH; Author: Sylvain Munaut
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include <osmocom/codec/codec.h>
static int
gen_table_fr(int *tbl)
{
int i, j;
tbl[0] = tbl[1] = tbl[2] = tbl[3] = -1;
for (i = 0; i < 260; i++) {
j = 4 + gsm610_bitorder[i];
if (i < 50)
tbl[j] = 0; /* Class 1a */
else if (i < 182)
tbl[j] = 1; /* Class 1b */
else
tbl[j] = 2; /* Class 2 */
}
return GSM_FR_BYTES * 8;
}
static int
gen_table_efr(int *tbl)
{
int i, j, k;
tbl[0] = tbl[1] = tbl[2] = tbl[3] = -1;
for (i = 0; i < 260; i++) {
j = gsm660_bitorder[i];
if (j < 71)
k = j;
else if (j < 73)
k = 71;
else if (j < 123)
k = j - 2;
else if (j < 125)
k = 119;
else if (j < 178)
k = j - 4;
else if (j < 180)
k = 172;
else if (j < 230)
k = j - 6;
else if (j < 232)
k = 222;
else if (j < 252)
k = j - 8;
else
continue;
if (i < 50)
tbl[k] = 0; /* Class 1a */
else if (i < 182)
tbl[k] = 1; /* Class 1b */
else
tbl[k] = 2; /* Class 2 */
}
return GSM_EFR_BYTES * 8;
}
static int
gen_table_amr_12_2(int *tbl)
{
int i;
for (i = 0; i < 16; i++)
tbl[i] = -1;
for (i = 0; i < 244; i++)
tbl[i+16] = i < 81 ? 0 : 1;
for (i = 0; i < 4; i++)
tbl[i+16+244] = -1;
return 8 * 33;
}
static void
print_table(const char *name, int *tbl, int len)
{
int i;
printf("static const int %s[] = {\n", name);
for (i = 0; i < len; i++) {
if ((i & 15) == 0)
printf("\t");
printf("%2d", tbl[i]);
if (((i & 15) == 15) || (i == len-1))
printf(",\n");
else
printf(", ");
}
printf("};\n\n");
}
int main(int argc, char *argv[])
{
int tbl[33*8];
int rv;
rv = gen_table_fr(tbl);
print_table("gsm_fr_bitclass", tbl, rv);
rv = gen_table_efr(tbl);
print_table("gsm_efr_bitclass", tbl, rv);
rv = gen_table_amr_12_2(tbl);
print_table("gsm_amr_12_2_bitclass", tbl, rv);
return 0;
}

View File

@@ -10,7 +10,7 @@ env = os.environ
env['L1FWD_BTS_HOST'] = '127.0.0.1'
bts_proc = subprocess.Popen(["./src/osmo-bts-sysmo/sysmobts-remote",
"-c", "./doc/examples/sysmo/osmo-bts-sysmo.cfg"], env = env,
"-c", "./doc/examples/sysmo/osmo-bts.cfg"], env = env,
stdin=None, stdout=None)
time.sleep(1)

View File

@@ -8,8 +8,8 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
osmo-build-dep.sh libosmocore "" --disable-doxygen
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
osmo-build-dep.sh libosmo-abis
cd "$deps"
@@ -17,7 +17,6 @@ configure_flags="\
--enable-sanitize \
--enable-werror \
--enable-trx \
--enable-external-tests \
"
build_bts "osmo-bts-trx" "$configure_flags"

View File

@@ -43,6 +43,7 @@ build_bts() {
conf_flags="$*"
if [ "$WITH_MANUALS" = "1" ]; then
conf_flags="$conf_flags --enable-manuals"
osmo-build-dep.sh osmo-gsm-manuals
export PATH="$inst/bin:$PATH"
fi
@@ -50,12 +51,10 @@ build_bts() {
./configure $conf_flags
$MAKE $PARALLEL_MAKE
$MAKE check || cat-testlogs.sh
DISTCHECK_CONFIGURE_FLAGS="$conf_flags" $MAKE $PARALLEL_MAKE distcheck || cat-testlogs.sh
DISTCHECK_CONFIGURE_FLAGS="$conf_flags" $MAKE distcheck || cat-testlogs.sh
# Manuals: publish
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
$MAKE -C "$base/doc/manuals" publish
fi
$MAKE $PARALLEL_MAKE maintainer-clean
}

View File

@@ -4,12 +4,12 @@
# shellcheck source=contrib/jenkins_common.sh
. $(dirname "$0")/jenkins_common.sh
osmo-build-dep.sh libosmocore "" --disable-doxygen
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
osmo-build-dep.sh libosmocore "" --disable-doxygen
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
osmo-build-dep.sh libosmo-abis
cd "$deps"
osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"

View File

@@ -4,12 +4,12 @@
# shellcheck source=contrib/jenkins_common.sh
. $(dirname "$0")/jenkins_common.sh
osmo-build-dep.sh libosmocore "" --disable-doxygen
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
osmo-build-dep.sh libosmocore "" --disable-doxygen
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
osmo-build-dep.sh libosmo-abis
cd "$deps"
osmo-layer1-headers.sh oc2g "$FIRMWARE_VERSION"

View File

@@ -4,12 +4,12 @@
# shellcheck source=contrib/jenkins_common.sh
. $(dirname "$0")/jenkins_common.sh
osmo-build-dep.sh libosmocore "" --disable-doxygen
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
osmo-build-dep.sh libosmocore "" --disable-doxygen
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
osmo-build-dep.sh libosmo-abis
cd "$deps"
osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"

View File

@@ -8,8 +8,8 @@ export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
osmo-build-dep.sh libosmocore "" --disable-doxygen
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
osmo-build-dep.sh libosmo-abis
cd "$deps"
@@ -20,7 +20,6 @@ configure_flags="\
--with-octsdr-2g=$deps/layer1-headers/ \
--enable-octphy \
--enable-trx \
--enable-external-tests \
"
build_bts "osmo-bts-octphy+trx" "$configure_flags"

View File

@@ -4,12 +4,12 @@
# shellcheck source=contrib/jenkins_common.sh
. $(dirname "$0")/jenkins_common.sh
osmo-build-dep.sh libosmocore "" --disable-doxygen
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
osmo-build-dep.sh libosmocore "" --disable-doxygen
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
osmo-build-dep.sh libosmo-abis
cd "$deps"
osmo-layer1-headers.sh sysmo "$FIRMWARE_VERSION"
@@ -21,7 +21,6 @@ configure_flags="\
--enable-werror \
--enable-sysmocom-bts \
--with-sysmobts=$inst/include/ \
--enable-external-tests \
"
# This will not work for the femtobts

31
contrib/l1fwd.init Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: l1fwd
# Required-Start:
# Required-Stop: $local_fs
# Default-Start: 5
# Default-Stop: 0 6
# Short-Description: Start screen session with l1fwd software
# Description:
### END INIT INFO
. /etc/default/rcS
case "$1" in
start)
/usr/bin/screen -d -m -c /etc/osmocom/screenrc-l1fwd
;;
stop)
echo "This script doesn't support stop"
exit 1
;;
restart|reload|force-reload)
exit 0
;;
show)
;;
*)
echo "Usage: sysmobts {start|stop|show|reload|restart}" >&2
exit 1
;;
esac

13
contrib/respawn-only.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
PID=$$
echo "-1000" > /proc/$PID/oom_score_adj
trap "{ kill 0; kill -2 0; }" EXIT
while [ -f $1 ]; do
(echo "0" > /proc/self/oom_score_adj && exec nice -n -20 $*) &
LAST_PID=$!
wait $LAST_PID
sleep 10s
done

18
contrib/respawn.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
PID=$$
echo "-1000" > /proc/$PID/oom_score_adj
trap "kill 0" EXIT
while [ -e /etc/passwd ]; do
cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0
sleep 2s
cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0
sleep 1s
echo "0" > /sys/class/leds/activity_led/brightness
(echo "0" > /proc/self/oom_score_adj && exec nice -n -20 $*) &
LAST_PID=$!
wait $LAST_PID
sleep 10s
done

3
contrib/screenrc-l1fwd Normal file
View File

@@ -0,0 +1,3 @@
chdir /tmp
screen -t BTS 0 /etc/osmocom/respawn.sh /usr/bin/l1fwd-proxy
detach

View File

@@ -0,0 +1,5 @@
chdir /tmp
screen -t BTS 0 /etc/osmocom/respawn.sh /usr/bin/osmo-bts-sysmo -c /etc/osmocom/osmo-bts.cfg -r 1 -M
screen -t PCU 1 /etc/osmocom/respawn-only.sh /usr/bin/osmo-pcu -c /etc/osmocom/osmo-pcu.cfg -e
screen -t MGR 2 /etc/osmocom/respawn-only.sh /usr/bin/sysmobts-mgr -n -c /etc/osmocom/sysmobts-mgr.cfg
detach

View File

@@ -24,9 +24,5 @@ if ENABLE_LC15BTS
SYSTEMD_SERVICES += osmo-bts-lc15.service lc15bts-mgr.service
endif
if ENABLE_OC2GBTS
SYSTEMD_SERVICES += osmo-bts-oc2g.service oc2gbts-mgr.service
endif
systemdsystemunit_DATA = $(SYSTEMD_SERVICES)
endif # HAVE_SYSTEMD

View File

@@ -2,15 +2,11 @@
Description=osmo-bts manager for LC15 / sysmoBTS 2100
After=lc15-sysdev-remap.service
Wants=lc15-sysdev-remap.service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
NotifyAccess=all
WatchdogSec=21780s
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2

View File

@@ -2,15 +2,11 @@
Description=osmo-bts manager for OC-2G
After=oc2g-sysdev-remap.service
Wants=oc2g-sysdev-remap.service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
NotifyAccess=all
WatchdogSec=21780s
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2

View File

@@ -1,22 +1,20 @@
[Unit]
Description=osmo-bts for LC15 / sysmoBTS 2100
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness'
ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness'
ExecStart=/usr/bin/osmo-bts-lc15 -t 2 -s -c /etc/osmocom/osmo-bts-lc15.cfg -M
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
RuntimeDirectory=osmo-bts
ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness'
ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness'
Restart=always
RestartSec=2
RestartPreventExitStatus=1
# CPU scheduling policy:
# The msg queues must be read fast enough
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
CPUSchedulingPriority=11
# See sched(7) for further details on real-time policies and priorities
CPUSchedulingPriority=1
[Install]
WantedBy=multi-user.target

View File

@@ -1,22 +1,20 @@
[Unit]
Description=osmo-bts for OC-2G
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts-oc2g.cfg -M
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
RuntimeDirectory=osmo-bts
ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness'
ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness'
ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts.cfg -M
ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness'
ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness'
Restart=always
RestartSec=2
RestartPreventExitStatus=1
# CPU scheduling policy:
# The msg queues must be read fast enough
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
CPUSchedulingPriority=11
# See sched(7) for further details on real-time policies and priorities
CPUSchedulingPriority=1
[Install]
WantedBy=multi-user.target

View File

@@ -1,7 +1,5 @@
[Unit]
Description=osmo-bts for sysmocom sysmoBTS
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
@@ -9,16 +7,13 @@ ExecStartPre=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
ExecStart=/usr/bin/osmo-bts-sysmo -s -c /etc/osmocom/osmo-bts-sysmo.cfg -M
ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
ExecStopPost=/bin/sh -c 'cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; sleep 3s; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0; sleep 1s'
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2
RestartPreventExitStatus=1
# CPU scheduling policy:
# The msg queues must be read fast enough
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
CPUSchedulingPriority=20
# See sched(7) for further details on real-time policies and priorities
CPUSchedulingPriority=1
[Install]
WantedBy=multi-user.target

View File

@@ -1,24 +1,15 @@
[Unit]
Description=Osmocom osmo-bts for osmo-trx
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/osmo-bts-trx -s -c /etc/osmocom/osmo-bts-trx.cfg
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2
User=osmocom
Group=osmocom
AmbientCapabilities=CAP_SYS_NICE
# CPU scheduling policy:
# Let it process messages quickly enough
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
CPUSchedulingPriority=11
# See sched(7) for further details on real-time policies and priorities
CPUSchedulingPriority=1
[Install]
WantedBy=multi-user.target

View File

@@ -1,24 +1,15 @@
[Unit]
Description=Osmocom GSM BTS for virtual Um layer based on GSMTAP/UDP
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/osmo-bts-virtual -s -c /etc/osmocom/osmo-bts-virtual.cfg
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2
User=osmocom
Group=osmocom
AmbientCapabilities=CAP_SYS_NICE
# CPU scheduling policy:
# Let it process messages quickly enough
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
CPUSchedulingPriority=11
# See sched(7) for further details on real-time policies and priorities
CPUSchedulingPriority=1
[Install]
WantedBy=multi-user.target

View File

@@ -1,13 +1,9 @@
[Unit]
Description=osmo-bts manager for sysmoBTS
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/sysmobts-mgr -ns -c /etc/osmocom/sysmobts-mgr.cfg
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2

1721
debian/changelog vendored

File diff suppressed because it is too large Load Diff

2
debian/compat vendored
View File

@@ -1 +1 @@
10
9

45
debian/control vendored
View File

@@ -1,42 +1,25 @@
Source: osmo-bts
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
Maintainer: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Section: net
Priority: optional
Build-Depends: debhelper (>= 10),
Build-Depends: debhelper (>= 9),
pkg-config,
dh-autoreconf,
dh-systemd (>= 1.5),
autotools-dev,
pkg-config,
libosmocore-dev (>= 1.11.0),
libosmo-abis-dev (>= 2.0.0),
libosmo-netif-dev (>= 1.6.0),
libosmocore-dev,
libosmo-abis-dev,
libgps-dev,
txt2man,
osmo-gsm-manuals-dev (>= 1.6.0)
txt2man
Standards-Version: 3.9.8
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
Vcs-Browser: http://git.osmocom.org/osmo-bts/
Vcs-Git: git://git.osmocom.org/osmo-bts
Homepage: https://projects.osmocom.org/projects/osmobts
Package: osmo-bts
Architecture: any
Depends: osmo-bts-trx, osmo-bts-virtual, ${misc:Depends}
Description: Base Transceiver Station for GSM
OsmoBTS is a software implementation of Layer2/3 of a BTS. It implements the
following protocols/interfaces:
LAPDm (GSM 04.06)
RTP
A-bis/IP in IPA multiplex
OML (GSM TS 12.21)
RSL (GSM TS 08.58)
.
OsmoBTS is modular and has support for multiple back-ends. A back-end talks to
a specific L1/PHY implementation of the respective BTS hardware. Based on this
architecture, it should be relatively easy to add a new back-end to support
so-far unsupported GSM PHY/L1 and associated hardware.
Package: osmo-bts-trx
Architecture: any
Conflicts: osmo-bts
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: osmo-bts-trx GSM BTS with osmo-trx
osmo-bts-trx to be used with the osmo-trx application
@@ -51,6 +34,7 @@ Description: Debug symbols for the osmo-bts-trx
Package: osmo-bts-virtual
Architecture: any
Conflicts: osmo-bts
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Virtual Osmocom GSM BTS (no RF hardware; GSMTAP/UDP)
This version of OsmoBTS doesn't use actual GSM PHY/Hardware/RF, but
@@ -64,12 +48,3 @@ Priority: extra
Depends: osmo-bts-virtual (= ${binary:Version}), ${misc:Depends}
Description: Debug symbols for the osmo-bts-virtual
Make debugging possible
Package: osmo-bts-doc
Architecture: all
Section: doc
Priority: optional
Depends: ${misc:Depends}
Description: ${misc:Package} PDF documentation
Various manuals: user manual, VTY reference manual and/or
protocol/interface manuals.

View File

@@ -1 +0,0 @@
usr/share/doc/osmo-bts-doc/*.pdf

View File

@@ -1,39 +0,0 @@
#!/bin/sh -e
case "$1" in
configure)
# Create the osmocom group and user (if it doesn't exist yet)
if ! getent group osmocom >/dev/null; then
groupadd --system osmocom
fi
if ! getent passwd osmocom >/dev/null; then
useradd \
--system \
--gid osmocom \
--home-dir /var/lib/osmocom \
--shell /sbin/nologin \
--comment "Open Source Mobile Communications" \
osmocom
fi
# Fix permissions of previous (root-owned) install (OS#4107)
if dpkg --compare-versions "$2" le "1.13.0"; then
if [ -e /etc/osmocom/osmo-bts-trx.cfg ]; then
chown -v osmocom:osmocom /etc/osmocom/osmo-bts-trx.cfg
chmod -v 0660 /etc/osmocom/osmo-bts-trx.cfg
fi
if [ -d /etc/osmocom ]; then
chown -v root:osmocom /etc/osmocom
chmod -v 2775 /etc/osmocom
fi
mkdir -p /var/lib/osmocom
chown -R -v osmocom:osmocom /var/lib/osmocom
fi
;;
esac
# dh_installdeb(1) will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#

View File

@@ -3,3 +3,4 @@ lib/systemd/system/osmo-bts-virtual.service
usr/bin/osmo-bts-virtual
usr/bin/osmo-bts-omldummy
usr/share/doc/osmo-bts/examples/osmo-bts-virtual/osmo-bts-virtual.cfg
usr/share/doc/osmo-bts/examples/osmo-bts-virtual/openbsc-virtual.cfg

View File

@@ -1,39 +0,0 @@
#!/bin/sh -e
case "$1" in
configure)
# Create the osmocom group and user (if it doesn't exist yet)
if ! getent group osmocom >/dev/null; then
groupadd --system osmocom
fi
if ! getent passwd osmocom >/dev/null; then
useradd \
--system \
--gid osmocom \
--home-dir /var/lib/osmocom \
--shell /sbin/nologin \
--comment "Open Source Mobile Communications" \
osmocom
fi
# Fix permissions of previous (root-owned) install (OS#4107)
if dpkg --compare-versions "$2" le "1.13.0"; then
if [ -e /etc/osmocom/osmo-bts-virtual.cfg ]; then
chown -v osmocom:osmocom /etc/osmocom/osmo-bts-virtual.cfg
chmod -v 0660 /etc/osmocom/osmo-bts-virtual.cfg
fi
if [ -d /etc/osmocom ]; then
chown -v root:osmocom /etc/osmocom
chmod -v 2775 /etc/osmocom
fi
mkdir -p /var/lib/osmocom
chown -R -v osmocom:osmocom /var/lib/osmocom
fi
;;
esac
# dh_installdeb(1) will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#

6
debian/rules vendored
View File

@@ -16,7 +16,7 @@ override_dh_strip:
dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg
override_dh_auto_configure:
dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system
override_dh_clean:
dh_clean
@@ -26,7 +26,3 @@ override_dh_clean:
# Print test results in case of a failure
override_dh_auto_test:
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers)
override_dh_compress:
dh_compress -X.pdf

View File

@@ -4,7 +4,7 @@ h2. generic
h3. trx.0.thermal-attenuation
The idea of this parameter is to attenuate the system output power as part of
The idea of this paramter is to attenuate the system output power as part of
thermal management. In some cases the PA might be passing a critical level,
so an external control process can use this attribute to reduce the system
output power.

View File

@@ -1,29 +1,17 @@
# all config examples must be listed here unconditionally, so that
# all of them end up in the release tarball (see OS#6349)
EXTRA_DIST = \
trx/osmo-bts-trx.cfg \
trx/osmo-bts-trx-calypso.cfg \
octphy/osmo-bts-trx2dsp1.cfg \
octphy/osmo-bts-octphy.cfg \
oc2g/osmo-bts-oc2g.cfg \
oc2g/oc2gbts-mgr.cfg \
sysmo/sysmobts-mgr.cfg \
sysmo/osmo-bts-sysmo.cfg \
litecell15/osmo-bts-lc15.cfg \
litecell15/lc15bts-mgr.cfg \
virtual/osmo-bts-virtual.cfg \
$(NULL)
OSMOCONF_FILES = virtual/osmo-bts-virtual.cfg
doc_virtualdir = $(docdir)/examples/osmo-bts-virtual
doc_virtual_DATA = \
virtual/osmo-bts-virtual.cfg
OSMOCONF_FILES = virtual/osmo-bts-virtual.cfg
virtual/osmo-bts-virtual.cfg \
virtual/openbsc-virtual.cfg
EXTRA_DIST = $(doc_virtual_DATA)
if ENABLE_SYSMOBTS
doc_sysmodir = $(docdir)/examples/osmo-bts-sysmo
doc_sysmo_DATA = \
sysmo/osmo-bts-sysmo.cfg \
sysmo/sysmobts-mgr.cfg
EXTRA_DIST += $(doc_sysmo_DATA)
OSMOCONF_FILES += sysmo/osmo-bts-sysmo.cfg sysmo/sysmobts-mgr.cfg
endif
@@ -32,6 +20,7 @@ doc_trxdir = $(docdir)/examples/osmo-bts-trx
doc_trx_DATA = \
trx/osmo-bts-trx.cfg \
trx/osmo-bts-trx-calypso.cfg
EXTRA_DIST += $(doc_trx_DATA)
OSMOCONF_FILES += trx/osmo-bts-trx.cfg
endif
@@ -40,6 +29,7 @@ doc_octphydir = $(docdir)/examples/osmo-bts-octphy
doc_octphy_DATA = \
octphy/osmo-bts-trx2dsp1.cfg \
octphy/osmo-bts-octphy.cfg
EXTRA_DIST += $(doc_octphy_DATA)
OSMOCONF_FILES += octphy/osmo-bts-octphy.cfg
endif
@@ -48,16 +38,9 @@ doc_lc15dir = $(docdir)/examples/osmo-bts-lc15
doc_lc15_DATA = \
litecell15/osmo-bts-lc15.cfg \
litecell15/lc15bts-mgr.cfg
EXTRA_DIST += $(doc_lc15_DATA)
OSMOCONF_FILES += litecell15/osmo-bts-lc15.cfg litecell15/lc15bts-mgr.cfg
endif
if ENABLE_OC2GBTS
doc_oc2gdir = $(docdir)/examples/osmo-bts-oc2g
doc_oc2g_DATA = \
oc2g/osmo-bts-oc2g.cfg \
oc2g/oc2gbts-mgr.cfg
OSMOCONF_FILES += oc2g/osmo-bts-oc2g.cfg oc2g/oc2gbts-mgr.cfg
endif
osmoconfdir = $(sysconfdir)/osmocom
osmoconf_DATA = $(OSMOCONF_FILES)

View File

@@ -3,12 +3,10 @@
!!
!
log stderr
logging filter all 1
logging color 1
logging print category-hex 0
logging print category 1
logging print category 0
logging timestamp 0
logging print file basename last
logging print level 1
logging level temp info
logging level fw info
logging level find info

View File

@@ -4,11 +4,7 @@
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl info
logging level oml info
logging level rll notice
@@ -39,7 +35,7 @@ phy 1
trx-calibration-path /mnt/rom/factory/calib
bts 0
band 900
ipa unit-id 6969 0
ipa unit-id 1500 0
oml remote-ip 192.168.234.185
trx 0
phy 0 instance 0

View File

@@ -3,12 +3,10 @@
!!
!
log stderr
logging filter all 1
logging color 1
logging print category-hex 0
logging print category 1
logging print category 0
logging timestamp 0
logging print file basename last
logging print level 1
logging level temp info
logging level fw info
logging level find info

View File

@@ -4,11 +4,7 @@
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl info
logging level oml info
logging level rll notice
@@ -36,7 +32,7 @@ phy 0
trx-calibration-path /mnt/rom/factory/calib
bts 0
band 900
ipa unit-id 6969 0
ipa unit-id 1500 0
oml remote-ip 10.42.0.1
trx 0
phy 0 instance 0

View File

@@ -4,11 +4,7 @@
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl info
logging level oml info
logging level rll notice
@@ -29,7 +25,7 @@ phy 0
instance 0
bts 0
band 1800
ipa unit-id 6969 0
ipa unit-id 1234 0
oml remote-ip 127.0.0.1
trx 0
phy 0 instance 0

View File

@@ -4,11 +4,7 @@
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl info
logging level oml info
logging level rll notice
@@ -30,7 +26,7 @@ phy 0
instance 1
bts 0
band 1800
ipa unit-id 6969 0
ipa unit-id 1234 0
oml remote-ip 127.0.0.1
trx 0
phy 0 instance 0

View File

@@ -4,11 +4,7 @@
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl info
logging level oml info
logging level rll notice
@@ -27,7 +23,7 @@ phy 0
instance 0
bts 0
band 1800
ipa unit-id 6969 0
ipa unit-id 666 0
oml remote-ip 10.1.2.3
trx 0
phy 0 instance 0

View File

@@ -3,12 +3,9 @@
!!
!
log stderr
logging filter all 1
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level temp info
logging level fw info
logging level find info

View File

@@ -1,15 +1,11 @@
!
! OsmoBTS configuration example for CalypsoBTS
! https://osmocom.org/projects/baseband/wiki/CalypsoBTS
! http://osmocom.org/projects/baseband/wiki/CalypsoBTS
!!
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl notice
logging level oml notice
logging level rll notice
@@ -26,15 +22,17 @@ line vty
!
phy 0
instance 0
osmotrx rx-gain 1
osmotrx ip local 127.0.0.1
osmotrx ip remote 127.0.0.1
osmotrx timing-advance-loop
osmotrx ms-power-loop -65
osmotrx legacy-setbsic
osmotrx fn-advance 20
osmotrx rts-advance 5
bts 0
oml remote-ip 127.0.0.1
ipa unit-id 6969 0
ipa unit-id 1801 0
gsmtap-sapi pdtch
gsmtap-sapi ccch
band 900
trx 0
phy 0 instance 0
nominal-tx-power 23

View File

@@ -4,11 +4,7 @@
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl notice
logging level oml notice
logging level rll notice
@@ -25,11 +21,14 @@ line vty
!
phy 0
instance 0
osmotrx rx-gain 1
osmotrx ip local 127.0.0.1
osmotrx ip remote 127.0.0.1
bts 0
band 1800
ipa unit-id 6969 0
oml remote-ip 127.0.0.1
oml remote-ip 192.168.122.1
gsmtap-sapi ccch
gsmtap-sapi pdtch
trx 0
phy 0 instance 0

View File

@@ -0,0 +1,151 @@
!
! OpenBSC (0.15.0.629-34f0-dirty) configuration saved from vty
!!
!
log stderr
logging filter all 1
logging color 0
logging print category 1
logging timestamp 1
logging level all info
logging level rll notice
logging level cc notice
logging level mm debug
logging level rr notice
logging level rsl notice
logging level nm info
logging level mncc notice
logging level pag notice
logging level meas notice
logging level sccp notice
logging level msc notice
logging level mgcp notice
logging level ho notice
logging level db notice
logging level ref notice
logging level gprs debug
logging level ns info
logging level bssgp debug
logging level llc debug
logging level sndcp debug
logging level nat notice
logging level ctrl notice
logging level smpp debug
logging level filter debug
logging level ranap debug
logging level sua debug
logging level lglobal notice
logging level llapd notice
logging level linp notice
logging level lmux notice
logging level lmi notice
logging level lmib notice
logging level lsms notice
logging level lctrl notice
logging level lgtp notice
logging level lstats notice
logging level lgsup notice
logging level loap notice
!
stats interval 5
!
line vty
no login
!
e1_input
e1_line 0 driver ipa
e1_line 0 port 0
no e1_line 0 keepalive
network
network country code 262
mobile network code 42
short name OpenBSC
long name OpenBSC
auth policy accept-all
authorized-regexp .*
location updating reject cause 13
encryption a5 0
neci 1
paging any use tch 0
rrlp mode ms-based
mm info 1
handover 0
handover window rxlev averaging 10
handover window rxqual averaging 1
handover window rxlev neighbor averaging 10
handover power budget interval 6
handover power budget hysteresis 3
handover maximum distance 9999
timer t3101 10
timer t3103 0
timer t3105 0
timer t3107 0
timer t3109 4
timer t3111 0
timer t3113 60
timer t3115 0
timer t3117 0
timer t3119 0
timer t3122 10
timer t3141 0
subscriber-keep-in-ram 0
bts 0
type sysmobts
band DCS1800
cell_identity 6969
location_area_code 1
base_station_id_code 63
ms max power 0
cell reselection hysteresis 4
rxlev access min 0
periodic location update 30
radio-link-timeout 32
channel allocator descending
rach tx integer 9
rach max transmission 7
channel-descrption attach 1
channel-descrption bs-pa-mfrms 5
channel-descrption bs-ag-blks-res 1
ip.access unit_id 6969 0
oml ip.access stream_id 255 line 0
neighbor-list mode automatic
codec-support fr
gprs mode none
no force-combined-si
trx 0
rf_locked 0
arfcn 666
nominal power 0
max_power_red 0
rsl e1 tei 0
timeslot 0
phys_chan_config CCCH+SDCCH4
hopping enabled 0
timeslot 1
phys_chan_config SDCCH8
hopping enabled 0
timeslot 2
phys_chan_config TCH/F
hopping enabled 0
timeslot 3
phys_chan_config TCH/F
hopping enabled 0
timeslot 4
phys_chan_config TCH/F
hopping enabled 0
timeslot 5
phys_chan_config TCH/F
hopping enabled 0
timeslot 6
phys_chan_config TCH/F
hopping enabled 0
timeslot 7
phys_chan_config TCH/F
hopping enabled 0
mncc-int
default-codec tch-f fr
default-codec tch-h hr
nitb
subscriber-create-on-demand
subscriber-create-on-demand random 1 24
assign-tmsi

View File

@@ -3,12 +3,10 @@
!!
!
log stderr
logging color 1
logging print category-hex 0
logging filter all 0
logging color 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
logging level rsl info
logging level oml info
logging level rll notice
@@ -52,11 +50,12 @@ bts 0
rtp jitter-buffer 100
paging queue-size 200
paging lifetime 0
uplink-power-target -75
min-qual-rach 50
min-qual-norm -5
trx 0
power-ramp max-initial 23000 mdBm
power-ramp step-size 2000 mdB
power-ramp step-interval 1
ms-power-control osmo
ms-power-control dsp
phy 0 instance 0

View File

@@ -3,9 +3,9 @@ EXTRA_DIST = dtx.dot \
osmobts-abis-docinfo.xml \
osmobts-usermanual.adoc \
osmobts-usermanual-docinfo.xml \
osmobts-vty-reference.xml \
rtp-amr.adoc \
rtp-amr-docinfo.xml \
regen_doc.sh \
abis \
chapters \
vty
@@ -17,33 +17,8 @@ if BUILD_MANUALS
osmobts-abis.pdf: $(srcdir)/abis/*.adoc $(srcdir)/abis/*.msc
rtp-amr.pdf: $(srcdir)/dtx.dot
# NOTE: osmo-bts-omldummy has no VTY interface
VARIANTS = virtual
VTY_REFERENCE = osmobts-vty-reference.xml
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
if ENABLE_SYSMOBTS
VARIANTS += sysmo
endif
if ENABLE_TRX
VARIANTS += trx
endif
if ENABLE_OCTPHY
VARIANTS += octphy
endif
if ENABLE_LC15BTS
VARIANTS += lc15
endif
if ENABLE_OC2GBTS
VARIANTS += oc2g
endif
# This is a significantly modified, multi-target adopted copy of
# $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
include $(srcdir)/vty/Makefile.vty-reference.inc
OSMO_REPOSITORY = osmo-bts
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
endif

View File

@@ -3,17 +3,16 @@
=== List of Messages
The following tables list the OML messages used by OsmoBTS, grouped by their
level of compliance with 3GPP TS 52.021 [[3gpp-ts-52-021]] (previously 3GPP TS
12.21).
level of compliance with 3GPP TS 12.21.
==== Messages Compliant With TS 52.021
==== Messages Compliant With TS 12.21
Specific limitations apply, see the linked sections.
.Messages compliant with TS 52.021
.Messages compliant with TS 12.21
[options="header",cols="10%,10%,20%,35%,5%,20%"]
|===
| TS 52.021 § | type code (hex) | This document § | Message | <-/-> | Received/Sent by OsmoBTS
| TS 12.21 § | type code (hex) | This document § | Message | <-/-> | Received/Sent by OsmoBTS
6+<| *SW Download Management Messages:*
| 8.3.7 | 0x10 | <<sw_act_rep>> | SW Activated Report | -> | Sent
6+<| *Air Interface Management Messages:*
@@ -35,16 +34,12 @@ Specific limitations apply, see the linked sections.
.3+.| 8.9.2 | 0x74 .3+.| <<opstart>> | Opstart | <- | Received
| 0x75 | Opstart Ack | -> | Sent
| 0x76 | Opstart Nack | -> | Sent
6+<| *Other Messages:*
.3+.| 8.11.1 | 0x81 | <<get_attributes>> | Get Attributes | <- | Received
| 8.11.3 | 0x82 | <<get_attr_resp>> | Get Attribute Response | -> | Sent
| 8.11.1 | 0x83 | | Get Attributes Nack | -> | Sent
|===
==== Messages Specific to OsmoBTS
.Messages specific to OsmoBTS, not found in 3GPP TS 52.021
.Messages specific to OsmoBTS, not found in 3GPP TS 12.21
[options="header"]
[options="header",cols="20%,55%,5%,20%"]
|===
@@ -54,10 +49,10 @@ Specific limitations apply, see the linked sections.
==== Messages Not Implemented by OsmoBTS
.3GPP TS 52.021 messages not implemented by OsmoBTS
.3GPP TS 12.21 messages not implemented by OsmoBTS
[options="header",cols="10%,10%,80%"]
|===
| TS 52.021 § | type code (hex) | Message
| TS 12.21 § | type code (hex) | Message
3+<| *SW Download Management Messages:*
.3+.| 8.3.1 | 0x01 | Load Data Initiate
| 0x02 | Load Data Initiate Ack
@@ -141,6 +136,9 @@ Specific limitations apply, see the linked sections.
| 8.10.3 | 0x8C | Stop Measurement
| 8.10.4 | 0x8D | Start Measurement
3+<| *Other Messages:*
| 8.11.1 | 0x81 | Get Attributes
| 8.11.3 | 0x82 | Get Attribute(s) Response
| 8.11.1 | 0x83 | Get Attributes Nack
.3+.| 8.11.2 | 0x84 | Set Alarm Threshold
| 0x85 | Set Alarm Threshold Ack
| 0x86 | Set Alarm Threshold Nack
@@ -153,7 +151,7 @@ Specific limitations apply, see the linked sections.
==== SW Activated Report
OsmoBTS will send an _SW Activated Report_ when RF has been activated
successfully. The message is compliant with 3GPP TS 52.021 § 8.3.7.
successfully. The message is compliant with 3GPP TS 12.21 § 8.3.7.
Upon RF activation, two _SW Activated Report_ messages will be sent, for the Object Classes
@@ -165,13 +163,13 @@ Upon RF activation, two _SW Activated Report_ messages will be sent, for the Obj
OsmoBTS will receive a _Set BTS Attributes_ message and reply with a
corresponding ACK message on success. IE handling is fully compliant to TS
52.021, except that a change of BCCH ARFCN or BSIC while in operation is not
12.21, except that a change of BCCH ARFCN or BSIC while in operation is not
supported, and hence the _Starting Time_ IE is rejected.
._Set BTS Attributes_ IEs not handled by OsmoBTS
[options="header",cols="10%,30%,60%"]
|===
| TS 52.021 § | IE Name | Handling
| TS 12.21 § | IE Name | Handling
| 9.4.52 | Starting Time | not supported (provokes NACK cause 0x10)
|===
@@ -179,13 +177,13 @@ supported, and hence the _Starting Time_ IE is rejected.
[[set_radio_attr]]
==== Set Radio Carrier Attributes
This message conforms to 3GPP TS 52.021, with the following limitation,
This message conforms to 3GPP TS 12.21, with the following limitation,
as frequency hopping is not supported by OsmoBTS:
._Set Radio Carrier Attributes_ IE limitations
[options="header",cols="10%,30%,60%"]
|===
| TS 52.021 § | IE Name | Handling
| TS 12.21 § | IE Name | Handling
| 9.4.5 | ARFCN List | ignored
|===
@@ -193,14 +191,14 @@ as frequency hopping is not supported by OsmoBTS:
[[set_chan_attr]]
==== Set Channel Attributes
This message conforms to 3GPP TS 52.021, with the following limitation: the
following 3GPP TS 52.021 IEs provoke a NACK response when sent to OsmoBTS, as
This message conforms to 3GPP TS 12.21, with the following limitation: the
following 3GPP TS 12.21 IEs provoke a NACK response when sent to OsmoBTS, as
frequency hopping is not supported:
._Set Channel Attributes_ IE limitations
[options="header",cols="10%,30%,60%"]
|===
| TS 52.021 § | IE Name | Handling
| TS 12.21 § | IE Name | Handling
| 9.4.21 | HSN | not supported (provokes NACK cause 0x10)
| 9.4.27 | MAIO | not supported (provokes NACK cause 0x10)
| 9.4.52 | Starting Time | not supported (provokes NACK cause 0x10)
@@ -209,54 +207,34 @@ frequency hopping is not supported:
[[state_changed_rep]]
==== State Changed Event Report
This message is compliant with 3GPP TS 52.021. Exactly these IEs are sent by
This message is compliant with 3GPP TS 12.21. Exactly these IEs are sent by
OsmoBTS:
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message Type (0xf5) | 3GPP TS 52.021 9.1 | M | V | 1
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
| Operational State | 3GPP TS 52.021 9.4.38 | O | TV | 2
| Availability Status | 3GPP TS 52.021 9.4.7 | O | TL16V (with length of 1) | 3
| Message Type (0xf5) | 3GPP TS 12.21 9.1 | M | V | 1
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
| Operational State | 3GPP TS 12.21 9.4.38 | O | TV | 2
| Availability Status | 3GPP TS 12.21 9.4.7 | O | TL16V (with length of 1) | 3
|===
[[chg_adm_state]]
==== Change Administrative State
This message is compliant with 3GPP TS 52.021 § 8.8.5. It applies to all of the
Object Classes defined in 3GPP TS 52.021 § 9.2 as well as
This message is compliant with 3GPP TS 12.21 § 8.8.5. It applies to all of the
Object Classes defined in 3GPP TS 12.21 § 9.2 as well as
<<addnl_obj_classes>>.
[[opstart]]
==== Opstart
This message is compliant with 3GPP TS 52.021 § 8.9.2. It applies to all of the
Object Classes defined in 3GPP TS 52.021 § 9.2 as well as
This message is compliant with 3GPP TS 12.21 § 8.9.2. It applies to all of the
Object Classes defined in 3GPP TS 12.21 § 9.2 as well as
<<addnl_obj_classes>>.
[[get_attributes]]
==== Get Attributes
This message is compliant with 3GPP TS 52.021 § 8.11.1.
For a list of supported attributes, see <<get_attr_resp>>.
[[get_attr_resp]]
==== Get Attribute Response
This message is compliant with 3GPP TS 52.021 § 8.11.3.
The following attributes are provided by OsmoBTS:
[options="header"]
|===
| 3GPP TS 52.021 chapter | description | see
| 9.4.61 | SW Configuration | <<NM_ATT_SW_CONFIG>>
| 9.4.30 | Manufacturer Id | <<NM_ATT_MANUF_ID>>
|===
=== Details on OsmoBTS Specific Messages
@@ -274,9 +252,9 @@ The message specifics depend on the Object Class and are detailed in
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message Type (0xf5) | 3GPP TS 52.021 9.1 | M | V | 1
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
| Message Type (0xf5) | 3GPP TS 12.21 9.1 | M | V | 1
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
5+<| _Object Class specific IEs follow, see <<addnl_obj_classes>>..._
|===
@@ -284,7 +262,7 @@ The message specifics depend on the Object Class and are detailed in
[[addnl_obj_classes]]
=== Additional Object Classes
In addition to 3GPP TS 52.021 Chapter 9.2, the following managed objects
In addition to 3GPP TS 12.21 Chapter 9.2, the following managed objects
are supported:
.Additional Managed Object Classes
@@ -306,9 +284,9 @@ with the following Information Elements:
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message Type | 3GPP TS 52.021 9.1 | M | V | 1
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
| Message Type | 3GPP TS 12.21 9.1 | M | V | 1
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
| GPRS NSEI | <<NM_ATT_IPACC_NSEI>> | O | TL16V | >= 5
| GPRS NS Configuration | <<NM_ATT_IPACC_NS_LINK_CFG>> | O | TL16V | >= 10
| GPRS BSSGP Configuration | <<NM_ATT_IPACC_BSSGP_CFG>> | O | TL16V | >= 14
@@ -323,9 +301,9 @@ message with the following Information Elements:
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message Type | 3GPP TS 52.021 9.1 | M | V | 1
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
| Message Type | 3GPP TS 12.21 9.1 | M | V | 1
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
| GPRS Routing Area Code | <<NM_ATT_IPACC_RAC>> | O | TL16V | >= 4
| GPRS Paging Configuration | <<NM_ATT_IPACC_GPRS_PAGING_CFG>> | O | TL16V | >= 5
| GPRS RLC Configuration | <<NM_ATT_IPACC_RLC_CFG>> | O | TL16V | >= 12
@@ -343,9 +321,9 @@ Attribute* message with the following Information Elements:
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message Type | 3GPP TS 52.021 9.1 | M | V | 1
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
| Message Type | 3GPP TS 12.21 9.1 | M | V | 1
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
| GPRS NSVCI | <<NM_ATT_IPACC_NSVCI>> | O | TL16V | >= 5
| GPRS NS Link Configuration | <<NM_ATT_IPACC_NS_LINK_CFG>> | O | TL16V | >= 11
|===
@@ -354,9 +332,9 @@ Attribute* message with the following Information Elements:
=== Information Elements Overview
All of the IEs handled by OsmoBTS are listed below, with limitations and
additions to TS 52.021 specified in more detail.
additions to TS 12.21 specified in more detail.
==== IEs Conforming to TS 52.021
==== IEs Conforming to TS 12.21
The following Information Elements are accepted by OsmoBTS.
@@ -368,10 +346,10 @@ IEs marked __ignored__ and additionally marked as being received by OsmoBTS
(<-) are in fact parsed and their values are stored by OsmoBTS, but these
stored items are currently not used in the OsmoBTS code base.
.IEs conforming to TS 52.021
.IEs conforming to TS 12.21
[options="header",cols="5%,10%,40%,5%,40%"]
|===
| tag (hex) | TS 52.021 § | IE name | <-/-> | Received/Sent by OsmoBTS
| tag (hex) | TS 12.21 § | IE name | <-/-> | Received/Sent by OsmoBTS
| 0x00 | 9.4.1 | Abis Channel | | _ignored_
| 0x01 | 9.4.2 | Additional Info | | _ignored_
| 0x02 | 9.4.3 | Additional Text | | _ignored_
@@ -394,8 +372,8 @@ stored items are currently not used in the OsmoBTS code base.
| 0x13 | 9.4.19 | File Version | | _ignored_
| 0x14 | 9.4.20 | GSM Time | | _ignored_
| 0x16 | 9.4.22 | HW Configuration | | _ignored_
| 0x18 | 9.4.24 | Intave Parameter | <- |
| 0x19 | 9.4.25 | Interference level Boundaries | <- |
| 0x18 | 9.4.24 | Intave Parameter | <- | _ignored_
| 0x19 | 9.4.25 | Interference level Boundaries | <- | _ignored_
| 0x1a | 9.4.26 | List of Required Attributes | | _ignored_
| 0x1c | 9.4.28 | Manufacturer Dependent State | | _ignored_
| 0x1d | 9.4.29 | Manufacturer Dependent Thresholds | | _ignored_
@@ -427,20 +405,20 @@ stored items are currently not used in the OsmoBTS code base.
| 0x38 | 9.4.58 | VSWR Thresholds | | _ignored_
| 0x39 | 9.4.59 | Window Size | | _ignored_
| 0x40 | 9.4.60 | TSC | <- | Received, with limitations: see <<NM_ATT_TSC>>
| 0x41 | 9.4.61 | SW Configuration | -> | Sent, see <<NM_ATT_SW_CONFIG>>
| 0x41 | 9.4.61 | SW Configuration | | _ignored_
| 0x43 | 9.4.63 | Perceived Severity | | _ignored_
| 0x44 | 9.4.64 | Get Attribute Response Info | -> | Sent, see <<NM_ATT_MANUF_ID>>
| 0x44 | 9.4.64 | Get Attribute Response Info | | _ignored_
| 0x45 | 9.4.65 | Outstanding Alarm Sequence | | _ignored_
| 0x46 | 9.4.66 | HW Conf Change Info | | _ignored_
| 0x47 | 9.4.32 | Measurement Result | | _ignored_
|===
==== IEs Not Conforming to TS 52.021
==== IEs Not Conforming to TS 12.21
.IEs not conforming to TS 52.021
.IEs not conforming to TS 12.21
[options="header",cols="5%,10%,30%,55%"]
|===
| tag (hex) | TS 52.021 § | IE name | Description
| tag (hex) | TS 12.21 § | IE name | Description
| 0x15 | 9.4.21 | HSN | presence causes NACK response
| 0x17 | 9.4.23 | HW Description | _ignored_ by OsmoBTS, but coding may differ, see <<ie_hw_desc>>
| 0x1b | 9.4.27 | MAIO | presence causes NACK response
@@ -453,14 +431,14 @@ stored items are currently not used in the OsmoBTS code base.
==== Additional Attributes and Parameters
The following Information Elements are defined in addition to those
specified in 3GPP TS 52.021 Chapter 9.4.
specified in 3GPP TS 12.21 Chapter 9.4.
All of these additional IEs are _received_ by OsmoBTS.
These attributes are not used by OsmoBTS, but
simply passed to OsmoPCU connected to the PCU socket.
.Additional IEs handled by OsmoBTS but not defined in TS 52.021
.Additional IEs handled by OsmoBTS but not defined in TS 12.21
[options="header",cols="5%,50%,45%"]
|===
| tag (hex) | IE name | Description
@@ -487,7 +465,7 @@ simply passed to OsmoPCU connected to the PCU socket.
[[ie_hw_desc]]
==== HW Description
TS 52.021 suggests a series of 5 length-value pairs for the _HW Description_ IE.
TS 12.21 suggests a series of 5 length-value pairs for the _HW Description_ IE.
Instead, OsmoBTS interprets it as a single TL16V. The value of this IE is
ignored by OsmoBTS, yet the coding may affect message parsing.
@@ -509,7 +487,7 @@ exactly one ARFCN.
[[ie_chan_comb]]
==== Additional Channel Combinations
In addition to 3GPP TS 52.021 Chapter 9.4.13, the following channel
In addition to 3GPP TS 12.21 Chapter 9.4.13, the following channel
combinations are supported:
.Additional Channel Combinations
@@ -535,7 +513,7 @@ work, please see the <<rsl-dynamic-channels>>.
[[ie_conn_fail_crit]]
==== Connection Failure Criterion
3GPP TS 52.021 Chapter 9.4.14 specifies two different options for the
3GPP TS 12.21 Chapter 9.4.14 specifies two different options for the
_Connection Failure Criterion_. OsmoBTS only implements the option
coded as 0x01, i.e. based upon uplink SACCH error rate
(RADIO_LINK_TIMEOUT).
@@ -545,7 +523,7 @@ coded as 0x01, i.e. based upon uplink SACCH error rate
Due to limitations in the currently supported PHY implementations,
OsmoBTS supports only one global TSC for all channels on one TRX, rather
than a separate TSC for each timeslot, as expected by 3GPP TS 52.021.
than a separate TSC for each timeslot, as expected by 3GPP TS 12.21.
[[NM_ATT_IPACC_DST_IP]]
@@ -805,91 +783,10 @@ It is encoded as follows:
This attribute is not used by OsmoBTS, but
simply passed to OsmoPCU connected to the PCU socket.
[[NM_ATT_SW_CONFIG]]
==== SW Configuration
The SW Configuration IE is compliant with 3GPP TS 52.021 9.4.61: it contains a
number of SW Description IEs (9.4.62).
.Coding of SW Configuration IE
[options="header",cols="20%,80%"]
|===
| octet | value
| 1 | NM_ATT_SW_CONFIG IEI (0x41)
| 2-3 | length of value part
| 4 | NM_ATT_SW_DESCR IEI (0x42)
| 5 | NM_ATT_FILE_ID IEI (0x12)
| 6-7 | length of file name
| 8-N | ASCII coded file name (without terminating nul)
| N+1 | NM_ATT_FILE_VERSION IEI (0x13)
| N+2 - N+3 | length of file content
| N+4 - M | file content
| M+1 | NM_ATT_SW_DESCR IEI (0x42)
| M+2 | NM_ATT_FILE_ID IEI (0x12)
2+| ...
|===
.File names and content sent in the SW Configuration IE
[options="header",cols="20%,80%"]
|===
| file name | content
| 'osmobts' | ASCII coded OsmoBTS version number like "1.2.3" or "1.2.3.4-abcd"
| 'BTS_TYPE_VARIANT' | one of "osmo-bts-lc15", "osmo-bts-oc2g", "osmo-bts-octphy",
"osmo-bts-omldummy", "osmo-bts-sysmo", "osmo-bts-trx", "osmo-bts-virtual"
| 'BTS_SUB_MODEL' | This file may be omitted; if present, may contain an ASCII
coded model number like "sysmoBTS 1002"
|===
[[NM_ATT_MANUF_ID]]
==== Manufacturer Id
The coding of the Manufacturer Id attribute is a sequence of bit flags (a bit
vector), where a zero flag indicates absence and a set flag indicates presence
of a specific BTS feature.
The number of flags transmitted depends on the software version of OsmoBTS and
the BTS backend in use. More flags may be added in the future. The flag bits
transmitted are followed by zero bits up to the next full octet boundary.
These features are currently defined:
.coding of BTS feature flags sent in the Manufacturer Id attribute
[options="header",cols="5%,5%,30%,60%"]
|===
| octet | bit | feature name | description
.8+.| 0 | 7 | HSCSD | High-Speed Circuit-Switched Data
| 6 | GPRS | General Packet Radio Service
| 5 | EGPRS | Enhanced GPRS (EDGE)
| 4 | ECSD | Enhanced Circuit-Switched Data
| 3 | HOPPING | Frequency Hopping
| 2 | MULTI_TSC | Multi-TSC
| 1 | OML_ALERTS | OML Alerts
| 0 | AGCH_PCH_PROP | AGCH/PCH proportional allocation
.8+.| 1 | 7 | CBCH | Cell Broadcast Channel
| 6 | SPEECH_F_V1 | Fullrate speech V1
| 5 | SPEECH_H_V1 | Halfrate speech V1
| 4 | SPEECH_F_EFR | Fullrate speech EFR
| 3 | SPEECH_F_AMR | Fullrate speech AMR
| 2 | SPEECH_H_AMR | Halfrate speech AMR
| 1 | ETWS_PN | ETWS Primary Notification via PCH
| 0 | PAGING_COORDINATION | BSS Paging Coordination
.8+.| 2 | 7 | IPV6_NSVC | NSVC IPv6
| 6 | ACCH_REP | FACCH/SACCH Repetition
| 5 | CCN | Cell Change Notification
| 4 | VAMOS | Voice services over Adaptive Multi-user channels on One Slot
| 3 2.4+.| reserved for future use, sent as zero
| 2
| 1
| 0
|===
=== A-bis OML Initialization / BTS bring-up
At the time an Abis/IP BTS connects to via OML to the BSC, it is
initialized according to the procedures described in 3GPP TS 52.021 as
initialized according to the procedures described in 3GPP TS 12.21 as
amended by this document.
Each Managed Object (MO) is separately initialized. The initialization

View File

@@ -3,16 +3,16 @@
=== List of Messages
The following tables list the RSL messages used by OsmoBTS A-bis/IP,
grouped by their level of compliance with 3GPP TS 48.058.
grouped by their level of compliance with 3GPP TS 08.58.
==== Messages Compliant With TS 48.058
==== Messages Compliant With TS 08.58
Specific additions and limitations apply, see the linked sections.
.Messages compliant with TS 48.058
.Messages compliant with TS 08.58
[options="header",cols="10%,20%,45%,5%,20%"]
|===
| TS 48.058 § | This document § | Message | <-/-> | Received/Sent by OsmoBTS
| TS 08.58 § | This document § | Message | <-/-> | Received/Sent by OsmoBTS
5+<| *Radio link layer management messages*
| 8.3.1 | - | DATA REQUEST | <- | Received
| 8.3.2 | - | DATA INDICATION | -> | Sent
@@ -39,18 +39,15 @@ Specific additions and limitations apply, see the linked sections.
| 8.4.11 | - | MODE MODIFY NEGATIVE ACKNOWLEDGE | -> | Sent
| 8.4.14 | - | RF CHANNEL RELEASE | <- | Received
| 8.4.15 | <<MS_POWER_CONTROL>> | MS POWER CONTROL | <- | Received
| 8.4.16 | - | BS POWER CONTROL | <- | Received
| 8.4.19 | - | RF CHANNEL RELEASE ACKNOWLEDGE | -> | Sent
| 8.4.20 | <<SACCH_INFO_MODIFY>> | SACCH INFO MODIFY | <- | Received
5+<| *COMMON CHANNEL MANAGEMENT MESSAGES*
| 8.5.1 | <<BCCH_INFORMATION>> | BCCH INFORMATION | <- | Received
| 8.5.2 | - | CCCH LOAD INDICATION | -> | Sent
| 8.5.3 | <<CHANNEL_REQUIRED>> | CHANNEL REQUIRED | -> | Sent
| 8.5.4 | - | DELETE INDICATION | -> | Sent
| 8.5.5 | <<PAGING_COMMAND>> | PAGING COMMAND | <- | Received
| 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received
| 8.5.8 | - | SMS BROADCAST COMMAND | <- | Received
| 8.5.9 | - | CBCH LOAD INDICATION | -> | Sent
| 8.5.8 | <<SMS_BROADCAST_COMMAND>> | SMS BROADCAST COMMAND | <- | Received
5+<| *TRX MANAGEMENT MESSAGES*
| 8.6.1 | <<RF_RESOURCE_INDICATION>> | RF RESOURCE INDICATION | -> | Sent
| 8.6.2 | <<SACCH_FILLING>> | SACCH FILLING | <- | Received
@@ -59,7 +56,7 @@ Specific additions and limitations apply, see the linked sections.
==== Messages Specific to OsmoBTS
.Messages specific to OsmoBTS, not found in 3GPP TS 48.058
.Messages specific to OsmoBTS, not found in 3GPP TS 08.58
[options="header",cols="15%,15%,45%,5%,20%"]
|===
2+| This document § | Message | <-/-> | Received/Sent by OsmoBTS
@@ -81,19 +78,18 @@ Specific additions and limitations apply, see the linked sections.
.3+.| <<pdch_deact>> | <<rsl_pdch_deact>> | RSL PDCH Deactivation | <- | Received
| <<rsl_pdch_deact_ack>> | RSL PDCH Deactivation ACK | -> | Sent
| <<rsl_pdch_deact_nack>> | RSL PDCH Deactivation NACK | -> | Sent
5+<| *COMMON CHANNEL MANAGEMENT MESSAGES*
.3+.| <<etws>> | <<OSMO_ETWS_CMD>> | Osmocom ETWS Command | <- | Received
|===
==== Messages Not Implemented by OsmoBTS
.3GPP TS 48.058 messages not implemented by OsmoBTS
.3GPP TS 08.58 messages not implemented by OsmoBTS
[options="header",cols="10%,90%"]
|===
| TS 48.058 § | Message
| TS 08.58 § | Message
2+<| *DEDICATED CHANNEL MANAGEMENT MESSAGES*
| 8.4.12 | PHYSICAL CONTEXT REQUEST
| 8.4.13 | PHYSICAL CONTEXT CONFIRM
| 8.4.16 | BS POWER CONTROL
| 8.4.17 | PREPROCESS CONFIGURE
| 8.4.18 | PREPROCESSED MEASUREMENT RESULT
| 8.4.21 | TALKER DETECTION
@@ -108,7 +104,9 @@ Specific additions and limitations apply, see the linked sections.
| 8.4.30 | TFO REPORT
| 8.4.31 | TFO MODIFICATION REQUEST
2+<| *COMMON CHANNEL MANAGEMENT MESSAGES*
| 8.5.4 | DELETE INDICATION
| 8.5.7 | SMS BROADCAST REQUEST
| 8.5.9 | CBCH LOAD INDICATION
| 8.5.10 | NOTIFICATION COMMAND
2+<| *TRX MANAGEMENT MESSAGES*
| 8.6.3 | OVERLOAD
@@ -123,7 +121,7 @@ Specific additions and limitations apply, see the linked sections.
==== Channel Activation
When used on a timeslot using the non-standard channel combination
'NM_CHANC_OSMO_DYN' as configured by OML, the regular
'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' as configured by OML, the regular
RSL channel activation procedures can not only be used for activation
of circuit-switched channels, but also for activation of a PDCH.
@@ -135,24 +133,24 @@ dynamic PDCH protocol employed by nanoBTS devices (<<ipa_style_pdch_mgmt>>).
[[MEASUREMENT_RESULT]]
==== Measurement Result
Conforms to 3GPP TS 48.058 § 8.4.8 with this limitation:
Conforms to 3GPP TS 08.58 § 8.4.8 with this limitation:
._Measurement Result_ IE limitations
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.37 | MS Timing Offset | never sent by OsmoBTS
|===
[[MODE_MODIFY]]
==== Mode Modify
Conforms to 3GPP TS 48.058 § 8.4.9 with these limitations:
Conforms to 3GPP TS 08.58 § 8.4.9 with these limitations:
._Mode Modify_ IE limitations
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.45 | Main channel reference | _ignored_
| 9.3.53 | MultiRate Control | _ignored_
| 9.3.54 | Supported Codec Types | _ignored_
@@ -161,12 +159,12 @@ Conforms to 3GPP TS 48.058 § 8.4.9 with these limitations:
[[MS_POWER_CONTROL]]
==== MS Power Control
Conforms to 3GPP TS 48.058 § 8.4.15 with these limitations:
Conforms to 3GPP TS 08.58 § 8.4.15 with these limitations:
._MS Power Control_ IE limitations
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.31 | MS Power Parameters | _ignored_
|===
@@ -174,12 +172,12 @@ Conforms to 3GPP TS 48.058 § 8.4.15 with these limitations:
[[SACCH_INFO_MODIFY]]
==== SACCH Info Modify
Conforms to 3GPP TS 48.058 § 8.4.20, with these exceptions:
Conforms to 3GPP TS 08.58 § 8.4.20, with these exceptions:
._SACCH Info Modify_ IE limitations
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.30 | System Info Type | See below for available types
| 9.3.23 | Starting Time | not supported, provokes an _Error Report_ response
|===
@@ -192,7 +190,6 @@ Conforms to 3GPP TS 48.058 § 8.4.20, with these exceptions:
| 0x06 | RSL_SYSTEM_INFO_6
| 0x0d | RSL_SYSTEM_INFO_5bis
| 0x0e | RSL_SYSTEM_INFO_5ter
| 0x0f | RSL_SYSTEM_INFO_10
| 0x47 | RSL_EXT_MEAS_ORDER
| 0x48 | RSL_MEAS_INFO
|===
@@ -200,12 +197,12 @@ Conforms to 3GPP TS 48.058 § 8.4.20, with these exceptions:
[[BCCH_INFORMATION]]
==== BCCH Information
Conforms to 3GPP TS 48.058 § 8.5.1, with these limitations and extensions:
Conforms to 3GPP TS 08.58 § 8.5.1, with these limitations and extensions:
._BCCH Information_ IE details
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.30 | System Info Type | See <<SACCH_INFO_MODIFY>> for available types
| 9.3.11 | L3 Info | This IE may be included instead of a 9.3.39 _Full BCCH Info_ IE.
The _Full BCCH Info_ takes precedence over _L3 Info_.
@@ -216,12 +213,12 @@ Conforms to 3GPP TS 48.058 § 8.5.1, with these limitations and extensions:
[[CHANNEL_REQUIRED]]
==== Channel Required
Conforms to 3GPP TS 48.058 § 8.5.3, with these limitations:
Conforms to 3GPP TS 08.58 § 8.5.3, with these limitations:
._Channel Required_ message IE details
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.16 | Physical Context | never sent by OsmoBTS
|===
@@ -229,44 +226,56 @@ Conforms to 3GPP TS 48.058 § 8.5.3, with these limitations:
[[PAGING_COMMAND]]
==== Paging Command
Conforms to 3GPP TS 48.058 § 8.5.5, with these limitations:
Conforms to 3GPP TS 08.58 § 8.5.5, with these limitations:
._Paging Command_ message IE details
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.49 | eMLPP Priority | _ignored_
|===
NOTE: If adding the identity to the paging queue fails, the BSC is not notified
in any way.
[[SMS_BROADCAST_COMMAND]]
=== SMS Broadcast Command
Conforms to 3GPP TS 08.58 § 8.5.8, with these limitations:
._Broadcast Command_ message IE details
[options="header",cols="10%,30%,60%"]
|===
| TS 08.58 § | IE Name | Handling
| 9.3.44 | SMSCB Channel Indicator | _ignored_
|===
[[RF_RESOURCE_INDICATION]]
==== RF Resource Indication
For all osmo-bts variants, except osmo-bts-trx, this message does not conform
to 3GPP TS 48.058 § 8.6.1, in that it omits the _Resource Information_ IE that
would contain the actual payload data, which renders this message void.
This message does not conform to 3GPP TS 08.58 § 8.6.1, in that it omits the
_Resource Information_ IE that would contain the actual payload data, which
renders this message void.
._RF Resource Indication_ message IE exceptions
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| 9.3.21 | Resource Information | DSP based osmo-bts variants omit this IE, though
TS 48.058 specifies it as mandatory.
| TS 08.58 § | IE Name | Handling
| 9.3.21 | Resource Information | OsmoBTS omits this IE, though TS 08.58
specifies it as mandatory.
|===
[[SACCH_FILLING]]
==== SACCH Filling
Conforms to 3GPP TS 48.058 § 8.6.2, with these limitations:
Conforms to 3GPP TS 08.58 § 8.6.2, with these limitations:
._SACCH Filling_ message IE limitations
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.3.30 | System Info Type | See <<SACCH_INFO_MODIFY>> for available types
| 9.3.23 | Starting Time | _ignored_
|===
@@ -276,7 +285,7 @@ Conforms to 3GPP TS 48.058 § 8.6.2, with these limitations:
=== User Plane Transport Management
This chapter defines the A-bis/IP specific RSL procedures that are
introduced in addition to the 3GPP TS 48.058 standard procedures.
introduced in addition to the 3GPP TS 08.58 standard procedures.
In classic A-bis over E1, user plane traffic is carried over 16kBps
sub-slots of 64kBps E1 time-slots according to ETSI/3GPP TS 08.60. As
@@ -347,7 +356,7 @@ See <<rsl_dlcx_ind_msg>>
In the classic data model established by ETSI/3GPP for A-bis, each
timeslot (channel) is configured using a static channel combination by
means of A-bis OML. Particularly in presence of GPRS services, this
is very inflexible and leads to inefficient use of air interface
is very unflexible and leads to inefficient use of air interface
resources.
As such, several methods have been implemented to overcome this
@@ -418,16 +427,16 @@ include::dyn_ts_ipa_style2.msc[]
==== Osmocom Style Dynamic Channels
This method is in use when OML uses
'NM_CHANC_OSMO_DYN' (0x90) for the given time-slot.
'NM_CHANC_OSMO_TCHFull_TCHHalf_PDCH' (0x90) for the given time-slot.
The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE'
procedure according to <<CHANNEL_ACTIVATION>>, with these modifications:
* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary
value 11000 (C5 through C1 as seen in 3GPP TS 48.058 § 9.3.1).
value 11000 (C5 thru C1 as seen in 3GPP TS 08.58 § 9.3.1).
* The 'A-bits' part of the 'Activation Type' IE take the non-standard binary
value 1111, with an additional fourth bit (add A4 to A3 through A1 as seen in
3GPP TS 48.058 § 9.3.3; all remaining reserved bits as well as the 'R' bit are
value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in
3GPP TS 08.58 § 9.3.3; all remaining reserved bits as well as the 'R' bit are
coded as zero).
* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs
are included.
@@ -437,7 +446,7 @@ Hence the message consists of exactly these IEs:
.PDCH type _Channel Activation_ message IEs
[options="header",cols="10%,30%,60%"]
|===
| TS 48.058 § | IE Name | Handling
| TS 08.58 § | IE Name | Handling
| 9.1 | Message discriminator | Dedicated Channel Management
| 9.2 | Message type | CHANnel ACTIVation
| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual
@@ -458,45 +467,6 @@ include::dyn_ts_osmocom_style1.msc[]
include::dyn_ts_osmocom_style2.msc[]
----
[[etws]]
=== ETWS (Earthquake and Tsunami Warning System)
ETWS as specified in 3GPP TS 23.041 includes not only notification via
SMSCB, but also so-called Primary Notifications (PN). The ETWS PN are
transmitted
* by the BSC to all subscribers with active dedicated channels
* by the BTS on the PCH to all subscribers in idle mode
* by the PCU on the PACCH to all subscribers with active TBF
Unfortunately, 3GPP forgot to update their specifications with any
information as to how the ETWS PN is transmitted from BSC to BTS in
a portable way, and Osmocom had to invent their own non-standard
signaling for it.
See <<OSMO_ETWS_CMD>> for the Osmocom implementation.
=== BCCH carrier power reduction operation
According to 3GPP TS 45.008, section 7.1, the BCCH carrier (sometimes called C0) of
a BTS shall maintain discontinuous Downlink transmission at full power in order to
stay "visible" to the mobile stations. Because of that, early versions of this 3GPP
document prohibited BS power reduction on C0. However, a new feature was introduced
version 13.0.0 (2015-11) - "BCCH carrier power reduction operation".
This is a special mode of operation, in which the variation of RF power level for
some timeslots is relaxed for the purpose of energy saving. In other words, the
output power on some timeslots, except the timeslot(s) carrying BCCH/CCCH, can be
lower than the full power. In this case the maximum allowed difference is 6 dB.
Unfortunately, 3GPP did not specify in which way the BTS is instructed to activate
and deactivate the BCCH carrier power reduction mode. Osmocom had to invent their
own non-standard approach: the BSC needs to send _BS POWER CONTROL_ message with
the _Channel Number_ IE set to 0x80 (BCCH) and the _Message Discriminator_ set to
0x06 (Common Channel Management messages).
=== Message Formats and Contents
[[rsl_crcx_msg]]
@@ -509,15 +479,14 @@ number*.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Destination IP Address | <<RSL_IE_IPAC_REMOTE_IP>> | O | TV | 5
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
| IP Speech Mode | <<RSL_IE_IPAC_SPEECH_MODE>> | O | TV | 2
| RTP Payload Type 2 | <<RSL_IE_IPAC_RTP_PAYLOAD2>> | O | TV | 2
| RTP CSD Format | <<RSL_IE_IPAC_RTP_CSD_FORMAT>> | O | TV | 2
|===
[[rsl_crcx_msg_ack]]
@@ -530,10 +499,10 @@ in response to the *Create Connection (CRCX)*.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Connection Id | <<RSL_IE_IPAC_CONN_ID>> | M | TV | 3
| Source IP Address | <<RSL_IE_IPAC_LOCAL_IP>> | O | TV | 5
| Source IP Port | <<RSL_IE_IPAC_LOCAL_PORT>> | O | TV | 3
@@ -550,13 +519,13 @@ sent in response to the *Create Connection (CRCX)*.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Destination IP Address | <<RSL_IE_IPAC_REMOTE_IP>> | O | TV | 5
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
| Cause | 48.058 9.3.26 | O | TLV | >= 3
| Cause | 08.58 9.3.26 | O | TLV | >= 3
|===
@@ -569,16 +538,15 @@ properties of a user-plane RTP connection.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Connection Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
| Destination IP Address | <<RSL_IE_IPAC_REMOTE_IP>> | O | TV | 5
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
| IP Speech Mode | <<RSL_IE_IPAC_SPEECH_MODE>> | O | TV | 2
| RTP Payload Type 2 | <<RSL_IE_IPAC_RTP_PAYLOAD2>> | O | TV | 2
| RTP CSD Format | <<RSL_IE_IPAC_RTP_CSD_FORMAT>> | O | TV | 2
|===
[[rsl_mdcx_msg_ack]]
@@ -591,10 +559,10 @@ response to a *Modify Connection (MDCX)*
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Connection Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
| Source IP Address | <<RSL_IE_IPAC_LOCAL_IP>> | C | TV | 5
| Source IP Port | <<RSL_IE_IPAC_LOCAL_PORT>> | C | TV | 3
@@ -612,11 +580,11 @@ Connection (MDCX)*.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Cause | 48.058 9.3.26 | M | TLV | >= 3
| Channel number | 08.58 9.3.1 | M | TV | 2
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|===
[[rsl_dlcx_ind_msg]]
@@ -629,13 +597,13 @@ time of RF Channel release.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Connection Id | <<RSL_IE_IPAC_CONN_ID>> | M | TV | 3
| Connection Id | <<RSL_IE_IPAC_CONN_STAT>> | M | TV | 3
| Cause | 48.058 9.3.26 | M | TLV | >= 3
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|===
[[rsl_dlcx_msg]]
@@ -648,10 +616,10 @@ number.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Connection Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
|===
@@ -666,10 +634,10 @@ Channel number. It is sent in response to the *Delete Connection
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Connection Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
| Connection Statistics | <<RSL_IE_IPAC_CONN_STAT>> | C | TV | 29
|===
@@ -685,12 +653,12 @@ Channel number. It is sent in response to the *Delete Connection
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
| Connection Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
| Cause | 48.058 9.3.26 | M | TLV | >= 3
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|===
[[rsl_pdch_act]]
@@ -702,10 +670,10 @@ a IPA style dynamic TCH/F+PDCH channel.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
|===
NOTE:: This message is *not* used by Osmocom style dynamic channels
@@ -719,11 +687,11 @@ of a PDCH on a IPA style dynamic TCH/F+PDCH channel.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Frame Number | 48.058 9.3.8 | O | TV | 3
| Channel number | 08.58 9.3.1 | M | TV | 2
| Frame Number | 08.58 9.3.8 | O | TV | 3
|===
NOTE:: This message is *not* used by Osmocom style dynamic channels
@@ -737,11 +705,11 @@ of a PDCH on a IPA style dynamic TCH/F+PDCH channel.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Cause | 48.058 9.3.26 | M | TLV | >= 3
| Channel number | 08.58 9.3.1 | M | TV | 2
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|===
NOTE:: This message is *not* used by Osmocom style dynamic channels
@@ -755,10 +723,10 @@ on a IPA style dynamic TCH/F+PDCH channel.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
|===
NOTE:: This message is *not* used by Osmocom style dynamic channels
@@ -772,10 +740,10 @@ of a PDCH on a IPA style dynamic TCH/F+PDCH channel.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Channel number | 08.58 9.3.1 | M | TV | 2
|===
NOTE:: This message is *not* used by Osmocom style dynamic channels
@@ -789,48 +757,22 @@ on a IPA style dynamic TCH/F+PDCH channel.
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 08.58 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| Cause | 48.058 9.3.26 | M | TLV | >= 3
| Channel number | 08.58 9.3.1 | M | TV | 2
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|===
NOTE:: This message is *not* used by Osmocom style dynamic channels
[[OSMO_ETWS_CMD]]
==== Osmocom ETWS Command
This message is sent by the BSC to transfer the ETWS Primary Notification (PN)
from BSC to BTS and enable/disable transmission of ETWS PN by the BTS. For more
information about ETWS, see 3GPP TS 23.041.
If the ETWS PN length is > 0, the BTS will immediately start transmission
of the received ETWS PN on the PCH using P1 Rest Octets. It will also forward
he ETWS PN to the PCU to enable the PCU to transmit it via PACCH on active TBF.
If the ETWS PN length is 0, the BTS will stop any ETWS PN broadcast via the PCH.
The Channel Number IE is set to the Downlink CCCH (PCH).
[options="header"]
[cols="30%,25%,15%,15%,15%"]
|===
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
| Message discriminator | 48.058 9.1 | M | V | 1
| Message type | <<own_msg_types>> | M | V | 1
| Channel number | 48.058 9.3.1 | M | TV | 2
| SMSCB Message | 48.058 9.3.42 | M | TLV | 2-58
|===
=== Information Element Codings
[[own_msg_types]]
==== A-bis/IP specific RSL Message discriminators
The following message discriminators are used in addition to those
indicated in 3GPP TS 48.058 Section 9.1:
indicated in 3GPP TS 08.58 Section 9.1:
.OsmoBTS specific new message discriminators
[options="header",cols="10%,50%,40%"]
@@ -846,7 +788,6 @@ indicated in 3GPP TS 48.058 Section 9.1:
| 0x77 | Delete Connection (DLCX) | <<rsl_dlcx_msg>>
| 0x78 | Delete Connection (DLCX) ACK | <<rsl_dlcx_msg_ack>>
| 0x79 | Delete Connection (DLCX) NACK | <<rsl_dlcx_msg_nack>>
| 0x7f | Osmocom ETWS Command | <<OSMO_ETWS_CMD>>
| 0x48 | PDCH Activate | <<rsl_pdch_act>>
| 0x49 | PDCH Activate ACK | <<rsl_pdch_act_ack>>
| 0x4a | PDCH Activate NACK | <<rsl_pdch_act_nack>>
@@ -858,54 +799,37 @@ indicated in 3GPP TS 48.058 Section 9.1:
==== A-bis/IP specific RSL IEIs
The following Information Element Identifiers (IEIs) are used in
addition to those indicated in 3GPP TS 48.058 Section 9.3:
addition to those indicated in 3GPP TS 08.58 Section 9.3:
.A-bis/IP specific information elements
[options="header",cols="10%,50%,40%"]
|===
| IEI | Name | This document §
| 0x01 | RSL_IE_CHAN_NR | <<RSL_IE_CHAN_NR>>
| 0x60 | RSL_IE_OSMO_REP_ACCH_CAP | <<RSL_IE_OSMO_REP_ACCH_CAP>>
| 0x61 | RSL_IE_OSMO_TRAINING_SEQUENCE | <<RSL_IE_OSMO_TRAINING_SEQUENCE>>
| 0x62 | RSL_IE_OSMO_TEMP_OVP_ACCH_CAP | <<RSL_IE_OSMO_TEMP_OVP_ACCH_CAP>>
| 0x63 | RSL_IE_OSMO_OSMUX_CID | <<RSL_IE_OSMO_OSMUX_CID>>
| 0xf0 | RSL_IE_IPAC_REMOTE_IP | <<RSL_IE_IPAC_REMOTE_IP>>
| 0xf0 | RSL_IE_IPAC_REMOTE_IP | <<RSL_IE_IPAC_REMOTE_IP>>
| 0xf1 | RSL_IE_IPAC_REMOTE_PORT | <<RSL_IE_IPAC_REMOTE_PORT>>
| 0xf3 | RSL_IE_IPAC_LOCAL_PORT | <<RSL_IE_IPAC_LOCAL_PORT>>
| 0xf4 | RSL_IE_IPAC_SPEECH_MODE | <<RSL_IE_IPAC_SPEECH_MODE>>
| 0xf5 | RSL_IE_IPAC_LOCAL_IP | <<RSL_IE_IPAC_LOCAL_IP>>
| 0xf6 | RSL_IE_IPAC_CONN_STAT | <<RSL_IE_IPAC_CONN_STAT>>
| 0xf8 | RSL_IE_IPAC_CONN_ID | <<RSL_IE_IPAC_CONN_ID>>
| 0xf9 | RSL_IE_IPAC_RTP_CSD_FORMAT | <<RSL_IE_IPAC_RTP_CSD_FORMAT>>
| 0xfc | RSL_IE_IPAC_RTP_PAYLOAD2 | <<RSL_IE_IPAC_RTP_PAYLOAD2>>
|===
[[RSL_IE_CHAN_NR]]
==== RSL_IE_CHAN_NR
This information element is coded as described in 3GPP TS 48.058 Section 9.3.1,
but in addition supports the following vendor specific values:
This information element is coded like 3GPP TS 08.58 Section 9.3.1,
but in addition supports the following extended coding:
.RSL Channel Number extensions
[options="header",cols="5%,5%,5%,5%,5%,75%"]
|===
| C5 | C4 | C3 | C2 | C1 | Description
| 1 | 1 | 0 | 0 | 0 | PDCH `<1>`
| 1 | 1 | 0 | 0 | 1 | CBCH on SDCCH4
| 1 | 1 | 0 | 1 | 0 | CBCH on SDCCH8
| 1 | 1 | 1 | 0 | 1 | VAMOS TCH/F `<2>`
| 1 | 1 | 1 | 1 | T | VAMOS TCH/H `<2>`
|===
`<1>` This extension is only valid on an Osmocom-style dynamic channel, having
configured the 'NM_CHANC_IPAC_TCHFull_PDCH' channel combination by OML.
`<2>` These Osmocom specific values are used by osmo-bsc to address logical
channels on the shadow timeslots in VAMOS mode, iff the BTS is an osmo-bts
and VAMOS capable.
* C5..C1 bits 0b11000 for PDCH type channels
The TN-Bits are not re-defined in this case but use the same encoding
as specified in TS 48.058 Section 9.3.1.
as specified in TS 08.58 Section 9.3.1.
NOTE:: The above extension is only valid on an Osmocom-style dynamic
channel, having configured the 'NM_CHANC_IPAC_TCHFull_PDCH' channel
combination by OML.
[[RSL_IE_IPAC_REMOTE_IP]]
==== RSL_IE_IPAC_REMOTE_IP
@@ -959,8 +883,8 @@ IEI followed by four bytes IPv4 address.
This information element contains statistics about the RTP connection.
It is encoded as 30 bytes, with the first byte as IEI, the second byte as length
(=28), and 28 bytes fixed-length payload encoded as follows:
It is encoded as 29 bytes, with the first byte as IEI and 28 bytes
fixed-length payload encoded as follows:
.A-bis/IP Connection Statistics
[options="header",width="60%",cols="15%,15%,70%"]
@@ -993,147 +917,6 @@ This information element contains the RTP payload identifier, which is
used in the PT (Payload Type) field of the RTP header in subsequent
transmissions of the RTP flow.
[[RSL_IE_OSMO_REP_ACCH_CAP]]
==== RSL_IE_OSMO_REP_ACCH_CAP
This is a one byte length TLV IE that is used to enable or disable repeated ACCH
capabilities on the BTS side during Channel Activation and Mode Modify.
The IE contains a bitfield in the lower nibble in order to set the ACCH repetition
policy for each of the two channel types individually. Depending on the state of the
bits (see table below) the ACCH repetition mode is either enabled or disabled completely.
The lower 3 bit of the higher nibble are used to signal an RXQUAL threshold to set the
BER on which UL-SACCH or DL-FACCH repetition shall be turned on. If the field is set
to 0, then UL-SACCH and DL-FACCH will be always on. DL-FACCH will also be turned on
automatically as soon as the MS requests a DL-SACCH repetition.
If the IE is not present, then ACCH repetition completely is disabled.
[options="header"]
|===
| *bit* | 7 | 6 - 4 | 3 | 2 | 1 | 0
| byte at offset 0 | 0 | RXQUAL | UL-SACCH | DL-SACCH | DL-FACCH/ALL | DL-FACCH/CMD
|===
(Bits 7 is reserved for future use and must be set to zero.)
[[RSL_IE_OSMO_TRAINING_SEQUENCE]]
==== RSL_IE_OSMO_TRAINING_SEQUENCE
This TLV IE instructs the BTS to use a specific training sequence set and
training sequence code for a given lchan. It is sent by OsmoBSC in RSL CHANNEL
ACTIVATION and MODE MODIFY messages to the BTS, iff the BTS is VAMOS-capable,
i.e. if an Abis-over-IP connected BTS indicated BTS_FEAT_VAMOS in the OML BTS
features (Manufacturer Id information element, see <<NM_ATT_MANUF_ID>>).
If this information element is present, the receiver shall ignore any other
training sequence set and training sequence code bits from other information
elements of the same RSL message.
This is an Osmocom-specific extension of the RSL layer, which was added to
express more than two TSC sets. For VAMOS operation, OsmoBSC selects from one
of four separate training sequence codings per modulation scheme, while usual
RSL IEs are only able to express a single-bit TSC set number. For clarity, this
IE contains both the TSC set and the TSC in one IE, and is defined as
overruling any other IEs containing TSC or TSC set numbers.
The first value octet indicates the training sequence set, and the second octet
indicates the training sequence code to be used. Receiving values from a
reserved value range should be considered an error condition.
.RSL_IE_OSMO_TRAINING_SEQUENCE
[options="header",width="80%",cols="20%,80%"]
|===
| IE octet | value
| octet 1 | RSL_IE_OSMO_TRAINING_SEQUENCE IEI (0x61)
| octet 2 | length of the value part (2)
| octet 3 | TSC set
| octet 4 | TSC
|===
The training sequence set (TSC set) is coded like the 'CS Domain TSC Set' bits,
as defined in the 'Extended TSC Set' IE in 3GPP TS 44.018 10.5.2.82
<<3gpp-ts-44-018>>, and corresponds to the 'TSC Set' as defined in 3GPP TS
45.002 <<3gpp-ts-45-002>>. The encoded training sequence set number ranges from
0 to 3, any other values are reserved for future use. The encoded 0 corresponds
to TSC Set 1, see <<RSL_IE_OSMO_TRAINING_SEQUENCE__TSC_set_coding>>.
[[RSL_IE_OSMO_TRAINING_SEQUENCE__TSC_set_coding]]
.TSC set (octet 3) coding
[options="header",width="80%",cols="20%,80%"]
|===
| octet 3 value | interpretation
| 0 | 'TSC Set 1' as in 3GPP TS 45.002
| 1 | 'TSC Set 2'
| 2 | 'TSC Set 3'
| 3 | 'TSC Set 4'
| 4..255 | reserved values
|===
The training sequence code (TSC) corresponds to the 'TSC' bits as defined in
the 'Channel Description 2' IE in 3GPP TS 44.018 10.5.2.5a <<3gpp-ts-44-018>>.
The training sequence code ranges from 0 to 7, any other values are reserved
for future use.
.TSC (octet 4) coding
[options="header",width="80%",cols="20%,80%"]
|===
| octet 4 value | interpretation
| 0 | 'Training Sequence Code (TSC) 0' as in 3GPP TS 45.002
| 1 | 'Training Sequence Code (TSC) 1'
| 2 | 'Training Sequence Code (TSC) 2'
| 3 | 'Training Sequence Code (TSC) 3'
| 4 | 'Training Sequence Code (TSC) 4'
| 5 | 'Training Sequence Code (TSC) 5'
| 6 | 'Training Sequence Code (TSC) 6'
| 7 | 'Training Sequence Code (TSC) 7'
| 8..255 | reserved values
|===
[[RSL_IE_OSMO_TEMP_OVP_ACCH_CAP]]
==== RSL_IE_OSMO_TEMP_OVP_ACCH_CAP
FIXME: this IE has been defined, but remains to be documented.
[[RSL_IE_OSMO_OSMUX_CID]]
==== RSL_IE_OSMO_OSMUX_CID
FIXME: this IE has been defined, but remains to be documented.
[[RSL_IE_IPAC_RTP_CSD_FORMAT]]
==== RSL_IE_IPAC_RTP_CSD_FORMAT
This information element contains the RTP Circuit Switched Data format.
.A-bis/IP RTP CSD Format
[options="header",width="60%",cols="15%,15%,70%"]
|===
| Offset | Size | Description
| 0 | 4 | RTP CSD Format D
| 4 | 4 | RTP CSD Format IR
|===
.A-bis/IP RTP CSD Format D Values
[options="header",width="40%",cols="20%,80%"]
|===
| Value | Description
| 0 | External TRAU format
| 1 | Non-TRAU Packed format
| 2 | TRAU within the BTS
| 3 | IWF-Free BTS-BTS Data
|===
.A-bis/IP RTP CSD Format IR Values
[options="header",width="40%",cols="20%,80%"]
|===
| Value | Description
| 0 | 8 kb/s
| 1 | 16 kb/s
| 2 | 32 kb/s
| 3 | 48 kb/s
|===
=== A-bis RSL Initialization / BTS bring-up
Upon receiving the 'IPA RSL CONNECT' OML message by the respective
@@ -1158,3 +941,4 @@ The initialization of the primary and secondary TRX slightly differ, as
illustrated by the differences of <<rsl-msc-pri>> and <<rsl-msc-sec>>.
Since the secondary TRX has no BCCH, it does not (need to) receive any 'RSL
BCCH INFORMATION' messages from the BSC.

View File

@@ -82,13 +82,13 @@ order to specify which PHY instance is allocated to this specific TRX.
| bts-specific | bts_model_phy_instance_set_defaults() | Called for every PHY Instance created
| common | bts_controlif_setup() | Initialization of Control Interface
| bts-specific | bts_model_ctrl_cmds_install() | Install model-specific control interface commands
| common | telnet_init_default() | Initialization of telnet interface
| common | telnet_init() | Initialization of telnet interface
| common | pcu_sock_init() | Initialization of PCU socket
| common | main() | Installation of signal handlers
| common | abis_open() | Start of the A-bis connection to BSC
| common | phy_links_open() | Iterate over list of configured PHY links
| bts-specific | bts_model_phy_link_open() | Open each of the configured PHY links
| bts-specific | bts_model_phy_link_close() | Close each of the configured PHY links
| common | write_pid_file() | Generate the pid file
| common | osmo_daemonize() | Fork as daemon in background (if configured)
| common | bts_main() | Run main loop until global variable quit >= 2
|===

View File

@@ -245,52 +245,10 @@ local (OsmoBTS) or remote (OsmoTRX) side of the UDP flows.
Set the number of frames to be transmitted to transceiver in advance of
current GSM frame number.
GSM is a TDMA (time division multiple access) system on the radio
interface. OsmoTRX is the "clock master" of that in the Osmocom
implementation. It informs OsmoBTS of the current GSM frame
number. However, as there is non-zero delays (UDP packet transmission
delay, operating system scheduler delay on both OsmoTRX and OsmoBTS
side, ...), OsmoBTS must compensate for that delay by "advancing"
the clock a certain amount of time.
In other words, if OsmoTRX informs us that the current frame number is N,
we advance it by `fn-advance` and transmit burst data for
`N + fn-advance` towards OsmoTRX.
The fn-advance should be kept as low as possible to avoid additional
delays to the user voice plane as well as to improve the performance
of the control plane (LAPDm) as well as GPRS.
However, fn-advance must be kept sufficiently high to ensure no
underruns on the OsmoTRX side.
The detailed value will depend on your underlying computer systems,
operating system and related tuning parameters. Running OsmoTRX
on a remote host will inevitably require a higher fn-advance than
running it on the same machine, where the UDP packets are just passed
over the loopback device.
The default value for `fn-advance` is 2 (corresponding to 9.2 milliseconds).
===== `osmotrx rts-advance <0-30>`
Set the number of frames to be requested from L1SAP in advance of current
frame number and fn-advance.
The value specified as `rts-advance` is added to the current GSM frame
number as reported by OsmoTRX *and* the `osmotrx fn-advance` in order
to generate the PH-RTS.ind (ready to send indications) across the L1SAP
interface inside osmo-bts. This will trigger the Layer 2 (LAPDm for
the control plane, RTP for the voice plane, and OsmoPCU for GPRS) to
generate a MAC block and input it into the osmo-bts-trx TDMA scheduler.
If OsmoTRX reported N as the current frame number, the actual frame number
reported on L1SAP to higher layers will be computed as follows:
N + fn-advance + rts-advance
The default value of `rts-advance` is 3 (corresponding to 14 milliseconds).
Do not change this unless you have a good reason!
Set the number of frames to be requested from PCU in advance of current
frame number. Do not change this unless you have a good reason!
===== `osmotrx rx-gain <0-50>`
@@ -442,7 +400,7 @@ configuration at the BTS configuration file is (as always) very minimal,
as in the GSM network architecture provides almost all relevant
configuration to the BTS from the BSC.
An example configuration file is provided as part of the osmo-bts source
An example configuratin file is provided as part of the osmo-bts source
code: `doc/examples/virtual/osmobts-virtual.cfg`
For more information see

View File

@@ -14,12 +14,12 @@ OsmoBTS software.
=== Command Line Options
The OsmoBTS executables (`osmo-bts-sysmo`, `osmo-bts-trx`,
Ths OsmoBTS executables (`osmo-bts-sysmo`, `osmo-bts-trx`,
`osmo-bts-octphy`, `osmo-bts-litecell15`, ...) share the following
generic command line options:
==== SYNOPSIS
*osmo-bts-sysmo* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE' ] [-s] [-T] [-e 'LOGLEVEL']
*osmo-bts-sysmo* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE' ] [-s] [-T] [-e 'LOGLEVEL'] [-r 'PRIO'] [-i 'GSMTAP-IP'] [-t <1-255>]
==== OPTIONS
*-h, --help*::
@@ -48,6 +48,16 @@ generic command line options:
Set the global log level for logging to stderr. This has mostly
been deprecated by VTY based logging configuration, see
<<logging>> for further information.
*-r, --realtime 'PRIO'*::
Enable use of the Linux kernel realtime priority scheduler with
the specified priority.
It is recommended you use this option on low-performance
embedded systems or systems that encounter high non-GSM/GPRS
load.
*-i, --gsmtap-ip 'GSMTAP-IP'*::
Specify the destination IP address for GSMTAP messages.
*-t, --trx-num <1-255>*::
Specify the number of TRX supported by this BTS.
There may be additional, hardware specific command line options by the
different bts_model implementations.
@@ -108,22 +118,11 @@ them via UDP/IP. At that point, they can be captured with utilities like
*tcpdump* or *tshark* for further analysis by the *wireshark* protocol
analyzer.
In order to activate this feature, you first need to make sure to specify
the remote address of _GSMTAP_ host in the configuration file. In most
cases, using 127.0.0.1 for passing the messages over the loopback (`lo`)
device will be sufficient:
.Example: Enabling GSMTAP Um-frame logging to localhost
----
bts 0
gsmtap-remote-host 127.0.0.1 <1>
----
<1> Destination address for _GSMTAP_ Um-frames
NOTE: Changing this parameter at run-time will not affect the existing
_GSMTAP_ connection, full program restart is required.
NOTE: Command line parameters `-i` and `--gsmtap-ip` have been deprecated.
In order to activate this feature, you first need to make sure to start
OsmoBTS using the `-i` or `--gsmtap-ip` command line option, specifying
the destination IP address for the GSMTAP messages. In most cases,
using 127.0.0.1 for passing the messages over the loopback (`lo`) device
will be sufficient.
OsmoBTS can selectively trace such messages by their L1 SAPI, for both
Rx and Tx. For a complete list of L1 SAPI values, please refer to the
@@ -138,7 +137,8 @@ node of the OsmoBTS VTY.
OsmoBTS> enable
OsmoBTS# configure terminal
OsmoBTS(config)# bts 0
OsmoBTS(bts)# gsmtap-sapi sdcch
OsmoBTS(bts)# trx 0
OsmoBTS(trx)# gsmtap-sapi sdcch
OsmoBTS(trx)# write <1>
----
<1> the `write` command will make the configuration persistent in the
@@ -146,37 +146,18 @@ configuration file. This is not required if you wish to enable GSMTAP
only in the current session of OsmoBTS.
De-activation can be performed similarly by using the `no gsmtap-sapi
sdcch` command at the `bts` node of the OsmoBTS VTY.
It may be useful to enable all SAPIs with a few exceptions, or vice versa
disable everything using one command. For this purpose, the VTY provides
`gsmtap-sapi enable-all` and `gsmtap-sapi disable-all` commands.
.Example: Enabling all SAPIs except PDTCH and PTCCH
----
bts 0
gsmtap-sapi enable-all <1>
no gsmtap-sapi pdtch <2>
no gsmtap-sapi ptcch <2>
----
<1> Enable all available SAPIs
<2> Exclude PDTCH and PTCCH SAPIs
sdcch` command at the `trx` node of the OsmoBTS VTY.
From the moment they are enabled via VTY, GSMTAP messages will be
generated and sent in UDP encapsulation to the IANA-registered UDP port
for GSMTAP (4729) of the specified remote address.
for GSMTAP (4729) at the IP address specified in the command line
argument.
==== Configuring power ramping
OsmoBTS can ramp up the power of its trx over time. This helps reduce
cell congestion in busy environments.
Some models of OsmoBTS (such as osmo-bts-trx) also support ramping down the
transmit power over time until finally ceasing broadcast, for instance due to a
trx becoming administratively locked or due to the whole BTS being gracefully
shut down. This allows for mobile stations camping on the cell to gradually move
to other cells in the area once the signal drop is detected.
In this example, the trx starts with 5dBm output power which increases by 1dB
every two seconds until it reaches nominal power.
Power ramping can use the power-ramp commands at the CONFIG TRX node of the

View File

@@ -1,4 +0,0 @@
[[counters]]
== Counters
include::./counters_generated.adoc[]

View File

@@ -1,64 +0,0 @@
// autogenerated by show asciidoc counters
These counters and their description based on OsmoBTS 0.8.1.346-33ed (OsmoBTS).
=== Rate Counters
// generating tables for rate_ctr_group
// rate_ctr_group table E1 Input subsystem
.e1inp - E1 Input subsystem
[options="header"]
|===
| Name | Reference | Description
| hdlc:abort | <<e1inp_hdlc:abort>> | HDLC abort
| hdlc:bad_fcs | <<e1inp_hdlc:bad_fcs>> | HLDC Bad FCS
| hdlc:overrun | <<e1inp_hdlc:overrun>> | HDLC Overrun
| alarm | <<e1inp_alarm>> | Alarm
| removed | <<e1inp_removed>> | Line removed
|===
// rate_ctr_group table cell broadcast channel
.cbch - cell broadcast channel
[options="header"]
|===
| Name | Reference | Description
| cbch:rcvd_queued | <<cbch_cbch:rcvd_queued>> | Received + queued CBCH messages (Abis)
| cbch:rcvd_dropped | <<cbch_cbch:rcvd_dropped>> | Received + dropped CBCH messages (Abis)
| cbch:sent_single | <<cbch_cbch:sent_single>> | Sent single CBCH messages (Um)
| cbch:sent_default | <<cbch_cbch:sent_default>> | Sent default CBCH messages (Um)
| cbch:sent_null | <<cbch_cbch:sent_null>> | Sent NULL CBCH messages (Um)
|===
// rate_ctr_group table cell broadcast channel
.cbch - cell broadcast channel
[options="header"]
|===
| Name | Reference | Description
| cbch:rcvd_queued | <<cbch_cbch:rcvd_queued>> | Received + queued CBCH messages (Abis)
| cbch:rcvd_dropped | <<cbch_cbch:rcvd_dropped>> | Received + dropped CBCH messages (Abis)
| cbch:sent_single | <<cbch_cbch:sent_single>> | Sent single CBCH messages (Um)
| cbch:sent_default | <<cbch_cbch:sent_default>> | Sent default CBCH messages (Um)
| cbch:sent_null | <<cbch_cbch:sent_null>> | Sent NULL CBCH messages (Um)
|===
// rate_ctr_group table base transceiver station
.bts - base transceiver station
[options="header"]
|===
| Name | Reference | Description
| paging:rcvd | <<bts_paging:rcvd>> | Received paging requests (Abis)
| paging:drop | <<bts_paging:drop>> | Dropped paging requests (Abis)
| paging:sent | <<bts_paging:sent>> | Sent paging requests (Um)
| rach:rcvd | <<bts_rach:rcvd>> | Received RACH requests (Um)
| rach:drop | <<bts_rach:drop>> | Dropped RACH requests (Um)
| rach:handover | <<bts_rach:handover>> | Received RACH requests (Handover)
| rach:cs | <<bts_rach:cs>> | Received RACH requests (CS/Abis)
| rach:ps | <<bts_rach:ps>> | Received RACH requests (PS/PCU)
| agch:rcvd | <<bts_agch:rcvd>> | Received AGCH requests (Abis)
| agch:sent | <<bts_agch:sent>> | Sent AGCH requests (Abis)
| agch:delete | <<bts_agch:delete>> | Sent AGCH DELETE IND (Abis)
|===
== Osmo Stat Items
// generating tables for osmo_stat_items
== Osmo Counters
// generating tables for osmo_counters
// there are no ungrouped osmo_counters

View File

@@ -43,7 +43,7 @@ See <<vty>> for further information.
=== OsmoBTS Control Interface
The general structure of the Osmocom control interface is described in
The general structure of the Omsocom control interface is described in
<<common-control-if>>.
The number of control interface commands/attributes is currently quite

View File

@@ -1,39 +0,0 @@
include::{commondir}/chapters/osmux/osmux.adoc[]
=== Osmux Support in {program-name}
Osmux usage in {program-name} in managed through the VTY commands in node
`osmux`. Command `use (on|off|only)` is used to configure use policy of Osmux
within {program-name}. Once enabled (`on` or `only`), {program-name} will
announce the _OSMUX_ BTS feature towards the BSC over OML. This way, the BSC
becomes aware that this BTS supports using Osmux to transfer voice call user
data when the AMR codec is selected.
It is then up to the BSC to decide whether to use Osmux or not when establishing
a new call. If the BSC decides to use Osmux for a given call, then the _IPACC
CRCX/MDCX_ messages sent by the BSC will contain an extra _Osmux CID_ IE
appended, which contains the Osmux CID to be used by the BTS to send Osmux
frames to the co-located BSC MGW (aka the BSC MGW' local CID, or {program-name}'
remote CID). The IP address and port provided in the same messages refer to the
address and port where Osmux frames with the provided CID are expected to be
received. Similarly, {program-name} appends an _Osmux CID_ IE to the _IPACC
CRCX/MDCX ACK_ message it generates, this time with its own local Osmux CID.
Same goes for the BTS' local IP address and port where Osmux frames are expected
to be received.
{program-name} will behave differently during call set up based on the VTY
command `use (on|off|only)` presented above:
* `off`: If _IPACC CRCX_ from BSC contains _Osmux CID_ IE, meaning
BSC wants to use Osmux for this call, then {program-name} will reject the
request and the call set up will fail.
* `on`: {program-name} will support and accept both Osmux and non-Osmux (RTP)
upon call set up. If _IPACC CRCX_ from BSC contains the _Osmux CID_ IE on a
AMR call (`Channel Mode GSM3`), it will set up an Osmux stream on its end and
provide the BSC with the BTS-local CID. If the BSC provides no _Osmux CID_ IE,
then {program-name} will set up a regular RTP based call.
* `only`: Same as per `on`, except that {program-name} will accept only Osmux
calls on the CN-side, this is, if _IPACC CRCX_ from BSC doesn't
contain an _Osmux CID_ IE, it will reject the assignment and the call set up
will fail. This means also that only AMR calls (`Channel Mode GSM3`) are
allowed.

View File

@@ -38,7 +38,7 @@ Typical configurations either use OsmoBTS with OsmoBSC, or with
OsmoNITB, as can be seen in the following figures.
[[fig-gsm-classic]]
.Classic GSM architecture using OsmoBTS with OsmoBTS components
.Classic GSM archtiecture using OsmoBTS with OsmoBTS components
[graphviz]
----
digraph G {

View File

@@ -1,50 +0,0 @@
==== Full example of QoS for osmo-bts uplink QoS
In the below example we will show the full set of configuration required
for both DSCP and PCP differentiation of uplink Abis traffic by osmo-bts.
What we want to achieve in this example is the following configuration:
.DSCP and PCP assignments for osmo-bts uplink traffic in this example
[options="header",width="30%",cols="2,1,1"]
|===
|Traffic |DSCP|PCP
|A-bis RSL | 56| 7
|A-bis RTP | 46| 6
|A-bis OML | 34| 5
|===
. configure the osmocom program to set the DSCP value
. configure an egrees QoS map to map from priority to PCP
.Example Step 1: add related VTY configuration to `osmo-bts.cfg`
----
...
e1_input
ipa ip-dscp oml 34
ipa socket-priority oml 5
ipa ip-dscp rsl 56
ipa socket-priority rsl 7
...
bts 0
rtp ip-dscp 46
rtp socket-priority 6
...
----
.Example Step 2: egress QoS map to map from socket priority to PCP values
----
$ sudo ip link set dev eth0.9<1> type vlan egress-qos-map 0:0 1:1 5:5 6:6 7:7 <2>
----
<1> make sure to specify your specific VLAN interface name here instead of `eth0.9`.
<2> create a egress QoS map that maps the priority value 1:1 to the PCP. We also include the
mapping 1:1 from the osmo-pcu example (see <<userman-osmopcu>>) here.
NOTE:: The settings of the `ip` command are volatile and only active until
the next reboot (or the network device or VLAN is removed). Please refer to
the documentation of your specific Linux distribution in order to find out how
to make such settings persistent by means of an `ifup` hook whenever the interface
comes up. For CentOS/RHEL 8 this can e.g. be achieved by means of an `/sbin/ifup-local
script` (when using `network-scripts` and not NetworkManager). For Debian or Ubuntu,
this typically involves adding `up` lines to `/etc/network/interfaces` or a `/etc/network/if-up.d`
script.

View File

@@ -1,3 +1,39 @@
<revhistory>
<revision>
<revnumber>1</revnumber>
<date>December 2015</date>
<authorinitials>NJH, HW</authorinitials>
<revremark>
Initial version, reflecting OsmoBTS master branch as on 2015-Dec-7
(commit e28a20a2d9d049cd6312e218a7646593bbc43431).
</revremark>
</revision>
<revision>
<revnumber>2</revnumber>
<date>February 2016</date>
<authorinitials>HW</authorinitials>
<revremark>
Updated version with Message Sequence Chart of OML and RSL bring-up.
</revremark>
</revision>
<revision>
<revnumber>2.1</revnumber>
<date>February 2016</date>
<authorinitials>HW</authorinitials>
<revremark>
Fix A-bis OML/RSL port number swap in message seqeuence charts.
</revremark>
</revision>
<revision>
<revnumber>2.2</revnumber>
<date>July 2016</date>
<authorinitials>NJH, HW</authorinitials>
<revremark>
Add description on Dynamic Channel Configuration in OML and activation in RSL.
</revremark>
</revision>
</revhistory>
<authorgroup>
<author>
@@ -25,7 +61,7 @@
</authorgroup>
<copyright>
<year>2015-2021</year>
<year>2015-2016</year>
<holder>sysmocom - s.f.m.c. GmbH</holder>
</copyright>

View File

@@ -87,8 +87,6 @@ include::{srcdir}/abis/rtp.adoc[]
include::./common/chapters/port_numbers.adoc[]
include::./common/chapters/bibliography.adoc[]
include::./common/chapters/glossary.adoc[]
include::./common/chapters/gfdl.adoc[]

View File

@@ -1,3 +1,14 @@
<revhistory>
<revision>
<revnumber>1</revnumber>
<date>January 2016</date>
<authorinitials>HW</authorinitials>
<revremark>
Initial version, reflecting OsmoBTS master branch as on FIXME
(commit FIXME).
</revremark>
</revision>
</revhistory>
<authorgroup>
<author>
@@ -14,7 +25,7 @@
</authorgroup>
<copyright>
<year>2016-2021</year>
<year>2016</year>
<holder>sysmocom - s.f.m.c. GmbH</holder>
</copyright>

View File

@@ -1,5 +1,4 @@
:gfdl-enabled:
:program-name: OsmoBTS
OsmoBTS User Manual
===================
@@ -15,10 +14,6 @@ include::{srcdir}/chapters/interfaces.adoc[]
include::{srcdir}/chapters/control.adoc[]
include::./common/chapters/counters-overview.adoc[]
include::{srcdir}/chapters/counters.adoc[]
include::./common/chapters/vty.adoc[]
include::./common/chapters/logging.adoc[]
@@ -31,12 +26,6 @@ include::{srcdir}/chapters/bts-models.adoc[]
include::{srcdir}/chapters/architecture.adoc[]
include::{srcdir}/chapters/osmux_bts.adoc[]
include::./common/chapters/qos-dscp-pcp.adoc[]
include::./common/chapters/vty_cpu_sched.adoc[]
include::./common/chapters/trx_if.adoc[]
include::./common/chapters/control_if.adoc[]

View File

@@ -6,25 +6,24 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML 5.0//EN"
"http://docbook.org/xml/5.0/dtd/docbook.dtd" [
<!ENTITY chapter-vty SYSTEM "./common/chapters/vty.xml" >
<!ENTITY sections-vty SYSTEM "@@GENERATED@@" >
<!ENTITY sections-vty SYSTEM "generated/docbook_vty.xml" >
]>
<book>
<info>
<revhistory>
<revision>
<revnumber>v2</revnumber>
<date>@@REV_DATE@@</date>
<authorinitials>s.f.m.c.</authorinitials>
<revremark>Automatic build (@@REV_NUMBER@@)</revremark>
<revnumber>v1</revnumber>
<date>13th October 2016</date>
<authorinitials>hw</authorinitials>
<revremark>Initial</revremark>
</revision>
</revhistory>
<title>OsmoBTS VTY Reference</title>
<subtitle>@@VARIANT@@</subtitle>
<copyright>
<year>@@CR_YEAR@@</year>
<year>2016</year>
</copyright>
<legalnotice>

View File

@@ -1,17 +0,0 @@
#!/bin/sh -x
if [ -z "$DOCKER_PLAYGROUND" ]; then
echo "You need to set DOCKER_PLAYGROUND"
exit 1
fi
SCRIPT=$(realpath "$0")
MANUAL_DIR=$(dirname "$SCRIPT")
COMMIT=${COMMIT:-$(git log -1 --format=format:%H)}
cd "$DOCKER_PLAYGROUND/scripts" || exit 1
OSMO_BTS_BRANCH=$COMMIT ./regen_doc.sh osmo-bts 4241 \
"$MANUAL_DIR/chapters/counters_generated.adoc" \
"$MANUAL_DIR/vty/bts_vty_reference.xml"

View File

@@ -1,3 +1,29 @@
<revhistory>
<revision>
<revnumber>1</revnumber>
<date>October 2016</date>
<authorinitials>HW</authorinitials>
<revremark>
Initial version
</revremark>
</revision>
<revision>
<revnumber>2</revnumber>
<date>November 2016</date>
<authorinitials>MS</authorinitials>
<revremark>
FSM added
</revremark>
</revision>
<revision>
<revnumber>3</revnumber>
<date>July 2017</date>
<authorinitials>PE</authorinitials>
<revremark>
Add section and update sequence charts to describe requirement to receive all PH-DATA.ind events
</revremark>
</revision>
</revhistory>
<authorgroup>
<author>
@@ -25,7 +51,7 @@
</authorgroup>
<copyright>
<year>2016-2021</year>
<year>2016</year>
<holder>sysmocom - s.f.m.c. GmbH</holder>
</copyright>

View File

@@ -95,10 +95,10 @@ msc {
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_FIRST)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
@@ -110,10 +110,10 @@ msc {
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
}
@@ -123,7 +123,7 @@ ULSF2:: As per 3GPP TS 05.03 section 3.9.2.4 The last 4 bursts shall not be tran
the SID_FIRST frame is immediately followed by a speech frame. It has been observed that some phone
does not transmit the last 4 bursts even if it is not followed by a speech frame.
ULSU2:: There must be exactly two suppressed voice frames between the
ULSU2:: There must be exactly two supressed voice frames between the
SID_FIRST and the SID_UPDATE, i.e. there's 60ms between SID_FIRST and
SID_UPDATE.
@@ -152,52 +152,52 @@ msc {
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
@@ -208,10 +208,10 @@ msc {
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
}
@@ -254,10 +254,10 @@ msc {
...;
--- [label="Once voice is active again"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
@@ -345,10 +345,10 @@ msc {
...;
--- [label="FACCH/F Frame During DTX"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
@@ -368,10 +368,10 @@ msc {
phy => bts [label="PH-DATA.ind FACCH/F"];
bts => mgw [label="FACCH/F"];
ms -x phy [label="Suppressed L1 burst", id="ULSF2"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst", id="ULSF2"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_FIRST)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
...;
@@ -382,7 +382,7 @@ ULSF2:: The sub-blocks 5-8 of SID_FIRST are not transmitted, as all
information bits are contained in sub-blocks 1-4 only
Note:: It has been observed with some phones that the SID_FIRST is not sent following the FACCH/F
frame. If this case occurs the No Data Frame and SID_UPDATE order resumes.
frame. If this case occures the No Data Frame and SID_UPDATE order resumes.
=== TCH/AFS Downlink (Network to MS)
@@ -660,10 +660,10 @@ msc {
phy => bts [label="PH-RTS.ind (TCH)"];
phy <= bts [label="PH-EMPTY-FRAME.req (FACCH/F)"];
phy <= bts [label="PH-EMPTY-FRAME.req (TCH/F)"];
ms x- phy [label="Suppressed burst"];
ms x- phy [label="Suppressed burst"];
ms x- phy [label="Suppressed burst"];
ms x- phy [label="Suppressed burst"];
ms x- phy [label="Supressed burst"];
ms x- phy [label="Supressed burst"];
ms x- phy [label="Supressed burst"];
ms x- phy [label="Supressed burst"];
}
----
@@ -738,8 +738,8 @@ msc {
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (N)"];
bts => mgw [label="RTP (AMR FT=0..7,Q=1)"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr_SidFirstP1", id="ULSF1"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
@@ -753,8 +753,8 @@ msc {
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
}
@@ -764,7 +764,7 @@ ULSF1:: Only SID_FIRST_P1 contains information so it must be the only one transm
NOTE:: It has been observed that not all phones transmit SID_FIRST_P2 so the PH-DATA.ind GsmL1_TchPlType_Amr_SidFirstP2 is not guaranteed to be sent to the BTS.
ULSU1:: There must be exactly two suppressed voice frames between the
ULSU1:: There must be exactly two supressed voice frames between the
SID_FIRST and the SID_UPDATE, i.e. there's 60ms between SID_FIRST and
SID_UPDATE.
@@ -795,33 +795,33 @@ msc {
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
@@ -834,8 +834,8 @@ msc {
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
}
@@ -999,8 +999,8 @@ msc {
...;
ms .. mgw [label="FACCH/H during DTX operation"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
@@ -1026,8 +1026,8 @@ msc {
phy => bts [label="PH-DATA.ind with empty payload"];
bts -x mgw [label="Suppressed RTP frame"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Suppressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
ms -x phy [label="Supressed L1 burst"];
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr_SidFirstP1"];
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
}

View File

@@ -1,37 +0,0 @@
DOCBOOKS = $(foreach v,$(VARIANTS),vty/osmobts-$(v)-vty-reference.xml)
DOCBOOKS_DEPS = $(DOCBOOKS) $(addsuffix .inc,$(DOCBOOKS))
INC_DIR = $(abspath $(builddir)/vty)
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.docbook.inc
CLEAN_FILES += $(DOCBOOKS_DEPS)
CLEAN_FILES += $(addsuffix .inc.gen,$(DOCBOOKS))
CLEAN_FILES += $(addsuffix .inc.merged,$(DOCBOOKS))
$(INC_DIR):
mkdir -p $@
vty/osmobts-%-vty-reference.xml: $(top_srcdir)/src/osmo-bts-% $(INC_DIR)
sed -e "s|@@GENERATED@@|$@.inc|" \
-e "s|@@VARIANT@@|$(notdir $<)|" \
-e "s|@@REV_NUMBER@@|$(VERSION)|" \
-e "s|@@REV_DATE@@|$(shell date +"%dth %B %Y")|" \
-e "s|@@CR_YEAR@@|$(shell date +"%Y")|" \
$(srcdir)/vty/osmobts-vty-reference.xml > $@
vty/osmobts-%-vty-reference.xml.inc: $(top_builddir)/src/osmo-bts-*/osmo-bts-% \
$(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \
$(OSMO_GSM_MANUALS_DIR)/common/chapters/vty.xml \
$(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl \
$(srcdir)/vty/*.xml $(INC_DIR)
# a) Invoke osmo-bts-% to generate the list of commands first
$< --vty-ref-mode default --vty-ref-xml > "$@.gen"
# ... filter garbage potentially printed by libraries to stdout
sed -i '/^<vtydoc/,$$!d' "$@.gen"
# b) Merge the result of a) with global and local additions
$(OSMO_GSM_MANUALS_DIR)/build/vty_reference_combine.sh \
$(realpath $(OSMO_GSM_MANUALS_DIR)/merge_doc.xsl) "$@.gen" \
$(OSMO_GSM_MANUALS_DIR)/common/vty_additions.xml \
$(srcdir)/vty/*additions*.xml > "$@.merged"
# c) Convert the result of b) into a valid docbook
xsltproc $(OSMO_GSM_MANUALS_DIR)/vty_reference.xsl "$@.merged" > $@

View File

@@ -1,26 +1 @@
<!-- ex:ts=2:sw=2:et -->
<vtydoc xmlns='urn:osmocom:xml:libosmocore:vty:doc:1.0'>
<node id='phy-inst'>
<!-- FIXME: This command appears twice for some reason. -->
<command id='osmotrx maxdly &lt;0-63&gt;'>
<description>
Access Burst is the first burst a mobile transmits in order to establish a connection and it
is used to estimate Timing Advance (TA) which is then applied to Normal Bursts to compensate
for signal delay due to distance. So changing this setting effectively changes maximum range
of the cell, because Access Bursts with a delay higher than this value will be ignored.
</description>
</command>
<!-- FIXME: This command appears unconditionally, despite being hidden. -->
<command id='osmotrx maxdlynb &lt;0-63&gt;'>
<description>
USE FOR TESTING ONLY, DO NOT CHANGE IN PRODUCTION USE!
During the normal operation, delay of Normal Bursts is controlled by the Timing Advance loop
and thus Normal Bursts arrive to a BTS with no more than a couple GSM symbols, which is
already taken into account in osmo-trx. Changing this setting will have no effect in
production installations except increasing osmo-trx CPU load. This setting is only useful
when testing with a transmitter which cannot precisely synchronize to the BTS downlink
signal, like R&amp;S CMD57.
</description>
</command>
</node>
</vtydoc>
<vtydoc xmlns='urn:osmocom:xml:libosmocore:vty:doc:1.0'/>

File diff suppressed because it is too large Load Diff

View File

@@ -21,12 +21,13 @@ The start-up procedure of OsmoBTS can be described as follows:
| bts-specific | bts_model_phy_instance_set_defaults() | Called for every PHY Instance created
| common | bts_controlif_setup() | Initialization of Control Interface
| bts-specific | bts_model_ctrl_cmds_install()
| common | telnet_init_default() | Initialization of telnet interface
| common | pcu_sock_init() | Initialization of PCU socket
| common | telnet_init() | Initialization of telnet interface
| common | pcu_sock_init() | Initializaiton of PCU socket
| common | main() | Installation of signal handlers
| common | abis_open() | Start of the A-bis connection to BSC
| common | phy_links_open() | Iterate over list of configured PHY links
| bts-specific | bts_model_phy_link_open() | Open each of the configured PHY links
| common | write_pid_file() | Generate the pid file
| common | osmo_daemonize() | Fork as daemon in background (if configured)
| common | bts_main() | Run main loop until global variable quit >= 2
| bts-specific | bts_model_oml_estab() | Called by core once OML link is established

View File

@@ -1,98 +0,0 @@
== rx_tchf_fn(): TCH/FS, TCH/EFS, TCH/AFS, TCH/F2.4, and FACCH/F
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 4
| | | | | | | | | | | | | | | | | | | | | a | b | c | d | Rx bid={0,1,2,3}, decode
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 4
| | | | | | | | | | | | | | | | | a | b | c | d | e | f | g | h | Rx bid={0,1,2,3}, decode
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 4
|
|<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>| frame A
| |<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>| frame B
@ decoding from here
== rx_tchf_fn(): TCH/F14.4, TCH/F9.6, TCH/F4.8
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 4
| | | | | | | | | | | | | | | | | | | | | a | b | c | d | Rx bid={0,1,2,3}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 4
| | | | | | | | | | | | | | | | | a | b | c | d | e | f | g | h | Rx bid={0,1,2,3}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 4
| | | | | | | | | | | | | a | b | c | d | e | f | g | h | i | j | k | l | Rx bid={0,1,2,3}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 4
| | | | | | | | | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | Rx bid={0,1,2,3}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 4
| | | | | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | Rx bid={0,1,2,3}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 4
| a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | Rx bid={0,1,2,3}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 4
|
|<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>| frame A
| |<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>| frame B
@ decoding from here
== rx_tchh_fn(): TCH/HS, TCH/AHS
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | | | | | a | b | | | Rx bid={0,1}, decode
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | | | a | b | c | d | | | Rx bid={0,1}, decode
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | a | b | c | d | e | f | | | Rx bid={0,1}, decode
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
|
|<~~~~~~~~~~~~~>| frame A
| |<~~~~~~~~~~~~~>| frame B
@ decoding from here
== rx_tchh_fn(): FACCH/H
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | | | | | a | b | | | Rx bid={0,1}, decode
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | | | a | b | c | d | | | Rx bid={0,1}
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | a | b | c | d | e | f | | | Rx bid={0,1}, decode
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|---+---+---+---+---+---+---+---+ << 2
|
|<~~~~~~~~~~~~~~~~~~~~~>| frame A
| |<~~~~~~~~~~~~~~~~~~~~~>| frame B
@ decoding from here
== rx_tchh_fn(): TCH/H4.8, TCH/H2.4
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | | | | | a | b | | | Rx bid={0,1}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | | | a | b | c | d | | | Rx bid={0,1}
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | | | a | b | c | d | e | f | | | Rx bid={0,1}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | | | a | b | c | d | e | f | g | h | | | Rx bid={0,1}
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | | | a | b | c | d | e | f | g | h | i | j | | | Rx bid={0,1}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | | | a | b | c | d | e | f | g | h | i | j | k | l | | | Rx bid={0,1}
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | | | a | b | c | d | e | f | g | h | i | j | k | l | m | n | | | Rx bid={0,1}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | | | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | | | Rx bid={0,1}
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | | | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | | | Rx bid={0,1}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| | | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | | | Rx bid={0,1}
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
| a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | | | Rx bid={0,1}, decode
|---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ << 2
|
|<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>| frame A
| |<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>| frame B
@ decoding from here

View File

@@ -1,40 +1,5 @@
noinst_HEADERS = \
abis.h \
abis_osmo.h \
asci.h \
bts.h \
bts_model.h \
bts_shutdown_fsm.h \
bts_sm.h \
bts_trx.h \
gsm_data.h \
logging.h \
measurement.h \
oml.h \
paging.h \
rsl.h \
rtp_input_preen.h \
signal.h \
vty.h \
amr.h \
pcu_if.h \
pcuif_proto.h \
handover.h \
msg_utils.h \
tx_power.h \
control_if.h \
cbch.h \
csd_rlp.h \
csd_v110.h \
l1sap.h \
lchan.h \
power_control.h \
scheduler.h \
scheduler_backend.h \
phy_link.h \
dtx_dl_amr_fsm.h \
ta_control.h \
nm_common_fsm.h \
notification.h \
osmux.h \
$(NULL)
noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h gsm_data_shared.h logging.h measurement.h \
oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \
handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \
power_control.h scheduler.h scheduler_backend.h phy_link.h \
dtx_dl_amr_fsm.h

View File

@@ -6,15 +6,19 @@
#include <osmo-bts/gsm_data.h>
enum abis_link_fsm_event {
ABIS_LINK_EV_SIGN_LINK_OML_UP,
ABIS_LINK_EV_SIGN_LINK_DOWN,
ABIS_LINK_EV_VTY_RM_ADDR, /* data: struct bsc_oml_host* being removed */
#define OML_RETRY_TIMER 5
#define OML_PING_TIMER 20
enum {
LINK_STATE_IDLE = 0,
LINK_STATE_RETRYING,
LINK_STATE_CONNECTING,
LINK_STATE_CONNECT,
};
void abis_init(struct gsm_bts *bts);
int abis_open(struct gsm_bts *bts, char *model_name);
struct e1inp_line *abis_open(struct gsm_bts *bts, char *dst_host,
char *model_name);
int abis_oml_sendmsg(struct msgb *msg);

View File

@@ -1,10 +0,0 @@
#pragma once
#include <osmocom/core/msgb.h>
#include <osmo-bts/pcuif_proto.h>
struct gsm_bts;
int down_osmo(struct gsm_bts *bts, struct msgb *msg);
int abis_osmo_pcu_tx_container(struct gsm_bts *bts, const struct gsm_pcu_if_container *container);

View File

@@ -14,6 +14,5 @@ int amr_parse_mr_conf(struct amr_multirate_conf *amr_mrc,
void amr_set_mode_pref(uint8_t *data, const struct amr_multirate_conf *amr_mrc,
uint8_t cmi, uint8_t cmr);
unsigned int amr_get_initial_mode(struct gsm_lchan *lchan);
void amr_init_mr_conf_def(struct gsm_lchan *lchan);
#endif /* _OSMO_BTS_AMR_H */

View File

@@ -1,43 +0,0 @@
#pragma once
#include <stdint.h>
#include <osmo-bts/lchan.h>
enum {
VGCS_TALKER_NONE = 0,
VGCS_TALKER_WAIT_FRAME,
VGCS_TALKER_ACTIVE,
};
void vgcs_rach(struct gsm_lchan *lchan, uint8_t ra, uint8_t acc_delay, uint32_t fn);
void vgcs_lchan_activate(struct gsm_lchan *lchan);
void vgcs_lchan_react(struct gsm_lchan *lchan);
void vgcs_talker_frame(struct gsm_lchan *lchan);
void vgcs_talker_reset(struct gsm_lchan *lchan, bool ul_access);
void vgcs_listener_reset(struct gsm_lchan *lchan);
static inline bool vgcs_is_uplink_free(struct gsm_lchan *lchan)
{
return lchan->asci.uplink_free;
}
static inline void vgcs_uplink_free_get(struct gsm_lchan *lchan, uint8_t *msg)
{
memcpy(msg, lchan->asci.uplink_free_msg, GSM_MACBLOCK_LEN);
}
static inline void vgcs_uplink_free_set(struct gsm_lchan *lchan, uint8_t *msg)
{
memcpy(lchan->asci.uplink_free_msg, msg, GSM_MACBLOCK_LEN);
lchan->asci.uplink_free = true;
}
static inline void vgcs_uplink_free_reset(struct gsm_lchan *lchan)
{
lchan->asci.uplink_free = false;
}

View File

@@ -2,13 +2,7 @@
#define _BTS_H
#include <osmocom/core/rate_ctr.h>
#include <osmocom/core/socket.h>
#include <osmo-bts/gsm_data.h>
#include <osmo-bts/bts_trx.h>
#include <osmo-bts/osmux.h>
struct gsm_bts_trx;
enum bts_global_status {
BTS_STATUS_RF_ACTIVE,
@@ -19,449 +13,56 @@ enum bts_global_status {
enum {
BTS_CTR_PAGING_RCVD,
BTS_CTR_PAGING_DROP,
BTS_CTR_PAGING_DROP_PS,
BTS_CTR_PAGING_SENT,
BTS_CTR_PAGING_CONG,
BTS_CTR_RACH_RCVD,
BTS_CTR_RACH_DROP,
BTS_CTR_RACH_HO,
BTS_CTR_RACH_VGCS,
BTS_CTR_RACH_CS,
BTS_CTR_RACH_PS,
BTS_CTR_AGCH_RCVD,
BTS_CTR_AGCH_SENT,
BTS_CTR_AGCH_DELETED,
BTS_CTR_RTP_RX_TOTAL,
BTS_CTR_RTP_RX_MARKER,
BTS_CTR_RTP_RX_DROP_PREEN,
BTS_CTR_RTP_RX_DROP_LOOPBACK,
BTS_CTR_RTP_RX_DROP_OVERFLOW,
BTS_CTR_RTP_RX_DROP_V110_DEC,
BTS_CTR_RTP_TX_TOTAL,
BTS_CTR_RTP_TX_MARKER,
};
/* Used by OML layer for BTS Attribute reporting */
enum bts_attribute {
BTS_TYPE_VARIANT,
BTS_SUB_MODEL,
TRX_PHY_VERSION,
};
const char *btsatttr2str(enum bts_attribute v);
enum gsm_bts_type_variant {
BTS_UNKNOWN,
BTS_OSMO_LITECELL15,
BTS_OSMO_OC2G,
BTS_OSMO_OCTPHY,
BTS_OSMO_SYSMO,
BTS_OSMO_TRX,
BTS_OSMO_VIRTUAL,
BTS_OSMO_OMLDUMMY,
_NUM_BTS_VARIANT
};
const char *btsvariant2str(enum gsm_bts_type_variant v);
enum bts_impl_flag {
/* TODO: add a brief description of this flag */
BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP,
/* When this flag is set then the measurement data is included in
* (PRIM_PH_DATA) and struct ph_tch_param (PRIM_TCH). Otherwise the
* measurement data is passed using a separate MPH INFO MEAS IND.
* (See also ticket: OS#2977) */
BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB,
/* Whether the BTS model requires RadioCarrier MO to be in Enabled state
* (OPSTARTed) before OPSTARTing the RadioChannel MOs. See OS#5157 */
BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER,
/* Whether the BTS model reports interference measurements to L1SAP. */
BTS_INTERNAL_FLAG_INTERF_MEAS,
_BTS_INTERNAL_FLAG_NUM, /* must be at the end */
};
/* BTS implementation flags (internal use, not exposed via OML) */
#define bts_internal_flag_get(bts, flag) \
((bts->flags & (typeof(bts->flags))(1 << flag)) != 0)
#define bts_internal_flag_set(bts, flag) \
bts->flags |= (typeof(bts->flags))(1 << flag)
struct gprs_rlc_cfg {
uint16_t parameter[_NUM_RLC_PAR];
struct {
uint16_t repeat_time; /* ms */
uint8_t repeat_count;
} paging;
uint32_t cs_mask; /* bitmask of gprs_cs */
uint8_t initial_cs;
uint8_t initial_mcs;
};
struct bts_smscb_state {
struct llist_head queue; /* list of struct smscb_msg */
int queue_len;
struct rate_ctr_group *ctrs;
struct smscb_msg *cur_msg; /* current SMS-CB */
struct smscb_msg *default_msg; /* default broadcast message; NULL if none */
};
/* Tx power filtering algorithm */
enum bts_pf_algo {
BTS_PF_ALGO_NONE = 0,
BTS_PF_ALGO_EWMA,
};
/* UL/DL power control parameters */
struct bts_power_ctrl_params {
/* Target value to strive to */
int target_dbm;
/* Tolerated deviation from target */
int hysteresis_db;
/* How many dB do we raise power at maximum */
int raise_step_max_db;
/* How many dB do we lower power at maximum */
int lower_step_max_db;
/* RxLev filtering algorithm */
enum bts_pf_algo pf_algo;
/* (Optional) filtering parameters */
union {
/* Exponentially Weighted Moving Average */
struct {
/* Smoothing factor: higher the value - less smoothing */
uint8_t alpha; /* 1 .. 99 (in %) */
} ewma;
} pf;
};
/* GPRS CELL; ip.access specific NM Object */
struct gsm_gprs_cell {
struct gsm_abis_mo mo;
uint16_t bvci;
uint8_t timer[11];
struct gprs_rlc_cfg rlc_cfg;
struct {
uint32_t gprs_codings; /* see NM_IPAC_F_GPRS_CODING_* flags */
} support;
};
/* Struct that holds one OML-Address (Address of the BSC) */
struct bsc_oml_host {
struct llist_head list;
char *addr;
};
#define BTS_PCU_SOCK_WQUEUE_LEN_DEFAULT 100
/* One BTS */
struct gsm_bts {
/* list header in g_bts_sm->bts_list */
struct llist_head list;
/* number of the BTS in network */
uint8_t nr;
/* human readable name / description */
char *description;
/* Cell Identity */
uint16_t cell_identity;
/* location area code of this BTS */
uint16_t location_area_code;
/* Base Station Identification Code (BSIC), lower 3 bits is BCC,
* which is used as TSC for the CCCH */
uint8_t bsic;
bool bsic_configured;
/* type of BTS */
enum gsm_bts_type_variant variant;
enum gsm_band band;
char version[MAX_VERSION_LENGTH];
char sub_model[MAX_VERSION_LENGTH];
/* public features of a given BTS (set/reported via OML) */
struct bitvec *features;
/* implementation flags of a given BTS (not exposed via OML) */
uint16_t flags;
/* Connected PCU version (if any) */
char pcu_version[MAX_VERSION_LENGTH];
/* maximum Tx power that the MS is permitted to use in this cell */
int ms_max_power;
/* how do we talk OML with this TRX? */
struct e1inp_sign_link *oml_link;
struct timespec oml_conn_established_timestamp;
/* OSMO extenion link associated to same line as oml_link: */
struct e1inp_sign_link *osmo_link;
/* Abis network management O&M handle */
struct gsm_abis_mo mo;
/* number of this BTS on given E1 link */
uint8_t bts_nr;
/* DTX features of this BTS */
bool dtxd;
/* CCCH is on C0 */
struct gsm_bts_trx *c0;
struct gsm_bts_sm *site_mgr;
/* bitmask of all SI that are present/valid in si_buf */
uint32_t si_valid;
/* 3GPP TS 44.018 Table 10.5.2.33b.1 INDEX and COUNT for SI2quater */
uint8_t si2q_index; /* distinguish individual SI2quater messages */
uint8_t si2q_count; /* si2q_index for the last (highest indexed) individual SI2quater message */
/* buffers where we put the pre-computed SI */
sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM];
/* offsets used while generating SI2quater */
size_t e_offset;
size_t u_offset;
/* decoded SI rest octets - *unmodified* as received from BSC */
struct osmo_gsm48_si_ro_info si3_ro_decoded;
struct osmo_gsm48_si_ro_info si4_ro_decoded;
/* is SI GPRS Indicator currently disabled due to lack of PCU connection? */
bool si_gprs_ind_disabled;
/* ip.access Unit ID's have Site/BTS/TRX layout */
union {
struct {
uint16_t site_id;
uint16_t bts_id;
uint32_t flags;
uint32_t rsl_ip;
} ip_access;
};
/* Not entirely sure how ip.access specific this is */
struct {
struct gsm_gprs_cell cell;
uint8_t rac;
} gprs;
/* transceivers */
int num_trx;
struct llist_head trx_list;
struct rate_ctr_group *ctrs;
bool supp_meas_toa256;
struct {
/* Interference Boundaries for OML */
int16_t boundary[6];
uint8_t intave;
} interference;
uint32_t t200_fn[7];
unsigned int t3105_ms;
unsigned int t3115_ms; /* VGCS UPLINK GRANT repeat timer */
struct {
uint8_t overload_period;
struct {
/* Input parameters from OML */
uint8_t load_ind_thresh; /* percent */
uint8_t load_ind_period; /* seconds */
/* Internal data */
struct osmo_timer_list timer;
unsigned int pch_total;
unsigned int pch_used;
} ccch;
struct {
/* Input parameters from OML */
int16_t busy_thresh; /* in dBm */
uint16_t averaging_slots;
/* Internal data */
unsigned int total; /* total nr */
unsigned int busy; /* above busy_thresh */
unsigned int access; /* access bursts */
} rach;
} load;
uint8_t ny1;
uint8_t ny2; /* maximum number of repetitions for the VGCS UPLINK GRANT */
uint8_t max_ta;
/* AGCH queuing */
struct {
struct llist_head queue;
int length;
int max_length;
int thresh_level; /* Cleanup threshold in percent of max len */
int low_level; /* Low water mark in percent of max len */
int high_level; /* High water mark in percent of max len */
/* TODO: Use a rate counter group instead */
uint64_t dropped_msgs;
uint64_t merged_msgs;
uint64_t rejected_msgs;
uint64_t agch_msgs;
uint64_t pch_msgs;
} agch_queue;
struct {
uint8_t *prim_notif; /* ETWS primary notification (NULL if none) */
ssize_t prim_notif_len; /* Length of prim_notif; expected 56 bytes */
uint8_t page_size;
uint8_t num_pages; /* total number of pages */
uint8_t next_page; /* next page number to be sent */
bool pni; /* Primary Notification Identifier */
} etws;
/* Advanced Speech Call Items (VBS/VGCS) + NCH related bits */
struct {
int pos_nch; /* position of the NCH or < 0, if not available */
uint8_t nln, nln_status; /* current notification list number and status */
struct llist_head notifications;
int notification_entries; /* current number of entries in the list */
int notification_count; /* counter to count all entries */
} asci;
struct paging_state *paging_state;
struct llist_head bsc_oml_hosts;
unsigned int rtp_jitter_buf_ms;
bool rtp_jitter_adaptive;
uint16_t rtp_port_range_start;
uint16_t rtp_port_range_end;
uint16_t rtp_port_range_next;
int rtp_ip_dscp;
int rtp_priority;
bool rtp_nogaps_mode; /* emit RTP stream without any gaps */
bool use_ul_ecu; /* "rtp internal-uplink-ecu" option */
bool emit_hr_rfc5993;
struct {
uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */
uint8_t max_ta; /* maximum timing advance */
} support;
struct {
uint8_t tc4_ctr;
} si;
struct gsm_time gsm_time;
/* frame number statistics (FN in PH-RTS.ind vs. PH-DATA.ind */
struct {
int32_t min; /* minimum observed */
int32_t max; /* maximum observed */
int32_t avg256; /* accumulator */
uint32_t avg_count; /* number of samples accumulated in avg256 */
uint32_t avg_window; /* number of averages in avg_count */
} fn_stats;
/* Radio Link Timeout counter. -1 disables timeout for
* lab/measurement purpose */
struct {
int oml; /* value communicated by BSC in OML */
int current; /* actual currently applied value */
bool vty_override; /* OML value overridden by VTY */
} radio_link_timeout;
/* Default (fall-back) Dynamic Power Control parameters for all transceivers */
struct gsm_power_ctrl_params bs_dpc_params; /* BS Dynamic Power Control */
struct gsm_power_ctrl_params ms_dpc_params; /* MS Dynamic Power Control */
/* Maximum BCCH carrier power reduction */
uint8_t c0_power_red_db;
/* used by the sysmoBTS to adjust band */
uint8_t auto_band;
/* State for SMSCB (Cell Broadcast) for BASIC and EXTENDED channel */
struct bts_smscb_state smscb_basic;
struct bts_smscb_state smscb_extended;
int smscb_queue_tgt_len; /* ideal/target queue length */
int smscb_queue_max_len; /* maximum queue length */
int smscb_queue_hyst; /* hysteresis for CBCH load indications */
int16_t min_qual_rach; /* minimum link quality (in centiBels) for Access Bursts */
int16_t min_qual_norm; /* minimum link quality (in centiBels) for Normal Bursts */
uint16_t max_ber10k_rach; /* Maximum permitted RACH BER in 0.01% */
struct {
char *sock_path;
unsigned int sock_wqueue_len_max;
} pcu;
/* GSMTAP Um logging (disabled by default) */
struct {
struct gsmtap_inst *inst;
char *remote_host;
char *local_host;
uint32_t sapi_mask;
uint8_t sapi_acch;
bool rlp;
bool rlp_skip_null;
} gsmtap;
struct osmux_state osmux;
struct osmo_fsm_inst *shutdown_fi; /* FSM instance to manage shutdown procedure during process exit */
bool shutdown_fi_exit_proc; /* exit process when shutdown_fsm is finished? */
bool shutdown_fi_skip_power_ramp; /* Skip power ramping and change power in one step? */
struct osmo_fsm_inst *abis_link_fi; /* FSM instance to manage abis connection during process startup and link failure */
struct osmo_tdef *T_defs; /* Timer defines */
void *model_priv; /* Allocated by bts_model, contains model specific data pointer */
};
extern const struct value_string bts_impl_flag_desc[];
extern void *tall_bts_ctx;
#define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater][i])
#define GSM_BTS_HAS_SI(bts, i) ((bts)->si_valid & (1 << i))
#define GSM_BTS_SI(bts, i) (void *)((bts)->si_buf[i][0])
static inline struct gsm_bts *gsm_gprs_cell_get_bts(struct gsm_gprs_cell *cell)
{
return (struct gsm_bts *)container_of(cell, struct gsm_bts, gprs.cell);
}
struct gsm_bts *gsm_bts_alloc(struct gsm_bts_sm *bts_sm, uint8_t bts_num);
struct gsm_bts *gsm_bts_num(const struct gsm_bts_sm *bts_sm, int num);
int bts_init(struct gsm_bts *bts);
int bts_trx_init(struct gsm_bts_trx *trx);
void bts_shutdown(struct gsm_bts *bts, const char *reason);
void bts_shutdown_ext(struct gsm_bts *bts, const char *reason, bool exit_proc, bool skip_power_ramp);
struct gsm_bts *create_bts(uint8_t num_trx, char *id);
int create_ms(struct gsm_bts_trx *trx, int maskc, uint8_t *maskv_tx,
uint8_t *maskv_rx);
void destroy_bts(struct gsm_bts *bts);
int work_bts(struct gsm_bts *bts);
int bts_link_estab(struct gsm_bts *bts);
int trx_link_estab(struct gsm_bts_trx *trx);
int trx_set_available(struct gsm_bts_trx *trx, int avail);
void bts_new_si(void *arg);
void bts_setup_slot(struct gsm_bts_trx_ts *slot, uint8_t comb);
int bts_agch_enqueue(struct gsm_bts *bts, struct msgb *msg);
struct msgb *bts_agch_dequeue(struct gsm_bts *bts);
int bts_agch_max_queue_length(int T, int bcch_conf);
int bts_ccch_copy_msg(struct gsm_bts *bts, uint8_t *out_buf, struct gsm_time *gt,
int is_ag_res);
enum ccch_msgt {
CCCH_MSGT_AGCH,
CCCH_MSGT_PCH,
CCCH_MSGT_NCH,
};
int bts_ccch_copy_msg(struct gsm_bts *bts, uint8_t *out_buf, struct gsm_time *gt, enum ccch_msgt ccch);
int bts_supports_cipher(struct gsm_bts *bts, int rsl_cipher);
uint8_t *bts_sysinfo_get(struct gsm_bts *bts, const struct gsm_time *g_time);
void regenerate_si3_restoctets(struct gsm_bts *bts);
void regenerate_si4_restoctets(struct gsm_bts *bts);
int get_si4_ro_offset(const uint8_t *si4_buf);
uint8_t *lchan_sacch_get(struct gsm_lchan *lchan);
int lchan_init_lapdm(struct gsm_lchan *lchan);
void load_timer_start(struct gsm_bts *bts);
void load_timer_stop(struct gsm_bts *bts);
bool load_timer_is_running(const struct gsm_bts *bts);
uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg);
void bts_update_status(enum bts_global_status which, int on);
int trx_ms_pwr_ctrl_is_osmo(struct gsm_bts_trx *trx);
struct gsm_time *get_time(struct gsm_bts *bts);
int bts_main(int argc, char **argv);
bool bts_supports_cm(const struct gsm_bts *bts,
const struct rsl_ie_chan_mode *cm);
int32_t bts_get_avg_fn_advance(const struct gsm_bts *bts);
/* return the gsm_lchan for the CBCH (if it exists at all) */
struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts);
int bts_set_c0_pwr_red(struct gsm_bts *bts, const uint8_t red);
/* Context information to be put in the control buffer (db) of the AGCH msg
* buffer */
struct bts_agch_msg_cb {
uint32_t msg_id;
bool confirm;
} __attribute__ ((packed));
int bts_supports_cm(struct gsm_bts *bts, enum gsm_phys_chan_config pchan,
enum gsm48_chan_mode cm);
#endif /* _BTS_H */

View File

@@ -5,7 +5,6 @@
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/protocol/gsm_12_21.h>
#include <osmo-bts/gsm_data.h>
@@ -21,8 +20,8 @@ int bts_model_check_oml(struct gsm_bts *bts, uint8_t msg_type,
struct tlv_parsed *old_attr, struct tlv_parsed *new_attr,
void *obj);
int bts_model_apply_oml(struct gsm_bts *bts, const struct msgb *msg,
struct gsm_abis_mo *mo, void *obj);
int bts_model_apply_oml(struct gsm_bts *bts, struct msgb *msg,
struct tlv_parsed *new_attr, int obj_kind, void *obj);
int bts_model_opstart(struct gsm_bts *bts, struct gsm_abis_mo *mo,
void *obj);
@@ -31,20 +30,17 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo,
void *obj, uint8_t adm_state);
int bts_model_trx_deact_rf(struct gsm_bts_trx *trx);
int bts_model_trx_close(struct gsm_bts_trx *trx);
/* Implementation should call bts_model_trx_close_cb when done */
void bts_model_trx_close(struct gsm_bts_trx *trx);
int bts_model_vty_init(struct gsm_bts *bts);
int bts_model_vty_init(void *ctx);
void bts_model_config_write_bts(struct vty *vty, const struct gsm_bts *bts);
void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx);
void bts_model_config_write_phy(struct vty *vty, const struct phy_link *plink);
void bts_model_config_write_phy_inst(struct vty *vty, const struct phy_instance *pinst);
void bts_model_config_write_bts(struct vty *vty, struct gsm_bts *bts);
void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx);
void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink);
void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst);
int bts_model_oml_estab(struct gsm_bts *bts);
/* Implementation should call power_trx_change_compl() to confirm power change applied */
int bts_model_change_power(struct gsm_bts_trx *trx, int p_trxout_mdBm);
int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan);
@@ -66,10 +62,4 @@ void bts_model_phy_instance_set_defaults(struct phy_instance *pinst);
int bts_model_ts_disconnect(struct gsm_bts_trx_ts *ts);
void bts_model_ts_connect(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config as_pchan);
/* BTS model specific implementations are expected to call these functions as a
* response to some of the APIs above:
*/
void bts_model_trx_close_cb(struct gsm_bts_trx *trx, int rc);
#endif

View File

@@ -1,43 +0,0 @@
/* BTS shutdown FSM */
/* (C) 2020 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
* Author: Pau Espin Pedrol <pespin@sysmocom.de>
*
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include <osmocom/core/fsm.h>
enum bts_shutdown_fsm_states {
BTS_SHUTDOWN_ST_NONE,
BTS_SHUTDOWN_ST_WAIT_RAMP_DOWN_COMPL,
BTS_SHUTDOWN_ST_WAIT_TRX_CLOSED,
BTS_SHUTDOWN_ST_EXIT,
};
enum bts_shutdown_fsm_events {
BTS_SHUTDOWN_EV_START,
BTS_SHUTDOWN_EV_TRX_RAMP_COMPL,
BTS_SHUTDOWN_EV_TRX_CLOSED,
};
extern struct osmo_fsm bts_shutdown_fsm;
struct gsm_bts;
bool bts_shutdown_in_progress(const struct gsm_bts *bts);

View File

@@ -1,48 +0,0 @@
#pragma once
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/socket.h>
#include <osmocom/gsm/gsm23003.h>
#include <osmo-bts/oml.h>
struct pcu_sock_state;
/* GPRS NSVC; ip.access specific NM Object */
struct gsm_gprs_nse;
struct gsm_gprs_nsvc {
struct gsm_abis_mo mo;
struct gsm_gprs_nse *nse;
/* data read via VTY config file, to configure the BTS
* via OML from BSC */
int id;
uint16_t nsvci;
struct osmo_sockaddr local; /* on the BTS */
struct osmo_sockaddr remote; /* on the SGSN */
};
/* GPRS NSE; ip.access specific NM Object */
struct gsm_gprs_nse {
struct gsm_abis_mo mo;
uint16_t nsei;
uint8_t timer[7];
struct gsm_gprs_nsvc nsvc[2];
};
struct gsm_bts *gsm_gprs_nse_get_bts(const struct gsm_gprs_nse *nse);
/* BTS Site Manager */
struct gsm_bts_sm {
struct gsm_abis_mo mo;
struct llist_head bts_list;
unsigned int num_bts;
struct osmo_plmn_id plmn;
struct {
struct pcu_sock_state *pcu_state;
struct gsm_gprs_nse nse;
} gprs;
};
extern struct gsm_bts_sm *g_bts_sm;
struct gsm_bts_sm *gsm_bts_sm_alloc(void *talloc_ctx);

View File

@@ -1,74 +0,0 @@
#pragma once
#include <osmocom/core/sockaddr_str.h>
#include <osmo-bts/gsm_data.h>
struct gsm_bts_bb_trx {
struct gsm_abis_mo mo;
/* how do we talk RSL with this TRX? */
struct {
struct osmo_sockaddr_str rem_addrstr;
uint8_t tei;
struct e1inp_sign_link *link;
} rsl;
};
/* One TRX in a BTS */
struct gsm_bts_trx {
/* list header in bts->trx_list */
struct llist_head list;
struct gsm_bts *bts;
/* number of this TRX in the BTS */
uint8_t nr;
/* human readable name / description */
char *description;
/* NM Radio Carrier and Baseband Transciever */
struct gsm_abis_mo mo;
struct gsm_bts_bb_trx bb_transc;
uint16_t arfcn;
int nominal_power; /* in dBm */
unsigned int max_power_red; /* in actual dB */
uint8_t max_power_backoff_8psk; /* in actual dB OC-2G only */
uint8_t c0_idle_power_red; /* in actual dB OC-2G only */
uint8_t ta_ctrl_interval; /* 1 step is 2 SACCH periods */
struct trx_power_params power_params;
struct gsm_power_ctrl_params *bs_dpc_params; /* BS Dynamic Power Control */
struct gsm_power_ctrl_params *ms_dpc_params; /* MS Dynamic Power Control */
bool ms_pwr_ctl_soft; /* is power control loop done by osmocom software? */
/* The associated PHY instance */
struct phy_instance *pinst;
struct {
uint32_t freq_bands; /* see NM_IPAC_F_FREQ_BAND_* flags */
uint32_t chan_types; /* see NM_IPAC_F_CHANT_* flags */
uint32_t chan_modes; /* see NM_IPAC_F_CHANM_* flags */
} support;
struct gsm_bts_trx_ts ts[TRX_NR_TS];
};
static inline struct gsm_bts_trx *gsm_bts_bb_trx_get_trx(struct gsm_bts_bb_trx *bb_transc) {
return (struct gsm_bts_trx *)container_of(bb_transc, struct gsm_bts_trx, bb_transc);
}
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num);
void gsm_bts_trx_init_shadow_ts(struct gsm_bts_trx *trx);
void gsm_bts_trx_free_shadow_ts(struct gsm_bts_trx *trx);
char *gsm_trx_name(const struct gsm_bts_trx *trx);
const char *gsm_trx_unit_id(struct gsm_bts_trx *trx);
int trx_link_estab(struct gsm_bts_trx *trx);
void trx_operability_update(struct gsm_bts_trx *trx);
uint8_t num_agch(const struct gsm_bts_trx *trx, const char * arg);
int pos_nch(const struct gsm_bts_trx *trx, const char *arg);
bool trx_ms_pwr_ctrl_is_osmo(const struct gsm_bts_trx *trx);
#define LOGPTRX(trx, ss, lvl, fmt, args...) LOGP(ss, lvl, "%s " fmt, gsm_trx_name(trx), ## args)

View File

@@ -6,20 +6,11 @@
#include <osmo-bts/gsm_data.h>
#include <osmo-bts/bts.h>
enum {
CBCH_CTR_RCVD_QUEUED,
CBCH_CTR_RCVD_DROPPED,
CBCH_CTR_SENT_SINGLE,
CBCH_CTR_SENT_DEFAULT,
CBCH_CTR_SENT_NULL,
};
/* incoming SMS broadcast command from RSL */
int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type,
bool extended_cbch, uint8_t msg_len, const uint8_t *msg);
int bts_process_smscb_cmd(struct gsm_bts *bts,
struct rsl_ie_cb_cmd_type cmd_type,
uint8_t msg_len, const uint8_t *msg);
/* call-back from bts model specific code when it wants to obtain a CBCH
* block for a given gsm_time. outbuf must have 23 bytes of space. */
int bts_cbch_get(struct gsm_bts *bts, uint8_t *outbuf, struct gsm_time *g_time);
void bts_cbch_reset(struct gsm_bts *bts);

View File

@@ -1,4 +1,5 @@
#pragma once
int bts_ctrl_cmds_install(struct gsm_bts *bts);
struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts, uint16_t port);
struct ctrl_handle *bts_controlif_setup(struct gsm_bts *bts,
const char *bind_addr, uint16_t port);

View File

@@ -1,36 +0,0 @@
/*
* Declarations for functions in csd_rlp.c: alignment of downlink RLP frames
* and RLP GSMTAP mechanism for CSD NT modes.
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <osmocom/core/bits.h>
#include <osmocom/gsm/l1sap.h>
#include <osmo-bts/lchan.h>
extern const uint8_t csd_tchf48_nt_e2_map[26];
/* Per TS 48.020 section 15.1, the cadence of E2+E3 bits in a properly
* aligned sequence of pseudo-V.110 frames forming a single RLP frame
* is 00-01-10-11. The following constant captures this bit sequence
* in hex, for comparison against align_bits output from
* csd_v110_rtp_decode() or against rlpdl_align_bits accumulator
* in CSD NT lchan state.
*/
#define NTCSD_ALIGNED_EBITS 0x1B
void ntcsd_dl_reset(struct gsm_lchan *lchan);
void ntcsd_dl_input_48(struct gsm_lchan *lchan, const ubit_t *data_bits,
uint8_t align_bits);
void ntcsd_dl_input_96(struct gsm_lchan *lchan, const ubit_t *data_bits,
uint8_t align_bits);
bool ntcsd_dl_output(struct gsm_lchan *lchan, ubit_t *rlp_frame_out);
void gsmtap_csd_rlp_process(struct gsm_lchan *lchan, bool is_uplink,
const struct ph_tch_param *tch_ind,
const ubit_t *data, unsigned int data_len);
void gsmtap_csd_rlp_dl(struct gsm_lchan *lchan, uint32_t fn,
const ubit_t *data, unsigned int data_len);

View File

@@ -1,24 +0,0 @@
#pragma once
/* RFC4040 "clearmode" RTP payload length */
#define RFC4040_RTP_PLEN 160
struct gsm_lchan;
struct csd_v110_lchan_desc {
uint16_t num_frames; /* number of V.110 frames in a radio block */
uint16_t num_frame_bits; /* number of bits in each V.110 frame */
uint16_t num_other_bits; /* number of other bits (e.g. M-bits for TCH/F14.4) */
uint8_t ra2_ir; /* intermediate rate (8 or 16 kbit/s) for RA2 step */
};
extern const struct csd_v110_lchan_desc csd_v110_lchan_desc[256];
#define CSD_V110_NUM_BITS(desc) \
((desc)->num_frames * (desc)->num_frame_bits + (desc)->num_other_bits)
int csd_v110_rtp_encode(const struct gsm_lchan *lchan, uint8_t *rtp,
const uint8_t *data, size_t data_len,
uint8_t nt48_half_num);
int csd_v110_rtp_decode(const struct gsm_lchan *lchan, uint8_t *data,
uint8_t *align_bits, const uint8_t *rtp, size_t rtp_len);

View File

@@ -1,33 +1,13 @@
#ifndef _GSM_DATA_H
#define _GSM_DATA_H
#include <stdbool.h>
#include <stdint.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/bitvec.h>
#include <osmocom/core/statistics.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/tdef.h>
#include <osmocom/gsm/lapdm.h>
#include <osmocom/gsm/gsm23003.h>
#include <osmocom/gsm/gsm0502.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/rxlev_stat.h>
#include <osmocom/gsm/sysinfo.h>
#include <osmocom/gsm/bts_features.h>
#include <osmocom/gsm/gsm48_rest_octets.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/protocol/gsm_12_21.h>
#include <osmocom/abis/e1_input.h>
#include <osmo-bts/paging.h>
#include <osmo-bts/tx_power.h>
#include <osmo-bts/oml.h>
#include <osmo-bts/lchan.h>
#define GSM_FR_BITS 260
#define GSM_EFR_BITS 244
@@ -36,209 +16,45 @@
#define GSM_HR_BYTES 14 /* TS 101318 Chapter 5.2: 112 bits, no sig */
#define GSM_EFR_BYTES 31 /* TS 101318 Chapter 5.3: 244 bits + 4bit sig */
#define GSM_SUPERFRAME (26*51) /* 1326 TDMA frames */
#define GSM_HYPERFRAME (2048*GSM_SUPERFRAME) /* GSM_HYPERFRAME frames */
#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DEFAULT 41
#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE 999999
#define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41
#define GSM_BTS_AGCH_QUEUE_HIGH_LEVEL_DEFAULT 91
#define LOGPLCHAN(lchan, ss, lvl, fmt, args...) LOGP(ss, lvl, "%s " fmt, gsm_lchan_name(lchan), ## args)
/* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1:
4-bit index is used (2#1111 = 10#15) */
#define SI2Q_MAX_NUM 16
/* length in bits (for single SI2quater message) */
#define SI2Q_MAX_LEN 160
#define SI2Q_MIN_LEN 18
/* lchans 0..3 are SDCCH in combined channel configuration,
use 4 as magic number for BCCH hack - see osmo-bts-../oml.c:opstart_compl() */
#define CCCH_LCHAN 4
#define CBCH_LCHAN 2
#define TRX_NR_TS 8
#define TS_MAX_LCHAN 8
#define MAX_VERSION_LENGTH 64
/* NM_IPAC_F_CHANT_* mask for NM_IPAC_EIE_CHAN_TYPES (common) */
#define NM_IPAC_MASK_CHANT_COMMON \
(NM_IPAC_F_CHANT_TCHF | \
NM_IPAC_F_CHANT_TCHH | \
NM_IPAC_F_CHANT_SDCCH8 | \
NM_IPAC_F_CHANT_BCCH | \
NM_IPAC_F_CHANT_BCCH_SDCCH4)
/* NM_IPAC_F_CHANM_SPEECH_* mask for NM_IPAC_EIE_CHAN_MODES */
#define NM_IPAC_MASK_CHANM_SPEECH \
(NM_IPAC_F_CHANM_SPEECH_FS | \
NM_IPAC_F_CHANM_SPEECH_EFS | \
NM_IPAC_F_CHANM_SPEECH_AFS | \
NM_IPAC_F_CHANM_SPEECH_HS | \
NM_IPAC_F_CHANM_SPEECH_AHS)
/* NM_IPAC_F_CHANM_CSD_NT_* mask for NM_IPAC_EIE_CHAN_MODES */
#define NM_IPAC_MASK_CHANM_CSD_NT \
(NM_IPAC_F_CHANM_CSD_NT_4k8 | \
NM_IPAC_F_CHANM_CSD_NT_9k6 | \
NM_IPAC_F_CHANM_CSD_NT_14k4)
/* NM_IPAC_F_CHANM_CSD_T_* mask for NM_IPAC_EIE_CHAN_MODES */
#define NM_IPAC_MASK_CHANM_CSD_T \
(NM_IPAC_F_CHANM_CSD_T_1200_75 | \
NM_IPAC_F_CHANM_CSD_T_600 | \
NM_IPAC_F_CHANM_CSD_T_1k2 | \
NM_IPAC_F_CHANM_CSD_T_2k4 | \
NM_IPAC_F_CHANM_CSD_T_4k8 | \
NM_IPAC_F_CHANM_CSD_T_9k6 | \
NM_IPAC_F_CHANM_CSD_T_14k4)
/* NM_IPAC_F_GPRS_CODING_CS[1-4] mask for NM_IPAC_EIE_GPRS_CODING */
#define NM_IPAC_MASK_GPRS_CODING_CS \
(NM_IPAC_F_GPRS_CODING_CS1 | \
NM_IPAC_F_GPRS_CODING_CS2 | \
NM_IPAC_F_GPRS_CODING_CS3 | \
NM_IPAC_F_GPRS_CODING_CS4)
/* NM_IPAC_F_GPRS_CODING_MCS[1-9] mask for NM_IPAC_EIE_GPRS_CODING */
#define NM_IPAC_MASK_GPRS_CODING_MCS \
(NM_IPAC_F_GPRS_CODING_MCS1 | \
NM_IPAC_F_GPRS_CODING_MCS2 | \
NM_IPAC_F_GPRS_CODING_MCS3 | \
NM_IPAC_F_GPRS_CODING_MCS4 | \
NM_IPAC_F_GPRS_CODING_MCS5 | \
NM_IPAC_F_GPRS_CODING_MCS6 | \
NM_IPAC_F_GPRS_CODING_MCS7 | \
NM_IPAC_F_GPRS_CODING_MCS8 | \
NM_IPAC_F_GPRS_CODING_MCS9)
enum gsm_bts_trx_ts_flags {
TS_F_PDCH_ACTIVE = 0x1000,
TS_F_PDCH_ACT_PENDING = 0x2000,
TS_F_PDCH_DEACT_PENDING = 0x4000,
TS_F_PDCH_PENDING_MASK = 0x6000 /*<
TS_F_PDCH_ACT_PENDING | TS_F_PDCH_DEACT_PENDING */
struct gsm_network {
struct llist_head bts_list;
unsigned int num_bts;
struct osmo_plmn_id plmn;
struct pcu_sock_state *pcu_state;
};
/* One Timeslot in a TRX */
struct gsm_bts_trx_ts {
struct gsm_bts_trx *trx;
/* number of this timeslot at the TRX */
uint8_t nr;
enum gsm_phys_chan_config pchan;
struct {
enum gsm_phys_chan_config pchan_is;
enum gsm_phys_chan_config pchan_want;
} dyn;
unsigned int flags;
struct gsm_abis_mo mo;
/* Training Sequence Code (range 0..7) */
uint8_t tsc_oml; /* configured via OML */
bool tsc_oml_configured;
uint8_t tsc_rsl; /* configured via RSL (Osmo extension) */
bool tsc_rsl_configured;
uint8_t tsc; /* TSC currently in use. Preference: RSL, OML, BTS-BSIC-OML */
/* Training Sequence Set (range 0..3) */
uint8_t tsc_set;
/* Actual BCCH carrier power reduction */
uint8_t c0_power_red_db;
/* Frequency hopping parameters (configured via OML) */
struct {
bool enabled;
uint8_t maio;
uint8_t hsn;
uint16_t arfcn_list[64];
uint8_t arfcn_num;
} hopping;
/* Transceiver "cache" for frequency hopping */
const struct gsm_bts_trx *fh_trx_list[64];
/* Implementation specific structure(s) */
void *priv;
/* VAMOS specific fields */
struct {
/* NULL if BTS_FEAT_VAMOS is not set */
struct gsm_bts_trx_ts *peer;
bool is_shadow;
} vamos;
struct gsm_lchan lchan[TS_MAX_LCHAN];
enum lchan_ciph_state {
LCHAN_CIPH_NONE,
LCHAN_CIPH_RX_REQ,
LCHAN_CIPH_RX_CONF,
LCHAN_CIPH_RXTX_REQ,
LCHAN_CIPH_RX_CONF_TX_REQ,
LCHAN_CIPH_RXTX_CONF,
};
enum gprs_rlc_par {
RLC_T3142,
RLC_T3169,
RLC_T3191,
RLC_T3193,
RLC_T3195,
RLC_N3101,
RLC_N3103,
RLC_N3105,
CV_COUNTDOWN,
T_DL_TBF_EXT, /* ms */
T_UL_TBF_EXT, /* ms */
_NUM_RLC_PAR
};
enum gprs_cs {
GPRS_CS1,
GPRS_CS2,
GPRS_CS3,
GPRS_CS4,
GPRS_MCS1,
GPRS_MCS2,
GPRS_MCS3,
GPRS_MCS4,
GPRS_MCS5,
GPRS_MCS6,
GPRS_MCS7,
GPRS_MCS8,
GPRS_MCS9,
_NUM_GRPS_CS
};
/* The amount of time within which a sudden disconnect of a newly established
* OML connection will cause a special warning to be logged. */
#define OSMO_BTS_OML_CONN_EARLY_DISCONNECT 10 /* in seconds */
extern struct osmo_tdef_group bts_tdef_groups[];
extern struct osmo_tdef bts_T_defs[];
extern struct osmo_tdef abis_T_defs[];
extern const struct value_string gsm_pchant_names[13];
extern const struct value_string gsm_pchant_descs[13];
const char *gsm_pchan_name(enum gsm_phys_chan_config c);
const char *gsm_lchant_name(enum gsm_chan_t c);
char *gsm_ts_name(const struct gsm_bts_trx_ts *ts);
char *gsm_ts_and_pchan_name(const struct gsm_bts_trx_ts *ts);
#define GSM_TS_NAME_FMT \
"bts=%u,trx=%u,ts=%u" "%s"
#define GSM_TS_NAME_ARGS(ts) \
(ts)->trx->bts->nr, (ts)->trx->nr, (ts)->nr, \
(ts)->vamos.is_shadow ? ",shadow" : ""
#define BSIC2BCC(bsic) ((bsic) & 0x07)
#define BTS_TSC(bts) BSIC2BCC((bts)->bsic)
struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
int *rc);
enum gsm_phys_chan_config ts_pchan(const struct gsm_bts_trx_ts *ts);
uint8_t ts_subslots(const struct gsm_bts_trx_ts *ts);
bool ts_is_tch(const struct gsm_bts_trx_ts *ts);
#include <osmo-bts/gsm_data_shared.h>
void lchan_set_state(struct gsm_lchan *lchan, enum gsm_lchan_state state);
int conf_lchans_as_pchan(struct gsm_bts_trx_ts *ts,
enum gsm_phys_chan_config pchan);
/* cipher code */
#define CIPHER_A5(x) (1 << (x-1))
int bts_supports_cipher(struct gsm_bts *bts, int rsl_cipher);
bool ts_is_pdch(const struct gsm_bts_trx_ts *ts);
void gsm_ts_apply_configured_tsc(struct gsm_bts_trx_ts *ts);
void gsm_ts_release(struct gsm_bts_trx_ts *ts);
int bts_model_check_cm_mode(enum gsm_phys_chan_config pchan, enum gsm48_chan_mode cm);
#endif /* _GSM_DATA_H */

View File

@@ -0,0 +1,854 @@
#ifndef _GSM_DATA_SHAREDH
#define _GSM_DATA_SHAREDH
#include <regex.h>
#include <stdbool.h>
#include <stdint.h>
#include <osmocom/codec/ecu.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/bitvec.h>
#include <osmocom/core/statistics.h>
#include <osmocom/core/utils.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/gsm/tlv.h>
#include <osmocom/gsm/rxlev_stat.h>
#include <osmocom/gsm/sysinfo.h>
#include <osmocom/gsm/meas_rep.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/protocol/gsm_12_21.h>
#include <osmocom/abis/e1_input.h>
#include <osmocom/gsm/lapdm.h>
/* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1:
4-bit index is used (2#1111 = 10#15) */
#define SI2Q_MAX_NUM 16
/* length in bits (for single SI2quater message) */
#define SI2Q_MAX_LEN 160
#define SI2Q_MIN_LEN 18
/* Channel Request reason */
enum gsm_chreq_reason_t {
GSM_CHREQ_REASON_EMERG,
GSM_CHREQ_REASON_PAG,
GSM_CHREQ_REASON_CALL,
GSM_CHREQ_REASON_LOCATION_UPD,
GSM_CHREQ_REASON_OTHER,
GSM_CHREQ_REASON_PDCH,
};
/* lchans 0..3 are SDCCH in combined channel configuration,
use 4 as magic number for BCCH hack - see osmo-bts-../oml.c:opstart_compl() */
#define CCCH_LCHAN 4
#define TRX_NR_TS 8
#define TS_MAX_LCHAN 8
#define HARDCODED_ARFCN 123
#define HARDCODED_BSIC 0x3f /* NCC = 7 / BCC = 7 */
/* for multi-drop config */
#define HARDCODED_BTS0_TS 1
#define HARDCODED_BTS1_TS 6
#define HARDCODED_BTS2_TS 11
#define MAX_VERSION_LENGTH 64
#define MAX_BTS_FEATURES 128
enum gsm_hooks {
GSM_HOOK_NM_SWLOAD,
GSM_HOOK_RR_PAGING,
GSM_HOOK_RR_SECURITY,
};
enum bts_gprs_mode {
BTS_GPRS_NONE = 0,
BTS_GPRS_GPRS = 1,
BTS_GPRS_EGPRS = 2,
};
struct gsm_lchan;
struct osmo_rtp_socket;
struct pcu_sock_state;
struct smscb_msg;
/* Network Management State */
struct gsm_nm_state {
uint8_t operational;
uint8_t administrative;
uint8_t availability;
};
struct gsm_abis_mo {
/* A-bis OML Object Class */
uint8_t obj_class;
/* is there still some procedure pending? */
uint8_t procedure_pending;
/* A-bis OML Object Instance */
struct abis_om_obj_inst obj_inst;
/* human-readable name */
const char *name;
/* NM State */
struct gsm_nm_state nm_state;
/* Attributes configured in this MO */
struct tlv_parsed *nm_attr;
/* BTS to which this MO belongs */
struct gsm_bts *bts;
};
#define MAX_A5_KEY_LEN (128/8)
#define A38_XOR_MIN_KEY_LEN 12
#define A38_XOR_MAX_KEY_LEN 16
#define A38_COMP128_KEY_LEN 16
#define RSL_ENC_ALG_A5(x) (x+1)
#define MAX_EARFCN_LIST 32
/* is the data link established? who established it? */
#define LCHAN_SAPI_UNUSED 0
#define LCHAN_SAPI_MS 1
#define LCHAN_SAPI_NET 2
#define LCHAN_SAPI_REL 3
/* state of a logical channel */
enum gsm_lchan_state {
LCHAN_S_NONE, /* channel is not active */
LCHAN_S_ACT_REQ, /* channel activation requested */
LCHAN_S_ACTIVE, /* channel is active and operational */
LCHAN_S_REL_REQ, /* channel release has been requested */
LCHAN_S_REL_ERR, /* channel is in an error state */
LCHAN_S_BROKEN, /* channel is somehow unusable */
LCHAN_S_INACTIVE, /* channel is set inactive */
};
/* BTS ONLY */
#define MAX_NUM_UL_MEAS 104
#define LC_UL_M_F_L1_VALID (1 << 0)
#define LC_UL_M_F_RES_VALID (1 << 1)
#define LC_UL_M_F_OSMO_EXT_VALID (1 << 2)
struct bts_ul_meas {
/* BER in units of 0.01%: 10.000 == 100% ber, 0 == 0% ber */
uint16_t ber10k;
/* timing advance offset (in 1/256 bits) */
int16_t ta_offs_256bits;
/* C/I ratio in dB */
float c_i;
/* flags */
uint8_t is_sub:1;
/* RSSI in dBm * -1 */
uint8_t inv_rssi;
};
struct bts_codec_conf {
uint8_t hr;
uint8_t efr;
uint8_t amr;
};
struct amr_mode {
uint8_t mode;
uint8_t threshold;
uint8_t hysteresis;
};
struct amr_multirate_conf {
uint8_t gsm48_ie[2];
struct amr_mode ms_mode[4];
struct amr_mode bts_mode[4];
uint8_t num_modes;
};
/* /BTS ONLY */
enum lchan_csd_mode {
LCHAN_CSD_M_NT,
LCHAN_CSD_M_T_1200_75,
LCHAN_CSD_M_T_600,
LCHAN_CSD_M_T_1200,
LCHAN_CSD_M_T_2400,
LCHAN_CSD_M_T_9600,
LCHAN_CSD_M_T_14400,
LCHAN_CSD_M_T_29000,
LCHAN_CSD_M_T_32000,
};
/* State of the SAPIs in the lchan */
enum lchan_sapi_state {
LCHAN_SAPI_S_NONE,
LCHAN_SAPI_S_REQ,
LCHAN_SAPI_S_ASSIGNED,
LCHAN_SAPI_S_REL,
LCHAN_SAPI_S_ERROR,
};
struct gsm_lchan {
/* The TS that we're part of */
struct gsm_bts_trx_ts *ts;
/* The logical subslot number in the TS */
uint8_t nr;
/* The logical channel type */
enum gsm_chan_t type;
/* RSL channel mode */
enum rsl_cmod_spd rsl_cmode;
/* If TCH, traffic channel mode */
enum gsm48_chan_mode tch_mode;
enum lchan_csd_mode csd_mode;
/* State */
enum gsm_lchan_state state;
const char *broken_reason;
/* Power levels for MS and BTS */
uint8_t bs_power;
uint8_t ms_power;
/* Encryption information */
struct {
uint8_t alg_id;
uint8_t key_len;
uint8_t key[MAX_A5_KEY_LEN];
} encr;
/* AMR bits */
uint8_t mr_bts_lv[7];
/* Established data link layer services */
int sacch_deact;
struct {
uint32_t bound_ip;
uint32_t connect_ip;
uint16_t bound_port;
uint16_t connect_port;
uint16_t conn_id;
uint8_t rtp_payload;
uint8_t rtp_payload2;
uint8_t speech_mode;
struct osmo_rtp_socket *rtp_socket;
} abis_ip;
uint8_t rqd_ta;
char *name;
/* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23.
* Currently we don't share these headers so this is a magic number. */
struct llist_head sapi_cmds;
uint8_t sapis_dl[23];
uint8_t sapis_ul[23];
struct lapdm_channel lapdm_ch;
struct llist_head dl_tch_queue;
struct {
/* bitmask of all SI that are present/valid in si_buf */
uint32_t valid;
/* bitmask of all SI that do not mirror the BTS-global SI values */
uint32_t overridden;
uint32_t last;
/* buffers where we put the pre-computed SI:
SI2Q_MAX_NUM is the max number of SI2quater messages (see 3GPP TS 44.018) */
sysinfo_buf_t buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM];
} si;
struct {
uint8_t flags;
/* RSL measurment result number, 0 at lchan_act */
uint8_t res_nr;
/* current Tx power level of the BTS */
uint8_t bts_tx_pwr;
/* number of measurements stored in array below */
uint8_t num_ul_meas;
struct bts_ul_meas uplink[MAX_NUM_UL_MEAS];
/* last L1 header from the MS */
uint8_t l1_info[2];
struct gsm_meas_rep_unidir ul_res;
int16_t ms_toa256;
/* Frame number of the last measurement indication receceived */
uint32_t last_fn;
/* Osmocom extended measurement results, see LC_UL_M_F_EXTD_VALID */
struct {
/* minimum value of toa256 during measurement period */
int16_t toa256_min;
/* maximum value of toa256 during measurement period */
int16_t toa256_max;
/* standard deviation of toa256 value during measurement period */
uint16_t toa256_std_dev;
} ext;
} meas;
struct {
struct amr_multirate_conf amr_mr;
struct {
struct osmo_fsm_inst *dl_amr_fsm;
/* TCH cache */
uint8_t cache[20];
/* FACCH cache */
uint8_t facch[GSM_MACBLOCK_LEN];
uint8_t len;
uint32_t fn;
bool is_update;
/* set for each SID frame to detect talkspurt for codecs
without explicit ONSET event */
bool ul_sid;
/* indicates if DTXd was active during DL measurement
period */
bool dl_active;
/* last UL SPEECH resume flag */
bool is_speech_resume;
} dtx;
uint8_t last_cmr;
uint32_t last_fn;
} tch;
/* 3GPP TS 48.058 § 9.3.37: [0; 255] ok, -1 means invalid*/
int16_t ms_t_offs;
/* 3GPP TS 45.010 § 1.2 round trip propagation delay (in symbols) or -1 */
int16_t p_offs;
/* BTS-side ciphering state (rx only, bi-directional, ...) */
uint8_t ciph_state;
uint8_t ciph_ns;
uint8_t loopback;
struct {
uint8_t active;
uint8_t ref;
/* T3105: PHYS INF retransmission */
struct osmo_timer_list t3105;
/* counts up to Ny1 */
unsigned int phys_info_count;
} ho;
/* S counter for link loss */
int s;
/* Kind of the release/activation. E.g. RSL or PCU */
int rel_act_kind;
/* RTP header Marker bit to indicate beginning of speech after pause */
bool rtp_tx_marker;
/* power handling */
struct {
uint8_t current;
uint8_t fixed;
} ms_power_ctrl;
struct msgb *pending_rel_ind_msg;
/* ECU (Error Concealment Unit) state */
union {
struct osmo_ecu_fr_state fr;
} ecu_state;
};
static inline uint8_t lchan_get_ta(const struct gsm_lchan *lchan)
{
return lchan->meas.l1_info[1];
}
extern const struct value_string lchan_ciph_state_names[];
static inline const char *lchan_ciph_state_name(uint8_t state) {
return get_value_string(lchan_ciph_state_names, state);
}
enum {
TS_F_PDCH_ACTIVE = 0x1000,
TS_F_PDCH_ACT_PENDING = 0x2000,
TS_F_PDCH_DEACT_PENDING = 0x4000,
TS_F_PDCH_PENDING_MASK = 0x6000 /*<
TS_F_PDCH_ACT_PENDING | TS_F_PDCH_DEACT_PENDING */
} gsm_bts_trx_ts_flags;
/* One Timeslot in a TRX */
struct gsm_bts_trx_ts {
struct gsm_bts_trx *trx;
/* number of this timeslot at the TRX */
uint8_t nr;
enum gsm_phys_chan_config pchan;
struct {
enum gsm_phys_chan_config pchan_is;
enum gsm_phys_chan_config pchan_want;
struct msgb *pending_chan_activ;
} dyn;
unsigned int flags;
struct gsm_abis_mo mo;
struct tlv_parsed nm_attr;
uint8_t nm_chan_comb;
int tsc; /* -1 == use BTS TSC */
struct {
/* Parameters below are configured by VTY */
int enabled;
uint8_t maio;
uint8_t hsn;
struct bitvec arfcns;
uint8_t arfcns_data[1024/8];
/* This is the pre-computed MA for channel assignments */
struct bitvec ma;
uint8_t ma_len; /* part of ma_data that is used */
uint8_t ma_data[8]; /* 10.5.2.21: max 8 bytes value part */
} hopping;
struct gsm_lchan lchan[TS_MAX_LCHAN];
};
/* One TRX in a BTS */
struct gsm_bts_trx {
/* list header in bts->trx_list */
struct llist_head list;
struct gsm_bts *bts;
/* number of this TRX in the BTS */
uint8_t nr;
/* human readable name / description */
char *description;
/* how do we talk RSL with this TRX? */
uint8_t rsl_tei;
struct e1inp_sign_link *rsl_link;
/* Some BTS (specifically Ericsson RBS) have a per-TRX OML Link */
struct e1inp_sign_link *oml_link;
struct gsm_abis_mo mo;
struct tlv_parsed nm_attr;
struct {
struct gsm_abis_mo mo;
} bb_transc;
uint16_t arfcn;
int nominal_power; /* in dBm */
unsigned int max_power_red; /* in actual dB */
uint8_t max_power_backoff_8psk; /* in actual dB OC-2G only */
uint8_t c0_idle_power_red; /* in actual dB OC-2G only */
struct trx_power_params power_params;
int ms_power_control;
struct {
void *l1h;
} role_bts;
union {
struct {
unsigned int test_state;
uint8_t test_nr;
struct rxlev_stats rxlev_stat;
} ipaccess;
};
struct gsm_bts_trx_ts ts[TRX_NR_TS];
};
#define GSM_BTS_SI2Q(bts, i) (struct gsm48_system_information_type_2quater *)((bts)->si_buf[SYSINFO_TYPE_2quater][i])
#define GSM_BTS_HAS_SI(bts, i) ((bts)->si_valid & (1 << i))
#define GSM_BTS_SI(bts, i) (void *)((bts)->si_buf[i][0])
#define GSM_LCHAN_SI(lchan, i) (void *)((lchan)->si.buf[i][0])
enum gsm_bts_type_variant {
BTS_UNKNOWN,
BTS_OSMO_LITECELL15,
BTS_OSMO_OC2G,
BTS_OSMO_OCTPHY,
BTS_OSMO_SYSMO,
BTS_OSMO_TRX,
BTS_OSMO_VIRTUAL,
BTS_OSMO_OMLDUMMY,
_NUM_BTS_VARIANT
};
/* Used by OML layer for BTS Attribute reporting */
enum bts_attribute {
BTS_TYPE_VARIANT,
BTS_SUB_MODEL,
TRX_PHY_VERSION,
};
struct vty;
/* N. B: always add new features to the end of the list (right before _NUM_BTS_FEAT) to avoid breaking compatibility
with BTS compiled against earlier version of this header. Also make sure that the description strings
gsm_bts_features_descs[] in gsm_data_shared.c are also updated accordingly! */
enum gsm_bts_features {
BTS_FEAT_HSCSD,
BTS_FEAT_GPRS,
BTS_FEAT_EGPRS,
BTS_FEAT_ECSD,
BTS_FEAT_HOPPING,
BTS_FEAT_MULTI_TSC,
BTS_FEAT_OML_ALERTS,
BTS_FEAT_AGCH_PCH_PROP,
BTS_FEAT_CBCH,
BTS_FEAT_SPEECH_F_V1,
BTS_FEAT_SPEECH_H_V1,
BTS_FEAT_SPEECH_F_EFR,
BTS_FEAT_SPEECH_F_AMR,
BTS_FEAT_SPEECH_H_AMR,
_NUM_BTS_FEAT
};
extern const struct value_string gsm_bts_features_descs[];
struct gsm_bts_gprs_nsvc {
struct gsm_bts *bts;
/* data read via VTY config file, to configure the BTS
* via OML from BSC */
int id;
uint16_t nsvci;
uint16_t local_port; /* on the BTS */
uint16_t remote_port; /* on the SGSN */
uint32_t remote_ip; /* on the SGSN */
struct gsm_abis_mo mo;
};
enum gprs_rlc_par {
RLC_T3142,
RLC_T3169,
RLC_T3191,
RLC_T3193,
RLC_T3195,
RLC_N3101,
RLC_N3103,
RLC_N3105,
CV_COUNTDOWN,
T_DL_TBF_EXT, /* ms */
T_UL_TBF_EXT, /* ms */
_NUM_RLC_PAR
};
enum gprs_cs {
GPRS_CS1,
GPRS_CS2,
GPRS_CS3,
GPRS_CS4,
GPRS_MCS1,
GPRS_MCS2,
GPRS_MCS3,
GPRS_MCS4,
GPRS_MCS5,
GPRS_MCS6,
GPRS_MCS7,
GPRS_MCS8,
GPRS_MCS9,
_NUM_GRPS_CS
};
struct gprs_rlc_cfg {
uint16_t parameter[_NUM_RLC_PAR];
struct {
uint16_t repeat_time; /* ms */
uint8_t repeat_count;
} paging;
uint32_t cs_mask; /* bitmask of gprs_cs */
uint8_t initial_cs;
uint8_t initial_mcs;
};
/* The amount of time within which a sudden disconnect of a newly established
* OML connection will cause a special warning to be logged. */
#define OSMO_BTS_OML_CONN_EARLY_DISCONNECT 10 /* in seconds */
/* One BTS */
struct gsm_bts {
/* list header in net->bts_list */
struct llist_head list;
/* Geographical location of the BTS */
struct llist_head loc_list;
/* number of ths BTS in network */
uint8_t nr;
/* human readable name / description */
char *description;
/* Cell Identity */
uint16_t cell_identity;
/* location area code of this BTS */
uint16_t location_area_code;
/* Base Station Identification Code (BSIC), lower 3 bits is BCC,
* which is used as TSC for the CCCH */
uint8_t bsic;
/* type of BTS */
enum gsm_bts_type_variant variant;
enum gsm_band band;
char version[MAX_VERSION_LENGTH];
char sub_model[MAX_VERSION_LENGTH];
/* features of a given BTS set/reported via OML */
struct bitvec features;
uint8_t _features_data[MAX_BTS_FEATURES/8];
/* Connected PCU version (if any) */
char pcu_version[MAX_VERSION_LENGTH];
/* maximum Tx power that the MS is permitted to use in this cell */
int ms_max_power;
/* how do we talk OML with this TRX? */
uint8_t oml_tei;
struct e1inp_sign_link *oml_link;
struct timespec oml_conn_established_timestamp;
/* Abis network management O&M handle */
struct abis_nm_h *nmh;
struct gsm_abis_mo mo;
/* number of this BTS on given E1 link */
uint8_t bts_nr;
/* DTX features of this BTS */
enum gsm48_dtx_mode dtxu;
bool dtxd;
/* CCCH is on C0 */
struct gsm_bts_trx *c0;
struct {
struct gsm_abis_mo mo;
} site_mgr;
/* bitmask of all SI that are present/valid in si_buf */
uint32_t si_valid;
/* 3GPP TS 44.018 Table 10.5.2.33b.1 INDEX and COUNT for SI2quater */
uint8_t si2q_index; /* distinguish individual SI2quater messages */
uint8_t si2q_count; /* si2q_index for the last (highest indexed) individual SI2quater message */
/* buffers where we put the pre-computed SI */
sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM];
/* offsets used while generating SI2quater */
size_t e_offset;
size_t u_offset;
/* ip.accesss Unit ID's have Site/BTS/TRX layout */
union {
struct {
uint16_t site_id;
uint16_t bts_id;
uint32_t flags;
uint32_t rsl_ip;
} ip_access;
};
/* Not entirely sure how ip.access specific this is */
struct {
uint8_t supports_egprs_11bit_rach;
enum bts_gprs_mode mode;
struct {
struct gsm_abis_mo mo;
uint16_t nsei;
uint8_t timer[7];
} nse;
struct {
struct gsm_abis_mo mo;
uint16_t bvci;
uint8_t timer[11];
struct gprs_rlc_cfg rlc_cfg;
} cell;
struct gsm_bts_gprs_nsvc nsvc[2];
uint8_t rac;
uint8_t net_ctrl_ord;
bool ctrl_ack_type_use_block;
} gprs;
/* RACH NM values */
int rach_b_thresh;
int rach_ldavg_slots;
/* transceivers */
int num_trx;
struct llist_head trx_list;
/* SI related items */
int force_combined_si;
int bcch_change_mark;
struct rate_ctr_group *ctrs;
bool supp_meas_toa256;
struct {
/* Interference Boundaries for OML */
int16_t boundary[6];
uint8_t intave;
} interference;
unsigned int t200_ms[7];
unsigned int t3105_ms;
struct {
uint8_t overload_period;
struct {
/* Input parameters from OML */
uint8_t load_ind_thresh; /* percent */
uint8_t load_ind_period; /* seconds */
/* Internal data */
struct osmo_timer_list timer;
unsigned int pch_total;
unsigned int pch_used;
} ccch;
struct {
/* Input parameters from OML */
int16_t busy_thresh; /* in dBm */
uint16_t averaging_slots;
/* Internal data */
unsigned int total; /* total nr */
unsigned int busy; /* above busy_thresh */
unsigned int access; /* access bursts */
} rach;
} load;
uint8_t ny1;
uint8_t max_ta;
/* AGCH queuing */
struct {
struct llist_head queue;
int length;
int max_length;
int thresh_level; /* Cleanup threshold in percent of max len */
int low_level; /* Low water mark in percent of max len */
int high_level; /* High water mark in percent of max len */
/* TODO: Use a rate counter group instead */
uint64_t dropped_msgs;
uint64_t merged_msgs;
uint64_t rejected_msgs;
uint64_t agch_msgs;
uint64_t pch_msgs;
} agch_queue;
struct paging_state *paging_state;
char *bsc_oml_host;
struct llist_head oml_queue;
unsigned int rtp_jitter_buf_ms;
bool rtp_jitter_adaptive;
uint16_t rtp_port_range_start;
uint16_t rtp_port_range_end;
uint16_t rtp_port_range_next;
struct {
uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */
} support;
struct {
uint8_t tc4_ctr;
} si;
struct gsm_time gsm_time;
/* Radio Link Timeout counter. -1 disables timeout for
* lab/measurement purpose */
int radio_link_timeout;
int ul_power_target; /* Uplink Rx power target */
/* used by the sysmoBTS to adjust band */
uint8_t auto_band;
struct {
struct llist_head queue; /* list of struct smscb_msg */
struct smscb_msg *cur_msg; /* current SMS-CB */
} smscb_state;
float min_qual_rach; /* minimum quality for RACH bursts */
float min_qual_norm; /* minimum quality for normal daata */
uint16_t max_ber10k_rach; /* Maximum permitted RACH BER in 0.01% */
struct {
char *sock_path;
} pcu;
struct {
uint32_t last_fn;
struct timeval tv_clock;
struct osmo_timer_list fn_timer;
} vbts;
#ifdef ENABLE_OC2GBTS
/* specific to Open Cellular 2G BTS */
struct {
uint8_t led_ctrl_mode; /* 0: control by BTS, 1: not control by BTS */
struct llist_head ceased_alarm_list; /* ceased alarm list*/
unsigned int rtp_drift_thres_ms; /* RTP timestamp drift detection threshold */
} oc2g;
#endif
};
struct gsm_bts *gsm_bts_alloc(void *talloc_ctx, uint8_t bts_num);
struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num);
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
struct gsm_bts_trx *gsm_bts_trx_num(const struct gsm_bts *bts, int num);
enum bts_attribute str2btsattr(const char *s);
const char *btsatttr2str(enum bts_attribute v);
enum gsm_bts_type_variant str2btsvariant(const char *arg);
const char *btsvariant2str(enum gsm_bts_type_variant v);
extern const struct value_string gsm_chreq_descs[];
const struct value_string gsm_pchant_names[13];
const struct value_string gsm_pchant_descs[13];
const char *gsm_pchan_name(enum gsm_phys_chan_config c);
enum gsm_phys_chan_config gsm_pchan_parse(const char *name);
const char *gsm_lchant_name(enum gsm_chan_t c);
const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
char *gsm_trx_name(const struct gsm_bts_trx *trx);
char *gsm_ts_name(const struct gsm_bts_trx_ts *ts);
char *gsm_ts_and_pchan_name(const struct gsm_bts_trx_ts *ts);
char *gsm_lchan_name_compute(const struct gsm_lchan *lchan);
const char *gsm_lchans_name(enum gsm_lchan_state s);
static inline char *gsm_lchan_name(const struct gsm_lchan *lchan)
{
return lchan->name;
}
static inline int gsm_bts_set_feature(struct gsm_bts *bts, enum gsm_bts_features feat)
{
OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);
return bitvec_set_bit_pos(&bts->features, feat, 1);
}
static inline bool gsm_bts_has_feature(const struct gsm_bts *bts, enum gsm_bts_features feat)
{
OSMO_ASSERT(_NUM_BTS_FEAT < MAX_BTS_FEATURES);
return bitvec_get_bit_pos(&bts->features, feat);
}
void gsm_abis_mo_reset(struct gsm_abis_mo *mo);
struct gsm_abis_mo *
gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
const struct abis_om_obj_inst *obj_inst);
struct gsm_nm_state *
gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
const struct abis_om_obj_inst *obj_inst);
void *
gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class,
const struct abis_om_obj_inst *obj_inst);
uint8_t gsm_pchan2chan_nr(enum gsm_phys_chan_config pchan,
uint8_t ts_nr, uint8_t lchan_nr);
uint8_t gsm_lchan2chan_nr(const struct gsm_lchan *lchan);
uint8_t gsm_lchan_as_pchan2chan_nr(const struct gsm_lchan *lchan,
enum gsm_phys_chan_config as_pchan);
/* return the gsm_lchan for the CBCH (if it exists at all) */
struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts);
/*
* help with parsing regexps
*/
int gsm_parse_reg(void *ctx, regex_t *reg, char **str,
int argc, const char **argv) __attribute__ ((warn_unused_result));
#define BSIC2BCC(bsic) ((bsic) & 0x3)
static inline uint8_t gsm_ts_tsc(const struct gsm_bts_trx_ts *ts)
{
if (ts->tsc != -1)
return ts->tsc;
else
return ts->trx->bts->bsic & 7;
}
struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
int *rc);
enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts);
uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
bool ts_is_tch(struct gsm_bts_trx_ts *ts);
const char *gsm_trx_unit_id(struct gsm_bts_trx *trx);
#endif

View File

@@ -2,9 +2,6 @@
#define L1SAP_H
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#define L1SAP_MSGB_HEADROOM 128
/* lchan link ID */
#define LID_SACCH 0x40
@@ -18,32 +15,16 @@
#define L1SAP_CHAN2SS_BCCH(chan_nr) (CCCH_LCHAN)
/* logical channel from chan_nr + link_id */
#define L1SAP_IS_LINK_SACCH(link_id) \
((link_id & 0xC0) == LID_SACCH)
#define L1SAP_IS_CHAN_TCHF(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_Bm_ACCHs || \
(chan_nr & 0xf8) == RSL_CHAN_OSMO_VAMOS_Bm_ACCHs)
#define L1SAP_IS_CHAN_TCHH(chan_nr) \
((chan_nr & 0xf0) == RSL_CHAN_Lm_ACCHs || \
(chan_nr & 0xf0) == RSL_CHAN_OSMO_VAMOS_Lm_ACCHs)
#define L1SAP_IS_CHAN_SDCCH4(chan_nr) \
((chan_nr & 0xe0) == RSL_CHAN_SDCCH4_ACCH)
#define L1SAP_IS_CHAN_SDCCH8(chan_nr) \
((chan_nr & 0xc0) == RSL_CHAN_SDCCH8_ACCH)
#define L1SAP_IS_CHAN_BCCH(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_BCCH)
#define L1SAP_IS_CHAN_RACH(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_RACH)
#define L1SAP_IS_CHAN_AGCH_PCH(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_PCH_AGCH)
#define L1SAP_IS_CHAN_PDCH(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_OSMO_PDCH)
#define L1SAP_IS_CHAN_CBCH(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH4) \
|| ((chan_nr & 0xf8) == RSL_CHAN_OSMO_CBCH8)
#define L1SAP_IS_CHAN_VAMOS(chan_nr) \
((chan_nr & 0xf8) == RSL_CHAN_OSMO_VAMOS_Bm_ACCHs || \
(chan_nr & 0xf0) == RSL_CHAN_OSMO_VAMOS_Lm_ACCHs)
#define L1SAP_IS_LINK_SACCH(link_id) ((link_id & 0xC0) == LID_SACCH)
#define L1SAP_IS_CHAN_TCHF(chan_nr) ((chan_nr & 0xf8) == 0x08)
#define L1SAP_IS_CHAN_TCHH(chan_nr) ((chan_nr & 0xf0) == 0x10)
#define L1SAP_IS_CHAN_SDCCH4(chan_nr) ((chan_nr & 0xe0) == 0x20)
#define L1SAP_IS_CHAN_SDCCH8(chan_nr) ((chan_nr & 0xc0) == 0x40)
#define L1SAP_IS_CHAN_BCCH(chan_nr) ((chan_nr & 0xf8) == 0x80)
#define L1SAP_IS_CHAN_RACH(chan_nr) ((chan_nr & 0xf8) == 0x88)
#define L1SAP_IS_CHAN_AGCH_PCH(chan_nr) ((chan_nr & 0xf8) == 0x90)
#define L1SAP_IS_CHAN_PDCH(chan_nr) ((chan_nr & 0xf8) == 0xc0)
#define L1SAP_IS_CHAN_CBCH(chan_nr) ((chan_nr & 0xf8) == 0xc8)
/* rach type from ra */
#define L1SAP_IS_PACKET_RACH(ra) ((ra & 0xf0) == 0x70 && (ra & 0x0f) != 0x0f)
@@ -90,7 +71,7 @@ int l1sap_up(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap);
/* pcu (socket interface) sends us a data request primitive */
int l1sap_pdch_req(struct gsm_bts_trx_ts *ts, int is_ptcch, uint32_t fn,
uint16_t arfcn, uint8_t block_nr, const uint8_t *data, uint8_t len);
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len);
/* call-back function for incoming RTP */
void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
@@ -98,55 +79,25 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
uint32_t timestamp, bool marker);
/* channel control */
int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr);
int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr, struct tlv_parsed *tp);
int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr);
int l1sap_chan_deact_sacch(struct gsm_bts_trx *trx, uint8_t chan_nr);
int l1sap_chan_modify(struct gsm_bts_trx *trx, uint8_t chan_nr);
int l1sap_uplink_access(struct gsm_lchan *lchan, bool active);
enum l1sap_common_sapi {
L1SAP_COMMON_SAPI_UNKNOWN,
/* alphabetic order */
L1SAP_COMMON_SAPI_AGCH,
L1SAP_COMMON_SAPI_BCCH,
L1SAP_COMMON_SAPI_CBCH,
L1SAP_COMMON_SAPI_FACCH_F,
L1SAP_COMMON_SAPI_FACCH_H,
L1SAP_COMMON_SAPI_FCCH,
L1SAP_COMMON_SAPI_IDLE,
L1SAP_COMMON_SAPI_NCH,
L1SAP_COMMON_SAPI_PACCH,
L1SAP_COMMON_SAPI_PAGCH,
L1SAP_COMMON_SAPI_PBCCH,
L1SAP_COMMON_SAPI_PCH,
L1SAP_COMMON_SAPI_PDTCH,
L1SAP_COMMON_SAPI_PNCH,
L1SAP_COMMON_SAPI_PPCH,
L1SAP_COMMON_SAPI_PRACH,
L1SAP_COMMON_SAPI_PTCCH,
L1SAP_COMMON_SAPI_RACH,
L1SAP_COMMON_SAPI_SACCH,
L1SAP_COMMON_SAPI_SCH,
L1SAP_COMMON_SAPI_SDCCH,
L1SAP_COMMON_SAPI_TCH_F,
L1SAP_COMMON_SAPI_TCH_H,
};
extern uint16_t l1sap_log_ctx_sapi;
extern const struct value_string l1sap_common_sapi_names[];
extern const struct value_string gsmtap_sapi_names[];
extern struct gsmtap_inst *gsmtap;
extern uint32_t gsmtap_sapi_mask;
extern uint8_t gsmtap_sapi_acch;
int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg,
struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn,
uint16_t ber10k, int16_t lqual_cb, int8_t rssi,
int16_t ta_offs, uint8_t is_sub);
uint16_t ber10k, int16_t lqual_cb);
#define msgb_l1sap_prim(msg) ((struct osmo_phsap_prim *)(msg)->l1h)
void radio_link_timeout_reset(struct gsm_lchan *lchan);
int bts_check_for_first_ciphrd(struct gsm_lchan *lchan,
uint8_t *data, int len);
enum ccch_msgt get_ccch_msgt(struct gsm_bts_trx *trx, uint32_t fn);
int is_ccch_for_agch(struct gsm_bts_trx *trx, uint32_t fn);
#endif /* L1SAP_H */

View File

@@ -1,444 +0,0 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <netinet/in.h>
#include <osmocom/core/bits.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/gsm/gsm_utils.h>
#include <osmocom/codec/codec.h>
#include <osmocom/codec/ecu.h>
#include <osmocom/gsm/lapdm.h>
#include <osmocom/gsm/sysinfo.h>
#include <osmocom/gsm/protocol/gsm_08_58.h>
#include <osmocom/gsm/gsm48_rest_octets.h>
#include <osmocom/gsm/protocol/gsm_04_08.h>
#include <osmocom/gsm/meas_rep.h>
#include <osmocom/netif/osmux.h>
#include <osmo-bts/power_control.h>
#define LOGPLCHAN(lchan, ss, lvl, fmt, args...) LOGP(ss, lvl, "%s " fmt, gsm_lchan_name(lchan), ## args)
enum lchan_ciph_state {
LCHAN_CIPH_NONE,
LCHAN_CIPH_RX_REQ,
LCHAN_CIPH_RX_CONF,
LCHAN_CIPH_RXTX_REQ,
LCHAN_CIPH_RX_CONF_TX_REQ,
LCHAN_CIPH_RXTX_CONF,
};
/* state of a logical channel */
enum gsm_lchan_state {
LCHAN_S_NONE, /* channel is not active */
LCHAN_S_ACT_REQ, /* channel activation requested */
LCHAN_S_ACTIVE, /* channel is active and operational */
LCHAN_S_REL_REQ, /* channel release has been requested */
LCHAN_S_REL_ERR, /* channel is in an error state */
LCHAN_S_BROKEN, /* channel is somehow unusable */
};
#define MAX_NUM_UL_MEAS 104
#define LC_UL_M_F_L1_VALID (1 << 0)
#define LC_UL_M_F_RES_VALID (1 << 1)
#define LC_UL_M_F_OSMO_EXT_VALID (1 << 2)
#define MAX_A5_KEY_LEN (128/8)
#define RSL_ENC_ALG_A5(x) (x+1)
struct bts_ul_meas {
/* BER in units of 0.01%: 10.000 == 100% ber, 0 == 0% ber */
uint16_t ber10k;
/* timing advance offset (in 1/256 bits) */
int16_t ta_offs_256bits;
/* C/I ratio in cB */
int16_t ci_cb;
/* flags */
uint8_t is_sub:1;
/* RSSI in dBm * -1 */
uint8_t inv_rssi;
};
struct amr_mode {
uint8_t mode;
uint8_t threshold;
uint8_t hysteresis;
};
struct amr_multirate_conf {
uint8_t gsm48_ie[2];
struct amr_mode mode[4];
uint8_t num_modes;
};
enum lchan_csd_mode {
LCHAN_CSD_M_NT = 0,
LCHAN_CSD_M_T_1200_75,
LCHAN_CSD_M_T_600,
LCHAN_CSD_M_T_1200,
LCHAN_CSD_M_T_2400,
LCHAN_CSD_M_T_4800,
LCHAN_CSD_M_T_9600,
LCHAN_CSD_M_T_14400,
LCHAN_CSD_M_T_29000,
LCHAN_CSD_M_T_32000,
_LCHAN_CSD_M_NUM,
};
extern const struct value_string lchan_csd_mode_descs[];
static inline const char *lchan_csd_mode_desc(enum lchan_csd_mode mode)
{
return get_value_string(lchan_csd_mode_descs, mode);
}
/* State of the SAPIs in the lchan */
enum lchan_sapi_state {
LCHAN_SAPI_S_NONE,
LCHAN_SAPI_S_REQ,
LCHAN_SAPI_S_ASSIGNED,
LCHAN_SAPI_S_REL,
LCHAN_SAPI_S_ERROR,
};
/* What kind of release/activation is done? A silent one for
* the PDCH or one triggered through RSL? */
enum lchan_rel_act_kind {
LCHAN_REL_ACT_RSL,
LCHAN_REL_ACT_PCU,
LCHAN_REL_ACT_OML,
LCHAN_REL_ACT_REACT, /* FIXME: remove once auto-activation hack is removed from opstart_compl() (OS#1575) */
};
struct gsm_rep_facch {
struct msgb *msg;
uint32_t fn;
};
struct lchan_power_ctrl_state {
/* Dynamic Power Control parameters (NULL in static mode) */
const struct gsm_power_ctrl_params *dpc_params;
/* Measurement pre-processing state (for dynamic mode) */
struct gsm_power_ctrl_meas_proc_state rxlev_meas_proc;
struct gsm_power_ctrl_meas_proc_state rxqual_meas_proc;
struct gsm_power_ctrl_meas_proc_state ci_meas_proc;
/* Number of SACCH blocks to skip (for dynamic mode) */
int skip_block_num;
/* Depending on the context (MS or BS power control), fields 'current' and 'max'
* reflect either the MS power level (magic numbers), or BS Power reduction level
* (attenuation, in dB). */
uint8_t current;
uint8_t max;
};
struct lchan_ta_ctrl_state {
/* Number of SACCH blocks to skip */
int skip_block_num;
/* Currently requested TA */
uint8_t current;
};
struct gsm_lchan {
/* The TS that we're part of */
struct gsm_bts_trx_ts *ts;
/* The logical subslot number in the TS */
uint8_t nr;
/* The logical channel type */
enum gsm_chan_t type;
/* RSL channel rate and type */
enum rsl_cmod_crt rsl_chan_rt;
/* RSL channel mode */
enum rsl_cmod_spd rsl_cmode;
/* If TCH, traffic channel mode */
enum gsm48_chan_mode tch_mode;
enum lchan_csd_mode csd_mode;
/* State */
enum gsm_lchan_state state;
const char *broken_reason;
/* Encryption information */
struct {
uint8_t alg_id;
uint8_t key_len;
uint8_t key[MAX_A5_KEY_LEN];
} encr;
struct {
uint32_t bound_ip;
uint32_t connect_ip;
uint16_t bound_port;
uint16_t connect_port;
uint16_t conn_id;
uint8_t rtp_payload;
uint8_t rtp_payload2;
uint8_t rtp_extensions;
uint8_t speech_mode;
struct {
bool use;
uint8_t local_cid;
uint8_t remote_cid;
/* Rx Osmux -> RTP, one allocated & owned per lchan */
struct osmux_out_handle *out;
/* Tx RTP -> Osmux, shared by all lchans sharing a
* remote endp (addr+port), see "struct osmux_handle" */
struct osmux_in_handle *in;
/* Used to build rtp messages we send to osmux */
struct osmo_rtp_handle *rtpst;
} osmux;
struct osmo_rtp_socket *rtp_socket;
} abis_ip;
char *name;
/* For handover, activation is described in 3GPP TS 48.058 4.1.3 and 4.1.4:
*
* | | Access || transmit | activate
* | MS Power | Delay || on main channel | dl SACCH
* ----------------------------------------------------------------------
* async ho no * --> yes no
* async ho yes * --> yes may be started
* sync ho no no --> yes no
* sync ho yes no --> yes may be started
* sync ho yes yes --> yes shall be started
*
* Always start the main channel immediately.
* want_dl_sacch_active indicates whether dl SACCH should be activated on CHAN ACT.
*/
bool want_dl_sacch_active;
/* Number of different GsmL1_Sapi_t used in osmo_bts_sysmo is 23.
* Currently we don't share these headers so this is a magic number. */
struct llist_head sapi_cmds;
uint8_t sapis_dl[23];
uint8_t sapis_ul[23];
struct lapdm_channel lapdm_ch;
/* It is required to have L3 info with DL establishment. */
bool l3_info_estab;
struct llist_head dl_tch_queue;
unsigned int dl_tch_queue_len;
struct {
/* bitmask of all SI that are present/valid in si_buf */
uint32_t valid;
/* bitmask of all SI that do not mirror the BTS-global SI values */
uint32_t overridden;
uint32_t last;
/* buffers where we put the pre-computed SI:
SI2Q_MAX_NUM is the max number of SI2quater messages (see 3GPP TS 44.018) */
sysinfo_buf_t buf[_MAX_SYSINFO_TYPE][SI2Q_MAX_NUM];
} si;
struct {
uint8_t flags;
/* RSL measurement result number, 0 at lchan_act */
uint8_t res_nr;
/* number of measurements stored in array below */
uint8_t num_ul_meas;
struct bts_ul_meas uplink[MAX_NUM_UL_MEAS];
/* last L1 header from the MS */
struct rsl_l1_info l1_info;
struct gsm_meas_rep_unidir ul_res;
int16_t ms_toa256;
int16_t ul_ci_cb_full;
int16_t ul_ci_cb_sub;
/* Frame number of the last measurement indication receceived */
uint32_t last_fn;
/* Osmocom extended measurement results, see LC_UL_M_F_EXTD_VALID */
struct {
/* minimum value of toa256 during measurement period */
int16_t toa256_min;
/* maximum value of toa256 during measurement period */
int16_t toa256_max;
/* standard deviation of toa256 value during measurement period */
uint16_t toa256_std_dev;
} ext;
/* Interference levels reported by PHY (in dBm) */
int16_t interf_meas_avg_dbm; /* Average value */
int16_t interf_meas_dbm[31]; /* Intave max is 31 */
uint8_t interf_meas_num;
uint8_t interf_band;
} meas;
struct {
struct amr_multirate_conf amr_mr;
struct {
struct osmo_fsm_inst *dl_amr_fsm;
/* TCH cache */
uint8_t cache[20];
/* FACCH cache */
uint8_t facch[GSM_MACBLOCK_LEN];
uint8_t len;
uint32_t fn;
bool is_update;
/* set for each SID frame to detect talkspurt for codecs
without explicit ONSET event */
bool ul_sid;
/* indicates if DTXd was active during DL measurement
period */
bool dl_active;
/* last UL SPEECH resume flag */
bool is_speech_resume;
} dtx;
struct {
bool last_rtp_input_was_sid;
uint8_t last_sid[GSM_FR_BYTES];
uint8_t last_sid_len;
uint8_t last_sid_age;
/* A SID was transmitted on the DL in the period
* beginning with the last transmitted speech frame
* or the last mandatory-Tx position, whichever was
* more recent. */
bool dl_sid_transmitted;
/* The current frame in the DL is taken up by FACCH */
bool dl_facch_stealing;
/* UL SID filter to catch DTXu half-blocks,
* see tch_ul_fr_hr_efr() function. */
bool ul_sid_filter;
} dtx_fr_hr_efr;
uint8_t last_cmr;
uint32_t last_fn;
struct {
/* RLP GSMTAP mechanism */
uint8_t rlp_buf_ul[576/8]; /* maximum size of RLP frame */
uint8_t rlp_buf_dl[576/8]; /* maximum size of RLP frame */
/* alignment of RLP frames in DL for NT modes */
ubit_t rlpdl_data_bits[60 * 7];
uint16_t rlpdl_align_bits;
uint8_t rlpdl_fill_level;
ubit_t tchf48_nt_2ndhalf[120];
} csd;
} tch;
/* 3GPP TS 48.058 § 9.3.37: [0; 255] ok, -1 means invalid*/
int16_t ms_t_offs;
/* 3GPP TS 45.010 § 1.2 round trip propagation delay (in symbols) or -1 */
int16_t p_offs;
/* BTS-side ciphering state (rx only, bi-directional, ...) */
uint8_t ciph_state;
uint8_t ciph_ns;
uint8_t loopback;
struct {
uint8_t active;
uint8_t ref;
/* T3105: PHYS INF retransmission */
struct osmo_timer_list t3105;
/* counts up to Ny1 */
unsigned int phys_info_count;
} ho;
struct {
bool listener_detected;
uint8_t talker_active;
uint8_t ref;
uint32_t fn;
/* T3115: VGCS UPLINK GRANT retransmission */
struct osmo_timer_list t3115;
/* counts up to Ny2 */
unsigned int vgcs_ul_grant_count;
/* uplink free message */
bool uplink_free;
uint8_t uplink_free_msg[GSM_MACBLOCK_LEN];
} asci;
/* S counter for link loss */
int s;
/* Kind of the release/activation. E.g. RSL or PCU */
enum lchan_rel_act_kind rel_act_kind;
/* Pending RSL CHANnel ACTIVation message */
struct msgb *pending_chan_activ;
/* RTP header Marker bit to indicate beginning of speech after pause */
bool rtp_tx_marker;
/* TA Control Loop */
struct lchan_ta_ctrl_state ta_ctrl;
/* MS/BS power control state */
struct lchan_power_ctrl_state ms_power_ctrl;
struct lchan_power_ctrl_state bs_power_ctrl;
/* MS/BS Dynamic Power Control parameters */
struct gsm_power_ctrl_params ms_dpc_params;
struct gsm_power_ctrl_params bs_dpc_params;
/* Temporary ACCH overpower capabilities and state */
struct abis_rsl_osmo_temp_ovp_acch_cap top_acch_cap;
bool top_acch_active;
struct msgb *pending_rel_ind_msg;
/* ECU (Error Concealment Unit) state */
struct osmo_ecu_state *ecu_state;
/* Repeated ACCH capabilities and current state */
struct abis_rsl_osmo_rep_acch_cap rep_acch_cap;
struct {
bool dl_facch_active;
bool ul_sacch_active;
bool dl_sacch_active;
/* Message buffers to store repeation candidates */
struct gsm_rep_facch dl_facch[2];
struct msgb *dl_sacch_msg;
} rep_acch;
/* Cached early Immediate Assignment message: if the Immediate Assignment arrives before the channel is
* confirmed active, then cache it here and send it once the channel is confirmed to be active. This is related
* to the Early IA feature, see OsmoBSC config option 'immediate-assignment pre-chan-ack'. */
struct msgb *early_rr_ia;
struct osmo_timer_list early_rr_ia_delay;
};
extern const struct value_string lchan_ciph_state_names[];
static inline const char *lchan_ciph_state_name(uint8_t state)
{
return get_value_string(lchan_ciph_state_names, state);
}
#define GSM_LCHAN_SI(lchan, i) (void *)((lchan)->si.buf[i][0])
void gsm_lchan_init(struct gsm_lchan *lchan, struct gsm_bts_trx_ts *ts, unsigned int lchan_nr);
void gsm_lchan_name_update(struct gsm_lchan *lchan);
int lchan_init_lapdm(struct gsm_lchan *lchan);
void gsm_lchan_release(struct gsm_lchan *lchan, enum lchan_rel_act_kind rel_kind);
int lchan_deactivate(struct gsm_lchan *lchan);
const char *gsm_lchans_name(enum gsm_lchan_state s);
static inline char *gsm_lchan_name(const struct gsm_lchan *lchan)
{
return lchan->name;
}
uint8_t *lchan_sacch_get(struct gsm_lchan *lchan);
uint8_t gsm_lchan2chan_nr(const struct gsm_lchan *lchan);
uint8_t gsm_lchan2chan_nr_rsl(const struct gsm_lchan *lchan);
uint8_t gsm_lchan_as_pchan2chan_nr(const struct gsm_lchan *lchan,
enum gsm_phys_chan_config as_pchan);
void gsm_lchan_interf_meas_push(struct gsm_lchan *lchan, int dbm);
void gsm_lchan_interf_meas_calc_avg(struct gsm_lchan *lchan);
int lchan2ecu_codec(const struct gsm_lchan *lchan);
void lchan_set_state(struct gsm_lchan *lchan, enum gsm_lchan_state state);
int lchan_rtp_socket_create(struct gsm_lchan *lchan, const char *bind_ip);
int lchan_rtp_socket_connect(struct gsm_lchan *lchan, const struct in_addr *ia, uint16_t connect_port);
void lchan_rtp_socket_free(struct gsm_lchan *lchan);
void lchan_dl_tch_queue_enqueue(struct gsm_lchan *lchan, struct msgb *msg, unsigned int limit);
static inline bool lchan_is_dcch(const struct gsm_lchan *lchan)
{
switch (lchan->type) {
case GSM_LCHAN_SDCCH:
case GSM_LCHAN_TCH_F:
case GSM_LCHAN_TCH_H:
return true;
default:
return false;
}
}
#define lchan_is_tch(lchan) \
((lchan)->type == GSM_LCHAN_TCH_F || (lchan)->type == GSM_LCHAN_TCH_H)

View File

@@ -20,8 +20,7 @@ enum {
DLOOP,
DABIS,
DRTP,
DOSMUX,
DASCI,
DSUM,
};
extern const struct log_info bts_log_info;
@@ -38,12 +37,4 @@ extern const struct log_info bts_log_info;
#define DEBUGPFN(ss, fn, fmt, args...) \
LOGP(ss, LOGL_DEBUG, "%s " fmt, gsm_fn_as_gsmtime_str(fn), ## args)
/* LOGP with lchan + frame number prefix */
#define LOGPLCFN(lchan, fn, ss, lvl, fmt, args...) \
LOGP(ss, lvl, "%s %s " fmt, gsm_lchan_name(lchan), gsm_fn_as_gsmtime_str(fn), ## args)
/* LOGP with lchan + gsm_time prefix */
#define LOGPLCGT(lchan, gt, ss, lvl, fmt, args...) \
LOGP(ss, lvl, "%s %s " fmt, gsm_lchan_name(lchan), osmo_dump_gsmtime(gt), ## args)
#endif /* _LOGGING_H */

Some files were not shown because too many files have changed in this diff Show More