mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-bts.git
synced 2025-11-17 20:32:07 +00:00
Compare commits
3 Commits
keith/dtx-
...
1.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b282dff1c2 | ||
|
|
69dd672305 | ||
|
|
d785da5943 |
24
.gitignore
vendored
24
.gitignore
vendored
@@ -35,10 +35,10 @@ src/osmo-bts-sysmo/osmo-bts-sysmo-remote
|
|||||||
src/osmo-bts-sysmo/sysmobts-mgr
|
src/osmo-bts-sysmo/sysmobts-mgr
|
||||||
src/osmo-bts-sysmo/sysmobts-util
|
src/osmo-bts-sysmo/sysmobts-util
|
||||||
|
|
||||||
src/osmo-bts-lc15/lc15bts-mgr
|
src/osmo-bts-litecell15/lc15bts-mgr
|
||||||
src/osmo-bts-lc15/lc15bts-util
|
src/osmo-bts-litecell15/lc15bts-util
|
||||||
src/osmo-bts-lc15/misc/.dirstamp
|
src/osmo-bts-litecell15/misc/.dirstamp
|
||||||
src/osmo-bts-lc15/osmo-bts-lc15
|
src/osmo-bts-litecell15/osmo-bts-lc15
|
||||||
|
|
||||||
src/osmo-bts-trx/osmo-bts-trx
|
src/osmo-bts-trx/osmo-bts-trx
|
||||||
|
|
||||||
@@ -47,14 +47,8 @@ src/osmo-bts-octphy/osmo-bts-octphy
|
|||||||
src/osmo-bts-virtual/osmo-bts-virtual
|
src/osmo-bts-virtual/osmo-bts-virtual
|
||||||
src/osmo-bts-omldummy/osmo-bts-omldummy
|
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/atconfig
|
||||||
tests/package.m4
|
tests/package.m4
|
||||||
tests/amr/amr_test
|
|
||||||
tests/agch/agch_test
|
tests/agch/agch_test
|
||||||
tests/paging/paging_test
|
tests/paging/paging_test
|
||||||
tests/cipher/cipher_test
|
tests/cipher/cipher_test
|
||||||
@@ -63,9 +57,6 @@ tests/meas/meas_test
|
|||||||
tests/misc/misc_test
|
tests/misc/misc_test
|
||||||
tests/handover/handover_test
|
tests/handover/handover_test
|
||||||
tests/tx_power/tx_power_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
|
||||||
tests/testsuite.log
|
tests/testsuite.log
|
||||||
|
|
||||||
@@ -88,20 +79,15 @@ debian/*.substvars
|
|||||||
debian/osmo-bts-trx-dbg/
|
debian/osmo-bts-trx-dbg/
|
||||||
debian/osmo-bts-trx/
|
debian/osmo-bts-trx/
|
||||||
debian/tmp/
|
debian/tmp/
|
||||||
|
/tests/power/power_test
|
||||||
|
|
||||||
# manuals
|
# manuals
|
||||||
doc/manuals/*.html
|
doc/manuals/*.html
|
||||||
doc/manuals/*.svg
|
doc/manuals/*.svg
|
||||||
doc/manuals/*.pdf
|
doc/manuals/*.pdf
|
||||||
doc/manuals/vty/*.pdf
|
|
||||||
doc/manuals/*__*.png
|
doc/manuals/*__*.png
|
||||||
doc/manuals/*.check
|
doc/manuals/*.check
|
||||||
doc/manuals/generated/
|
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/osmomsc-usermanual.xml
|
||||||
doc/manuals/common
|
doc/manuals/common
|
||||||
doc/manuals/build
|
doc/manuals/build
|
||||||
|
|
||||||
contrib/osmo-bts.spec
|
|
||||||
|
|||||||
11
Makefile.am
11
Makefile.am
@@ -5,13 +5,10 @@ SUBDIRS = include src tests doc contrib
|
|||||||
|
|
||||||
# package the contrib and doc
|
# package the contrib and doc
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
.version \
|
contrib/dump_docs.py contrib/screenrc-l1fwd \
|
||||||
README.md \
|
contrib/l1fwd.init contrib/screenrc-sysmobts contrib/respawn.sh \
|
||||||
contrib/dump_docs.py \
|
git-version-gen .version \
|
||||||
contrib/osmo-bts.spec.in \
|
README.md
|
||||||
debian \
|
|
||||||
git-version-gen \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||||
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
|
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
|
||||||
|
|||||||
42
README.md
42
README.md
@@ -20,41 +20,32 @@ Several kinds of BTS hardware are supported:
|
|||||||
* sysmocom sysmoBTS
|
* sysmocom sysmoBTS
|
||||||
* Octasic octphy
|
* Octasic octphy
|
||||||
* Nutaq litecell 1.5
|
* Nutaq litecell 1.5
|
||||||
* OpenCellular 2G (OC-2G)
|
* software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX)
|
||||||
* software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX, LimeSDR)
|
|
||||||
|
|
||||||
Homepage
|
Homepage
|
||||||
--------
|
--------
|
||||||
|
|
||||||
The official homepage of the project is
|
The official homepage of the project is
|
||||||
<https://osmocom.org/projects/osmobts/wiki>
|
https://osmocom.org/projects/osmobts/wiki
|
||||||
|
|
||||||
GIT Repository
|
GIT Repository
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
You can clone from the official osmo-bts.git repository using
|
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
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
User Manuals and VTY reference manuals are [optionally] built in PDF form
|
We provide a
|
||||||
as part of the build process.
|
[User Manual](http://ftp.osmocom.org/docs/latest/osmobts-usermanual.pdf)
|
||||||
|
as well as a
|
||||||
Pre-rendered PDF version of the current "master" can be found at
|
[VTY Reference Manual](http://ftp.osmocom.org/docs/latest/osmobsc-vty-reference.pdf)
|
||||||
[User Manual](https://ftp.osmocom.org/docs/latest/osmobts-usermanual.pdf)
|
and a
|
||||||
as well as the VTY reference manuals
|
[Abis refrence MAnual](http://ftp.osmocom.org/docs/latest/osmobts-abis.pdf)
|
||||||
* [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)
|
|
||||||
describing the OsmoBTS specific A-bis dialect.
|
describing the OsmoBTS specific A-bis dialect.
|
||||||
|
|
||||||
Mailing List
|
Mailing List
|
||||||
@@ -86,7 +77,7 @@ https://gerrit.osmocom.org/#/q/project:osmo-bts+status:open
|
|||||||
Known Limitations
|
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:
|
implementation:
|
||||||
|
|
||||||
Common Core
|
Common Core
|
||||||
@@ -96,6 +87,10 @@ Common Core
|
|||||||
* System Information limited to 1,2,2bis,2ter,2quater,3,4,5,6,9,13
|
* System Information limited to 1,2,2bis,2ter,2quater,3,4,5,6,9,13
|
||||||
* No RATSCCH in AMR
|
* No RATSCCH in AMR
|
||||||
* Will reject TS 12.21 STARTING TIME in SET BTS ATTR / SET CHAN ATTR
|
* 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 MultiRate Control
|
||||||
* No support of TS 08.58 Supported Codec Types
|
* No support of TS 08.58 Supported Codec Types
|
||||||
* No support of Bter frame / ENHANCED MEASUREMENT REPORT
|
* No support of Bter frame / ENHANCED MEASUREMENT REPORT
|
||||||
@@ -122,3 +117,10 @@ osmo-bts-octphy
|
|||||||
* no clear indication of nominal transmit power, various power related
|
* no clear indication of nominal transmit power, various power related
|
||||||
computations are likely off
|
computations are likely off
|
||||||
* no OML attribute validation during bts_model_check_oml()
|
* 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)
|
||||||
|
|||||||
10
TODO-RELEASE
10
TODO-RELEASE
@@ -1,10 +0,0 @@
|
|||||||
# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
|
|
||||||
# according to https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
|
|
||||||
# In short:
|
|
||||||
# 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:0.
|
|
||||||
# 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
|
|
||||||
libosmogsm >1.8.0 <osmocom/gsm/protocol/gsm_44_060.h> added
|
|
||||||
79
configure.ac
79
configure.ac
@@ -9,8 +9,6 @@ AC_CONFIG_AUX_DIR([.])
|
|||||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||||
AC_CONFIG_TESTDIR(tests)
|
AC_CONFIG_TESTDIR(tests)
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -std=gnu11"
|
|
||||||
|
|
||||||
dnl kernel style compile messages
|
dnl kernel style compile messages
|
||||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||||
|
|
||||||
@@ -24,11 +22,6 @@ AC_PROG_CC
|
|||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
LT_INIT
|
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)
|
dnl check for pkg-config (explained in detail in libosmocore/configure.ac)
|
||||||
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
|
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
|
||||||
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
|
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
|
||||||
@@ -69,15 +62,14 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl checks for libraries
|
dnl checks for libraries
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.0.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.0.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.0.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.0.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec >= 1.0.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.8.0)
|
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.0.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.4.0)
|
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.6.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 1.4.0)
|
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 0.6.0)
|
||||||
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.3.0)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable support for sysmobts calibration tool])
|
AC_MSG_CHECKING([whether to enable support for sysmobts calibration tool])
|
||||||
AC_ARG_ENABLE(sysmobts-calib,
|
AC_ARG_ENABLE(sysmobts-calib,
|
||||||
@@ -350,56 +342,6 @@ then
|
|||||||
AC_SUBST([OSMO_GSM_MANUALS_DIR])
|
AC_SUBST([OSMO_GSM_MANUALS_DIR])
|
||||||
fi
|
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
|
# https://www.freedesktop.org/software/systemd/man/daemon.html
|
||||||
AC_ARG_WITH([systemdsystemunitdir],
|
AC_ARG_WITH([systemdsystemunitdir],
|
||||||
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
|
[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-virtual/Makefile
|
||||||
src/osmo-bts-omldummy/Makefile
|
src/osmo-bts-omldummy/Makefile
|
||||||
src/osmo-bts-sysmo/Makefile
|
src/osmo-bts-sysmo/Makefile
|
||||||
src/osmo-bts-lc15/Makefile
|
src/osmo-bts-litecell15/Makefile
|
||||||
src/osmo-bts-oc2g/Makefile
|
src/osmo-bts-oc2g/Makefile
|
||||||
src/osmo-bts-trx/Makefile
|
src/osmo-bts-trx/Makefile
|
||||||
src/osmo-bts-octphy/Makefile
|
src/osmo-bts-octphy/Makefile
|
||||||
@@ -440,15 +382,12 @@ AC_OUTPUT(
|
|||||||
tests/sysmobts/Makefile
|
tests/sysmobts/Makefile
|
||||||
tests/misc/Makefile
|
tests/misc/Makefile
|
||||||
tests/handover/Makefile
|
tests/handover/Makefile
|
||||||
tests/ta_control/Makefile
|
|
||||||
tests/tx_power/Makefile
|
tests/tx_power/Makefile
|
||||||
tests/power/Makefile
|
tests/power/Makefile
|
||||||
tests/meas/Makefile
|
tests/meas/Makefile
|
||||||
tests/amr/Makefile
|
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
doc/examples/Makefile
|
doc/examples/Makefile
|
||||||
doc/manuals/Makefile
|
doc/manuals/Makefile
|
||||||
contrib/Makefile
|
contrib/Makefile
|
||||||
contrib/systemd/Makefile
|
contrib/systemd/Makefile
|
||||||
contrib/osmo-bts.spec
|
|
||||||
Makefile)
|
Makefile)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ env = os.environ
|
|||||||
env['L1FWD_BTS_HOST'] = '127.0.0.1'
|
env['L1FWD_BTS_HOST'] = '127.0.0.1'
|
||||||
|
|
||||||
bts_proc = subprocess.Popen(["./src/osmo-bts-sysmo/sysmobts-remote",
|
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)
|
stdin=None, stdout=None)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ export LD_LIBRARY_PATH="$inst/lib"
|
|||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
||||||
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
osmo-build-dep.sh libosmo-abis
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
|
|
||||||
cd "$deps"
|
cd "$deps"
|
||||||
|
|
||||||
@@ -18,7 +17,6 @@ configure_flags="\
|
|||||||
--enable-sanitize \
|
--enable-sanitize \
|
||||||
--enable-werror \
|
--enable-werror \
|
||||||
--enable-trx \
|
--enable-trx \
|
||||||
--enable-external-tests \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
build_bts "osmo-bts-trx" "$configure_flags"
|
build_bts "osmo-bts-trx" "$configure_flags"
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ build_bts() {
|
|||||||
conf_flags="$*"
|
conf_flags="$*"
|
||||||
if [ "$WITH_MANUALS" = "1" ]; then
|
if [ "$WITH_MANUALS" = "1" ]; then
|
||||||
conf_flags="$conf_flags --enable-manuals"
|
conf_flags="$conf_flags --enable-manuals"
|
||||||
|
osmo-build-dep.sh osmo-gsm-manuals
|
||||||
export PATH="$inst/bin:$PATH"
|
export PATH="$inst/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -50,12 +51,10 @@ build_bts() {
|
|||||||
./configure $conf_flags
|
./configure $conf_flags
|
||||||
$MAKE $PARALLEL_MAKE
|
$MAKE $PARALLEL_MAKE
|
||||||
$MAKE check || cat-testlogs.sh
|
$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
|
# Manuals: publish
|
||||||
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
|
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
|
||||||
$MAKE -C "$base/doc/manuals" publish
|
$MAKE -C "$base/doc/manuals" publish
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$MAKE $PARALLEL_MAKE maintainer-clean
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
export LD_LIBRARY_PATH="$inst/lib"
|
||||||
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
osmo-build-dep.sh libosmo-abis
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
|
|
||||||
cd "$deps"
|
cd "$deps"
|
||||||
osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
|
osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
export LD_LIBRARY_PATH="$inst/lib"
|
||||||
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
osmo-build-dep.sh libosmo-abis
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
|
|
||||||
cd "$deps"
|
cd "$deps"
|
||||||
osmo-layer1-headers.sh oc2g "$FIRMWARE_VERSION"
|
osmo-layer1-headers.sh oc2g "$FIRMWARE_VERSION"
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
export LD_LIBRARY_PATH="$inst/lib"
|
||||||
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
osmo-build-dep.sh libosmo-abis
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
|
|
||||||
cd "$deps"
|
cd "$deps"
|
||||||
osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
|
osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ export LD_LIBRARY_PATH="$inst/lib"
|
|||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
||||||
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
osmo-build-dep.sh libosmo-abis
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
|
|
||||||
cd "$deps"
|
cd "$deps"
|
||||||
|
|
||||||
@@ -21,7 +20,6 @@ configure_flags="\
|
|||||||
--with-octsdr-2g=$deps/layer1-headers/ \
|
--with-octsdr-2g=$deps/layer1-headers/ \
|
||||||
--enable-octphy \
|
--enable-octphy \
|
||||||
--enable-trx \
|
--enable-trx \
|
||||||
--enable-external-tests \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
build_bts "osmo-bts-octphy+trx" "$configure_flags"
|
build_bts "osmo-bts-octphy+trx" "$configure_flags"
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
export LD_LIBRARY_PATH="$inst/lib"
|
||||||
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
osmo-build-dep.sh libosmo-abis
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
|
|
||||||
cd "$deps"
|
cd "$deps"
|
||||||
osmo-layer1-headers.sh sysmo "$FIRMWARE_VERSION"
|
osmo-layer1-headers.sh sysmo "$FIRMWARE_VERSION"
|
||||||
@@ -22,7 +21,6 @@ configure_flags="\
|
|||||||
--enable-werror \
|
--enable-werror \
|
||||||
--enable-sysmocom-bts \
|
--enable-sysmocom-bts \
|
||||||
--with-sysmobts=$inst/include/ \
|
--with-sysmobts=$inst/include/ \
|
||||||
--enable-external-tests \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
# This will not work for the femtobts
|
# This will not work for the femtobts
|
||||||
|
|||||||
31
contrib/l1fwd.init
Executable file
31
contrib/l1fwd.init
Executable 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
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
#
|
|
||||||
# spec file for package osmo-bts
|
|
||||||
#
|
|
||||||
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
|
|
||||||
#
|
|
||||||
# All modifications and additions to the file contributed by third parties
|
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
|
||||||
# upon. The license for this file, and modifications and additions to the
|
|
||||||
# file, is the same license as for the pristine package itself (unless the
|
|
||||||
# license for the pristine package is not an Open Source License, in which
|
|
||||||
# case the license is the MIT License). An "Open Source License" is a
|
|
||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
|
||||||
# published by the Open Source Initiative.
|
|
||||||
|
|
||||||
Name: osmo-bts
|
|
||||||
Version: @VERSION@
|
|
||||||
Release: 0
|
|
||||||
Summary: Osmocom BTS-Side code (Abis, scheduling)
|
|
||||||
License: AGPL-3.0-or-later AND GPL-2.0-only
|
|
||||||
Group: Productivity/Telephony/Servers
|
|
||||||
URL: https://osmocom.org/projects/osmobts
|
|
||||||
Source: %{name}-%{version}.tar.xz
|
|
||||||
BuildRequires: autoconf
|
|
||||||
BuildRequires: automake
|
|
||||||
BuildRequires: libtool
|
|
||||||
BuildRequires: pkgconfig >= 0.20
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
BuildRequires: systemd-rpm-macros
|
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig(libosmocodec) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(libosmocoding) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(libosmocore) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(libosmoctrl) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(libosmogsm) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(libosmovty) >= 1.8.0
|
|
||||||
BuildRequires: pkgconfig(libosmoabis) >= 1.4.0
|
|
||||||
BuildRequires: pkgconfig(libosmotrau) >= 1.4.0
|
|
||||||
BuildRequires: pkgconfig(libosmo-netif) >= 1.3.0
|
|
||||||
%{?systemd_requires}
|
|
||||||
|
|
||||||
%description
|
|
||||||
Osmocom BTS-Side code (A-bis, scheduling).
|
|
||||||
|
|
||||||
%package -n osmo-bts-virtual
|
|
||||||
Summary: Virtual Osmocom GSM BTS (no RF hardware; GSMTAP/UDP)
|
|
||||||
License: GPL-2.0-or-later
|
|
||||||
Group: Productivity/Telephony/Utilities
|
|
||||||
|
|
||||||
%description -n osmo-bts-virtual
|
|
||||||
This version of OsmoBTS doesn't use actual GSM PHY/Hardware/RF, but
|
|
||||||
utilizes GSMTAP-over-UDP frames for the Um interface. This is useful
|
|
||||||
in fully virtualized setups e.g. in combination with OsmocomBB virt_phy.
|
|
||||||
|
|
||||||
%package -n osmo-bts-omldummy
|
|
||||||
Summary: Osmocom CI: Bring up only OML without RSL
|
|
||||||
License: GPL-2.0-or-later
|
|
||||||
Group: Productivity/Telephony/Utilities
|
|
||||||
|
|
||||||
%description -n osmo-bts-omldummy
|
|
||||||
This is used only in integration testing, where in the TTCN-3 testsuite
|
|
||||||
we currently have no A-bis OML implementation, but only a RSL one.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%setup -q
|
|
||||||
|
|
||||||
%build
|
|
||||||
echo "%{version}" >.tarball-version
|
|
||||||
autoreconf -fi
|
|
||||||
%configure \
|
|
||||||
--docdir="%{_docdir}/%{name}" \
|
|
||||||
--with-systemdsystemunitdir=%{_unitdir} \
|
|
||||||
--enable-trx
|
|
||||||
make V=1 %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
|
||||||
%make_install
|
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
|
||||||
%pre %service_add_pre osmo-bts-trx.service
|
|
||||||
%post %service_add_post osmo-bts-trx.service
|
|
||||||
%preun %service_del_preun osmo-bts-trx.service
|
|
||||||
%postun %service_del_postun osmo-bts-trx.service
|
|
||||||
%pre virtual %service_add_pre osmo-bts-virtual.service
|
|
||||||
%post virtual %service_add_post osmo-bts-virtual.service
|
|
||||||
%preun virtual %service_del_preun osmo-bts-virtual.service
|
|
||||||
%postun virtual %service_del_postun osmo-bts-virtual.service
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%check
|
|
||||||
make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +)
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license COPYING
|
|
||||||
%doc README.md
|
|
||||||
%dir %{_docdir}/%{name}
|
|
||||||
%dir %{_docdir}/%{name}/examples
|
|
||||||
%dir %{_docdir}/%{name}/examples/osmo-bts-trx
|
|
||||||
%{_docdir}/%{name}/examples/osmo-bts-trx/osmo-bts-trx-calypso.cfg
|
|
||||||
%{_docdir}/%{name}/examples/osmo-bts-trx/osmo-bts-trx.cfg
|
|
||||||
%dir %{_docdir}/%{name}/examples/osmo-bts-virtual
|
|
||||||
%{_docdir}/%{name}/examples/osmo-bts-virtual/osmo-bts-virtual.cfg
|
|
||||||
%{_bindir}/osmo-bts-trx
|
|
||||||
%dir %{_sysconfdir}/osmocom
|
|
||||||
%config(noreplace) %{_sysconfdir}/osmocom/osmo-bts-trx.cfg
|
|
||||||
%{_unitdir}/osmo-bts-trx.service
|
|
||||||
|
|
||||||
%files -n osmo-bts-virtual
|
|
||||||
%{_bindir}/osmo-bts-virtual
|
|
||||||
%dir %{_sysconfdir}/osmocom
|
|
||||||
%config(noreplace) %{_sysconfdir}/osmocom/osmo-bts-virtual.cfg
|
|
||||||
%{_unitdir}/osmo-bts-virtual.service
|
|
||||||
|
|
||||||
%files -n osmo-bts-omldummy
|
|
||||||
%{_bindir}/osmo-bts-omldummy
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
13
contrib/respawn-only.sh
Executable file
13
contrib/respawn-only.sh
Executable 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
18
contrib/respawn.sh
Executable 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
3
contrib/screenrc-l1fwd
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
chdir /tmp
|
||||||
|
screen -t BTS 0 /etc/osmocom/respawn.sh /usr/bin/l1fwd-proxy
|
||||||
|
detach
|
||||||
5
contrib/screenrc-sysmobts
Normal file
5
contrib/screenrc-sysmobts
Normal 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
|
||||||
@@ -24,9 +24,5 @@ if ENABLE_LC15BTS
|
|||||||
SYSTEMD_SERVICES += osmo-bts-lc15.service lc15bts-mgr.service
|
SYSTEMD_SERVICES += osmo-bts-lc15.service lc15bts-mgr.service
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_OC2GBTS
|
|
||||||
SYSTEMD_SERVICES += osmo-bts-oc2g.service oc2gbts-mgr.service
|
|
||||||
endif
|
|
||||||
|
|
||||||
systemdsystemunit_DATA = $(SYSTEMD_SERVICES)
|
systemdsystemunit_DATA = $(SYSTEMD_SERVICES)
|
||||||
endif # HAVE_SYSTEMD
|
endif # HAVE_SYSTEMD
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ Wants=lc15-sysdev-remap.service
|
|||||||
Type=simple
|
Type=simple
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
WatchdogSec=21780s
|
WatchdogSec=21780s
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ Wants=oc2g-sysdev-remap.service
|
|||||||
Type=simple
|
Type=simple
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
WatchdogSec=21780s
|
WatchdogSec=21780s
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,18 @@ Description=osmo-bts for LC15 / sysmoBTS 2100
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
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
|
ExecStart=/usr/bin/osmo-bts-lc15 -t 2 -s -c /etc/osmocom/osmo-bts-lc15.cfg -M
|
||||||
StateDirectory=osmocom
|
ExecStopPost=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness'
|
||||||
WorkingDirectory=%S/osmocom
|
ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/usr1/brightness'
|
||||||
RuntimeDirectory=osmo-bts
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
RestartPreventExitStatus=1
|
RestartPreventExitStatus=1
|
||||||
|
|
||||||
# CPU scheduling policy:
|
# The msg queues must be read fast enough
|
||||||
CPUSchedulingPolicy=rr
|
CPUSchedulingPolicy=rr
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
CPUSchedulingPriority=1
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -3,19 +3,18 @@ Description=osmo-bts for OC-2G
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts-oc2g.cfg -M
|
ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr0/brightness'
|
||||||
StateDirectory=osmocom
|
ExecStartPre=/bin/sh -c 'echo 1 > /sys/class/leds/usr1/brightness'
|
||||||
WorkingDirectory=%S/osmocom
|
ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts.cfg -M
|
||||||
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
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
RestartPreventExitStatus=1
|
RestartPreventExitStatus=1
|
||||||
|
|
||||||
# CPU scheduling policy:
|
# The msg queues must be read fast enough
|
||||||
CPUSchedulingPolicy=rr
|
CPUSchedulingPolicy=rr
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
CPUSchedulingPriority=1
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -7,17 +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
|
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 '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'
|
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
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
RestartPreventExitStatus=1
|
RestartPreventExitStatus=1
|
||||||
|
|
||||||
# CPU scheduling policy:
|
# The msg queues must be read fast enough
|
||||||
CPUSchedulingPolicy=rr
|
CPUSchedulingPolicy=rr
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
CPUSchedulingPriority=1
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -4,16 +4,12 @@ Description=Osmocom osmo-bts for osmo-trx
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/osmo-bts-trx -s -c /etc/osmocom/osmo-bts-trx.cfg
|
ExecStart=/usr/bin/osmo-bts-trx -s -c /etc/osmocom/osmo-bts-trx.cfg
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
|
||||||
# CPU scheduling policy:
|
# Let it process messages quickly enough
|
||||||
CPUSchedulingPolicy=rr
|
CPUSchedulingPolicy=rr
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
CPUSchedulingPriority=1
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -4,16 +4,12 @@ Description=Osmocom GSM BTS for virtual Um layer based on GSMTAP/UDP
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/osmo-bts-virtual -s -c /etc/osmocom/osmo-bts-virtual.cfg
|
ExecStart=/usr/bin/osmo-bts-virtual -s -c /etc/osmocom/osmo-bts-virtual.cfg
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
|
||||||
# CPU scheduling policy:
|
# Let it process messages quickly enough
|
||||||
CPUSchedulingPolicy=rr
|
CPUSchedulingPolicy=rr
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
CPUSchedulingPriority=1
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ Description=osmo-bts manager for sysmoBTS
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/sysmobts-mgr -ns -c /etc/osmocom/sysmobts-mgr.cfg
|
ExecStart=/usr/bin/sysmobts-mgr -ns -c /etc/osmocom/sysmobts-mgr.cfg
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
|
||||||
|
|||||||
1342
debian/changelog
vendored
1342
debian/changelog
vendored
File diff suppressed because it is too large
Load Diff
43
debian/control
vendored
43
debian/control
vendored
@@ -1,42 +1,25 @@
|
|||||||
Source: osmo-bts
|
Source: osmo-bts
|
||||||
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
|
Maintainer: Holger Hans Peter Freyther <holger@moiji-mobile.com>
|
||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper (>= 9),
|
Build-Depends: debhelper (>= 9),
|
||||||
pkg-config,
|
pkg-config,
|
||||||
dh-autoreconf,
|
dh-autoreconf,
|
||||||
|
dh-systemd (>= 1.5),
|
||||||
autotools-dev,
|
autotools-dev,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
libosmocore-dev (>= 1.8.0),
|
libosmocore-dev,
|
||||||
libosmo-abis-dev (>= 1.4.0),
|
libosmo-abis-dev,
|
||||||
libosmo-netif-dev (>= 1.3.0),
|
|
||||||
libgps-dev,
|
libgps-dev,
|
||||||
txt2man,
|
txt2man
|
||||||
osmo-gsm-manuals-dev (>= 1.4.0)
|
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
|
Vcs-Browser: http://git.osmocom.org/osmo-bts/
|
||||||
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
|
Vcs-Git: git://git.osmocom.org/osmo-bts
|
||||||
Homepage: https://projects.osmocom.org/projects/osmobts
|
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
|
Package: osmo-bts-trx
|
||||||
Architecture: any
|
Architecture: any
|
||||||
|
Conflicts: osmo-bts
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: osmo-bts-trx GSM BTS with osmo-trx
|
Description: osmo-bts-trx GSM BTS with osmo-trx
|
||||||
osmo-bts-trx to be used with the osmo-trx application
|
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
|
Package: osmo-bts-virtual
|
||||||
Architecture: any
|
Architecture: any
|
||||||
|
Conflicts: osmo-bts
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||||
Description: Virtual Osmocom GSM BTS (no RF hardware; GSMTAP/UDP)
|
Description: Virtual Osmocom GSM BTS (no RF hardware; GSMTAP/UDP)
|
||||||
This version of OsmoBTS doesn't use actual GSM PHY/Hardware/RF, but
|
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}
|
Depends: osmo-bts-virtual (= ${binary:Version}), ${misc:Depends}
|
||||||
Description: Debug symbols for the osmo-bts-virtual
|
Description: Debug symbols for the osmo-bts-virtual
|
||||||
Make debugging possible
|
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.
|
|
||||||
|
|||||||
1
debian/osmo-bts-doc.install
vendored
1
debian/osmo-bts-doc.install
vendored
@@ -1 +0,0 @@
|
|||||||
usr/share/doc/osmo-bts-doc/*.pdf
|
|
||||||
1
debian/osmo-bts-virtual.install
vendored
1
debian/osmo-bts-virtual.install
vendored
@@ -3,3 +3,4 @@ lib/systemd/system/osmo-bts-virtual.service
|
|||||||
usr/bin/osmo-bts-virtual
|
usr/bin/osmo-bts-virtual
|
||||||
usr/bin/osmo-bts-omldummy
|
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/osmo-bts-virtual.cfg
|
||||||
|
usr/share/doc/osmo-bts/examples/osmo-bts-virtual/openbsc-virtual.cfg
|
||||||
|
|||||||
6
debian/rules
vendored
6
debian/rules
vendored
@@ -16,7 +16,7 @@ override_dh_strip:
|
|||||||
dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg
|
dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg
|
||||||
|
|
||||||
override_dh_auto_configure:
|
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:
|
override_dh_clean:
|
||||||
dh_clean
|
dh_clean
|
||||||
@@ -26,7 +26,3 @@ override_dh_clean:
|
|||||||
# Print test results in case of a failure
|
# Print test results in case of a failure
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
|
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
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ h2. generic
|
|||||||
|
|
||||||
h3. trx.0.thermal-attenuation
|
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,
|
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
|
so an external control process can use this attribute to reduce the system
|
||||||
output power.
|
output power.
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ OSMOCONF_FILES = virtual/osmo-bts-virtual.cfg
|
|||||||
|
|
||||||
doc_virtualdir = $(docdir)/examples/osmo-bts-virtual
|
doc_virtualdir = $(docdir)/examples/osmo-bts-virtual
|
||||||
doc_virtual_DATA = \
|
doc_virtual_DATA = \
|
||||||
virtual/osmo-bts-virtual.cfg
|
virtual/osmo-bts-virtual.cfg \
|
||||||
|
virtual/openbsc-virtual.cfg
|
||||||
EXTRA_DIST = $(doc_virtual_DATA)
|
EXTRA_DIST = $(doc_virtual_DATA)
|
||||||
|
|
||||||
if ENABLE_SYSMOBTS
|
if ENABLE_SYSMOBTS
|
||||||
@@ -41,14 +42,5 @@ EXTRA_DIST += $(doc_lc15_DATA)
|
|||||||
OSMOCONF_FILES += litecell15/osmo-bts-lc15.cfg litecell15/lc15bts-mgr.cfg
|
OSMOCONF_FILES += litecell15/osmo-bts-lc15.cfg litecell15/lc15bts-mgr.cfg
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_OC2GBTS
|
|
||||||
doc_oc2gdir = $(docdir)/examples/osmo-bts-oc2g
|
|
||||||
doc_oc2g_DATA = \
|
|
||||||
oc2g/osmo-bts-oc2g.cfg \
|
|
||||||
oc2g/oc2gbts-mgr.cfg
|
|
||||||
EXTRA_DIST += $(doc_oc2g_DATA)
|
|
||||||
OSMOCONF_FILES += oc2g/osmo-bts-oc2g.cfg oc2g/oc2gbts-mgr.cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
osmoconfdir = $(sysconfdir)/osmocom
|
osmoconfdir = $(sysconfdir)/osmocom
|
||||||
osmoconf_DATA = $(OSMOCONF_FILES)
|
osmoconf_DATA = $(OSMOCONF_FILES)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
!
|
!
|
||||||
! OsmoBTS configuration example for CalypsoBTS
|
! OsmoBTS configuration example for CalypsoBTS
|
||||||
! https://osmocom.org/projects/baseband/wiki/CalypsoBTS
|
! http://osmocom.org/projects/baseband/wiki/CalypsoBTS
|
||||||
!!
|
!!
|
||||||
!
|
!
|
||||||
log stderr
|
log stderr
|
||||||
@@ -22,17 +22,17 @@ line vty
|
|||||||
!
|
!
|
||||||
phy 0
|
phy 0
|
||||||
instance 0
|
instance 0
|
||||||
|
osmotrx rx-gain 1
|
||||||
osmotrx ip local 127.0.0.1
|
osmotrx ip local 127.0.0.1
|
||||||
osmotrx ip remote 127.0.0.1
|
osmotrx ip remote 127.0.0.1
|
||||||
|
osmotrx timing-advance-loop
|
||||||
|
osmotrx ms-power-loop -65
|
||||||
osmotrx legacy-setbsic
|
osmotrx legacy-setbsic
|
||||||
osmotrx fn-advance 20
|
|
||||||
osmotrx rts-advance 5
|
|
||||||
bts 0
|
bts 0
|
||||||
oml remote-ip 127.0.0.1
|
oml remote-ip 127.0.0.1
|
||||||
ipa unit-id 6969 0
|
ipa unit-id 1801 0
|
||||||
gsmtap-sapi pdtch
|
gsmtap-sapi pdtch
|
||||||
gsmtap-sapi ccch
|
gsmtap-sapi ccch
|
||||||
band 900
|
band 900
|
||||||
trx 0
|
trx 0
|
||||||
phy 0 instance 0
|
phy 0 instance 0
|
||||||
nominal-tx-power 23
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ line vty
|
|||||||
!
|
!
|
||||||
phy 0
|
phy 0
|
||||||
instance 0
|
instance 0
|
||||||
|
osmotrx rx-gain 1
|
||||||
osmotrx ip local 127.0.0.1
|
osmotrx ip local 127.0.0.1
|
||||||
osmotrx ip remote 127.0.0.1
|
osmotrx ip remote 127.0.0.1
|
||||||
bts 0
|
bts 0
|
||||||
|
|||||||
151
doc/examples/virtual/openbsc-virtual.cfg
Normal file
151
doc/examples/virtual/openbsc-virtual.cfg
Normal 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
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
!!
|
!!
|
||||||
!
|
!
|
||||||
log stderr
|
log stderr
|
||||||
logging filter all 1
|
logging filter all 0
|
||||||
logging color 0
|
logging color 0
|
||||||
logging print category 1
|
logging print category 1
|
||||||
logging timestamp 0
|
logging timestamp 0
|
||||||
@@ -50,11 +50,12 @@ bts 0
|
|||||||
rtp jitter-buffer 100
|
rtp jitter-buffer 100
|
||||||
paging queue-size 200
|
paging queue-size 200
|
||||||
paging lifetime 0
|
paging lifetime 0
|
||||||
|
uplink-power-target -75
|
||||||
min-qual-rach 50
|
min-qual-rach 50
|
||||||
min-qual-norm -5
|
min-qual-norm -5
|
||||||
trx 0
|
trx 0
|
||||||
power-ramp max-initial 23000 mdBm
|
power-ramp max-initial 23000 mdBm
|
||||||
power-ramp step-size 2000 mdB
|
power-ramp step-size 2000 mdB
|
||||||
power-ramp step-interval 1
|
power-ramp step-interval 1
|
||||||
ms-power-control osmo
|
ms-power-control dsp
|
||||||
phy 0 instance 0
|
phy 0 instance 0
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ EXTRA_DIST = dtx.dot \
|
|||||||
osmobts-abis-docinfo.xml \
|
osmobts-abis-docinfo.xml \
|
||||||
osmobts-usermanual.adoc \
|
osmobts-usermanual.adoc \
|
||||||
osmobts-usermanual-docinfo.xml \
|
osmobts-usermanual-docinfo.xml \
|
||||||
|
osmobts-vty-reference.xml \
|
||||||
rtp-amr.adoc \
|
rtp-amr.adoc \
|
||||||
rtp-amr-docinfo.xml \
|
rtp-amr-docinfo.xml \
|
||||||
regen_doc.sh \
|
|
||||||
abis \
|
abis \
|
||||||
chapters \
|
chapters \
|
||||||
vty
|
vty
|
||||||
@@ -17,33 +17,8 @@ if BUILD_MANUALS
|
|||||||
osmobts-abis.pdf: $(srcdir)/abis/*.adoc $(srcdir)/abis/*.msc
|
osmobts-abis.pdf: $(srcdir)/abis/*.adoc $(srcdir)/abis/*.msc
|
||||||
rtp-amr.pdf: $(srcdir)/dtx.dot
|
rtp-amr.pdf: $(srcdir)/dtx.dot
|
||||||
|
|
||||||
# NOTE: osmo-bts-omldummy has no VTY interface
|
VTY_REFERENCE = osmobts-vty-reference.xml
|
||||||
VARIANTS = virtual
|
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
|
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -3,17 +3,16 @@
|
|||||||
=== List of Messages
|
=== List of Messages
|
||||||
|
|
||||||
The following tables list the OML messages used by OsmoBTS, grouped by their
|
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
|
level of compliance with 3GPP TS 12.21.
|
||||||
12.21).
|
|
||||||
|
|
||||||
==== Messages Compliant With TS 52.021
|
==== Messages Compliant With TS 12.21
|
||||||
|
|
||||||
Specific limitations apply, see the linked sections.
|
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%"]
|
[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:*
|
6+<| *SW Download Management Messages:*
|
||||||
| 8.3.7 | 0x10 | <<sw_act_rep>> | SW Activated Report | -> | Sent
|
| 8.3.7 | 0x10 | <<sw_act_rep>> | SW Activated Report | -> | Sent
|
||||||
6+<| *Air Interface Management Messages:*
|
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
|
.3+.| 8.9.2 | 0x74 .3+.| <<opstart>> | Opstart | <- | Received
|
||||||
| 0x75 | Opstart Ack | -> | Sent
|
| 0x75 | Opstart Ack | -> | Sent
|
||||||
| 0x76 | Opstart Nack | -> | 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
|
||||||
|
|
||||||
.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"]
|
||||||
[options="header",cols="20%,55%,5%,20%"]
|
[options="header",cols="20%,55%,5%,20%"]
|
||||||
|===
|
|===
|
||||||
@@ -54,10 +49,10 @@ Specific limitations apply, see the linked sections.
|
|||||||
|
|
||||||
|
|
||||||
==== Messages Not Implemented by OsmoBTS
|
==== 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%"]
|
[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+<| *SW Download Management Messages:*
|
||||||
.3+.| 8.3.1 | 0x01 | Load Data Initiate
|
.3+.| 8.3.1 | 0x01 | Load Data Initiate
|
||||||
| 0x02 | Load Data Initiate Ack
|
| 0x02 | Load Data Initiate Ack
|
||||||
@@ -141,6 +136,9 @@ Specific limitations apply, see the linked sections.
|
|||||||
| 8.10.3 | 0x8C | Stop Measurement
|
| 8.10.3 | 0x8C | Stop Measurement
|
||||||
| 8.10.4 | 0x8D | Start Measurement
|
| 8.10.4 | 0x8D | Start Measurement
|
||||||
3+<| *Other Messages:*
|
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
|
.3+.| 8.11.2 | 0x84 | Set Alarm Threshold
|
||||||
| 0x85 | Set Alarm Threshold Ack
|
| 0x85 | Set Alarm Threshold Ack
|
||||||
| 0x86 | Set Alarm Threshold Nack
|
| 0x86 | Set Alarm Threshold Nack
|
||||||
@@ -153,7 +151,7 @@ Specific limitations apply, see the linked sections.
|
|||||||
==== SW Activated Report
|
==== SW Activated Report
|
||||||
|
|
||||||
OsmoBTS will send an _SW Activated Report_ when RF has been activated
|
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
|
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
|
OsmoBTS will receive a _Set BTS Attributes_ message and reply with a
|
||||||
corresponding ACK message on success. IE handling is fully compliant to TS
|
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.
|
supported, and hence the _Starting Time_ IE is rejected.
|
||||||
|
|
||||||
._Set BTS Attributes_ IEs not handled by OsmoBTS
|
._Set BTS Attributes_ IEs not handled by OsmoBTS
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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)
|
| 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_attr]]
|
||||||
==== Set Radio Carrier Attributes
|
==== 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:
|
as frequency hopping is not supported by OsmoBTS:
|
||||||
|
|
||||||
._Set Radio Carrier Attributes_ IE limitations
|
._Set Radio Carrier Attributes_ IE limitations
|
||||||
[options="header",cols="10%,30%,60%"]
|
[options="header",cols="10%,30%,60%"]
|
||||||
|===
|
|===
|
||||||
| TS 52.021 § | IE Name | Handling
|
| TS 12.21 § | IE Name | Handling
|
||||||
| 9.4.5 | ARFCN List | ignored
|
| 9.4.5 | ARFCN List | ignored
|
||||||
|===
|
|===
|
||||||
|
|
||||||
@@ -193,14 +191,14 @@ as frequency hopping is not supported by OsmoBTS:
|
|||||||
[[set_chan_attr]]
|
[[set_chan_attr]]
|
||||||
==== Set Channel Attributes
|
==== Set Channel Attributes
|
||||||
|
|
||||||
This message conforms to 3GPP TS 52.021, with the following limitation: the
|
This message conforms to 3GPP TS 12.21, with the following limitation: the
|
||||||
following 3GPP TS 52.021 IEs provoke a NACK response when sent to OsmoBTS, as
|
following 3GPP TS 12.21 IEs provoke a NACK response when sent to OsmoBTS, as
|
||||||
frequency hopping is not supported:
|
frequency hopping is not supported:
|
||||||
|
|
||||||
._Set Channel Attributes_ IE limitations
|
._Set Channel Attributes_ IE limitations
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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.21 | HSN | not supported (provokes NACK cause 0x10)
|
||||||
| 9.4.27 | MAIO | 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)
|
| 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_rep]]
|
||||||
==== State Changed Event Report
|
==== 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:
|
OsmoBTS:
|
||||||
|
|
||||||
[options="header"]
|
[options="header"]
|
||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message Type (0xf5) | 3GPP TS 52.021 9.1 | M | V | 1
|
| Message Type (0xf5) | 3GPP TS 12.21 9.1 | M | V | 1
|
||||||
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
|
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
|
||||||
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
|
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
|
||||||
| Operational State | 3GPP TS 52.021 9.4.38 | O | TV | 2
|
| Operational State | 3GPP TS 12.21 9.4.38 | O | TV | 2
|
||||||
| Availability Status | 3GPP TS 52.021 9.4.7 | O | TL16V (with length of 1) | 3
|
| Availability Status | 3GPP TS 12.21 9.4.7 | O | TL16V (with length of 1) | 3
|
||||||
|===
|
|===
|
||||||
|
|
||||||
[[chg_adm_state]]
|
[[chg_adm_state]]
|
||||||
==== Change Administrative State
|
==== Change Administrative State
|
||||||
|
|
||||||
This message is compliant with 3GPP TS 52.021 § 8.8.5. It applies to all of the
|
This message is compliant with 3GPP TS 12.21 § 8.8.5. It applies to all of the
|
||||||
Object Classes defined in 3GPP TS 52.021 § 9.2 as well as
|
Object Classes defined in 3GPP TS 12.21 § 9.2 as well as
|
||||||
<<addnl_obj_classes>>.
|
<<addnl_obj_classes>>.
|
||||||
|
|
||||||
[[opstart]]
|
[[opstart]]
|
||||||
==== Opstart
|
==== Opstart
|
||||||
|
|
||||||
This message is compliant with 3GPP TS 52.021 § 8.9.2. It applies to all of the
|
This message is compliant with 3GPP TS 12.21 § 8.9.2. It applies to all of the
|
||||||
Object Classes defined in 3GPP TS 52.021 § 9.2 as well as
|
Object Classes defined in 3GPP TS 12.21 § 9.2 as well as
|
||||||
<<addnl_obj_classes>>.
|
<<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
|
=== 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%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message Type (0xf5) | 3GPP TS 52.021 9.1 | M | V | 1
|
| Message Type (0xf5) | 3GPP TS 12.21 9.1 | M | V | 1
|
||||||
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
|
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
|
||||||
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
|
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
|
||||||
5+<| _Object Class specific IEs follow, see <<addnl_obj_classes>>..._
|
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]]
|
[[addnl_obj_classes]]
|
||||||
=== Additional Object 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:
|
are supported:
|
||||||
|
|
||||||
.Additional Managed Object Classes
|
.Additional Managed Object Classes
|
||||||
@@ -306,9 +284,9 @@ with the following Information Elements:
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message Type | 3GPP TS 52.021 9.1 | M | V | 1
|
| Message Type | 3GPP TS 12.21 9.1 | M | V | 1
|
||||||
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
|
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
|
||||||
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
|
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
|
||||||
| GPRS NSEI | <<NM_ATT_IPACC_NSEI>> | O | TL16V | >= 5
|
| GPRS NSEI | <<NM_ATT_IPACC_NSEI>> | O | TL16V | >= 5
|
||||||
| GPRS NS Configuration | <<NM_ATT_IPACC_NS_LINK_CFG>> | O | TL16V | >= 10
|
| GPRS NS Configuration | <<NM_ATT_IPACC_NS_LINK_CFG>> | O | TL16V | >= 10
|
||||||
| GPRS BSSGP Configuration | <<NM_ATT_IPACC_BSSGP_CFG>> | O | TL16V | >= 14
|
| 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%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message Type | 3GPP TS 52.021 9.1 | M | V | 1
|
| Message Type | 3GPP TS 12.21 9.1 | M | V | 1
|
||||||
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
|
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
|
||||||
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
|
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
|
||||||
| GPRS Routing Area Code | <<NM_ATT_IPACC_RAC>> | O | TL16V | >= 4
|
| GPRS Routing Area Code | <<NM_ATT_IPACC_RAC>> | O | TL16V | >= 4
|
||||||
| GPRS Paging Configuration | <<NM_ATT_IPACC_GPRS_PAGING_CFG>> | O | TL16V | >= 5
|
| GPRS Paging Configuration | <<NM_ATT_IPACC_GPRS_PAGING_CFG>> | O | TL16V | >= 5
|
||||||
| GPRS RLC Configuration | <<NM_ATT_IPACC_RLC_CFG>> | O | TL16V | >= 12
|
| 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%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message Type | 3GPP TS 52.021 9.1 | M | V | 1
|
| Message Type | 3GPP TS 12.21 9.1 | M | V | 1
|
||||||
| Object Class | 3GPP TS 52.021 9.2 | M | V | 1
|
| Object Class | 3GPP TS 12.21 9.2 | M | V | 1
|
||||||
| Object Instance | 3GPP TS 52.021 9.3 | M | V | 3
|
| Object Instance | 3GPP TS 12.21 9.3 | M | V | 3
|
||||||
| GPRS NSVCI | <<NM_ATT_IPACC_NSVCI>> | O | TL16V | >= 5
|
| GPRS NSVCI | <<NM_ATT_IPACC_NSVCI>> | O | TL16V | >= 5
|
||||||
| GPRS NS Link Configuration | <<NM_ATT_IPACC_NS_LINK_CFG>> | O | TL16V | >= 11
|
| 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
|
=== Information Elements Overview
|
||||||
|
|
||||||
All of the IEs handled by OsmoBTS are listed below, with limitations and
|
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.
|
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
|
(<-) are in fact parsed and their values are stored by OsmoBTS, but these
|
||||||
stored items are currently not used in the OsmoBTS code base.
|
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%"]
|
[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_
|
| 0x00 | 9.4.1 | Abis Channel | | _ignored_
|
||||||
| 0x01 | 9.4.2 | Additional Info | | _ignored_
|
| 0x01 | 9.4.2 | Additional Info | | _ignored_
|
||||||
| 0x02 | 9.4.3 | Additional Text | | _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_
|
| 0x13 | 9.4.19 | File Version | | _ignored_
|
||||||
| 0x14 | 9.4.20 | GSM Time | | _ignored_
|
| 0x14 | 9.4.20 | GSM Time | | _ignored_
|
||||||
| 0x16 | 9.4.22 | HW Configuration | | _ignored_
|
| 0x16 | 9.4.22 | HW Configuration | | _ignored_
|
||||||
| 0x18 | 9.4.24 | Intave Parameter | <- |
|
| 0x18 | 9.4.24 | Intave Parameter | <- | _ignored_
|
||||||
| 0x19 | 9.4.25 | Interference level Boundaries | <- |
|
| 0x19 | 9.4.25 | Interference level Boundaries | <- | _ignored_
|
||||||
| 0x1a | 9.4.26 | List of Required Attributes | | _ignored_
|
| 0x1a | 9.4.26 | List of Required Attributes | | _ignored_
|
||||||
| 0x1c | 9.4.28 | Manufacturer Dependent State | | _ignored_
|
| 0x1c | 9.4.28 | Manufacturer Dependent State | | _ignored_
|
||||||
| 0x1d | 9.4.29 | Manufacturer Dependent Thresholds | | _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_
|
| 0x38 | 9.4.58 | VSWR Thresholds | | _ignored_
|
||||||
| 0x39 | 9.4.59 | Window Size | | _ignored_
|
| 0x39 | 9.4.59 | Window Size | | _ignored_
|
||||||
| 0x40 | 9.4.60 | TSC | <- | Received, with limitations: see <<NM_ATT_TSC>>
|
| 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_
|
| 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_
|
| 0x45 | 9.4.65 | Outstanding Alarm Sequence | | _ignored_
|
||||||
| 0x46 | 9.4.66 | HW Conf Change Info | | _ignored_
|
| 0x46 | 9.4.66 | HW Conf Change Info | | _ignored_
|
||||||
| 0x47 | 9.4.32 | Measurement Result | | _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%"]
|
[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
|
| 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>>
|
| 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
|
| 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
|
==== Additional Attributes and Parameters
|
||||||
|
|
||||||
The following Information Elements are defined in addition to those
|
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.
|
All of these additional IEs are _received_ by OsmoBTS.
|
||||||
|
|
||||||
These attributes are not used by OsmoBTS, but
|
These attributes are not used by OsmoBTS, but
|
||||||
simply passed to OsmoPCU connected to the PCU socket.
|
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%"]
|
[options="header",cols="5%,50%,45%"]
|
||||||
|===
|
|===
|
||||||
| tag (hex) | IE name | Description
|
| tag (hex) | IE name | Description
|
||||||
@@ -487,7 +465,7 @@ simply passed to OsmoPCU connected to the PCU socket.
|
|||||||
[[ie_hw_desc]]
|
[[ie_hw_desc]]
|
||||||
==== HW Description
|
==== 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
|
Instead, OsmoBTS interprets it as a single TL16V. The value of this IE is
|
||||||
ignored by OsmoBTS, yet the coding may affect message parsing.
|
ignored by OsmoBTS, yet the coding may affect message parsing.
|
||||||
|
|
||||||
@@ -509,7 +487,7 @@ exactly one ARFCN.
|
|||||||
[[ie_chan_comb]]
|
[[ie_chan_comb]]
|
||||||
==== Additional Channel Combinations
|
==== 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:
|
combinations are supported:
|
||||||
|
|
||||||
.Additional Channel Combinations
|
.Additional Channel Combinations
|
||||||
@@ -535,7 +513,7 @@ work, please see the <<rsl-dynamic-channels>>.
|
|||||||
[[ie_conn_fail_crit]]
|
[[ie_conn_fail_crit]]
|
||||||
==== Connection Failure Criterion
|
==== 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
|
_Connection Failure Criterion_. OsmoBTS only implements the option
|
||||||
coded as 0x01, i.e. based upon uplink SACCH error rate
|
coded as 0x01, i.e. based upon uplink SACCH error rate
|
||||||
(RADIO_LINK_TIMEOUT).
|
(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,
|
Due to limitations in the currently supported PHY implementations,
|
||||||
OsmoBTS supports only one global TSC for all channels on one TRX, rather
|
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]]
|
[[NM_ATT_IPACC_DST_IP]]
|
||||||
@@ -805,91 +783,10 @@ It is encoded as follows:
|
|||||||
This attribute is not used by OsmoBTS, but
|
This attribute is not used by OsmoBTS, but
|
||||||
simply passed to OsmoPCU connected to the PCU socket.
|
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
|
=== A-bis OML Initialization / BTS bring-up
|
||||||
|
|
||||||
At the time an Abis/IP BTS connects to via OML to the BSC, it is
|
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.
|
amended by this document.
|
||||||
|
|
||||||
Each Managed Object (MO) is separately initialized. The initialization
|
Each Managed Object (MO) is separately initialized. The initialization
|
||||||
|
|||||||
@@ -3,16 +3,16 @@
|
|||||||
=== List of Messages
|
=== List of Messages
|
||||||
|
|
||||||
The following tables list the RSL messages used by OsmoBTS A-bis/IP,
|
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.
|
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%"]
|
[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*
|
5+<| *Radio link layer management messages*
|
||||||
| 8.3.1 | - | DATA REQUEST | <- | Received
|
| 8.3.1 | - | DATA REQUEST | <- | Received
|
||||||
| 8.3.2 | - | DATA INDICATION | -> | Sent
|
| 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.11 | - | MODE MODIFY NEGATIVE ACKNOWLEDGE | -> | Sent
|
||||||
| 8.4.14 | - | RF CHANNEL RELEASE | <- | Received
|
| 8.4.14 | - | RF CHANNEL RELEASE | <- | Received
|
||||||
| 8.4.15 | <<MS_POWER_CONTROL>> | MS POWER CONTROL | <- | 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.19 | - | RF CHANNEL RELEASE ACKNOWLEDGE | -> | Sent
|
||||||
| 8.4.20 | <<SACCH_INFO_MODIFY>> | SACCH INFO MODIFY | <- | Received
|
| 8.4.20 | <<SACCH_INFO_MODIFY>> | SACCH INFO MODIFY | <- | Received
|
||||||
5+<| *COMMON CHANNEL MANAGEMENT MESSAGES*
|
5+<| *COMMON CHANNEL MANAGEMENT MESSAGES*
|
||||||
| 8.5.1 | <<BCCH_INFORMATION>> | BCCH INFORMATION | <- | Received
|
| 8.5.1 | <<BCCH_INFORMATION>> | BCCH INFORMATION | <- | Received
|
||||||
| 8.5.2 | - | CCCH LOAD INDICATION | -> | Sent
|
| 8.5.2 | - | CCCH LOAD INDICATION | -> | Sent
|
||||||
| 8.5.3 | <<CHANNEL_REQUIRED>> | CHANNEL REQUIRED | -> | 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.5 | <<PAGING_COMMAND>> | PAGING COMMAND | <- | Received
|
||||||
| 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received
|
| 8.5.6 | - | IMMEDIATE ASSIGN COMMAND | <- | Received
|
||||||
| 8.5.8 | - | SMS BROADCAST COMMAND | <- | Received
|
| 8.5.8 | <<SMS_BROADCAST_COMMAND>> | SMS BROADCAST COMMAND | <- | Received
|
||||||
| 8.5.9 | - | CBCH LOAD INDICATION | -> | Sent
|
|
||||||
5+<| *TRX MANAGEMENT MESSAGES*
|
5+<| *TRX MANAGEMENT MESSAGES*
|
||||||
| 8.6.1 | <<RF_RESOURCE_INDICATION>> | RF RESOURCE INDICATION | -> | Sent
|
| 8.6.1 | <<RF_RESOURCE_INDICATION>> | RF RESOURCE INDICATION | -> | Sent
|
||||||
| 8.6.2 | <<SACCH_FILLING>> | SACCH FILLING | <- | Received
|
| 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
|
||||||
|
|
||||||
.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%"]
|
[options="header",cols="15%,15%,45%,5%,20%"]
|
||||||
|===
|
|===
|
||||||
2+| This document § | Message | <-/-> | Received/Sent by OsmoBTS
|
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
|
.3+.| <<pdch_deact>> | <<rsl_pdch_deact>> | RSL PDCH Deactivation | <- | Received
|
||||||
| <<rsl_pdch_deact_ack>> | RSL PDCH Deactivation ACK | -> | Sent
|
| <<rsl_pdch_deact_ack>> | RSL PDCH Deactivation ACK | -> | Sent
|
||||||
| <<rsl_pdch_deact_nack>> | RSL PDCH Deactivation NACK | -> | 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
|
==== 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%"]
|
[options="header",cols="10%,90%"]
|
||||||
|===
|
|===
|
||||||
| TS 48.058 § | Message
|
| TS 08.58 § | Message
|
||||||
2+<| *DEDICATED CHANNEL MANAGEMENT MESSAGES*
|
2+<| *DEDICATED CHANNEL MANAGEMENT MESSAGES*
|
||||||
| 8.4.12 | PHYSICAL CONTEXT REQUEST
|
| 8.4.12 | PHYSICAL CONTEXT REQUEST
|
||||||
| 8.4.13 | PHYSICAL CONTEXT CONFIRM
|
| 8.4.13 | PHYSICAL CONTEXT CONFIRM
|
||||||
|
| 8.4.16 | BS POWER CONTROL
|
||||||
| 8.4.17 | PREPROCESS CONFIGURE
|
| 8.4.17 | PREPROCESS CONFIGURE
|
||||||
| 8.4.18 | PREPROCESSED MEASUREMENT RESULT
|
| 8.4.18 | PREPROCESSED MEASUREMENT RESULT
|
||||||
| 8.4.21 | TALKER DETECTION
|
| 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.30 | TFO REPORT
|
||||||
| 8.4.31 | TFO MODIFICATION REQUEST
|
| 8.4.31 | TFO MODIFICATION REQUEST
|
||||||
2+<| *COMMON CHANNEL MANAGEMENT MESSAGES*
|
2+<| *COMMON CHANNEL MANAGEMENT MESSAGES*
|
||||||
|
| 8.5.4 | DELETE INDICATION
|
||||||
| 8.5.7 | SMS BROADCAST REQUEST
|
| 8.5.7 | SMS BROADCAST REQUEST
|
||||||
|
| 8.5.9 | CBCH LOAD INDICATION
|
||||||
| 8.5.10 | NOTIFICATION COMMAND
|
| 8.5.10 | NOTIFICATION COMMAND
|
||||||
2+<| *TRX MANAGEMENT MESSAGES*
|
2+<| *TRX MANAGEMENT MESSAGES*
|
||||||
| 8.6.3 | OVERLOAD
|
| 8.6.3 | OVERLOAD
|
||||||
@@ -123,7 +121,7 @@ Specific additions and limitations apply, see the linked sections.
|
|||||||
==== Channel Activation
|
==== Channel Activation
|
||||||
|
|
||||||
When used on a timeslot using the non-standard channel combination
|
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
|
RSL channel activation procedures can not only be used for activation
|
||||||
of circuit-switched channels, but also for activation of a PDCH.
|
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]]
|
||||||
==== 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
|
._Measurement Result_ IE limitations
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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
|
| 9.3.37 | MS Timing Offset | never sent by OsmoBTS
|
||||||
|===
|
|===
|
||||||
|
|
||||||
[[MODE_MODIFY]]
|
[[MODE_MODIFY]]
|
||||||
==== 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
|
._Mode Modify_ IE limitations
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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.45 | Main channel reference | _ignored_
|
||||||
| 9.3.53 | MultiRate Control | _ignored_
|
| 9.3.53 | MultiRate Control | _ignored_
|
||||||
| 9.3.54 | Supported Codec Types | _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]]
|
||||||
==== 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
|
._MS Power Control_ IE limitations
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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_
|
| 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]]
|
||||||
==== 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
|
._SACCH Info Modify_ IE limitations
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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.30 | System Info Type | See below for available types
|
||||||
| 9.3.23 | Starting Time | not supported, provokes an _Error Report_ response
|
| 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
|
| 0x06 | RSL_SYSTEM_INFO_6
|
||||||
| 0x0d | RSL_SYSTEM_INFO_5bis
|
| 0x0d | RSL_SYSTEM_INFO_5bis
|
||||||
| 0x0e | RSL_SYSTEM_INFO_5ter
|
| 0x0e | RSL_SYSTEM_INFO_5ter
|
||||||
| 0x0f | RSL_SYSTEM_INFO_10
|
|
||||||
| 0x47 | RSL_EXT_MEAS_ORDER
|
| 0x47 | RSL_EXT_MEAS_ORDER
|
||||||
| 0x48 | RSL_MEAS_INFO
|
| 0x48 | RSL_MEAS_INFO
|
||||||
|===
|
|===
|
||||||
@@ -200,12 +197,12 @@ Conforms to 3GPP TS 48.058 § 8.4.20, with these exceptions:
|
|||||||
[[BCCH_INFORMATION]]
|
[[BCCH_INFORMATION]]
|
||||||
==== 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
|
._BCCH Information_ IE details
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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.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.
|
| 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_.
|
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]]
|
||||||
==== 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
|
._Channel Required_ message IE details
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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
|
| 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]]
|
||||||
==== 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
|
._Paging Command_ message IE details
|
||||||
[options="header",cols="10%,30%,60%"]
|
[options="header",cols="10%,30%,60%"]
|
||||||
|===
|
|===
|
||||||
| TS 48.058 § | IE Name | Handling
|
| TS 08.58 § | IE Name | Handling
|
||||||
| 9.3.49 | eMLPP Priority | _ignored_
|
| 9.3.49 | eMLPP Priority | _ignored_
|
||||||
|===
|
|===
|
||||||
|
|
||||||
NOTE: If adding the identity to the paging queue fails, the BSC is not notified
|
NOTE: If adding the identity to the paging queue fails, the BSC is not notified
|
||||||
in any way.
|
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]]
|
||||||
==== RF Resource Indication
|
==== RF Resource Indication
|
||||||
|
|
||||||
For all osmo-bts variants, except osmo-bts-trx, this message does not conform
|
This message does not conform to 3GPP TS 08.58 § 8.6.1, in that it omits the
|
||||||
to 3GPP TS 48.058 § 8.6.1, in that it omits the _Resource Information_ IE that
|
_Resource Information_ IE that would contain the actual payload data, which
|
||||||
would contain the actual payload data, which renders this message void.
|
renders this message void.
|
||||||
|
|
||||||
._RF Resource Indication_ message IE exceptions
|
._RF Resource Indication_ message IE exceptions
|
||||||
[options="header",cols="10%,30%,60%"]
|
[options="header",cols="10%,30%,60%"]
|
||||||
|===
|
|===
|
||||||
| TS 48.058 § | IE Name | Handling
|
| TS 08.58 § | IE Name | Handling
|
||||||
| 9.3.21 | Resource Information | DSP based osmo-bts variants omit this IE, though
|
| 9.3.21 | Resource Information | OsmoBTS omits this IE, though TS 08.58
|
||||||
TS 48.058 specifies it as mandatory.
|
specifies it as mandatory.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
|
||||||
[[SACCH_FILLING]]
|
[[SACCH_FILLING]]
|
||||||
==== 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
|
._SACCH Filling_ message IE limitations
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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.30 | System Info Type | See <<SACCH_INFO_MODIFY>> for available types
|
||||||
| 9.3.23 | Starting Time | _ignored_
|
| 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
|
=== User Plane Transport Management
|
||||||
|
|
||||||
This chapter defines the A-bis/IP specific RSL procedures that are
|
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
|
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
|
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
|
In the classic data model established by ETSI/3GPP for A-bis, each
|
||||||
timeslot (channel) is configured using a static channel combination by
|
timeslot (channel) is configured using a static channel combination by
|
||||||
means of A-bis OML. Particularly in presence of GPRS services, this
|
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.
|
resources.
|
||||||
|
|
||||||
As such, several methods have been implemented to overcome this
|
As such, several methods have been implemented to overcome this
|
||||||
@@ -418,16 +427,16 @@ include::dyn_ts_ipa_style2.msc[]
|
|||||||
==== Osmocom Style Dynamic Channels
|
==== Osmocom Style Dynamic Channels
|
||||||
|
|
||||||
This method is in use when OML uses
|
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'
|
The activation of PDCH is performed by using the regular 'RSL CHANNEL ACTIVATE'
|
||||||
procedure according to <<CHANNEL_ACTIVATION>>, with these modifications:
|
procedure according to <<CHANNEL_ACTIVATION>>, with these modifications:
|
||||||
|
|
||||||
* The 'C-bits' part of the 'Channel Number' IE take the non-standard binary
|
* 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
|
* 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
|
value 1111, with an additional fourth bit (add A4 to A3 thru A1 as seen in
|
||||||
3GPP TS 48.058 § 9.3.3; all remaining reserved bits as well as the 'R' bit are
|
3GPP TS 08.58 § 9.3.3; all remaining reserved bits as well as the 'R' bit are
|
||||||
coded as zero).
|
coded as zero).
|
||||||
* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs
|
* The normally mandatory 'Channel Mode' IE is omitted; none of the optional IEs
|
||||||
are included.
|
are included.
|
||||||
@@ -437,7 +446,7 @@ Hence the message consists of exactly these IEs:
|
|||||||
.PDCH type _Channel Activation_ message IEs
|
.PDCH type _Channel Activation_ message IEs
|
||||||
[options="header",cols="10%,30%,60%"]
|
[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.1 | Message discriminator | Dedicated Channel Management
|
||||||
| 9.2 | Message type | CHANnel ACTIVation
|
| 9.2 | Message type | CHANnel ACTIVation
|
||||||
| 9.3.1 | Channel number | 'C-bits' 11000, plus TS bits as usual
|
| 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[]
|
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
|
=== Message Formats and Contents
|
||||||
|
|
||||||
[[rsl_crcx_msg]]
|
[[rsl_crcx_msg]]
|
||||||
@@ -510,14 +480,13 @@ number*.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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 Address | <<RSL_IE_IPAC_REMOTE_IP>> | O | TV | 5
|
||||||
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
|
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
|
||||||
| IP Speech Mode | <<RSL_IE_IPAC_SPEECH_MODE>> | O | TV | 2
|
| IP Speech Mode | <<RSL_IE_IPAC_SPEECH_MODE>> | O | TV | 2
|
||||||
| RTP Payload Type 2 | <<RSL_IE_IPAC_RTP_PAYLOAD2>> | 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]]
|
[[rsl_crcx_msg_ack]]
|
||||||
@@ -531,9 +500,9 @@ in response to the *Create Connection (CRCX)*.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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_ID>> | M | TV | 3
|
||||||
| Source IP Address | <<RSL_IE_IPAC_LOCAL_IP>> | O | TV | 5
|
| Source IP Address | <<RSL_IE_IPAC_LOCAL_IP>> | O | TV | 5
|
||||||
| Source IP Port | <<RSL_IE_IPAC_LOCAL_PORT>> | O | TV | 3
|
| Source IP Port | <<RSL_IE_IPAC_LOCAL_PORT>> | O | TV | 3
|
||||||
@@ -551,12 +520,12 @@ sent in response to the *Create Connection (CRCX)*.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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 Address | <<RSL_IE_IPAC_REMOTE_IP>> | O | TV | 5
|
||||||
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
|
| 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
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
|
||||||
@@ -570,15 +539,14 @@ properties of a user-plane RTP connection.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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 Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
|
||||||
| Destination IP Address | <<RSL_IE_IPAC_REMOTE_IP>> | O | TV | 5
|
| Destination IP Address | <<RSL_IE_IPAC_REMOTE_IP>> | O | TV | 5
|
||||||
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
|
| Destination IP Port | <<RSL_IE_IPAC_REMOTE_PORT>> | O | TV | 3
|
||||||
| IP Speech Mode | <<RSL_IE_IPAC_SPEECH_MODE>> | O | TV | 2
|
| IP Speech Mode | <<RSL_IE_IPAC_SPEECH_MODE>> | O | TV | 2
|
||||||
| RTP Payload Type 2 | <<RSL_IE_IPAC_RTP_PAYLOAD2>> | 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]]
|
[[rsl_mdcx_msg_ack]]
|
||||||
@@ -592,9 +560,9 @@ response to a *Modify Connection (MDCX)*
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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 Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
|
||||||
| Source IP Address | <<RSL_IE_IPAC_LOCAL_IP>> | C | TV | 5
|
| Source IP Address | <<RSL_IE_IPAC_LOCAL_IP>> | C | TV | 5
|
||||||
| Source IP Port | <<RSL_IE_IPAC_LOCAL_PORT>> | C | TV | 3
|
| Source IP Port | <<RSL_IE_IPAC_LOCAL_PORT>> | C | TV | 3
|
||||||
@@ -613,10 +581,10 @@ Connection (MDCX)*.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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
|
||||||
| Cause | 48.058 9.3.26 | M | TLV | >= 3
|
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|
||||||
|===
|
|===
|
||||||
|
|
||||||
[[rsl_dlcx_ind_msg]]
|
[[rsl_dlcx_ind_msg]]
|
||||||
@@ -630,12 +598,12 @@ time of RF Channel release.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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_ID>> | M | TV | 3
|
||||||
| Connection Id | <<RSL_IE_IPAC_CONN_STAT>> | 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]]
|
[[rsl_dlcx_msg]]
|
||||||
@@ -649,9 +617,9 @@ number.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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 Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
|
||||||
|===
|
|===
|
||||||
|
|
||||||
@@ -667,9 +635,9 @@ Channel number. It is sent in response to the *Delete Connection
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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 Id | <<RSL_IE_IPAC_CONN_ID>> | O | TV | 3
|
||||||
| Connection Statistics | <<RSL_IE_IPAC_CONN_STAT>> | C | TV | 29
|
| Connection Statistics | <<RSL_IE_IPAC_CONN_STAT>> | C | TV | 29
|
||||||
|===
|
|===
|
||||||
@@ -686,11 +654,11 @@ Channel number. It is sent in response to the *Delete Connection
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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 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]]
|
[[rsl_pdch_act]]
|
||||||
@@ -703,9 +671,9 @@ a IPA style dynamic TCH/F+PDCH channel.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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
|
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
||||||
@@ -720,10 +688,10 @@ of a PDCH on a IPA style dynamic TCH/F+PDCH channel.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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
|
||||||
| Frame Number | 48.058 9.3.8 | O | TV | 3
|
| Frame Number | 08.58 9.3.8 | O | TV | 3
|
||||||
|===
|
|===
|
||||||
|
|
||||||
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
||||||
@@ -738,10 +706,10 @@ of a PDCH on a IPA style dynamic TCH/F+PDCH channel.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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
|
||||||
| Cause | 48.058 9.3.26 | M | TLV | >= 3
|
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|
||||||
|===
|
|===
|
||||||
|
|
||||||
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
||||||
@@ -756,9 +724,9 @@ on a IPA style dynamic TCH/F+PDCH channel.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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
|
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
||||||
@@ -773,9 +741,9 @@ of a PDCH on a IPA style dynamic TCH/F+PDCH channel.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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
|
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
||||||
@@ -790,47 +758,21 @@ on a IPA style dynamic TCH/F+PDCH channel.
|
|||||||
[cols="30%,25%,15%,15%,15%"]
|
[cols="30%,25%,15%,15%,15%"]
|
||||||
|===
|
|===
|
||||||
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
| INFORMATION ELEMENT | REFERENCE | PRESENCE | FORMAT | LENGTH
|
||||||
| Message discriminator | 48.058 9.1 | M | V | 1
|
| Message discriminator | 08.58 9.1 | M | V | 1
|
||||||
| Message type | <<own_msg_types>> | 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
|
||||||
| Cause | 48.058 9.3.26 | M | TLV | >= 3
|
| Cause | 08.58 9.3.26 | M | TLV | >= 3
|
||||||
|===
|
|===
|
||||||
|
|
||||||
NOTE:: This message is *not* used by Osmocom style dynamic channels
|
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
|
=== Information Element Codings
|
||||||
|
|
||||||
[[own_msg_types]]
|
[[own_msg_types]]
|
||||||
==== A-bis/IP specific RSL Message discriminators
|
==== A-bis/IP specific RSL Message discriminators
|
||||||
|
|
||||||
The following message discriminators are used in addition to those
|
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
|
.OsmoBTS specific new message discriminators
|
||||||
[options="header",cols="10%,50%,40%"]
|
[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>>
|
| 0x77 | Delete Connection (DLCX) | <<rsl_dlcx_msg>>
|
||||||
| 0x78 | Delete Connection (DLCX) ACK | <<rsl_dlcx_msg_ack>>
|
| 0x78 | Delete Connection (DLCX) ACK | <<rsl_dlcx_msg_ack>>
|
||||||
| 0x79 | Delete Connection (DLCX) NACK | <<rsl_dlcx_msg_nack>>
|
| 0x79 | Delete Connection (DLCX) NACK | <<rsl_dlcx_msg_nack>>
|
||||||
| 0x7f | Osmocom ETWS Command | <<OSMO_ETWS_CMD>>
|
|
||||||
| 0x48 | PDCH Activate | <<rsl_pdch_act>>
|
| 0x48 | PDCH Activate | <<rsl_pdch_act>>
|
||||||
| 0x49 | PDCH Activate ACK | <<rsl_pdch_act_ack>>
|
| 0x49 | PDCH Activate ACK | <<rsl_pdch_act_ack>>
|
||||||
| 0x4a | PDCH Activate NACK | <<rsl_pdch_act_nack>>
|
| 0x4a | PDCH Activate NACK | <<rsl_pdch_act_nack>>
|
||||||
@@ -858,15 +799,13 @@ indicated in 3GPP TS 48.058 Section 9.1:
|
|||||||
==== A-bis/IP specific RSL IEIs
|
==== A-bis/IP specific RSL IEIs
|
||||||
|
|
||||||
The following Information Element Identifiers (IEIs) are used in
|
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
|
.A-bis/IP specific information elements
|
||||||
[options="header",cols="10%,50%,40%"]
|
[options="header",cols="10%,50%,40%"]
|
||||||
|===
|
|===
|
||||||
| IEI | Name | This document §
|
| IEI | Name | This document §
|
||||||
| 0x01 | RSL_IE_CHAN_NR | <<RSL_IE_CHAN_NR>>
|
| 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>>
|
|
||||||
| 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>>
|
| 0xf1 | RSL_IE_IPAC_REMOTE_PORT | <<RSL_IE_IPAC_REMOTE_PORT>>
|
||||||
| 0xf3 | RSL_IE_IPAC_LOCAL_PORT | <<RSL_IE_IPAC_LOCAL_PORT>>
|
| 0xf3 | RSL_IE_IPAC_LOCAL_PORT | <<RSL_IE_IPAC_LOCAL_PORT>>
|
||||||
@@ -874,36 +813,23 @@ addition to those indicated in 3GPP TS 48.058 Section 9.3:
|
|||||||
| 0xf5 | RSL_IE_IPAC_LOCAL_IP | <<RSL_IE_IPAC_LOCAL_IP>>
|
| 0xf5 | RSL_IE_IPAC_LOCAL_IP | <<RSL_IE_IPAC_LOCAL_IP>>
|
||||||
| 0xf6 | RSL_IE_IPAC_CONN_STAT | <<RSL_IE_IPAC_CONN_STAT>>
|
| 0xf6 | RSL_IE_IPAC_CONN_STAT | <<RSL_IE_IPAC_CONN_STAT>>
|
||||||
| 0xf8 | RSL_IE_IPAC_CONN_ID | <<RSL_IE_IPAC_CONN_ID>>
|
| 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>>
|
| 0xfc | RSL_IE_IPAC_RTP_PAYLOAD2 | <<RSL_IE_IPAC_RTP_PAYLOAD2>>
|
||||||
|===
|
|===
|
||||||
|
|
||||||
[[RSL_IE_CHAN_NR]]
|
[[RSL_IE_CHAN_NR]]
|
||||||
==== RSL_IE_CHAN_NR
|
==== RSL_IE_CHAN_NR
|
||||||
|
|
||||||
This information element is coded as described in 3GPP TS 48.058 Section 9.3.1,
|
This information element is coded like 3GPP TS 08.58 Section 9.3.1,
|
||||||
but in addition supports the following vendor specific values:
|
but in addition supports the following extended coding:
|
||||||
|
|
||||||
.RSL Channel Number extensions
|
* C5..C1 bits 0b11000 for PDCH type channels
|
||||||
[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.
|
|
||||||
|
|
||||||
The TN-Bits are not re-defined in this case but use the same encoding
|
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]]
|
||||||
==== RSL_IE_IPAC_REMOTE_IP
|
==== RSL_IE_IPAC_REMOTE_IP
|
||||||
@@ -957,8 +883,8 @@ IEI followed by four bytes IPv4 address.
|
|||||||
|
|
||||||
This information element contains statistics about the RTP connection.
|
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
|
It is encoded as 29 bytes, with the first byte as IEI and 28 bytes
|
||||||
(=28), and 28 bytes fixed-length payload encoded as follows:
|
fixed-length payload encoded as follows:
|
||||||
|
|
||||||
.A-bis/IP Connection Statistics
|
.A-bis/IP Connection Statistics
|
||||||
[options="header",width="60%",cols="15%,15%,70%"]
|
[options="header",width="60%",cols="15%,15%,70%"]
|
||||||
@@ -991,137 +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
|
used in the PT (Payload Type) field of the RTP header in subsequent
|
||||||
transmissions of the RTP flow.
|
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_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
|
=== A-bis RSL Initialization / BTS bring-up
|
||||||
|
|
||||||
Upon receiving the 'IPA RSL CONNECT' OML message by the respective
|
Upon receiving the 'IPA RSL CONNECT' OML message by the respective
|
||||||
@@ -1146,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>>.
|
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
|
Since the secondary TRX has no BCCH, it does not (need to) receive any 'RSL
|
||||||
BCCH INFORMATION' messages from the BSC.
|
BCCH INFORMATION' messages from the BSC.
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
| bts-specific | bts_model_phy_instance_set_defaults() | Called for every PHY Instance created
|
||||||
| common | bts_controlif_setup() | Initialization of Control Interface
|
| common | bts_controlif_setup() | Initialization of Control Interface
|
||||||
| bts-specific | bts_model_ctrl_cmds_install() | Install model-specific control interface commands
|
| 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 | pcu_sock_init() | Initialization of PCU socket
|
||||||
| common | main() | Installation of signal handlers
|
| common | main() | Installation of signal handlers
|
||||||
| common | abis_open() | Start of the A-bis connection to BSC
|
| common | abis_open() | Start of the A-bis connection to BSC
|
||||||
| common | phy_links_open() | Iterate over list of configured PHY links
|
| 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_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 | osmo_daemonize() | Fork as daemon in background (if configured)
|
||||||
| common | bts_main() | Run main loop until global variable quit >= 2
|
| common | bts_main() | Run main loop until global variable quit >= 2
|
||||||
|===
|
|===
|
||||||
|
|||||||
@@ -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
|
Set the number of frames to be transmitted to transceiver in advance of
|
||||||
current GSM frame number.
|
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>`
|
===== `osmotrx rts-advance <0-30>`
|
||||||
|
|
||||||
Set the number of frames to be requested from L1SAP in advance of current
|
Set the number of frames to be requested from PCU in advance of current
|
||||||
frame number and fn-advance.
|
frame number. Do not change this unless you have a good reason!
|
||||||
|
|
||||||
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!
|
|
||||||
|
|
||||||
===== `osmotrx rx-gain <0-50>`
|
===== `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
|
as in the GSM network architecture provides almost all relevant
|
||||||
configuration to the BTS from the BSC.
|
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`
|
code: `doc/examples/virtual/osmobts-virtual.cfg`
|
||||||
|
|
||||||
For more information see
|
For more information see
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ OsmoBTS software.
|
|||||||
|
|
||||||
=== Command Line Options
|
=== 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
|
`osmo-bts-octphy`, `osmo-bts-litecell15`, ...) share the following
|
||||||
generic command line options:
|
generic command line options:
|
||||||
|
|
||||||
==== SYNOPSIS
|
==== 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
|
==== OPTIONS
|
||||||
*-h, --help*::
|
*-h, --help*::
|
||||||
@@ -48,6 +48,16 @@ generic command line options:
|
|||||||
Set the global log level for logging to stderr. This has mostly
|
Set the global log level for logging to stderr. This has mostly
|
||||||
been deprecated by VTY based logging configuration, see
|
been deprecated by VTY based logging configuration, see
|
||||||
<<logging>> for further information.
|
<<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
|
There may be additional, hardware specific command line options by the
|
||||||
different bts_model implementations.
|
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
|
*tcpdump* or *tshark* for further analysis by the *wireshark* protocol
|
||||||
analyzer.
|
analyzer.
|
||||||
|
|
||||||
In order to activate this feature, you first need to make sure to specify
|
In order to activate this feature, you first need to make sure to start
|
||||||
the remote address of _GSMTAP_ host in the configuration file. In most
|
OsmoBTS using the `-i` or `--gsmtap-ip` command line option, specifying
|
||||||
cases, using 127.0.0.1 for passing the messages over the loopback (`lo`)
|
the destination IP address for the GSMTAP messages. In most cases,
|
||||||
device will be sufficient:
|
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.
|
|
||||||
|
|
||||||
OsmoBTS can selectively trace such messages by their L1 SAPI, for both
|
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
|
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> enable
|
||||||
OsmoBTS# configure terminal
|
OsmoBTS# configure terminal
|
||||||
OsmoBTS(config)# bts 0
|
OsmoBTS(config)# bts 0
|
||||||
OsmoBTS(bts)# gsmtap-sapi sdcch
|
OsmoBTS(bts)# trx 0
|
||||||
|
OsmoBTS(trx)# gsmtap-sapi sdcch
|
||||||
OsmoBTS(trx)# write <1>
|
OsmoBTS(trx)# write <1>
|
||||||
----
|
----
|
||||||
<1> the `write` command will make the configuration persistent in the
|
<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.
|
only in the current session of OsmoBTS.
|
||||||
|
|
||||||
De-activation can be performed similarly by using the `no gsmtap-sapi
|
De-activation can be performed similarly by using the `no gsmtap-sapi
|
||||||
sdcch` command at the `bts` node of the OsmoBTS VTY.
|
sdcch` command at the `trx` 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
|
|
||||||
|
|
||||||
From the moment they are enabled via VTY, GSMTAP messages will be
|
From the moment they are enabled via VTY, GSMTAP messages will be
|
||||||
generated and sent in UDP encapsulation to the IANA-registered UDP port
|
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
|
==== Configuring power ramping
|
||||||
|
|
||||||
OsmoBTS can ramp up the power of its trx over time. This helps reduce
|
OsmoBTS can ramp up the power of its trx over time. This helps reduce
|
||||||
cell congestion in busy environments.
|
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
|
In this example, the trx starts with 5dBm output power which increases by 1dB
|
||||||
every two seconds until it reaches nominal power.
|
every two seconds until it reaches nominal power.
|
||||||
Power ramping can use the power-ramp commands at the CONFIG TRX node of the
|
Power ramping can use the power-ramp commands at the CONFIG TRX node of the
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
[[counters]]
|
|
||||||
== Counters
|
|
||||||
|
|
||||||
include::./counters_generated.adoc[]
|
|
||||||
@@ -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
|
|
||||||
@@ -43,7 +43,7 @@ See <<vty>> for further information.
|
|||||||
|
|
||||||
=== OsmoBTS Control Interface
|
=== 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>>.
|
<<common-control-if>>.
|
||||||
|
|
||||||
The number of control interface commands/attributes is currently quite
|
The number of control interface commands/attributes is currently quite
|
||||||
|
|||||||
@@ -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.
|
|
||||||
@@ -38,7 +38,7 @@ Typical configurations either use OsmoBTS with OsmoBSC, or with
|
|||||||
OsmoNITB, as can be seen in the following figures.
|
OsmoNITB, as can be seen in the following figures.
|
||||||
|
|
||||||
[[fig-gsm-classic]]
|
[[fig-gsm-classic]]
|
||||||
.Classic GSM architecture using OsmoBTS with OsmoBTS components
|
.Classic GSM archtiecture using OsmoBTS with OsmoBTS components
|
||||||
[graphviz]
|
[graphviz]
|
||||||
----
|
----
|
||||||
digraph G {
|
digraph G {
|
||||||
|
|||||||
@@ -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.
|
|
||||||
@@ -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>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
@@ -25,7 +61,7 @@
|
|||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2015-2021</year>
|
<year>2015-2016</year>
|
||||||
<holder>sysmocom - s.f.m.c. GmbH</holder>
|
<holder>sysmocom - s.f.m.c. GmbH</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,6 @@ include::{srcdir}/abis/rtp.adoc[]
|
|||||||
|
|
||||||
include::./common/chapters/port_numbers.adoc[]
|
include::./common/chapters/port_numbers.adoc[]
|
||||||
|
|
||||||
include::./common/chapters/bibliography.adoc[]
|
|
||||||
|
|
||||||
include::./common/chapters/glossary.adoc[]
|
include::./common/chapters/glossary.adoc[]
|
||||||
|
|
||||||
include::./common/chapters/gfdl.adoc[]
|
include::./common/chapters/gfdl.adoc[]
|
||||||
|
|||||||
@@ -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>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
@@ -14,7 +25,7 @@
|
|||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2016-2021</year>
|
<year>2016</year>
|
||||||
<holder>sysmocom - s.f.m.c. GmbH</holder>
|
<holder>sysmocom - s.f.m.c. GmbH</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
:gfdl-enabled:
|
:gfdl-enabled:
|
||||||
:program-name: OsmoBTS
|
|
||||||
|
|
||||||
OsmoBTS User Manual
|
OsmoBTS User Manual
|
||||||
===================
|
===================
|
||||||
@@ -15,10 +14,6 @@ include::{srcdir}/chapters/interfaces.adoc[]
|
|||||||
|
|
||||||
include::{srcdir}/chapters/control.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/vty.adoc[]
|
||||||
|
|
||||||
include::./common/chapters/logging.adoc[]
|
include::./common/chapters/logging.adoc[]
|
||||||
@@ -31,12 +26,6 @@ include::{srcdir}/chapters/bts-models.adoc[]
|
|||||||
|
|
||||||
include::{srcdir}/chapters/architecture.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/trx_if.adoc[]
|
||||||
|
|
||||||
include::./common/chapters/control_if.adoc[]
|
include::./common/chapters/control_if.adoc[]
|
||||||
|
|||||||
@@ -6,25 +6,24 @@
|
|||||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML 5.0//EN"
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML 5.0//EN"
|
||||||
"http://docbook.org/xml/5.0/dtd/docbook.dtd" [
|
"http://docbook.org/xml/5.0/dtd/docbook.dtd" [
|
||||||
<!ENTITY chapter-vty SYSTEM "./common/chapters/vty.xml" >
|
<!ENTITY chapter-vty SYSTEM "./common/chapters/vty.xml" >
|
||||||
<!ENTITY sections-vty SYSTEM "@@GENERATED@@" >
|
<!ENTITY sections-vty SYSTEM "generated/docbook_vty.xml" >
|
||||||
]>
|
]>
|
||||||
|
|
||||||
<book>
|
<book>
|
||||||
<info>
|
<info>
|
||||||
<revhistory>
|
<revhistory>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>v2</revnumber>
|
<revnumber>v1</revnumber>
|
||||||
<date>@@REV_DATE@@</date>
|
<date>13th October 2016</date>
|
||||||
<authorinitials>s.f.m.c.</authorinitials>
|
<authorinitials>hw</authorinitials>
|
||||||
<revremark>Automatic build (@@REV_NUMBER@@)</revremark>
|
<revremark>Initial</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
<title>OsmoBTS VTY Reference</title>
|
<title>OsmoBTS VTY Reference</title>
|
||||||
<subtitle>@@VARIANT@@</subtitle>
|
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>@@CR_YEAR@@</year>
|
<year>2016</year>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
@@ -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"
|
|
||||||
@@ -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>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
@@ -25,7 +51,7 @@
|
|||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2016-2021</year>
|
<year>2016</year>
|
||||||
<holder>sysmocom - s.f.m.c. GmbH</holder>
|
<holder>sysmocom - s.f.m.c. GmbH</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_FIRST)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_FIRST)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
@@ -110,10 +110,10 @@ msc {
|
|||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
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
|
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.
|
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_FIRST and the SID_UPDATE, i.e. there's 60ms between SID_FIRST and
|
||||||
SID_UPDATE.
|
SID_UPDATE.
|
||||||
|
|
||||||
@@ -152,52 +152,52 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
@@ -208,10 +208,10 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
||||||
}
|
}
|
||||||
@@ -254,10 +254,10 @@ msc {
|
|||||||
...;
|
...;
|
||||||
--- [label="Once voice is active again"];
|
--- [label="Once voice is active again"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
@@ -345,10 +345,10 @@ msc {
|
|||||||
...;
|
...;
|
||||||
--- [label="FACCH/F Frame During DTX"];
|
--- [label="FACCH/F Frame During DTX"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
@@ -368,10 +368,10 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind FACCH/F"];
|
phy => bts [label="PH-DATA.ind FACCH/F"];
|
||||||
bts => mgw [label="FACCH/F"];
|
bts => mgw [label="FACCH/F"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst", id="ULSF2"];
|
ms -x phy [label="Supressed L1 burst", id="ULSF2"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_FIRST)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_FIRST)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
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
|
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
|
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)
|
=== TCH/AFS Downlink (Network to MS)
|
||||||
|
|
||||||
@@ -660,10 +660,10 @@ msc {
|
|||||||
phy => bts [label="PH-RTS.ind (TCH)"];
|
phy => bts [label="PH-RTS.ind (TCH)"];
|
||||||
phy <= bts [label="PH-EMPTY-FRAME.req (FACCH/F)"];
|
phy <= bts [label="PH-EMPTY-FRAME.req (FACCH/F)"];
|
||||||
phy <= bts [label="PH-EMPTY-FRAME.req (TCH/F)"];
|
phy <= bts [label="PH-EMPTY-FRAME.req (TCH/F)"];
|
||||||
ms x- phy [label="Suppressed burst"];
|
ms x- phy [label="Supressed burst"];
|
||||||
ms x- phy [label="Suppressed burst"];
|
ms x- phy [label="Supressed burst"];
|
||||||
ms x- phy [label="Suppressed burst"];
|
ms x- phy [label="Supressed burst"];
|
||||||
ms x- phy [label="Suppressed burst"];
|
ms x- phy [label="Supressed burst"];
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -738,8 +738,8 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (N)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (N)"];
|
||||||
bts => mgw [label="RTP (AMR FT=0..7,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=0..7,Q=1)"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr_SidFirstP1", id="ULSF1"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr_SidFirstP1", id="ULSF1"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
||||||
|
|
||||||
@@ -753,8 +753,8 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
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.
|
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_FIRST and the SID_UPDATE, i.e. there's 60ms between SID_FIRST and
|
||||||
SID_UPDATE.
|
SID_UPDATE.
|
||||||
|
|
||||||
@@ -795,33 +795,33 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
@@ -834,8 +834,8 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr (SID_UPDATE)"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
||||||
}
|
}
|
||||||
@@ -999,8 +999,8 @@ msc {
|
|||||||
...;
|
...;
|
||||||
ms .. mgw [label="FACCH/H during DTX operation"];
|
ms .. mgw [label="FACCH/H during DTX operation"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
@@ -1026,8 +1026,8 @@ msc {
|
|||||||
phy => bts [label="PH-DATA.ind with empty payload"];
|
phy => bts [label="PH-DATA.ind with empty payload"];
|
||||||
bts -x mgw [label="Suppressed RTP frame"];
|
bts -x mgw [label="Suppressed RTP frame"];
|
||||||
|
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
ms -x phy [label="Suppressed L1 burst"];
|
ms -x phy [label="Supressed L1 burst"];
|
||||||
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr_SidFirstP1"];
|
phy => bts [label="PH-DATA.ind GsmL1_TchPlType_Amr_SidFirstP1"];
|
||||||
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
bts => mgw [label="RTP (AMR FT=SID,Q=1)"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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" > $@
|
|
||||||
@@ -1,26 +1 @@
|
|||||||
<!-- ex:ts=2:sw=2:et -->
|
<vtydoc xmlns='urn:osmocom:xml:libosmocore:vty:doc:1.0'/>
|
||||||
<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 <0-63>'>
|
|
||||||
<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 <0-63>'>
|
|
||||||
<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&S CMD57.
|
|
||||||
</description>
|
|
||||||
</command>
|
|
||||||
</node>
|
|
||||||
</vtydoc>
|
|
||||||
|
|||||||
1633
doc/manuals/vty/bts_vty_reference.xml
Normal file
1633
doc/manuals/vty/bts_vty_reference.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
|
| bts-specific | bts_model_phy_instance_set_defaults() | Called for every PHY Instance created
|
||||||
| common | bts_controlif_setup() | Initialization of Control Interface
|
| common | bts_controlif_setup() | Initialization of Control Interface
|
||||||
| bts-specific | bts_model_ctrl_cmds_install()
|
| bts-specific | bts_model_ctrl_cmds_install()
|
||||||
| common | telnet_init_default() | Initialization of telnet interface
|
| common | telnet_init() | Initialization of telnet interface
|
||||||
| common | pcu_sock_init() | Initialization of PCU socket
|
| common | pcu_sock_init() | Initializaiton of PCU socket
|
||||||
| common | main() | Installation of signal handlers
|
| common | main() | Installation of signal handlers
|
||||||
| common | abis_open() | Start of the A-bis connection to BSC
|
| common | abis_open() | Start of the A-bis connection to BSC
|
||||||
| common | phy_links_open() | Iterate over list of configured PHY links
|
| 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_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 | osmo_daemonize() | Fork as daemon in background (if configured)
|
||||||
| common | bts_main() | Run main loop until global variable quit >= 2
|
| 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
|
| bts-specific | bts_model_oml_estab() | Called by core once OML link is established
|
||||||
|
|||||||
@@ -1,34 +1,5 @@
|
|||||||
noinst_HEADERS = \
|
noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h gsm_data_shared.h logging.h measurement.h \
|
||||||
abis.h \
|
oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \
|
||||||
abis_osmo.h \
|
handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \
|
||||||
bts.h \
|
power_control.h scheduler.h scheduler_backend.h phy_link.h \
|
||||||
bts_model.h \
|
dtx_dl_amr_fsm.h
|
||||||
bts_shutdown_fsm.h \
|
|
||||||
bts_trx.h \
|
|
||||||
gsm_data.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 \
|
|
||||||
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 \
|
|
||||||
osmux.h \
|
|
||||||
$(NULL)
|
|
||||||
|
|||||||
@@ -6,15 +6,19 @@
|
|||||||
|
|
||||||
#include <osmo-bts/gsm_data.h>
|
#include <osmo-bts/gsm_data.h>
|
||||||
|
|
||||||
enum abis_link_fsm_event {
|
#define OML_RETRY_TIMER 5
|
||||||
ABIS_LINK_EV_SIGN_LINK_OML_UP,
|
#define OML_PING_TIMER 20
|
||||||
ABIS_LINK_EV_SIGN_LINK_DOWN,
|
|
||||||
ABIS_LINK_EV_VTY_RM_ADDR, /* data: struct bsc_oml_host* being removed */
|
enum {
|
||||||
|
LINK_STATE_IDLE = 0,
|
||||||
|
LINK_STATE_RETRYING,
|
||||||
|
LINK_STATE_CONNECTING,
|
||||||
|
LINK_STATE_CONNECT,
|
||||||
};
|
};
|
||||||
|
|
||||||
void abis_init(struct gsm_bts *bts);
|
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);
|
int abis_oml_sendmsg(struct msgb *msg);
|
||||||
|
|||||||
@@ -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);
|
|
||||||
@@ -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,
|
void amr_set_mode_pref(uint8_t *data, const struct amr_multirate_conf *amr_mrc,
|
||||||
uint8_t cmi, uint8_t cmr);
|
uint8_t cmi, uint8_t cmr);
|
||||||
unsigned int amr_get_initial_mode(struct gsm_lchan *lchan);
|
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 */
|
#endif /* _OSMO_BTS_AMR_H */
|
||||||
|
|||||||
@@ -2,13 +2,7 @@
|
|||||||
#define _BTS_H
|
#define _BTS_H
|
||||||
|
|
||||||
#include <osmocom/core/rate_ctr.h>
|
#include <osmocom/core/rate_ctr.h>
|
||||||
#include <osmocom/core/socket.h>
|
|
||||||
#include <osmo-bts/gsm_data.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 {
|
enum bts_global_status {
|
||||||
BTS_STATUS_RF_ACTIVE,
|
BTS_STATUS_RF_ACTIVE,
|
||||||
@@ -19,9 +13,7 @@ enum bts_global_status {
|
|||||||
enum {
|
enum {
|
||||||
BTS_CTR_PAGING_RCVD,
|
BTS_CTR_PAGING_RCVD,
|
||||||
BTS_CTR_PAGING_DROP,
|
BTS_CTR_PAGING_DROP,
|
||||||
BTS_CTR_PAGING_DROP_PS,
|
|
||||||
BTS_CTR_PAGING_SENT,
|
BTS_CTR_PAGING_SENT,
|
||||||
BTS_CTR_PAGING_CONG,
|
|
||||||
BTS_CTR_RACH_RCVD,
|
BTS_CTR_RACH_RCVD,
|
||||||
BTS_CTR_RACH_DROP,
|
BTS_CTR_RACH_DROP,
|
||||||
BTS_CTR_RACH_HO,
|
BTS_CTR_RACH_HO,
|
||||||
@@ -32,404 +24,45 @@ enum {
|
|||||||
BTS_CTR_AGCH_DELETED,
|
BTS_CTR_AGCH_DELETED,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 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);
|
|
||||||
|
|
||||||
/* TODO: add a brief description of this flag */
|
|
||||||
#define BTS_INTERNAL_FLAG_MS_PWR_CTRL_DSP (1 << 0)
|
|
||||||
/* 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) */
|
|
||||||
#define BTS_INTERNAL_FLAG_MEAS_PAYLOAD_COMB (1 << 1)
|
|
||||||
/* Whether the BTS model requires RadioCarrier MO to be in Enabled state
|
|
||||||
* (OPSTARTed) before OPSTARTing the RadioChannel MOs. See OS#5157 */
|
|
||||||
#define BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER (1 << 2)
|
|
||||||
/* Whether the BTS model reports interference measurements to L1SAP. */
|
|
||||||
#define BTS_INTERNAL_FLAG_INTERF_MEAS (1 << 3)
|
|
||||||
|
|
||||||
/* BTS implementation flags (internal use, not exposed via OML) */
|
|
||||||
#define bts_internal_flag_get(bts, flag) \
|
|
||||||
((bts->flags & (typeof(bts->flags)) flag) != 0)
|
|
||||||
#define bts_internal_flag_set(bts, flag) \
|
|
||||||
bts->flags |= (typeof(bts->flags)) flag
|
|
||||||
|
|
||||||
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;
|
|
||||||
struct osmo_sockaddr local; /* on the BTS */
|
|
||||||
struct osmo_sockaddr remote; /* on the SGSN */
|
|
||||||
|
|
||||||
struct gsm_abis_mo mo;
|
|
||||||
};
|
|
||||||
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* BTS Site Manager */
|
|
||||||
struct gsm_bts_sm {
|
|
||||||
struct gsm_abis_mo mo;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Struct that holds one OML-Address (Address of the BSC) */
|
|
||||||
struct bsc_oml_host {
|
|
||||||
struct llist_head list;
|
|
||||||
char *addr;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* One BTS */
|
|
||||||
struct gsm_bts {
|
|
||||||
/* list header in net->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;
|
|
||||||
/* 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 {
|
|
||||||
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;
|
|
||||||
} 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;
|
|
||||||
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 {
|
|
||||||
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;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
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;
|
|
||||||
/* 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;
|
|
||||||
} 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;
|
|
||||||
} 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;
|
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_bts_sm_get_bts(struct gsm_bts_sm *site_mgr) {
|
|
||||||
return (struct gsm_bts *)container_of(site_mgr, struct gsm_bts, site_mgr);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct gsm_bts *gsm_bts_alloc(void *talloc_ctx, uint8_t bts_num);
|
|
||||||
struct gsm_bts *gsm_bts_num(const struct gsm_network *net, int num);
|
|
||||||
|
|
||||||
int bts_init(struct gsm_bts *bts);
|
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(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 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);
|
int bts_agch_enqueue(struct gsm_bts *bts, struct msgb *msg);
|
||||||
struct msgb *bts_agch_dequeue(struct gsm_bts *bts);
|
struct msgb *bts_agch_dequeue(struct gsm_bts *bts);
|
||||||
int bts_agch_max_queue_length(int T, int bcch_conf);
|
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 bts_ccch_copy_msg(struct gsm_bts *bts, uint8_t *out_buf, struct gsm_time *gt,
|
||||||
int is_ag_res);
|
int is_ag_res);
|
||||||
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);
|
uint8_t *bts_sysinfo_get(struct gsm_bts *bts, const struct gsm_time *g_time);
|
||||||
void regenerate_si3_restoctets(struct gsm_bts *bts);
|
uint8_t *lchan_sacch_get(struct gsm_lchan *lchan);
|
||||||
void regenerate_si4_restoctets(struct gsm_bts *bts);
|
int lchan_init_lapdm(struct gsm_lchan *lchan);
|
||||||
int get_si4_ro_offset(const uint8_t *si4_buf);
|
|
||||||
|
|
||||||
void load_timer_start(struct gsm_bts *bts);
|
void load_timer_start(struct gsm_bts *bts);
|
||||||
void load_timer_stop(struct gsm_bts *bts);
|
uint8_t num_agch(struct gsm_bts_trx *trx, const char * arg);
|
||||||
bool load_timer_is_running(const struct gsm_bts *bts);
|
|
||||||
void bts_update_status(enum bts_global_status which, int on);
|
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);
|
struct gsm_time *get_time(struct gsm_bts *bts);
|
||||||
|
|
||||||
int bts_main(int argc, char **argv);
|
int bts_main(int argc, char **argv);
|
||||||
|
|
||||||
int bts_supports_cm(const struct gsm_bts *bts,
|
int bts_supports_cm(struct gsm_bts *bts, enum gsm_phys_chan_config pchan,
|
||||||
const struct rsl_ie_chan_mode *cm);
|
enum gsm48_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);
|
|
||||||
|
|
||||||
#endif /* _BTS_H */
|
#endif /* _BTS_H */
|
||||||
|
|
||||||
|
|||||||
@@ -30,20 +30,17 @@ int bts_model_chg_adm_state(struct gsm_bts *bts, struct gsm_abis_mo *mo,
|
|||||||
void *obj, uint8_t adm_state);
|
void *obj, uint8_t adm_state);
|
||||||
|
|
||||||
int bts_model_trx_deact_rf(struct gsm_bts_trx *trx);
|
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 */
|
int bts_model_vty_init(struct gsm_bts *bts);
|
||||||
void bts_model_trx_close(struct gsm_bts_trx *trx);
|
|
||||||
|
|
||||||
int bts_model_vty_init(void *ctx);
|
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_bts(struct vty *vty, const struct gsm_bts *bts);
|
void bts_model_config_write_phy(struct vty *vty, struct phy_link *plink);
|
||||||
void bts_model_config_write_trx(struct vty *vty, const struct gsm_bts_trx *trx);
|
void bts_model_config_write_phy_inst(struct vty *vty, struct phy_instance *pinst);
|
||||||
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);
|
|
||||||
|
|
||||||
int bts_model_oml_estab(struct gsm_bts *bts);
|
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_change_power(struct gsm_bts_trx *trx, int p_trxout_mdBm);
|
||||||
int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan);
|
int bts_model_adjst_ms_pwr(struct gsm_lchan *lchan);
|
||||||
|
|
||||||
@@ -65,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);
|
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);
|
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
|
#endif
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
/* BTS shutdown FSM */
|
|
||||||
|
|
||||||
/* (C) 2020 by sysmocom - s.m.f.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 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);
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <osmo-bts/gsm_data.h>
|
|
||||||
|
|
||||||
struct gsm_bts_bb_trx {
|
|
||||||
struct gsm_abis_mo mo;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 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;
|
|
||||||
|
|
||||||
/* 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 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);
|
|
||||||
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)
|
|
||||||
@@ -6,20 +6,11 @@
|
|||||||
#include <osmo-bts/gsm_data.h>
|
#include <osmo-bts/gsm_data.h>
|
||||||
#include <osmo-bts/bts.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 */
|
/* incoming SMS broadcast command from RSL */
|
||||||
int bts_process_smscb_cmd(struct gsm_bts *bts, struct rsl_ie_cb_cmd_type cmd_type,
|
int bts_process_smscb_cmd(struct gsm_bts *bts,
|
||||||
bool extended_cbch, uint8_t msg_len, const uint8_t *msg);
|
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
|
/* 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. */
|
* 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);
|
int bts_cbch_get(struct gsm_bts *bts, uint8_t *outbuf, struct gsm_time *g_time);
|
||||||
|
|
||||||
void bts_cbch_reset(struct gsm_bts *bts);
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
int bts_ctrl_cmds_install(struct gsm_bts *bts);
|
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);
|
||||||
|
|||||||
@@ -1,33 +1,13 @@
|
|||||||
#ifndef _GSM_DATA_H
|
#ifndef _GSM_DATA_H
|
||||||
#define _GSM_DATA_H
|
#define _GSM_DATA_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#include <osmocom/core/timer.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/linuxlist.h>
|
||||||
#include <osmocom/core/tdef.h>
|
#include <osmocom/gsm/lapdm.h>
|
||||||
#include <osmocom/gsm/gsm23003.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/paging.h>
|
||||||
#include <osmo-bts/tx_power.h>
|
#include <osmo-bts/tx_power.h>
|
||||||
#include <osmo-bts/oml.h>
|
|
||||||
#include <osmo-bts/lchan.h>
|
|
||||||
|
|
||||||
#define GSM_FR_BITS 260
|
#define GSM_FR_BITS 260
|
||||||
#define GSM_EFR_BITS 244
|
#define GSM_EFR_BITS 244
|
||||||
@@ -36,11 +16,16 @@
|
|||||||
#define GSM_HR_BYTES 14 /* TS 101318 Chapter 5.2: 112 bits, no sig */
|
#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_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_DEFAULT 41
|
||||||
#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE 999999
|
#define GSM_BTS_AGCH_QUEUE_THRESH_LEVEL_DISABLE 999999
|
||||||
#define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41
|
#define GSM_BTS_AGCH_QUEUE_LOW_LEVEL_DEFAULT 41
|
||||||
#define GSM_BTS_AGCH_QUEUE_HIGH_LEVEL_DEFAULT 91
|
#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)
|
||||||
|
|
||||||
struct gsm_network {
|
struct gsm_network {
|
||||||
struct llist_head bts_list;
|
struct llist_head bts_list;
|
||||||
unsigned int num_bts;
|
unsigned int num_bts;
|
||||||
@@ -48,152 +33,28 @@ struct gsm_network {
|
|||||||
struct pcu_sock_state *pcu_state;
|
struct pcu_sock_state *pcu_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 16 is the max. number of SI2quater messages according to 3GPP TS 44.018 Table 10.5.2.33b.1:
|
enum lchan_ciph_state {
|
||||||
4-bit index is used (2#1111 = 10#15) */
|
LCHAN_CIPH_NONE,
|
||||||
#define SI2Q_MAX_NUM 16
|
LCHAN_CIPH_RX_REQ,
|
||||||
/* length in bits (for single SI2quater message) */
|
LCHAN_CIPH_RX_CONF,
|
||||||
#define SI2Q_MAX_LEN 160
|
LCHAN_CIPH_RXTX_REQ,
|
||||||
#define SI2Q_MIN_LEN 18
|
LCHAN_CIPH_RX_CONF_TX_REQ,
|
||||||
|
LCHAN_CIPH_RXTX_CONF,
|
||||||
/* 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
|
|
||||||
|
|
||||||
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 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* One Timeslot in a TRX */
|
#include <osmo-bts/gsm_data_shared.h>
|
||||||
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 */
|
|
||||||
uint8_t tsc; /* currently in use */
|
|
||||||
/* 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 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);
|
|
||||||
|
|
||||||
|
void lchan_set_state(struct gsm_lchan *lchan, enum gsm_lchan_state state);
|
||||||
int conf_lchans_as_pchan(struct gsm_bts_trx_ts *ts,
|
int conf_lchans_as_pchan(struct gsm_bts_trx_ts *ts,
|
||||||
enum gsm_phys_chan_config pchan);
|
enum gsm_phys_chan_config pchan);
|
||||||
|
|
||||||
/* cipher code */
|
/* cipher code */
|
||||||
#define CIPHER_A5(x) (1 << (x-1))
|
#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);
|
bool ts_is_pdch(const 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 */
|
#endif /* _GSM_DATA_H */
|
||||||
|
|||||||
854
include/osmo-bts/gsm_data_shared.h
Normal file
854
include/osmo-bts/gsm_data_shared.h
Normal 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
|
||||||
@@ -2,9 +2,6 @@
|
|||||||
#define L1SAP_H
|
#define L1SAP_H
|
||||||
|
|
||||||
#include <osmocom/gsm/protocol/gsm_04_08.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 */
|
/* lchan link ID */
|
||||||
#define LID_SACCH 0x40
|
#define LID_SACCH 0x40
|
||||||
@@ -18,32 +15,16 @@
|
|||||||
#define L1SAP_CHAN2SS_BCCH(chan_nr) (CCCH_LCHAN)
|
#define L1SAP_CHAN2SS_BCCH(chan_nr) (CCCH_LCHAN)
|
||||||
|
|
||||||
/* logical channel from chan_nr + link_id */
|
/* logical channel from chan_nr + link_id */
|
||||||
#define L1SAP_IS_LINK_SACCH(link_id) \
|
#define L1SAP_IS_LINK_SACCH(link_id) ((link_id & 0xC0) == LID_SACCH)
|
||||||
((link_id & 0xC0) == LID_SACCH)
|
#define L1SAP_IS_CHAN_TCHF(chan_nr) ((chan_nr & 0xf8) == 0x08)
|
||||||
#define L1SAP_IS_CHAN_TCHF(chan_nr) \
|
#define L1SAP_IS_CHAN_TCHH(chan_nr) ((chan_nr & 0xf0) == 0x10)
|
||||||
((chan_nr & 0xf8) == RSL_CHAN_Bm_ACCHs || \
|
#define L1SAP_IS_CHAN_SDCCH4(chan_nr) ((chan_nr & 0xe0) == 0x20)
|
||||||
(chan_nr & 0xf8) == RSL_CHAN_OSMO_VAMOS_Bm_ACCHs)
|
#define L1SAP_IS_CHAN_SDCCH8(chan_nr) ((chan_nr & 0xc0) == 0x40)
|
||||||
#define L1SAP_IS_CHAN_TCHH(chan_nr) \
|
#define L1SAP_IS_CHAN_BCCH(chan_nr) ((chan_nr & 0xf8) == 0x80)
|
||||||
((chan_nr & 0xf0) == RSL_CHAN_Lm_ACCHs || \
|
#define L1SAP_IS_CHAN_RACH(chan_nr) ((chan_nr & 0xf8) == 0x88)
|
||||||
(chan_nr & 0xf0) == RSL_CHAN_OSMO_VAMOS_Lm_ACCHs)
|
#define L1SAP_IS_CHAN_AGCH_PCH(chan_nr) ((chan_nr & 0xf8) == 0x90)
|
||||||
#define L1SAP_IS_CHAN_SDCCH4(chan_nr) \
|
#define L1SAP_IS_CHAN_PDCH(chan_nr) ((chan_nr & 0xf8) == 0xc0)
|
||||||
((chan_nr & 0xe0) == RSL_CHAN_SDCCH4_ACCH)
|
#define L1SAP_IS_CHAN_CBCH(chan_nr) ((chan_nr & 0xf8) == 0xc8)
|
||||||
#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)
|
|
||||||
|
|
||||||
/* rach type from ra */
|
/* rach type from ra */
|
||||||
#define L1SAP_IS_PACKET_RACH(ra) ((ra & 0xf0) == 0x70 && (ra & 0x0f) != 0x0f)
|
#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 */
|
/* 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,
|
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 */
|
/* call-back function for incoming RTP */
|
||||||
void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
|
void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
|
||||||
@@ -98,46 +79,19 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
|
|||||||
uint32_t timestamp, bool marker);
|
uint32_t timestamp, bool marker);
|
||||||
|
|
||||||
/* channel control */
|
/* 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_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_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_chan_modify(struct gsm_bts_trx *trx, uint8_t chan_nr);
|
||||||
|
|
||||||
enum l1sap_common_sapi {
|
extern const struct value_string gsmtap_sapi_names[];
|
||||||
L1SAP_COMMON_SAPI_UNKNOWN,
|
extern struct gsmtap_inst *gsmtap;
|
||||||
/* alphabetic order */
|
extern uint32_t gsmtap_sapi_mask;
|
||||||
L1SAP_COMMON_SAPI_AGCH,
|
extern uint8_t gsmtap_sapi_acch;
|
||||||
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[];
|
|
||||||
|
|
||||||
int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg,
|
int add_l1sap_header(struct gsm_bts_trx *trx, struct msgb *rmsg,
|
||||||
struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn,
|
struct gsm_lchan *lchan, uint8_t chan_nr, uint32_t fn,
|
||||||
uint16_t ber10k, int16_t lqual_cb, int8_t rssi,
|
uint16_t ber10k, int16_t lqual_cb);
|
||||||
int16_t ta_offs, uint8_t is_sub);
|
|
||||||
|
|
||||||
#define msgb_l1sap_prim(msg) ((struct osmo_phsap_prim *)(msg)->l1h)
|
#define msgb_l1sap_prim(msg) ((struct osmo_phsap_prim *)(msg)->l1h)
|
||||||
|
|
||||||
|
|||||||
@@ -1,391 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <netinet/in.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/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,
|
|
||||||
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,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 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 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 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;
|
|
||||||
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;
|
|
||||||
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 */
|
|
||||||
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)
|
|
||||||
@@ -20,7 +20,7 @@ enum {
|
|||||||
DLOOP,
|
DLOOP,
|
||||||
DABIS,
|
DABIS,
|
||||||
DRTP,
|
DRTP,
|
||||||
DOSMUX,
|
DSUM,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const struct log_info bts_log_info;
|
extern const struct log_info bts_log_info;
|
||||||
|
|||||||
@@ -4,22 +4,16 @@
|
|||||||
#define MEAS_MAX_TIMING_ADVANCE 63
|
#define MEAS_MAX_TIMING_ADVANCE 63
|
||||||
#define MEAS_MIN_TIMING_ADVANCE 0
|
#define MEAS_MIN_TIMING_ADVANCE 0
|
||||||
|
|
||||||
int lchan_new_ul_meas(struct gsm_lchan *lchan,
|
int lchan_new_ul_meas(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn);
|
||||||
const struct bts_ul_meas *ulm,
|
|
||||||
uint32_t fn);
|
|
||||||
|
|
||||||
int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn);
|
int lchan_meas_check_compute(struct gsm_lchan *lchan, uint32_t fn);
|
||||||
|
|
||||||
int lchan_meas_process_measurement(struct gsm_lchan *lchan,
|
int lchan_meas_process_measurement(struct gsm_lchan *lchan, struct bts_ul_meas *ulm, uint32_t fn);
|
||||||
const struct bts_ul_meas *ulm,
|
|
||||||
uint32_t fn);
|
|
||||||
|
|
||||||
void lchan_meas_reset(struct gsm_lchan *lchan);
|
void lchan_meas_reset(struct gsm_lchan *lchan);
|
||||||
|
|
||||||
bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn);
|
bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn, bool is_amr_sid_update);
|
||||||
|
|
||||||
int is_meas_complete(struct gsm_lchan *lchan, uint32_t fn);
|
int is_meas_complete(struct gsm_lchan *lchan, uint32_t fn);
|
||||||
|
|
||||||
void lchan_meas_handle_sacch(struct gsm_lchan *lchan, struct msgb *msg);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,97 +0,0 @@
|
|||||||
/* Header for all NM FSM. Following 3GPP TS 12.21 Figure 2/GSM 12.21:
|
|
||||||
GSM 12.21 Objects' Operational state and availability status behaviour during initialization */
|
|
||||||
|
|
||||||
/* (C) 2020 by sysmocom - s.m.f.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 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>
|
|
||||||
#include <osmocom/core/utils.h>
|
|
||||||
#include <osmocom/core/msgb.h>
|
|
||||||
|
|
||||||
/* Common */
|
|
||||||
enum nm_fsm_events {
|
|
||||||
NM_EV_SW_ACT,
|
|
||||||
NM_EV_SETATTR_ACK, /* data: struct nm_fsm_ev_setattr_data */
|
|
||||||
NM_EV_SETATTR_NACK, /* data: struct nm_fsm_ev_setattr_data */
|
|
||||||
NM_EV_OPSTART_ACK,
|
|
||||||
NM_EV_OPSTART_NACK,
|
|
||||||
NM_EV_SHUTDOWN_START,
|
|
||||||
NM_EV_SHUTDOWN_FINISH,
|
|
||||||
NM_EV_RSL_UP, /* RadioCarrier and BaseBand Transceiver only */
|
|
||||||
NM_EV_RSL_DOWN, /* RadioCarrier and BaseBand Transceiver only */
|
|
||||||
NM_EV_PHYLINK_UP, /* RadioCarrier and BaseBand Transceiver only */
|
|
||||||
NM_EV_PHYLINK_DOWN, /* RadioCarrier and BaseBand Transceiver only */
|
|
||||||
NM_EV_DISABLE, /* RadioCarrier and BaseBand Transceiver only */
|
|
||||||
NM_EV_BBTRANSC_INSTALLED, /* Radio Channel only */
|
|
||||||
NM_EV_BBTRANSC_ENABLED, /* Radio Channel only */
|
|
||||||
NM_EV_BBTRANSC_DISABLED, /* Radio Channel only */
|
|
||||||
NM_EV_RCARRIER_ENABLED, /* Radio Channel only */
|
|
||||||
NM_EV_RCARRIER_DISABLED, /* Radio Channel only */
|
|
||||||
};
|
|
||||||
extern const struct value_string nm_fsm_event_names[];
|
|
||||||
|
|
||||||
struct nm_fsm_ev_setattr_data {
|
|
||||||
struct msgb *msg; /* msgb ownership is transferred to FSM */
|
|
||||||
int cause;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* BTS SiteManager */
|
|
||||||
enum nm_bts_sm_op_fsm_states {
|
|
||||||
NM_BTS_SM_ST_OP_DISABLED_NOTINSTALLED,
|
|
||||||
NM_BTS_SM_ST_OP_DISABLED_OFFLINE,
|
|
||||||
NM_BTS_SM_ST_OP_ENABLED,
|
|
||||||
};
|
|
||||||
extern struct osmo_fsm nm_bts_sm_fsm;
|
|
||||||
|
|
||||||
/* BTS */
|
|
||||||
enum nm_bts_op_fsm_states {
|
|
||||||
NM_BTS_ST_OP_DISABLED_NOTINSTALLED,
|
|
||||||
NM_BTS_ST_OP_DISABLED_OFFLINE,
|
|
||||||
NM_BTS_ST_OP_ENABLED,
|
|
||||||
};
|
|
||||||
extern struct osmo_fsm nm_bts_fsm;
|
|
||||||
|
|
||||||
/* BaseBand Transceiver */
|
|
||||||
enum nm_bb_transc_op_fsm_states {
|
|
||||||
NM_BBTRANSC_ST_OP_DISABLED_NOTINSTALLED,
|
|
||||||
NM_BBTRANSC_ST_OP_DISABLED_OFFLINE,
|
|
||||||
NM_BBTRANSC_ST_OP_ENABLED,
|
|
||||||
};
|
|
||||||
extern struct osmo_fsm nm_bb_transc_fsm;
|
|
||||||
|
|
||||||
/* Radio Carrier */
|
|
||||||
enum nm_rcarrier_op_fsm_states {
|
|
||||||
NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED,
|
|
||||||
NM_RCARRIER_ST_OP_DISABLED_OFFLINE,
|
|
||||||
NM_RCARRIER_ST_OP_ENABLED,
|
|
||||||
};
|
|
||||||
extern struct osmo_fsm nm_rcarrier_fsm;
|
|
||||||
|
|
||||||
/* Radio channel */
|
|
||||||
enum nm_chan_op_fsm_states {
|
|
||||||
NM_CHAN_ST_OP_DISABLED_NOTINSTALLED,
|
|
||||||
NM_CHAN_ST_OP_DISABLED_DEPENDENCY,
|
|
||||||
NM_CHAN_ST_OP_DISABLED_OFFLINE,
|
|
||||||
NM_CHAN_ST_OP_ENABLED,
|
|
||||||
};
|
|
||||||
extern struct osmo_fsm nm_chan_fsm;
|
|
||||||
@@ -8,47 +8,20 @@ struct gsm_abis_mo;
|
|||||||
struct msgb;
|
struct msgb;
|
||||||
struct gsm_lchan;
|
struct gsm_lchan;
|
||||||
|
|
||||||
/* Network Management State */
|
|
||||||
struct gsm_nm_state {
|
|
||||||
enum abis_nm_op_state operational;
|
|
||||||
enum abis_nm_adm_state administrative;
|
|
||||||
enum abis_nm_avail_state availability;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct gsm_abis_mo {
|
int oml_init(struct gsm_abis_mo *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;
|
|
||||||
/* NM BTS Site Manager FSM */
|
|
||||||
struct osmo_fsm_inst *fi;
|
|
||||||
bool setattr_success;
|
|
||||||
bool opstart_success;
|
|
||||||
};
|
|
||||||
|
|
||||||
int oml_init(void);
|
|
||||||
int down_oml(struct gsm_bts *bts, struct msgb *msg);
|
int down_oml(struct gsm_bts *bts, struct msgb *msg);
|
||||||
|
|
||||||
struct msgb *oml_msgb_alloc(void);
|
struct msgb *oml_msgb_alloc(void);
|
||||||
int oml_send_msg(struct msgb *msg, int is_mauf);
|
int oml_send_msg(struct msgb *msg, int is_mauf);
|
||||||
int oml_mo_send_msg(const struct gsm_abis_mo *mo, struct msgb *msg, uint8_t msg_type);
|
int oml_mo_send_msg(struct gsm_abis_mo *mo, struct msgb *msg, uint8_t msg_type);
|
||||||
int oml_mo_opstart_ack(const struct gsm_abis_mo *mo);
|
int oml_mo_opstart_ack(struct gsm_abis_mo *mo);
|
||||||
int oml_mo_opstart_nack(const struct gsm_abis_mo *mo, uint8_t nack_cause);
|
int oml_mo_opstart_nack(struct gsm_abis_mo *mo, uint8_t nack_cause);
|
||||||
int oml_mo_statechg_ack(const struct gsm_abis_mo *mo);
|
int oml_mo_statechg_ack(struct gsm_abis_mo *mo);
|
||||||
int oml_mo_statechg_nack(const struct gsm_abis_mo *mo, uint8_t nack_cause);
|
int oml_mo_statechg_nack(struct gsm_abis_mo *mo, uint8_t nack_cause);
|
||||||
|
|
||||||
/* Change the state and send STATE CHG REP */
|
/* Change the state and send STATE CHG REP */
|
||||||
int oml_mo_state_chg(struct gsm_abis_mo *mo, int op_state, int avail_state, int adm_state);
|
int oml_mo_state_chg(struct gsm_abis_mo *mo, int op_state, int avail_state);
|
||||||
|
|
||||||
/* First initialization of MO, does _not_ generate state changes */
|
/* First initialization of MO, does _not_ generate state changes */
|
||||||
void oml_mo_state_init(struct gsm_abis_mo *mo, int op_state, int avail_state);
|
void oml_mo_state_init(struct gsm_abis_mo *mo, int op_state, int avail_state);
|
||||||
@@ -58,30 +31,20 @@ int oml_mo_rf_lock_chg(struct gsm_abis_mo *mo, uint8_t mute_state[8],
|
|||||||
int success);
|
int success);
|
||||||
|
|
||||||
/* Transmit STATE CHG REP even if there was no state change */
|
/* Transmit STATE CHG REP even if there was no state change */
|
||||||
int oml_tx_state_changed(const struct gsm_abis_mo *mo);
|
int oml_tx_state_changed(struct gsm_abis_mo *mo);
|
||||||
|
|
||||||
int oml_mo_tx_sw_act_rep(const struct gsm_abis_mo *mo);
|
int oml_mo_tx_sw_act_rep(struct gsm_abis_mo *mo);
|
||||||
|
|
||||||
int oml_fom_ack_nack(struct msgb *old_msg, uint8_t cause);
|
int oml_fom_ack_nack(struct msgb *old_msg, uint8_t cause);
|
||||||
|
|
||||||
int oml_mo_fom_ack_nack(const struct gsm_abis_mo *mo, uint8_t orig_msg_type,
|
int oml_mo_fom_ack_nack(struct gsm_abis_mo *mo, uint8_t orig_msg_type,
|
||||||
uint8_t cause);
|
uint8_t cause);
|
||||||
|
|
||||||
|
/* Configure LAPDm T200 timers for this lchan according to OML */
|
||||||
|
int oml_set_lchan_t200(struct gsm_lchan *lchan);
|
||||||
extern const unsigned int oml_default_t200_ms[7];
|
extern const unsigned int oml_default_t200_ms[7];
|
||||||
|
|
||||||
/* Transmit failure event report */
|
/* Transmit failure event report */
|
||||||
int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity,
|
void oml_fail_rep(uint16_t cause_value, const char *fmt, ...);
|
||||||
uint16_t cause_value, const char *fmt, ...);
|
|
||||||
|
|
||||||
void gsm_mo_init(struct gsm_abis_mo *mo, struct gsm_bts *bts,
|
|
||||||
uint8_t obj_class, uint8_t p1, uint8_t p2, uint8_t p3);
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
#endif // _OML_H */
|
#endif // _OML_H */
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <osmocom/core/select.h>
|
|
||||||
#include <osmocom/netif/osmux.h>
|
|
||||||
|
|
||||||
struct gsm_bts;
|
|
||||||
struct gsm_lchan;
|
|
||||||
|
|
||||||
enum osmux_usage {
|
|
||||||
OSMUX_USAGE_OFF = 0,
|
|
||||||
OSMUX_USAGE_ON = 1,
|
|
||||||
OSMUX_USAGE_ONLY = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct osmux_state {
|
|
||||||
enum osmux_usage use;
|
|
||||||
char *local_addr;
|
|
||||||
uint16_t local_port;
|
|
||||||
struct osmo_fd fd;
|
|
||||||
uint8_t batch_factor;
|
|
||||||
unsigned int batch_size;
|
|
||||||
bool dummy_padding;
|
|
||||||
struct llist_head osmux_handle_list;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Contains a "struct osmux_in_handle" towards a specific peer (remote IPaddr+port) */
|
|
||||||
struct osmux_handle {
|
|
||||||
struct llist_head head;
|
|
||||||
struct gsm_bts *bts;
|
|
||||||
struct osmux_in_handle *in;
|
|
||||||
struct osmo_sockaddr rem_addr;
|
|
||||||
int refcnt;
|
|
||||||
};
|
|
||||||
|
|
||||||
int bts_osmux_init(struct gsm_bts *bts);
|
|
||||||
void bts_osmux_release(struct gsm_bts *bts);
|
|
||||||
int bts_osmux_open(struct gsm_bts *bts);
|
|
||||||
|
|
||||||
int lchan_osmux_init(struct gsm_lchan *lchan, uint8_t rtp_payload);
|
|
||||||
void lchan_osmux_release(struct gsm_lchan *lchan);
|
|
||||||
int lchan_osmux_connect(struct gsm_lchan *lchan);
|
|
||||||
bool lchan_osmux_connected(const struct gsm_lchan *lchan);
|
|
||||||
int lchan_osmux_send_frame(struct gsm_lchan *lchan, const uint8_t *payload,
|
|
||||||
unsigned int payload_len, unsigned int duration, bool marker);
|
|
||||||
|
|
||||||
int lchan_osmux_skipped_frame(struct gsm_lchan *lchan, unsigned int duration);
|
|
||||||
@@ -36,8 +36,8 @@ int paging_add_identity(struct paging_state *ps, uint8_t paging_group,
|
|||||||
const uint8_t *identity_lv, uint8_t chan_needed);
|
const uint8_t *identity_lv, uint8_t chan_needed);
|
||||||
|
|
||||||
/* Add an IMM.ASS message to the paging queue */
|
/* Add an IMM.ASS message to the paging queue */
|
||||||
int paging_add_imm_ass(struct paging_state *ps,
|
int paging_add_imm_ass(struct paging_state *ps, const uint8_t *data,
|
||||||
const uint8_t *data, uint8_t len);
|
uint8_t len);
|
||||||
|
|
||||||
/* generate paging message for given gsm time */
|
/* generate paging message for given gsm time */
|
||||||
int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt,
|
int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt,
|
||||||
|
|||||||
@@ -1,29 +1,20 @@
|
|||||||
#ifndef _PCU_IF_H
|
#ifndef _PCU_IF_H
|
||||||
#define _PCU_IF_H
|
#define _PCU_IF_H
|
||||||
|
|
||||||
#include <osmo-bts/pcuif_proto.h>
|
|
||||||
|
|
||||||
extern int pcu_direct;
|
extern int pcu_direct;
|
||||||
|
|
||||||
#define PCUIF_HDR_SIZE (sizeof(struct gsm_pcu_if) - sizeof(((struct gsm_pcu_if *)0)->u))
|
|
||||||
|
|
||||||
int pcu_tx_info_ind(void);
|
int pcu_tx_info_ind(void);
|
||||||
int pcu_tx_si(const struct gsm_bts *bts, enum osmo_sysinfo_type si_type, bool enable);
|
int pcu_tx_si13(const struct gsm_bts *bts, bool enable);
|
||||||
int pcu_tx_app_info_req(struct gsm_bts *bts, uint8_t app_type, uint8_t len, const uint8_t *app_data);
|
|
||||||
int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
|
int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
|
||||||
uint16_t arfcn, uint8_t block_nr);
|
uint16_t arfcn, uint8_t block_nr);
|
||||||
int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
|
int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn,
|
||||||
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
|
uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len,
|
||||||
int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual);
|
int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual);
|
||||||
int pcu_tx_rach_ind(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
|
int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn,
|
||||||
int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit,
|
uint8_t is_11bit, enum ph_burst_type burst_type);
|
||||||
enum ph_burst_type burst_type, uint8_t sapi);
|
|
||||||
int pcu_tx_time_ind(uint32_t fn);
|
int pcu_tx_time_ind(uint32_t fn);
|
||||||
int pcu_tx_interf_ind(const struct gsm_bts_trx *trx, uint32_t fn);
|
|
||||||
int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
|
int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed);
|
||||||
int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len);
|
int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len);
|
||||||
int pcu_tx_susp_req(struct gsm_lchan *lchan, uint32_t tlli, const uint8_t *ra_id, uint8_t cause);
|
|
||||||
int pcu_sock_send(struct gsm_network *net, struct msgb *msg);
|
|
||||||
|
|
||||||
int pcu_sock_init(const char *path);
|
int pcu_sock_init(const char *path);
|
||||||
void pcu_sock_exit(void);
|
void pcu_sock_exit(void);
|
||||||
|
|||||||
@@ -2,29 +2,24 @@
|
|||||||
#define _PCUIF_PROTO_H
|
#define _PCUIF_PROTO_H
|
||||||
|
|
||||||
#include <osmocom/gsm/l1sap.h>
|
#include <osmocom/gsm/l1sap.h>
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
|
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
|
||||||
|
|
||||||
#define PCU_IF_VERSION 0x0a
|
#define PCU_IF_VERSION 0x09
|
||||||
#define TXT_MAX_LEN 128
|
#define TXT_MAX_LEN 128
|
||||||
|
|
||||||
/* msg_type */
|
/* msg_type */
|
||||||
#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */
|
#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */
|
||||||
#define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */
|
#define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */
|
||||||
#define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */
|
#define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */
|
||||||
#define PCU_IF_MSG_SUSP_REQ 0x03 /* BTS forwards GPRS SUSP REQ to PCU */
|
|
||||||
#define PCU_IF_MSG_APP_INFO_REQ 0x04 /* BTS asks PCU to transmit APP INFO via PACCH */
|
|
||||||
#define PCU_IF_MSG_RTS_REQ 0x10 /* ready to send request */
|
#define PCU_IF_MSG_RTS_REQ 0x10 /* ready to send request */
|
||||||
#define PCU_IF_MSG_DATA_CNF_DT 0x11 /* confirm (with direct tlli) */
|
#define PCU_IF_MSG_DATA_CNF_DT 0x11 /* confirm (with direct tlli) */
|
||||||
#define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */
|
#define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */
|
||||||
#define PCU_IF_MSG_INFO_IND 0x32 /* retrieve BTS info */
|
#define PCU_IF_MSG_INFO_IND 0x32 /* retrieve BTS info */
|
||||||
#define PCU_IF_MSG_ACT_REQ 0x40 /* activate/deactivate PDCH */
|
#define PCU_IF_MSG_ACT_REQ 0x40 /* activate/deactivate PDCH */
|
||||||
#define PCU_IF_MSG_TIME_IND 0x52 /* GSM time indication */
|
#define PCU_IF_MSG_TIME_IND 0x52 /* GSM time indication */
|
||||||
#define PCU_IF_MSG_INTERF_IND 0x53 /* interference report */
|
|
||||||
#define PCU_IF_MSG_PAG_REQ 0x60 /* paging request */
|
#define PCU_IF_MSG_PAG_REQ 0x60 /* paging request */
|
||||||
#define PCU_IF_MSG_TXT_IND 0x70 /* Text indication for BTS */
|
#define PCU_IF_MSG_TXT_IND 0x70 /* Text indication for BTS */
|
||||||
#define PCU_IF_MSG_CONTAINER 0x80 /* Transparent container message */
|
|
||||||
|
|
||||||
/* sapi */
|
/* sapi */
|
||||||
#define PCU_IF_SAPI_RACH 0x01 /* channel request on CCCH */
|
#define PCU_IF_SAPI_RACH 0x01 /* channel request on CCCH */
|
||||||
@@ -53,14 +48,6 @@
|
|||||||
#define PCU_IF_FLAG_MCS8 (1 << 27)
|
#define PCU_IF_FLAG_MCS8 (1 << 27)
|
||||||
#define PCU_IF_FLAG_MCS9 (1 << 28)
|
#define PCU_IF_FLAG_MCS9 (1 << 28)
|
||||||
|
|
||||||
/* NSVC address type */
|
|
||||||
#define PCU_IF_ADDR_TYPE_UNSPEC 0x00 /* No address - empty entry */
|
|
||||||
#define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */
|
|
||||||
#define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */
|
|
||||||
|
|
||||||
#define PCU_IF_NUM_NSVC 2
|
|
||||||
#define PCU_IF_NUM_TRX 8
|
|
||||||
|
|
||||||
enum gsm_pcu_if_text_type {
|
enum gsm_pcu_if_text_type {
|
||||||
PCU_VERSION,
|
PCU_VERSION,
|
||||||
PCU_OML_ALERT,
|
PCU_OML_ALERT,
|
||||||
@@ -119,31 +106,20 @@ struct gsm_pcu_if_rach_ind {
|
|||||||
uint16_t arfcn;
|
uint16_t arfcn;
|
||||||
uint8_t is_11bit;
|
uint8_t is_11bit;
|
||||||
uint8_t burst_type;
|
uint8_t burst_type;
|
||||||
uint8_t trx_nr;
|
|
||||||
uint8_t ts_nr;
|
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
struct gsm_pcu_if_info_trx_ts {
|
|
||||||
uint8_t tsc;
|
|
||||||
uint8_t hopping;
|
|
||||||
uint8_t hsn;
|
|
||||||
uint8_t maio;
|
|
||||||
uint8_t ma_bit_len;
|
|
||||||
uint8_t ma[8];
|
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct gsm_pcu_if_info_trx {
|
struct gsm_pcu_if_info_trx {
|
||||||
uint16_t arfcn;
|
uint16_t arfcn;
|
||||||
uint8_t pdch_mask; /* PDCH timeslot mask */
|
uint8_t pdch_mask; /* PDCH channels per TS */
|
||||||
uint8_t spare;
|
uint8_t spare;
|
||||||
|
uint8_t tsc[8]; /* TSC per channel */
|
||||||
uint32_t hlayer1;
|
uint32_t hlayer1;
|
||||||
struct gsm_pcu_if_info_trx_ts ts[8];
|
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct gsm_pcu_if_info_ind {
|
struct gsm_pcu_if_info_ind {
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
struct gsm_pcu_if_info_trx trx[PCU_IF_NUM_TRX]; /* TRX infos per BTS */
|
struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */
|
||||||
uint8_t bsic;
|
uint8_t bsic;
|
||||||
/* RAI */
|
/* RAI */
|
||||||
uint16_t mcc, mnc;
|
uint16_t mcc, mnc;
|
||||||
@@ -172,14 +148,10 @@ struct gsm_pcu_if_info_ind {
|
|||||||
uint8_t initial_cs;
|
uint8_t initial_cs;
|
||||||
uint8_t initial_mcs;
|
uint8_t initial_mcs;
|
||||||
/* NSVC */
|
/* NSVC */
|
||||||
uint16_t nsvci[PCU_IF_NUM_NSVC];
|
uint16_t nsvci[2];
|
||||||
uint16_t local_port[PCU_IF_NUM_NSVC];
|
uint16_t local_port[2];
|
||||||
uint16_t remote_port[PCU_IF_NUM_NSVC];
|
uint16_t remote_port[2];
|
||||||
uint8_t address_type[PCU_IF_NUM_NSVC];
|
uint32_t remote_ip[2];
|
||||||
union {
|
|
||||||
struct in_addr v4;
|
|
||||||
struct in6_addr v6;
|
|
||||||
} remote_ip[PCU_IF_NUM_NSVC];
|
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
struct gsm_pcu_if_act_req {
|
struct gsm_pcu_if_act_req {
|
||||||
@@ -199,36 +171,6 @@ struct gsm_pcu_if_pag_req {
|
|||||||
uint8_t identity_lv[9];
|
uint8_t identity_lv[9];
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
/* BTS tells PCU to [once] send given application data via PACCH to all UE with active TBF */
|
|
||||||
struct gsm_pcu_if_app_info_req {
|
|
||||||
uint8_t application_type; /* 4bit field, see TS 44.060 11.2.47 */
|
|
||||||
uint8_t len; /* length of data */
|
|
||||||
uint8_t data[162]; /* random size choice; ETWS needs 56 bytes */
|
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
/* BTS tells PCU about a GPRS SUSPENSION REQUEST received on DCCH */
|
|
||||||
struct gsm_pcu_if_susp_req {
|
|
||||||
uint32_t tlli;
|
|
||||||
uint8_t ra_id[6];
|
|
||||||
uint8_t cause;
|
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
/* Interference measurements on PDCH timeslots */
|
|
||||||
struct gsm_pcu_if_interf_ind {
|
|
||||||
uint8_t trx_nr;
|
|
||||||
uint8_t spare[3];
|
|
||||||
uint32_t fn;
|
|
||||||
uint8_t interf[8];
|
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
/* Contains messages transmitted BSC<->PCU, potentially forwarded by BTS via IPA/PCU */
|
|
||||||
struct gsm_pcu_if_container {
|
|
||||||
uint8_t msg_type;
|
|
||||||
uint8_t spare;
|
|
||||||
uint16_t length; /* network byte order */
|
|
||||||
uint8_t data[0];
|
|
||||||
} __attribute__ ((packed));
|
|
||||||
|
|
||||||
struct gsm_pcu_if {
|
struct gsm_pcu_if {
|
||||||
/* context based information */
|
/* context based information */
|
||||||
uint8_t msg_type; /* message type */
|
uint8_t msg_type; /* message type */
|
||||||
@@ -240,7 +182,6 @@ struct gsm_pcu_if {
|
|||||||
struct gsm_pcu_if_data data_cnf;
|
struct gsm_pcu_if_data data_cnf;
|
||||||
struct gsm_pcu_if_data_cnf_dt data_cnf_dt;
|
struct gsm_pcu_if_data_cnf_dt data_cnf_dt;
|
||||||
struct gsm_pcu_if_data data_ind;
|
struct gsm_pcu_if_data data_ind;
|
||||||
struct gsm_pcu_if_susp_req susp_req;
|
|
||||||
struct gsm_pcu_if_rts_req rts_req;
|
struct gsm_pcu_if_rts_req rts_req;
|
||||||
struct gsm_pcu_if_rach_ind rach_ind;
|
struct gsm_pcu_if_rach_ind rach_ind;
|
||||||
struct gsm_pcu_if_txt_ind txt_ind;
|
struct gsm_pcu_if_txt_ind txt_ind;
|
||||||
@@ -248,9 +189,6 @@ struct gsm_pcu_if {
|
|||||||
struct gsm_pcu_if_act_req act_req;
|
struct gsm_pcu_if_act_req act_req;
|
||||||
struct gsm_pcu_if_time_ind time_ind;
|
struct gsm_pcu_if_time_ind time_ind;
|
||||||
struct gsm_pcu_if_pag_req pag_req;
|
struct gsm_pcu_if_pag_req pag_req;
|
||||||
struct gsm_pcu_if_app_info_req app_info_req;
|
|
||||||
struct gsm_pcu_if_interf_ind interf_ind;
|
|
||||||
struct gsm_pcu_if_container container;
|
|
||||||
} u;
|
} u;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,11 @@
|
|||||||
#include <osmocom/core/linuxlist.h>
|
#include <osmocom/core/linuxlist.h>
|
||||||
|
|
||||||
#include <osmo-bts/scheduler.h>
|
#include <osmo-bts/scheduler.h>
|
||||||
#include <osmo-bts/bts_trx.h>
|
|
||||||
|
|
||||||
#include <linux/if_packet.h>
|
#include <linux/if_packet.h>
|
||||||
#include "btsconfig.h"
|
#include "btsconfig.h"
|
||||||
|
|
||||||
|
struct gsm_bts_trx;
|
||||||
struct virt_um_inst;
|
struct virt_um_inst;
|
||||||
|
|
||||||
enum phy_link_type {
|
enum phy_link_type {
|
||||||
@@ -45,17 +44,15 @@ struct phy_link {
|
|||||||
uint16_t base_port_local;
|
uint16_t base_port_local;
|
||||||
uint16_t base_port_remote;
|
uint16_t base_port_remote;
|
||||||
struct osmo_fd trx_ofd_clk;
|
struct osmo_fd trx_ofd_clk;
|
||||||
|
bool trx_ta_loop;
|
||||||
|
bool trx_ms_power_loop;
|
||||||
|
int8_t trx_target_rssi;
|
||||||
uint32_t clock_advance;
|
uint32_t clock_advance;
|
||||||
uint32_t rts_advance;
|
uint32_t rts_advance;
|
||||||
bool use_legacy_setbsic;
|
bool use_legacy_setbsic;
|
||||||
uint8_t trxd_pdu_ver_max; /* Maximum TRXD PDU version to negotiate */
|
|
||||||
bool powered; /* last POWERON (true) or POWEROFF (false) confirmed */
|
|
||||||
bool poweron_sent; /* is there a POWERON in transit? */
|
|
||||||
bool poweroff_sent; /* is there a POWEROFF in transit? */
|
|
||||||
} osmotrx;
|
} osmotrx;
|
||||||
struct {
|
struct {
|
||||||
char *mcast_dev; /* Network device for multicast */
|
char *mcast_dev; /* Network device for multicast */
|
||||||
int ttl; /* TTL of transmitted udp multicast */
|
|
||||||
char *bts_mcast_group; /* BTS are listening to this group */
|
char *bts_mcast_group; /* BTS are listening to this group */
|
||||||
uint16_t bts_mcast_port;
|
uint16_t bts_mcast_port;
|
||||||
char *ms_mcast_group; /* MS are listening to this group */
|
char *ms_mcast_group; /* MS are listening to this group */
|
||||||
@@ -98,7 +95,7 @@ struct phy_instance {
|
|||||||
struct phy_link *phy_link;
|
struct phy_link *phy_link;
|
||||||
|
|
||||||
/* back-pointer to the TRX to which we're associated */
|
/* back-pointer to the TRX to which we're associated */
|
||||||
struct gsm_bts_trx *trx; /* NOTE: may be NULL! */
|
struct gsm_bts_trx *trx;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -113,8 +110,11 @@ struct phy_instance {
|
|||||||
} sysmobts;
|
} sysmobts;
|
||||||
struct {
|
struct {
|
||||||
struct trx_l1h *hdl;
|
struct trx_l1h *hdl;
|
||||||
struct trx_dl_burst_req br[TRX_NR_TS];
|
bool sw_act_reported;
|
||||||
} osmotrx;
|
} osmotrx;
|
||||||
|
struct {
|
||||||
|
struct l1sched_trx sched;
|
||||||
|
} virt;
|
||||||
struct {
|
struct {
|
||||||
/* logical transceiver number within one PHY */
|
/* logical transceiver number within one PHY */
|
||||||
uint32_t trx_id;
|
uint32_t trx_id;
|
||||||
@@ -134,7 +134,6 @@ struct phy_instance {
|
|||||||
uint8_t dsp_alive_period; /* DSP alive timer period */
|
uint8_t dsp_alive_period; /* DSP alive timer period */
|
||||||
uint8_t tx_pwr_adj_mode; /* 0: no auto adjust power, 1: auto adjust power using RMS detector */
|
uint8_t tx_pwr_adj_mode; /* 0: no auto adjust power, 1: auto adjust power using RMS detector */
|
||||||
uint8_t tx_pwr_red_8psk; /* 8-PSK maximum Tx power reduction level in dB */
|
uint8_t tx_pwr_red_8psk; /* 8-PSK maximum Tx power reduction level in dB */
|
||||||
uint8_t tx_c0_idle_pwr_red; /* C0 idle slot Tx power reduction level in dB */
|
|
||||||
} lc15;
|
} lc15;
|
||||||
struct {
|
struct {
|
||||||
/* configuration */
|
/* configuration */
|
||||||
@@ -156,26 +155,21 @@ struct phy_instance {
|
|||||||
struct phy_link *phy_link_by_num(int num);
|
struct phy_link *phy_link_by_num(int num);
|
||||||
struct phy_link *phy_link_create(void *ctx, int num);
|
struct phy_link *phy_link_create(void *ctx, int num);
|
||||||
void phy_link_destroy(struct phy_link *plink);
|
void phy_link_destroy(struct phy_link *plink);
|
||||||
const char *phy_link_name(const struct phy_link *plink);
|
|
||||||
void phy_link_state_set(struct phy_link *plink, enum phy_link_state state);
|
void phy_link_state_set(struct phy_link *plink, enum phy_link_state state);
|
||||||
enum phy_link_state phy_link_state_get(struct phy_link *plink);
|
|
||||||
const char *phy_link_state_name(enum phy_link_state state);
|
|
||||||
int phy_links_open(void);
|
int phy_links_open(void);
|
||||||
|
|
||||||
struct phy_instance *phy_instance_by_num(const struct phy_link *plink, int num);
|
struct phy_instance *phy_instance_by_num(struct phy_link *plink, int num);
|
||||||
struct phy_instance *phy_instance_create(struct phy_link *plink, int num);
|
struct phy_instance *phy_instance_create(struct phy_link *plink, int num);
|
||||||
void phy_instance_link_to_trx(struct phy_instance *pinst, struct gsm_bts_trx *trx);
|
void phy_instance_link_to_trx(struct phy_instance *pinst, struct gsm_bts_trx *trx);
|
||||||
void phy_instance_destroy(struct phy_instance *pinst);
|
void phy_instance_destroy(struct phy_instance *pinst);
|
||||||
const char *phy_instance_name(const struct phy_instance *pinst);
|
const char *phy_instance_name(struct phy_instance *pinst);
|
||||||
|
|
||||||
static inline struct phy_instance *trx_phy_instance(const struct gsm_bts_trx *trx)
|
void phy_user_statechg_notif(struct phy_instance *pinst, enum phy_link_state link_state);
|
||||||
|
|
||||||
|
static inline struct phy_instance *trx_phy_instance(struct gsm_bts_trx *trx)
|
||||||
{
|
{
|
||||||
OSMO_ASSERT(trx);
|
OSMO_ASSERT(trx);
|
||||||
return trx->pinst;
|
return trx->role_bts.l1h;
|
||||||
}
|
}
|
||||||
|
|
||||||
int bts_model_phy_link_open(struct phy_link *plink);
|
int bts_model_phy_link_open(struct phy_link *plink);
|
||||||
int bts_model_phy_link_close(struct phy_link *plink);
|
|
||||||
|
|
||||||
#define LOGPPHL(plink, section, lvl, fmt, args...) LOGP(section, lvl, "%s: " fmt, phy_link_name(plink), ##args)
|
|
||||||
#define LOGPPHI(pinst, section, lvl, fmt, args...) LOGP(section, lvl, "%s: " fmt, phy_instance_name(pinst), ##args)
|
|
||||||
|
|||||||
@@ -1,90 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <osmo-bts/gsm_data.h>
|
||||||
|
|
||||||
/* MS/BS Power related measurement averaging algo */
|
|
||||||
enum gsm_power_ctrl_meas_avg_algo {
|
|
||||||
GSM_PWR_CTRL_MEAS_AVG_ALGO_NONE = 0x00,
|
|
||||||
GSM_PWR_CTRL_MEAS_AVG_ALGO_UNWEIGHTED = 0x01,
|
|
||||||
GSM_PWR_CTRL_MEAS_AVG_ALGO_WEIGHTED = 0x02,
|
|
||||||
GSM_PWR_CTRL_MEAS_AVG_ALGO_MOD_MEDIAN = 0x03,
|
|
||||||
/* EWMA is an Osmocom specific algo */
|
|
||||||
GSM_PWR_CTRL_MEAS_AVG_ALGO_OSMO_EWMA = 0x04,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* MS/BS Power related measurement parameters */
|
|
||||||
struct gsm_power_ctrl_meas_params {
|
|
||||||
/* Thresholds (see 3GPP TS 45.008, section A.3.2.1) */
|
|
||||||
uint8_t lower_thresh; /* lower (decreasing) direction */
|
|
||||||
uint8_t upper_thresh; /* upper (increasing) direction */
|
|
||||||
|
|
||||||
/* Threshold Comparators for lower (decreasing) direction */
|
|
||||||
uint8_t lower_cmp_p; /* P1 for RxLev, P3 for RxQual */
|
|
||||||
uint8_t lower_cmp_n; /* N1 for RxLev, N3 for RxQual */
|
|
||||||
/* Threshold Comparators for upper (increasing) direction */
|
|
||||||
uint8_t upper_cmp_p; /* P2 for RxLev, P4 for RxQual */
|
|
||||||
uint8_t upper_cmp_n; /* N2 for RxLev, N4 for RxQual */
|
|
||||||
|
|
||||||
/* Hreqave and Hreqt (see 3GPP TS 45.008, Annex A) */
|
|
||||||
uint8_t h_reqave;
|
|
||||||
uint8_t h_reqt;
|
|
||||||
|
|
||||||
/* AVG algorithm and its specific parameters */
|
|
||||||
enum gsm_power_ctrl_meas_avg_algo algo;
|
|
||||||
union {
|
|
||||||
/* Exponentially Weighted Moving Average */
|
|
||||||
struct {
|
|
||||||
/* Smoothing factor: higher the value - less smoothing */
|
|
||||||
uint8_t alpha; /* 1 .. 99 (in %) */
|
|
||||||
} ewma;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/* MS/BS Power Control parameters */
|
|
||||||
struct gsm_power_ctrl_params {
|
|
||||||
/* Minimum interval between power level changes */
|
|
||||||
uint8_t ctrl_interval; /* 1 step is 2 SACCH periods */
|
|
||||||
|
|
||||||
/* Power change step size (maximum) */
|
|
||||||
uint8_t inc_step_size_db; /* increasing direction */
|
|
||||||
uint8_t red_step_size_db; /* reducing direction */
|
|
||||||
|
|
||||||
/* Measurement averaging parameters for RxLev & RxQual */
|
|
||||||
struct gsm_power_ctrl_meas_params rxqual_meas;
|
|
||||||
struct gsm_power_ctrl_meas_params rxlev_meas;
|
|
||||||
|
|
||||||
/* Measurement averaging parameters for C/I, per chan type */
|
|
||||||
struct gsm_power_ctrl_meas_params ci_fr_meas;
|
|
||||||
struct gsm_power_ctrl_meas_params ci_hr_meas;
|
|
||||||
struct gsm_power_ctrl_meas_params ci_amr_fr_meas;
|
|
||||||
struct gsm_power_ctrl_meas_params ci_amr_hr_meas;
|
|
||||||
struct gsm_power_ctrl_meas_params ci_sdcch_meas;
|
|
||||||
struct gsm_power_ctrl_meas_params ci_gprs_meas;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Measurement pre-processing state */
|
|
||||||
struct gsm_power_ctrl_meas_proc_state {
|
|
||||||
/* Number of measurements processed */
|
|
||||||
unsigned int meas_num;
|
|
||||||
/* Algorithm specific data */
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
/* Scaled up 100 times average value */
|
|
||||||
int Avg100;
|
|
||||||
} ewma;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Default MS/BS Power Control parameters */
|
|
||||||
extern const struct gsm_power_ctrl_params power_ctrl_params_def;
|
|
||||||
void power_ctrl_params_def_reset(struct gsm_power_ctrl_params *params, bool is_bs_pwr);
|
|
||||||
|
|
||||||
struct gsm_lchan;
|
|
||||||
int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
|
int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
|
||||||
const uint8_t ms_power_lvl,
|
const uint8_t ms_power, const int rxLevel);
|
||||||
const int8_t ul_rssi_dbm,
|
|
||||||
const int16_t ul_lqual_cb);
|
|
||||||
|
|
||||||
int lchan_bs_pwr_ctrl(struct gsm_lchan *lchan,
|
|
||||||
const struct gsm48_meas_res *mr);
|
|
||||||
|
|||||||
@@ -1,9 +1,22 @@
|
|||||||
#ifndef _RSL_H
|
#ifndef _RSL_H
|
||||||
#define _RSL_H
|
#define _RSL_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* What kind of release/activation is done? A silent one for
|
||||||
|
* the PDCH or one triggered through RSL?
|
||||||
|
*/
|
||||||
|
enum {
|
||||||
|
LCHAN_REL_ACT_RSL,
|
||||||
|
LCHAN_REL_ACT_PCU,
|
||||||
|
LCHAN_REL_ACT_OML,
|
||||||
|
LCHAN_REL_ACT_REACT, /* remove once auto-activation hack is removed from opstart_compl() */
|
||||||
|
};
|
||||||
|
|
||||||
#define LCHAN_FN_DUMMY 0xFFFFFFFF
|
#define LCHAN_FN_DUMMY 0xFFFFFFFF
|
||||||
#define LCHAN_FN_WAIT 0xFFFFFFFE
|
#define LCHAN_FN_WAIT 0xFFFFFFFE
|
||||||
|
|
||||||
|
int msgb_queue_flush(struct llist_head *list);
|
||||||
|
|
||||||
int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg);
|
int down_rsl(struct gsm_bts_trx *trx, struct msgb *msg);
|
||||||
int rsl_tx_rf_res(struct gsm_bts_trx *trx);
|
int rsl_tx_rf_res(struct gsm_bts_trx *trx);
|
||||||
int rsl_tx_chan_rqd(struct gsm_bts_trx *trx, struct gsm_time *gtime,
|
int rsl_tx_chan_rqd(struct gsm_bts_trx *trx, struct gsm_time *gtime,
|
||||||
@@ -11,10 +24,12 @@ int rsl_tx_chan_rqd(struct gsm_bts_trx *trx, struct gsm_time *gtime,
|
|||||||
int rsl_tx_est_ind(struct gsm_lchan *lchan, uint8_t link_id, uint8_t *data, int len);
|
int rsl_tx_est_ind(struct gsm_lchan *lchan, uint8_t link_id, uint8_t *data, int len);
|
||||||
|
|
||||||
int rsl_tx_chan_act_acknack(struct gsm_lchan *lchan, uint8_t cause);
|
int rsl_tx_chan_act_acknack(struct gsm_lchan *lchan, uint8_t cause);
|
||||||
int rsl_tx_conn_fail(const struct gsm_lchan *lchan, uint8_t cause);
|
int rsl_tx_conn_fail(struct gsm_lchan *lchan, uint8_t cause);
|
||||||
int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan);
|
int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan);
|
||||||
int rsl_tx_hando_det(struct gsm_lchan *lchan, uint8_t *ho_delay);
|
int rsl_tx_hando_det(struct gsm_lchan *lchan, uint8_t *ho_delay);
|
||||||
|
|
||||||
|
int lchan_deactivate(struct gsm_lchan *lchan);
|
||||||
|
|
||||||
/* call-back for LAPDm code, called when it wants to send msgs UP */
|
/* call-back for LAPDm code, called when it wants to send msgs UP */
|
||||||
int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx);
|
int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx);
|
||||||
|
|
||||||
@@ -28,8 +43,4 @@ void cb_ts_disconnected(struct gsm_bts_trx_ts *ts);
|
|||||||
void cb_ts_connected(struct gsm_bts_trx_ts *ts, int rc);
|
void cb_ts_connected(struct gsm_bts_trx_ts *ts, int rc);
|
||||||
void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc);
|
void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc);
|
||||||
|
|
||||||
int rsl_tx_cbch_load_indication(struct gsm_bts *bts, bool ext_cbch, bool overflow, uint8_t amount);
|
|
||||||
|
|
||||||
int rsl_tx_meas_res(struct gsm_lchan *lchan, const uint8_t *l3, unsigned int l3_len, int timing_offset);
|
|
||||||
|
|
||||||
#endif // _RSL_H */
|
#endif // _RSL_H */
|
||||||
|
|||||||
@@ -1,19 +1,10 @@
|
|||||||
#pragma once
|
#ifndef TRX_SCHEDULER_H
|
||||||
|
#define TRX_SCHEDULER_H
|
||||||
|
|
||||||
#include <osmocom/core/utils.h>
|
#include <osmocom/core/utils.h>
|
||||||
#include <osmocom/core/rate_ctr.h>
|
|
||||||
|
|
||||||
#include <osmo-bts/gsm_data.h>
|
#include <osmo-bts/gsm_data.h>
|
||||||
|
|
||||||
#define TRX_GMSK_NB_TSC(br) \
|
|
||||||
_sched_train_seq_gmsk_nb[(br)->tsc_set][(br)->tsc]
|
|
||||||
|
|
||||||
#define TRX_8PSK_NB_TSC(br) \
|
|
||||||
_sched_train_seq_8psk_nb[(br)->tsc]
|
|
||||||
|
|
||||||
#define TRX_CHAN_IS_DEDIC(chan) \
|
|
||||||
(chan >= TRXC_TCHF)
|
|
||||||
|
|
||||||
/* These types define the different channels on a multiframe.
|
/* These types define the different channels on a multiframe.
|
||||||
* Each channel has queues and can be activated individually.
|
* Each channel has queues and can be activated individually.
|
||||||
*/
|
*/
|
||||||
@@ -24,10 +15,6 @@ enum trx_chan_type {
|
|||||||
TRXC_BCCH,
|
TRXC_BCCH,
|
||||||
TRXC_RACH,
|
TRXC_RACH,
|
||||||
TRXC_CCCH,
|
TRXC_CCCH,
|
||||||
TRXC_CBCH,
|
|
||||||
TRXC_PDTCH,
|
|
||||||
TRXC_PTCCH,
|
|
||||||
/* Dedicated channels start here */
|
|
||||||
TRXC_TCHF,
|
TRXC_TCHF,
|
||||||
TRXC_TCHH_0,
|
TRXC_TCHH_0,
|
||||||
TRXC_TCHH_1,
|
TRXC_TCHH_1,
|
||||||
@@ -58,44 +45,41 @@ enum trx_chan_type {
|
|||||||
TRXC_SACCH8_5,
|
TRXC_SACCH8_5,
|
||||||
TRXC_SACCH8_6,
|
TRXC_SACCH8_6,
|
||||||
TRXC_SACCH8_7,
|
TRXC_SACCH8_7,
|
||||||
|
TRXC_PDTCH,
|
||||||
|
TRXC_PTCCH,
|
||||||
|
TRXC_CBCH,
|
||||||
_TRX_CHAN_MAX
|
_TRX_CHAN_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern const struct value_string trx_chan_type_names[];
|
||||||
|
|
||||||
#define GSM_BURST_LEN 148
|
#define GSM_BURST_LEN 148
|
||||||
#define GPRS_BURST_LEN GSM_BURST_LEN
|
#define GPRS_BURST_LEN GSM_BURST_LEN
|
||||||
#define EGPRS_BURST_LEN 444
|
#define EGPRS_BURST_LEN 444
|
||||||
|
|
||||||
enum trx_mod_type {
|
enum trx_burst_type {
|
||||||
TRX_MOD_T_GMSK,
|
TRX_BURST_GMSK,
|
||||||
TRX_MOD_T_8PSK,
|
TRX_BURST_8PSK,
|
||||||
TRX_MOD_T_AQPSK,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* A set of measurements belonging to one Uplink burst */
|
|
||||||
struct l1sched_meas_set {
|
|
||||||
uint32_t fn; /* TDMA frame number */
|
|
||||||
int16_t toa256; /* Timing of Arrival (1/256 of a symbol) */
|
|
||||||
int16_t ci_cb; /* Carrier-to-Interference (cB) */
|
|
||||||
float rssi; /* RSSI (dBm) */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* States each channel on a multiframe */
|
/* States each channel on a multiframe */
|
||||||
struct l1sched_chan_state {
|
struct l1sched_chan_state {
|
||||||
/* Pointer to the associated logical channel state from gsm_data_shared.
|
|
||||||
* Initialized during channel activation, thus may be NULL for inactive
|
|
||||||
* or auto-active channels. Always check before dereferencing! */
|
|
||||||
struct gsm_lchan *lchan;
|
|
||||||
|
|
||||||
/* scheduler */
|
/* scheduler */
|
||||||
bool active; /* Channel is active */
|
uint8_t active; /* Channel is active */
|
||||||
ubit_t *dl_bursts; /* burst buffer for TX */
|
ubit_t *dl_bursts; /* burst buffer for TX */
|
||||||
enum trx_mod_type dl_mod_type; /* Downlink modulation type */
|
enum trx_burst_type dl_burst_type; /* GMSK or 8PSK burst type */
|
||||||
sbit_t *ul_bursts; /* burst buffer for RX */
|
sbit_t *ul_bursts; /* burst buffer for RX */
|
||||||
sbit_t *ul_bursts_prev;/* previous burst buffer for RX (repeated SACCH) */
|
|
||||||
uint32_t ul_first_fn; /* fn of first burst */
|
uint32_t ul_first_fn; /* fn of first burst */
|
||||||
uint8_t ul_mask; /* mask of received bursts */
|
uint8_t ul_mask; /* mask of received bursts */
|
||||||
|
|
||||||
|
/* RSSI / TOA */
|
||||||
|
uint8_t rssi_num; /* number of RSSI values */
|
||||||
|
float rssi_sum; /* sum of RSSI values */
|
||||||
|
uint8_t toa_num; /* number of TOA values */
|
||||||
|
int32_t toa256_sum; /* sum of TOA values (1/256 symbol) */
|
||||||
|
|
||||||
/* loss detection */
|
/* loss detection */
|
||||||
|
uint8_t lost_frames; /* how many L2 frames were lost */
|
||||||
uint32_t last_tdma_fn; /* last processed TDMA frame number */
|
uint32_t last_tdma_fn; /* last processed TDMA frame number */
|
||||||
uint32_t proc_tdma_fs; /* how many TDMA frames were processed */
|
uint32_t proc_tdma_fs; /* how many TDMA frames were processed */
|
||||||
uint32_t lost_tdma_fs; /* how many TDMA frames were lost */
|
uint32_t lost_tdma_fs; /* how many TDMA frames were lost */
|
||||||
@@ -106,20 +90,18 @@ struct l1sched_chan_state {
|
|||||||
/* AMR */
|
/* AMR */
|
||||||
uint8_t codec[4]; /* 4 possible codecs for amr */
|
uint8_t codec[4]; /* 4 possible codecs for amr */
|
||||||
int codecs; /* number of possible codecs */
|
int codecs; /* number of possible codecs */
|
||||||
int lqual_cb_sum; /* sum of link quality samples (in cB) */
|
float ber_sum; /* sum of bit error rates */
|
||||||
int lqual_cb_num; /* number of link quality samples */
|
int ber_num; /* number of bit error rates */
|
||||||
uint8_t ul_ft; /* current uplink FT index */
|
uint8_t ul_ft; /* current uplink FT index */
|
||||||
uint8_t dl_ft; /* current downlink FT index */
|
uint8_t dl_ft; /* current downlink FT index */
|
||||||
uint8_t ul_cmr; /* current uplink CMR index */
|
uint8_t ul_cmr; /* current uplink CMR index */
|
||||||
uint8_t dl_cmr; /* current downlink CMR index */
|
uint8_t dl_cmr; /* current downlink CMR index */
|
||||||
uint8_t amr_last_dtx; /* last received dtx frame type */
|
uint8_t amr_loop; /* if AMR loop is enabled */
|
||||||
|
|
||||||
/* TCH/H */
|
/* TCH/H */
|
||||||
uint8_t dl_ongoing_facch; /* FACCH/H on downlink */
|
uint8_t dl_ongoing_facch; /* FACCH/H on downlink */
|
||||||
uint8_t ul_ongoing_facch; /* FACCH/H on uplink */
|
uint8_t ul_ongoing_facch; /* FACCH/H on uplink */
|
||||||
|
|
||||||
uint8_t dl_facch_bursts; /* number of remaining DL FACCH bursts */
|
|
||||||
|
|
||||||
/* encryption */
|
/* encryption */
|
||||||
int ul_encr_algo; /* A5/x encry algo downlink */
|
int ul_encr_algo; /* A5/x encry algo downlink */
|
||||||
int dl_encr_algo; /* A5/x encry algo uplink */
|
int dl_encr_algo; /* A5/x encry algo uplink */
|
||||||
@@ -128,74 +110,87 @@ struct l1sched_chan_state {
|
|||||||
uint8_t ul_encr_key[MAX_A5_KEY_LEN];
|
uint8_t ul_encr_key[MAX_A5_KEY_LEN];
|
||||||
uint8_t dl_encr_key[MAX_A5_KEY_LEN];
|
uint8_t dl_encr_key[MAX_A5_KEY_LEN];
|
||||||
|
|
||||||
/* Uplink measurements */
|
/* measurements */
|
||||||
struct {
|
struct {
|
||||||
/* Active channel measurements (simple ring buffer) */
|
uint8_t clock; /* cyclic clock counter */
|
||||||
struct l1sched_meas_set buf[8]; /* up to 8 entries */
|
int8_t rssi[32]; /* last RSSI values */
|
||||||
unsigned int current; /* current position */
|
int rssi_count; /* received RSSI values */
|
||||||
|
int rssi_valid_count; /* number of stored value */
|
||||||
/* Interference measurements */
|
int rssi_got_burst; /* any burst received so far */
|
||||||
int interf_avg; /* sliding average */
|
int32_t toa256_sum; /* sum of TOA values (1/256 symbol) */
|
||||||
|
int toa_num; /* number of TOA value */
|
||||||
} meas;
|
} meas;
|
||||||
|
|
||||||
/* handover */
|
/* handover */
|
||||||
bool ho_rach_detect; /* if rach detection is on */
|
uint8_t ho_rach_detect; /* if rach detection is on */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct l1sched_ts {
|
struct l1sched_ts {
|
||||||
struct gsm_bts_trx_ts *ts; /* timeslot we belong to */
|
|
||||||
|
|
||||||
uint8_t mf_index; /* selected multiframe index */
|
uint8_t mf_index; /* selected multiframe index */
|
||||||
uint8_t mf_period; /* period of multiframe */
|
uint8_t mf_period; /* period of multiframe */
|
||||||
const struct trx_sched_frame *mf_frames; /* pointer to frame layout */
|
const struct trx_sched_frame *mf_frames; /* pointer to frame layout */
|
||||||
|
|
||||||
struct llist_head dl_prims; /* Queue primitives for TX */
|
struct llist_head dl_prims; /* Queue primitives for TX */
|
||||||
|
|
||||||
struct rate_ctr_group *ctrs; /* rate counters */
|
|
||||||
|
|
||||||
/* Channel states for all logical channels */
|
/* Channel states for all logical channels */
|
||||||
struct l1sched_chan_state chan_state[_TRX_CHAN_MAX];
|
struct l1sched_chan_state chan_state[_TRX_CHAN_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct l1sched_trx {
|
||||||
|
struct gsm_bts_trx *trx;
|
||||||
|
struct l1sched_ts ts[TRX_NR_TS];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct l1sched_ts *l1sched_trx_get_ts(struct l1sched_trx *l1t, uint8_t tn);
|
||||||
|
|
||||||
|
/*! \brief how many frame numbers in advance we should send bursts to PHY */
|
||||||
|
extern uint32_t trx_clock_advance;
|
||||||
|
/*! \brief advance RTS.ind to L2 by that many clocks */
|
||||||
|
extern uint32_t trx_rts_advance;
|
||||||
|
/*! \brief last frame number as received from PHY */
|
||||||
|
extern uint32_t transceiver_last_fn;
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Initialize the scheduler data structures */
|
/*! \brief Initialize the scheduler data structures */
|
||||||
void trx_sched_init(struct gsm_bts_trx *trx);
|
int trx_sched_init(struct l1sched_trx *l1t, struct gsm_bts_trx *trx);
|
||||||
|
|
||||||
/*! \brief De-initialize the scheduler data structures */
|
/*! \brief De-initialize the scheduler data structures */
|
||||||
void trx_sched_clean(struct gsm_bts_trx *trx);
|
void trx_sched_exit(struct l1sched_trx *l1t);
|
||||||
|
|
||||||
/*! \brief Handle a PH-DATA.req from L2 down to L1 */
|
/*! \brief Handle a PH-DATA.req from L2 down to L1 */
|
||||||
int trx_sched_ph_data_req(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap);
|
int trx_sched_ph_data_req(struct l1sched_trx *l1t, struct osmo_phsap_prim *l1sap);
|
||||||
|
|
||||||
/*! \brief Handle a PH-TCH.req from L2 down to L1 */
|
/*! \brief Handle a PH-TCH.req from L2 down to L1 */
|
||||||
int trx_sched_tch_req(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap);
|
int trx_sched_tch_req(struct l1sched_trx *l1t, struct osmo_phsap_prim *l1sap);
|
||||||
|
|
||||||
/*! \brief PHY informs us of new (current) GSM frame number */
|
/*! \brief PHY informs us of new (current) GSM frame number */
|
||||||
int trx_sched_clock(struct gsm_bts *bts, uint32_t fn);
|
int trx_sched_clock(struct gsm_bts *bts, uint32_t fn);
|
||||||
|
|
||||||
/*! \brief PHY informs us clock indications should start to be received */
|
/*! \brief handle an UL burst received by PHY */
|
||||||
int trx_sched_clock_started(struct gsm_bts *bts);
|
int trx_sched_ul_burst(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
sbit_t *bits, uint16_t nbits, int8_t rssi, int16_t toa);
|
||||||
/*! \brief PHY informs us no more clock indications should be received anymore */
|
|
||||||
int trx_sched_clock_stopped(struct gsm_bts *bts);
|
|
||||||
|
|
||||||
/*! \brief set multiframe scheduler to given physical channel config */
|
/*! \brief set multiframe scheduler to given physical channel config */
|
||||||
int trx_sched_set_pchan(struct gsm_bts_trx_ts *ts, enum gsm_phys_chan_config pchan);
|
int trx_sched_set_pchan(struct l1sched_trx *l1t, uint8_t tn,
|
||||||
|
enum gsm_phys_chan_config pchan);
|
||||||
|
|
||||||
/*! \brief set all matching logical channels active/inactive */
|
/*! \brief set all matching logical channels active/inactive */
|
||||||
int trx_sched_set_lchan(struct gsm_lchan *lchan, uint8_t chan_nr, uint8_t link_id, bool active);
|
int trx_sched_set_lchan(struct l1sched_trx *l1t, uint8_t chan_nr, uint8_t link_id,
|
||||||
|
int active);
|
||||||
/*! \brief set all logical channels of BCCH/CCCH active/inactive */
|
|
||||||
int trx_sched_set_bcch_ccch(struct gsm_lchan *lchan, bool active);
|
|
||||||
|
|
||||||
/*! \brief set mode of all matching logical channels to given mode(s) */
|
/*! \brief set mode of all matching logical channels to given mode(s) */
|
||||||
int trx_sched_set_mode(struct gsm_bts_trx_ts *ts, uint8_t chan_nr, uint8_t rsl_cmode,
|
int trx_sched_set_mode(struct l1sched_trx *l1t, uint8_t chan_nr, uint8_t rsl_cmode,
|
||||||
uint8_t tch_mode, int codecs, uint8_t codec0, uint8_t codec1,
|
uint8_t tch_mode, int codecs, uint8_t codec0, uint8_t codec1,
|
||||||
uint8_t codec2, uint8_t codec3, uint8_t initial_codec,
|
uint8_t codec2, uint8_t codec3, uint8_t initial_codec,
|
||||||
uint8_t handover);
|
uint8_t handover);
|
||||||
|
|
||||||
/*! \brief set ciphering on given logical channels */
|
/*! \brief set ciphering on given logical channels */
|
||||||
int trx_sched_set_cipher(struct gsm_lchan *lchan, uint8_t chan_nr, bool downlink);
|
int trx_sched_set_cipher(struct l1sched_trx *l1t, uint8_t chan_nr, int downlink,
|
||||||
|
int algo, uint8_t *key, int key_len);
|
||||||
|
|
||||||
|
/* \brief close all logical channels and reset timeslots */
|
||||||
|
void trx_sched_reset(struct l1sched_trx *l1t);
|
||||||
|
|
||||||
|
|
||||||
/* frame structures */
|
/* frame structures */
|
||||||
struct trx_sched_frame {
|
struct trx_sched_frame {
|
||||||
@@ -226,100 +221,7 @@ struct trx_sched_multiframe {
|
|||||||
int find_sched_mframe_idx(enum gsm_phys_chan_config pchan, uint8_t tn);
|
int find_sched_mframe_idx(enum gsm_phys_chan_config pchan, uint8_t tn);
|
||||||
|
|
||||||
/*! Determine if given frame number contains SACCH (true) or other (false) burst */
|
/*! Determine if given frame number contains SACCH (true) or other (false) burst */
|
||||||
bool trx_sched_is_sacch_fn(const struct gsm_bts_trx_ts *ts, uint32_t fn, bool uplink);
|
bool trx_sched_is_sacch_fn(struct gsm_bts_trx_ts *ts, uint32_t fn, bool uplink);
|
||||||
extern const struct trx_sched_multiframe trx_sched_multiframes[];
|
extern const struct trx_sched_multiframe trx_sched_multiframes[];
|
||||||
|
|
||||||
#define TRX_BI_F_NOPE_IND (1 << 0)
|
#endif /* TRX_SCHEDULER_H */
|
||||||
#define TRX_BI_F_MOD_TYPE (1 << 1)
|
|
||||||
#define TRX_BI_F_TS_INFO (1 << 2)
|
|
||||||
#define TRX_BI_F_CI_CB (1 << 3)
|
|
||||||
#define TRX_BI_F_TRX_NUM (1 << 4)
|
|
||||||
#define TRX_BI_F_BATCH_IND (1 << 5)
|
|
||||||
#define TRX_BI_F_SHADOW_IND (1 << 6)
|
|
||||||
#define TRX_BI_F_ACCESS_BURST (1 << 7)
|
|
||||||
|
|
||||||
/*! UL burst indication with the corresponding meta info */
|
|
||||||
struct trx_ul_burst_ind {
|
|
||||||
/* Field presence bitmask (see TRX_BI_F_*) */
|
|
||||||
uint8_t flags;
|
|
||||||
|
|
||||||
/* Mandatory fields */
|
|
||||||
uint32_t fn; /*!< TDMA frame number */
|
|
||||||
uint8_t tn; /*!< TDMA time-slot number */
|
|
||||||
int16_t toa256; /*!< Timing of Arrival in units of 1/256 of symbol */
|
|
||||||
int8_t rssi; /*!< Received Signal Strength Indication */
|
|
||||||
|
|
||||||
/* Optional fields (defined by flags) */
|
|
||||||
enum trx_mod_type mod; /*!< Modulation type */
|
|
||||||
uint8_t tsc_set; /*!< Training Sequence Set */
|
|
||||||
uint8_t tsc; /*!< Training Sequence Code */
|
|
||||||
int16_t ci_cb; /*!< Carrier-to-Interference ratio (in centiBels) */
|
|
||||||
uint8_t trx_num; /*!< TRX (RF channel) number */
|
|
||||||
|
|
||||||
/* Used internally by the PDU parser */
|
|
||||||
uint8_t _num_pdus; /*!< Number of processed PDUs */
|
|
||||||
|
|
||||||
/* Internally used by the scheduler */
|
|
||||||
enum trx_chan_type chan;
|
|
||||||
uint8_t bid;
|
|
||||||
|
|
||||||
/*! Burst soft-bits buffer */
|
|
||||||
sbit_t burst[EGPRS_BURST_LEN];
|
|
||||||
size_t burst_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TRX_BR_F_FACCH (1 << 0)
|
|
||||||
|
|
||||||
/*! DL burst request with the corresponding meta info */
|
|
||||||
struct trx_dl_burst_req {
|
|
||||||
uint8_t flags; /*!< see TRX_BR_F_* */
|
|
||||||
|
|
||||||
/* Mandatory fields */
|
|
||||||
uint32_t fn; /*!< TDMA frame number */
|
|
||||||
uint8_t tn; /*!< TDMA timeslot number */
|
|
||||||
uint8_t att; /*!< Tx power attenuation */
|
|
||||||
int8_t scpir; /*!< SCPIR (for AQPSK only) */
|
|
||||||
uint8_t trx_num; /*!< TRX (RF channel) number */
|
|
||||||
|
|
||||||
enum trx_mod_type mod; /*!< Modulation type */
|
|
||||||
uint8_t tsc_set; /*!< Training Sequence Set */
|
|
||||||
uint8_t tsc; /*!< Training Sequence Code */
|
|
||||||
|
|
||||||
/* Internally used by the scheduler */
|
|
||||||
enum trx_chan_type chan;
|
|
||||||
uint8_t bid;
|
|
||||||
|
|
||||||
/*! Burst hard-bits buffer */
|
|
||||||
ubit_t burst[EGPRS_BURST_LEN];
|
|
||||||
size_t burst_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*! Handle an UL burst received by PHY */
|
|
||||||
int trx_sched_route_burst_ind(const struct gsm_bts_trx *trx, struct trx_ul_burst_ind *bi);
|
|
||||||
int trx_sched_ul_burst(struct l1sched_ts *l1ts, struct trx_ul_burst_ind *bi);
|
|
||||||
|
|
||||||
/* Averaging mode for trx_sched_meas_avg() */
|
|
||||||
enum sched_meas_avg_mode {
|
|
||||||
/* last 4 bursts (default for xCCH, PTCCH and PDTCH) */
|
|
||||||
SCHED_MEAS_AVG_M_S4N4,
|
|
||||||
/* last 8 bursts (default for TCH/F and FACCH/F) */
|
|
||||||
SCHED_MEAS_AVG_M_S8N8,
|
|
||||||
/* first 4 of last 6 bursts (default for TCH/H) */
|
|
||||||
SCHED_MEAS_AVG_M_S6N4,
|
|
||||||
/* last 6 bursts (default for FACCH/H) */
|
|
||||||
SCHED_MEAS_AVG_M_S6N6,
|
|
||||||
/* first 4 of last 8 bursts */
|
|
||||||
SCHED_MEAS_AVG_M_S8N4,
|
|
||||||
/* first 2 of last 6 bursts */
|
|
||||||
SCHED_MEAS_AVG_M_S6N2,
|
|
||||||
/* middle 2 of last 6 bursts */
|
|
||||||
SCHED_MEAS_AVG_M_S4N2,
|
|
||||||
};
|
|
||||||
|
|
||||||
void trx_sched_meas_push(struct l1sched_chan_state *chan_state,
|
|
||||||
const struct trx_ul_burst_ind *bi);
|
|
||||||
void trx_sched_meas_avg(const struct l1sched_chan_state *chan_state,
|
|
||||||
struct l1sched_meas_set *avg,
|
|
||||||
enum sched_meas_avg_mode mode);
|
|
||||||
uint32_t trx_sched_lookup_fn(const struct l1sched_chan_state *chan_state,
|
|
||||||
const unsigned int shift);
|
|
||||||
|
|||||||
@@ -1,71 +1,94 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define LOGL1S(subsys, level, l1ts, chan, fn, fmt, args ...) \
|
#define LOGL1S(subsys, level, l1t, tn, chan, fn, fmt, args ...) \
|
||||||
LOGP(subsys, level, "%s %s %s: " fmt, \
|
LOGP(subsys, level, "%s %s %s: " fmt, \
|
||||||
gsm_fn_as_gsmtime_str(fn), \
|
gsm_fn_as_gsmtime_str(fn), \
|
||||||
gsm_ts_name((l1ts)->ts), \
|
gsm_ts_name(&(l1t)->trx->ts[tn]), \
|
||||||
chan >=0 ? trx_chan_desc[chan].name : "", ## args)
|
chan >=0 ? trx_chan_desc[chan].name : "", ## args)
|
||||||
|
|
||||||
/* Logging helper adding context from trx_{ul,dl}_burst_{ind,req} */
|
typedef int trx_sched_rts_func(struct l1sched_trx *l1t, uint8_t tn,
|
||||||
#define LOGL1SB(subsys, level, l1ts, b, fmt, args ...) \
|
uint32_t fn, enum trx_chan_type chan);
|
||||||
LOGL1S(subsys, level, l1ts, (b)->chan, (b)->fn, fmt, ## args)
|
|
||||||
|
|
||||||
typedef int trx_sched_rts_func(const struct l1sched_ts *l1ts, const struct trx_dl_burst_req *br);
|
typedef ubit_t *trx_sched_dl_func(struct l1sched_trx *l1t, uint8_t tn,
|
||||||
typedef int trx_sched_dl_func(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
uint32_t fn, enum trx_chan_type chan,
|
||||||
typedef int trx_sched_ul_func(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi);
|
uint8_t bid, uint16_t *nbits);
|
||||||
|
|
||||||
|
typedef int trx_sched_ul_func(struct l1sched_trx *l1t, uint8_t tn,
|
||||||
|
uint32_t fn, enum trx_chan_type chan,
|
||||||
|
uint8_t bid, sbit_t *bits, uint16_t nbits,
|
||||||
|
int8_t rssi, int16_t toa256);
|
||||||
|
|
||||||
struct trx_chan_desc {
|
struct trx_chan_desc {
|
||||||
/*! \brief Human-readable name */
|
/*! \brief Is this on a PDCH (PS) ? */
|
||||||
const char *name;
|
int pdch;
|
||||||
/*! \brief Human-readable description */
|
/*! \brief TRX Channel Type */
|
||||||
const char *desc;
|
enum trx_chan_type chan;
|
||||||
/*! \brief Channel Number (like in RSL) */
|
/*! \brief Channel Number (like in RSL) */
|
||||||
uint8_t chan_nr;
|
uint8_t chan_nr;
|
||||||
/*! \brief Link ID (like in RSL) */
|
/*! \brief Link ID (like in RSL) */
|
||||||
uint8_t link_id;
|
uint8_t link_id;
|
||||||
|
/*! \brief Human-readable name */
|
||||||
|
const char *name;
|
||||||
/*! \brief function to call when we want to generate RTS.req to L2 */
|
/*! \brief function to call when we want to generate RTS.req to L2 */
|
||||||
trx_sched_rts_func *rts_fn;
|
trx_sched_rts_func *rts_fn;
|
||||||
/*! \brief function to call when DATA.req received from L2 */
|
/*! \brief function to call when DATA.req received from L2 */
|
||||||
trx_sched_dl_func *dl_fn;
|
trx_sched_dl_func *dl_fn;
|
||||||
/*! \brief function to call when burst received from PHY */
|
/*! \brief function to call when burst received from PHY */
|
||||||
trx_sched_ul_func *ul_fn;
|
trx_sched_ul_func *ul_fn;
|
||||||
/*! \brief channel flags, see TRX_CHAN_FLAG_* */
|
/*! \brief is this channel automatically active at start? */
|
||||||
uint8_t flags;
|
int auto_active;
|
||||||
};
|
};
|
||||||
extern const struct trx_chan_desc trx_chan_desc[_TRX_CHAN_MAX];
|
extern const struct trx_chan_desc trx_chan_desc[_TRX_CHAN_MAX];
|
||||||
|
|
||||||
extern const ubit_t _sched_dummy_burst[];
|
extern const ubit_t _sched_tsc[8][26];
|
||||||
extern const ubit_t _sched_train_seq_gmsk_nb[4][8][26];
|
extern const ubit_t _sched_egprs_tsc[8][78];
|
||||||
extern const ubit_t _sched_train_seq_8psk_nb[8][78];
|
const ubit_t _sched_fcch_burst[148];
|
||||||
extern const ubit_t _sched_train_seq_gmsk_sb[64];
|
const ubit_t _sched_sch_train[64];
|
||||||
|
|
||||||
struct msgb *_sched_dequeue_prim(struct l1sched_ts *l1ts, const struct trx_dl_burst_req *br);
|
struct msgb *_sched_dequeue_prim(struct l1sched_trx *l1t, int8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan);
|
||||||
|
|
||||||
int _sched_compose_ph_data_ind(struct l1sched_ts *l1ts, uint32_t fn,
|
int _sched_compose_ph_data_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
enum trx_chan_type chan, uint8_t *l2,
|
enum trx_chan_type chan, uint8_t *l2,
|
||||||
uint8_t l2_len, float rssi,
|
uint8_t l2_len, float rssi,
|
||||||
int16_t ta_offs_256bits, int16_t link_qual_cb,
|
int16_t ta_offs_256bits, int16_t link_qual_cb,
|
||||||
uint16_t ber10k,
|
uint16_t ber10k,
|
||||||
enum osmo_ph_pres_info_type presence_info);
|
enum osmo_ph_pres_info_type presence_info);
|
||||||
|
|
||||||
int _sched_compose_tch_ind(struct l1sched_ts *l1ts, uint32_t fn,
|
int _sched_compose_tch_ind(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
enum trx_chan_type chan, uint8_t *tch, uint8_t tch_len,
|
enum trx_chan_type chan, uint8_t *tch, uint8_t tch_len);
|
||||||
int16_t ta_offs_256bits, uint16_t ber10k, float rssi,
|
|
||||||
int16_t link_qual_cb, uint8_t is_sub);
|
|
||||||
|
|
||||||
int tx_fcch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
ubit_t *tx_idle_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
int tx_sch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
|
||||||
int tx_data_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
ubit_t *tx_fcch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
int tx_pdtch_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
|
||||||
int tx_tchf_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
ubit_t *tx_sch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
int tx_tchh_fn(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
|
||||||
|
ubit_t *tx_data_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
|
||||||
|
ubit_t *tx_pdtch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
|
||||||
|
ubit_t *tx_tchf_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
|
||||||
|
ubit_t *tx_tchh_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, uint16_t *nbits);
|
||||||
|
int rx_rach_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, sbit_t *bits, uint16_t nbits,
|
||||||
|
int8_t rssi, int16_t toa256);
|
||||||
|
int rx_data_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, sbit_t *bits, uint16_t nbits,
|
||||||
|
int8_t rssi, int16_t toa256);
|
||||||
|
int rx_pdtch_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, sbit_t *bits, uint16_t nbits,
|
||||||
|
int8_t rssi, int16_t toa256);
|
||||||
|
int rx_tchf_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, sbit_t *bits, uint16_t nbits,
|
||||||
|
int8_t rssi, int16_t toa256);
|
||||||
|
int rx_tchh_fn(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn,
|
||||||
|
enum trx_chan_type chan, uint8_t bid, sbit_t *bits, uint16_t nbits,
|
||||||
|
int8_t rssi, int16_t toa256);
|
||||||
|
|
||||||
int rx_rach_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi);
|
const ubit_t *_sched_dl_burst(struct l1sched_trx *l1t, uint8_t tn,
|
||||||
int rx_data_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi);
|
uint32_t fn, uint16_t *nbits);
|
||||||
int rx_pdtch_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi);
|
int _sched_rts(struct l1sched_trx *l1t, uint8_t tn, uint32_t fn);
|
||||||
int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi);
|
void _sched_act_rach_det(struct l1sched_trx *l1t, uint8_t tn, uint8_t ss, int activate);
|
||||||
int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi);
|
|
||||||
|
|
||||||
void _sched_dl_burst(struct l1sched_ts *l1ts, struct trx_dl_burst_req *br);
|
|
||||||
int _sched_rts(const struct l1sched_ts *l1ts, uint32_t fn);
|
|
||||||
void _sched_act_rach_det(struct gsm_bts_trx *trx, uint8_t tn, uint8_t ss, int activate);
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
enum sig_subsys {
|
enum sig_subsys {
|
||||||
SS_GLOBAL,
|
SS_GLOBAL,
|
||||||
|
SS_FAIL,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum signals_global {
|
enum signals_global {
|
||||||
@@ -15,10 +16,4 @@ enum signals_global {
|
|||||||
S_NEW_NSVC_ATTR,
|
S_NEW_NSVC_ATTR,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nm_statechg_signal_data {
|
|
||||||
struct gsm_abis_mo *mo;
|
|
||||||
uint8_t old_state;
|
|
||||||
uint8_t new_state;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <osmo-bts/gsm_data.h>
|
|
||||||
|
|
||||||
void lchan_ms_ta_ctrl(struct gsm_lchan *lchan, uint8_t ms_tx_ta, int16_t toa256);
|
|
||||||
@@ -20,8 +20,6 @@ struct power_amp {
|
|||||||
struct pa_calibration calib;
|
struct pa_calibration calib;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*ramp_compl_cb_t)(struct gsm_bts_trx *trx);
|
|
||||||
|
|
||||||
/* Transmit power related parameters of a transceiver */
|
/* Transmit power related parameters of a transceiver */
|
||||||
struct trx_power_params {
|
struct trx_power_params {
|
||||||
/* specified maximum output of TRX at full power, has to be
|
/* specified maximum output of TRX at full power, has to be
|
||||||
@@ -57,34 +55,24 @@ struct trx_power_params {
|
|||||||
unsigned int step_size_mdB;
|
unsigned int step_size_mdB;
|
||||||
unsigned int step_interval_sec;
|
unsigned int step_interval_sec;
|
||||||
struct osmo_timer_list step_timer;
|
struct osmo_timer_list step_timer;
|
||||||
/* call-back called when target is reached */
|
|
||||||
ramp_compl_cb_t compl_cb;
|
|
||||||
} ramp;
|
} ramp;
|
||||||
};
|
};
|
||||||
|
|
||||||
int get_p_max_out_mdBm(const struct gsm_bts_trx *trx);
|
int get_p_max_out_mdBm(struct gsm_bts_trx *trx);
|
||||||
|
|
||||||
int get_p_nominal_mdBm(const struct gsm_bts_trx *trx);
|
int get_p_nominal_mdBm(struct gsm_bts_trx *trx);
|
||||||
|
|
||||||
int get_p_target_mdBm(const struct gsm_bts_trx *trx, uint8_t bs_power_red);
|
int get_p_target_mdBm(struct gsm_bts_trx *trx, uint8_t bs_power_ie);
|
||||||
int get_p_target_mdBm_lchan(const struct gsm_lchan *lchan);
|
int get_p_target_mdBm_lchan(struct gsm_lchan *lchan);
|
||||||
|
|
||||||
int get_p_actual_mdBm(const struct gsm_bts_trx *trx, int p_target_mdBm);
|
int get_p_trxout_target_mdBm(struct gsm_bts_trx *trx, uint8_t bs_power_ie);
|
||||||
|
int get_p_trxout_target_mdBm_lchan(struct gsm_lchan *lchan);
|
||||||
|
|
||||||
int get_p_trxout_target_mdBm(const struct gsm_bts_trx *trx, uint8_t bs_power_red);
|
int get_p_trxout_actual_mdBm(struct gsm_bts_trx *trx, uint8_t bs_power_ie);
|
||||||
int get_p_trxout_target_mdBm_lchan(const struct gsm_lchan *lchan);
|
int get_p_trxout_actual_mdBm_lchan(struct gsm_lchan *lchan);
|
||||||
|
|
||||||
int get_p_trxout_actual_mdBm(const struct gsm_bts_trx *trx, uint8_t bs_power_red);
|
int power_ramp_start(struct gsm_bts_trx *trx, int p_total_tgt_mdBm, int bypass);
|
||||||
int get_p_trxout_actual_mdBm_lchan(const struct gsm_lchan *lchan);
|
|
||||||
|
|
||||||
int _power_ramp_start(struct gsm_bts_trx *trx, int p_total_tgt_mdBm, int bypass_max_power, ramp_compl_cb_t ramp_compl_cb, bool skip_ramping);
|
|
||||||
#define power_ramp_start(trx, p_total_tgt_mdBm, bypass_max_power, ramp_compl_cb) \
|
|
||||||
_power_ramp_start(trx, p_total_tgt_mdBm, bypass_max_power, ramp_compl_cb, false)
|
|
||||||
#define power_ramp_force(trx, p_total_tgt_mdBm, bypass_max_power, ramp_compl_cb) \
|
|
||||||
_power_ramp_start(trx, p_total_tgt_mdBm, bypass_max_power, ramp_compl_cb, true)
|
|
||||||
|
|
||||||
void power_ramp_abort(struct gsm_bts_trx *trx);
|
|
||||||
|
|
||||||
void power_trx_change_compl(struct gsm_bts_trx *trx, int p_trxout_cur_mdBm);
|
void power_trx_change_compl(struct gsm_bts_trx *trx, int p_trxout_cur_mdBm);
|
||||||
|
|
||||||
int power_ramp_initial_power_mdBm(const struct gsm_bts_trx *trx);
|
int power_ramp_initial_power_mdBm(struct gsm_bts_trx *trx);
|
||||||
|
|||||||
@@ -12,9 +12,11 @@ enum bts_vty_node {
|
|||||||
PHY_INST_NODE,
|
PHY_INST_NODE,
|
||||||
BTS_NODE,
|
BTS_NODE,
|
||||||
TRX_NODE,
|
TRX_NODE,
|
||||||
OSMUX_NODE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern struct cmd_element ournode_exit_cmd;
|
||||||
|
extern struct cmd_element ournode_end_cmd;
|
||||||
|
|
||||||
extern struct cmd_element cfg_bts_auto_band_cmd;
|
extern struct cmd_element cfg_bts_auto_band_cmd;
|
||||||
extern struct cmd_element cfg_bts_no_auto_band_cmd;
|
extern struct cmd_element cfg_bts_no_auto_band_cmd;
|
||||||
|
|
||||||
@@ -23,17 +25,8 @@ struct phy_instance *vty_get_phy_instance(struct vty *vty, int phy_nr, int inst_
|
|||||||
int bts_vty_go_parent(struct vty *vty);
|
int bts_vty_go_parent(struct vty *vty);
|
||||||
int bts_vty_is_config_node(struct vty *vty, int node);
|
int bts_vty_is_config_node(struct vty *vty, int node);
|
||||||
|
|
||||||
int bts_vty_init(void *ctx);
|
int bts_vty_init(struct gsm_bts *bts, const struct log_info *cat);
|
||||||
|
|
||||||
struct gsm_network *gsmnet_from_vty(struct vty *v);
|
|
||||||
|
|
||||||
extern struct vty_app_info bts_vty_info;
|
extern struct vty_app_info bts_vty_info;
|
||||||
extern struct gsm_bts *g_bts;
|
|
||||||
|
|
||||||
enum bts_vty_cmd_attr {
|
|
||||||
BTS_VTY_ATTR_NEW_LCHAN,
|
|
||||||
BTS_VTY_TRX_POWERCYCLE,
|
|
||||||
/* NOTE: up to 32 entries */
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ SUBDIRS += osmo-bts-octphy
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_LC15BTS
|
if ENABLE_LC15BTS
|
||||||
SUBDIRS += osmo-bts-lc15
|
SUBDIRS += osmo-bts-litecell15
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_OC2GBTS
|
if ENABLE_OC2GBTS
|
||||||
|
|||||||
@@ -1,79 +1,17 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
|
||||||
$(all_includes) \
|
AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOCODEC_CFLAGS)
|
||||||
-I$(top_srcdir)/include \
|
LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOCODEC_LIBS)
|
||||||
-I$(top_builddir)/include \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_CFLAGS = \
|
|
||||||
-Wall \
|
|
||||||
$(LIBOSMOCORE_CFLAGS) \
|
|
||||||
$(LIBOSMOTRAU_CFLAGS) \
|
|
||||||
$(LIBOSMOCODEC_CFLAGS) \
|
|
||||||
$(LIBOSMONETIF_CFLAGS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
LDADD = \
|
|
||||||
$(LIBOSMOCORE_LIBS) \
|
|
||||||
$(LIBOSMOTRAU_LIBS) \
|
|
||||||
$(LIBOSMOCODEC_LIBS) \
|
|
||||||
$(LIBOSMONETIF_LIBS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
if ENABLE_LC15BTS
|
if ENABLE_LC15BTS
|
||||||
AM_CFLAGS += -DENABLE_LC15BTS
|
AM_CFLAGS += -DENABLE_LC15BTS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
noinst_LIBRARIES = libbts.a libl1sched.a
|
noinst_LIBRARIES = libbts.a libl1sched.a
|
||||||
libbts_a_SOURCES = \
|
libbts_a_SOURCES = gsm_data_shared.c sysinfo.c logging.c abis.c oml.c bts.c \
|
||||||
gsm_data.c \
|
rsl.c vty.c paging.c measurement.c amr.c lchan.c \
|
||||||
sysinfo.c \
|
load_indication.c pcu_sock.c handover.c msg_utils.c \
|
||||||
logging.c \
|
tx_power.c bts_ctrl_commands.c bts_ctrl_lookup.c \
|
||||||
abis.c \
|
l1sap.c cbch.c power_control.c main.c phy_link.c \
|
||||||
abis_osmo.c \
|
dtx_dl_amr_fsm.c scheduler_mframe.c
|
||||||
oml.c \
|
|
||||||
osmux.c \
|
|
||||||
bts.c \
|
|
||||||
bts_trx.c \
|
|
||||||
rsl.c \
|
|
||||||
vty.c \
|
|
||||||
paging.c \
|
|
||||||
measurement.c \
|
|
||||||
amr.c \
|
|
||||||
lchan.c \
|
|
||||||
load_indication.c \
|
|
||||||
pcu_sock.c \
|
|
||||||
handover.c \
|
|
||||||
msg_utils.c \
|
|
||||||
tx_power.c \
|
|
||||||
bts_ctrl_commands.c \
|
|
||||||
bts_ctrl_lookup.c \
|
|
||||||
bts_shutdown_fsm.c \
|
|
||||||
l1sap.c \
|
|
||||||
cbch.c \
|
|
||||||
power_control.c \
|
|
||||||
main.c \
|
|
||||||
phy_link.c \
|
|
||||||
dtx_dl_amr_fsm.c \
|
|
||||||
scheduler_mframe.c \
|
|
||||||
ta_control.c \
|
|
||||||
nm_common_fsm.c \
|
|
||||||
nm_bts_sm_fsm.c \
|
|
||||||
nm_bts_fsm.c \
|
|
||||||
nm_bb_transc_fsm.c \
|
|
||||||
nm_channel_fsm.c \
|
|
||||||
nm_radio_carrier_fsm.c \
|
|
||||||
probes.d \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
libl1sched_a_SOURCES = scheduler.c
|
libl1sched_a_SOURCES = scheduler.c
|
||||||
|
|
||||||
if ENABLE_SYSTEMTAP
|
|
||||||
probes.h: probes.d
|
|
||||||
$(DTRACE) -C -h -s $< -o $@
|
|
||||||
|
|
||||||
probes.lo: probes.d
|
|
||||||
$(LIBTOOL) --mode=compile $(AM_V_lt) --tag=CC env CFLAGS="$(CFLAGS)" $(DTRACE) -C -G -s $< -o $@
|
|
||||||
|
|
||||||
BUILT_SOURCES = probes.h probes.lo
|
|
||||||
libbts_la_LDADD = probes.lo
|
|
||||||
endif
|
|
||||||
|
|||||||
@@ -38,320 +38,47 @@
|
|||||||
#include <osmocom/core/msgb.h>
|
#include <osmocom/core/msgb.h>
|
||||||
#include <osmocom/core/signal.h>
|
#include <osmocom/core/signal.h>
|
||||||
#include <osmocom/core/macaddr.h>
|
#include <osmocom/core/macaddr.h>
|
||||||
#include <osmocom/core/fsm.h>
|
|
||||||
#include <osmocom/abis/abis.h>
|
#include <osmocom/abis/abis.h>
|
||||||
#include <osmocom/abis/e1_input.h>
|
#include <osmocom/abis/e1_input.h>
|
||||||
#include <osmocom/abis/ipaccess.h>
|
#include <osmocom/abis/ipaccess.h>
|
||||||
#include <osmocom/gsm/ipa.h>
|
#include <osmocom/gsm/ipa.h>
|
||||||
|
|
||||||
#include <osmo-bts/abis.h>
|
|
||||||
#include <osmo-bts/logging.h>
|
#include <osmo-bts/logging.h>
|
||||||
#include <osmo-bts/gsm_data.h>
|
#include <osmo-bts/gsm_data.h>
|
||||||
#include <osmo-bts/bts.h>
|
#include <osmo-bts/bts.h>
|
||||||
#include <osmo-bts/rsl.h>
|
#include <osmo-bts/rsl.h>
|
||||||
#include <osmo-bts/oml.h>
|
#include <osmo-bts/oml.h>
|
||||||
#include <osmo-bts/abis_osmo.h>
|
|
||||||
#include <osmo-bts/bts_model.h>
|
#include <osmo-bts/bts_model.h>
|
||||||
#include <osmo-bts/bts_trx.h>
|
|
||||||
#include <osmo-bts/bts_shutdown_fsm.h>
|
|
||||||
|
|
||||||
static struct gsm_bts *g_bts;
|
static struct gsm_bts *g_bts;
|
||||||
|
|
||||||
static struct e1inp_line_ops line_ops;
|
|
||||||
|
|
||||||
static struct ipaccess_unit bts_dev_info;
|
|
||||||
|
|
||||||
#define S(x) (1 << (x))
|
|
||||||
#define OML_RETRY_TIMER 5
|
|
||||||
|
|
||||||
enum abis_link_fsm_state {
|
|
||||||
ABIS_LINK_ST_WAIT_RECONNECT, /* OML link has not yet been established */
|
|
||||||
ABIS_LINK_ST_CONNECTING, /* OML link in process of been established */
|
|
||||||
ABIS_LINK_ST_CONNECTED, /* OML link is established, RSL links may be established or not */
|
|
||||||
ABIS_LINK_ST_FAILED, /* There used to be an active OML connection but it became broken */
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct value_string abis_link_fsm_event_names[] = {
|
|
||||||
{ ABIS_LINK_EV_SIGN_LINK_OML_UP, "SIGN_LINK_OML_UP", },
|
|
||||||
{ ABIS_LINK_EV_SIGN_LINK_DOWN, "SIGN_LINK_DOWN" },
|
|
||||||
{ ABIS_LINK_EV_VTY_RM_ADDR, "VTY_RM_ADDR" },
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct abis_link_fsm_priv {
|
|
||||||
struct bsc_oml_host *current_bsc;
|
|
||||||
struct gsm_bts *bts;
|
|
||||||
char *model_name;
|
|
||||||
bool reconnect_to_current_bsc;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void reset_oml_link(struct gsm_bts *bts)
|
|
||||||
{
|
|
||||||
if (bts->oml_link) {
|
|
||||||
struct timespec now;
|
|
||||||
|
|
||||||
e1inp_sign_link_destroy(bts->oml_link);
|
|
||||||
|
|
||||||
/* Log a special notice if the OML connection was dropped relatively quickly. */
|
|
||||||
if (bts->oml_conn_established_timestamp.tv_sec != 0 && clock_gettime(CLOCK_MONOTONIC, &now) == 0 &&
|
|
||||||
bts->oml_conn_established_timestamp.tv_sec + OSMO_BTS_OML_CONN_EARLY_DISCONNECT >= now.tv_sec) {
|
|
||||||
LOGP(DABIS, LOGL_FATAL, "OML link was closed early within %" PRIu64 " seconds. "
|
|
||||||
"If this situation persists, please check your BTS and BSC configuration files for errors. "
|
|
||||||
"A common error is a mismatch between unit_id configuration parameters of BTS and BSC.\n",
|
|
||||||
(uint64_t) (now.tv_sec - bts->oml_conn_established_timestamp.tv_sec));
|
|
||||||
}
|
|
||||||
bts->oml_link = NULL;
|
|
||||||
}
|
|
||||||
memset(&bts->oml_conn_established_timestamp, 0, sizeof(bts->oml_conn_established_timestamp));
|
|
||||||
|
|
||||||
/* Same for IPAC_PROTO_OSMO on the same ipa connection: */
|
|
||||||
if (bts->osmo_link) {
|
|
||||||
e1inp_sign_link_destroy(bts->osmo_link);
|
|
||||||
bts->osmo_link = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static int pick_next_bsc(struct osmo_fsm_inst *fi)
|
|
||||||
{
|
|
||||||
struct abis_link_fsm_priv *priv = fi->priv;
|
|
||||||
struct gsm_bts *bts = priv->bts;
|
|
||||||
struct bsc_oml_host *last;
|
|
||||||
|
|
||||||
if (llist_empty(&bts->bsc_oml_hosts)) {
|
|
||||||
LOGPFSML(fi, LOGL_ERROR, "List of BSCs to connect to is empty!\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Keep current pointer to priv->current_bsc: */
|
|
||||||
if (priv->reconnect_to_current_bsc) {
|
|
||||||
OSMO_ASSERT(priv->current_bsc);
|
|
||||||
priv->reconnect_to_current_bsc = false;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
last = (struct bsc_oml_host *)llist_last_entry(&bts->bsc_oml_hosts, struct bsc_oml_host, list);
|
|
||||||
|
|
||||||
if (!priv->current_bsc || priv->current_bsc == last) /* Pick first one (wrap around): */
|
|
||||||
priv->current_bsc = (struct bsc_oml_host *)llist_first_entry(&bts->bsc_oml_hosts, struct bsc_oml_host, list);
|
|
||||||
else
|
|
||||||
priv->current_bsc = (struct bsc_oml_host *)llist_entry(priv->current_bsc->list.next, struct bsc_oml_host, list);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void abis_link_connecting_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
|
|
||||||
{
|
|
||||||
struct e1inp_line *line;
|
|
||||||
struct abis_link_fsm_priv *priv = fi->priv;
|
|
||||||
struct gsm_bts *bts = priv->bts;
|
|
||||||
|
|
||||||
if (bts_shutdown_in_progress(bts)) {
|
|
||||||
LOGPFSML(fi, LOGL_NOTICE, "BTS is shutting down, delaying A-bis connection establishment to BSC\n");
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_WAIT_RECONNECT, OML_RETRY_TIMER, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pick_next_bsc(fi) < 0) {
|
|
||||||
LOGPFSML(fi, LOGL_FATAL, "No BSC available, A-bis connection establishment failed\n");
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_FAILED, 0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGP(DABIS, LOGL_NOTICE, "A-bis connection establishment to BSC (%s) in progress...\n", priv->current_bsc->addr);
|
|
||||||
|
|
||||||
/* patch in various data from VTY and other sources */
|
|
||||||
line_ops.cfg.ipa.addr = priv->current_bsc->addr;
|
|
||||||
osmo_get_macaddr(bts_dev_info.mac_addr, "eth0");
|
|
||||||
bts_dev_info.site_id = bts->ip_access.site_id;
|
|
||||||
bts_dev_info.bts_id = bts->ip_access.bts_id;
|
|
||||||
bts_dev_info.unit_name = priv->model_name;
|
|
||||||
if (bts->description)
|
|
||||||
bts_dev_info.unit_name = bts->description;
|
|
||||||
bts_dev_info.location2 = priv->model_name;
|
|
||||||
|
|
||||||
line = e1inp_line_find(0);
|
|
||||||
if (!line)
|
|
||||||
line = e1inp_line_create(0, "ipa");
|
|
||||||
if (!line) {
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_FAILED, 0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/* Line always comes already with a "ctor" reference, enough to keep it alive forever. */
|
|
||||||
|
|
||||||
e1inp_line_bind_ops(line, &line_ops);
|
|
||||||
/* This will open the OML connection now */
|
|
||||||
if (e1inp_line_update(line) < 0) {
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_FAILED, 0, 0);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The TCP connection to the BSC is now in progress.
|
|
||||||
* Wait for OML Link UP to transition to CONNECTED. */
|
|
||||||
}
|
|
||||||
|
|
||||||
static void abis_link_connecting(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
|
||||||
{
|
|
||||||
struct abis_link_fsm_priv *priv = fi->priv;
|
|
||||||
struct gsm_bts *bts = priv->bts;
|
|
||||||
|
|
||||||
switch (event) {
|
|
||||||
case ABIS_LINK_EV_SIGN_LINK_OML_UP:
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_CONNECTED, 0, 0);
|
|
||||||
break;
|
|
||||||
case ABIS_LINK_EV_SIGN_LINK_DOWN:
|
|
||||||
reset_oml_link(bts);
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_WAIT_RECONNECT, OML_RETRY_TIMER, 0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
OSMO_ASSERT(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void abis_link_connected_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
|
|
||||||
{
|
|
||||||
bts_link_estab(g_bts);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void abis_link_connected(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
|
||||||
{
|
|
||||||
struct abis_link_fsm_priv *priv = fi->priv;
|
|
||||||
struct gsm_bts *bts = priv->bts;
|
|
||||||
struct gsm_bts_trx *trx;
|
|
||||||
OSMO_ASSERT(event == ABIS_LINK_EV_SIGN_LINK_DOWN);
|
|
||||||
|
|
||||||
/* First remove the OML signalling link */
|
|
||||||
reset_oml_link(bts);
|
|
||||||
|
|
||||||
/* Then iterate over the RSL signalling links */
|
|
||||||
llist_for_each_entry(trx, &bts->trx_list, list) {
|
|
||||||
if (trx->rsl_link) {
|
|
||||||
e1inp_sign_link_destroy(trx->rsl_link);
|
|
||||||
trx->rsl_link = NULL;
|
|
||||||
if (trx == trx->bts->c0)
|
|
||||||
load_timer_stop(trx->bts);
|
|
||||||
} else {
|
|
||||||
/* If we have no rsl_link yet it may mean that lower
|
|
||||||
* layers are still establishing the socket (TCP, IPA).
|
|
||||||
* Let's tell it to stop connection establishment since
|
|
||||||
* we are shutting down. */
|
|
||||||
struct e1inp_line *line = e1inp_line_find(0);
|
|
||||||
if (line)
|
|
||||||
e1inp_ipa_bts_rsl_close_n(line, trx->nr);
|
|
||||||
}
|
|
||||||
/* Note: Here we could send NM_EV_RSL_DOWN to each
|
|
||||||
* trx->(bb_transc.)mo.fi, but we are starting shutdown of the
|
|
||||||
* entire BTS anyway through bts_model_abis_close(), so simply
|
|
||||||
* let bts_shutdown FSM take care of slowly powering down all
|
|
||||||
* the TRX. It would make sense to send NM_EV_RSL_DOWN only if a
|
|
||||||
* RSL link TRX!=C0 was going down, in order to selectively stop
|
|
||||||
* that TRX only. But libosmo-abis expects us to drop the entire
|
|
||||||
* line when something goes wrong... */
|
|
||||||
}
|
|
||||||
bts_model_abis_close(bts);
|
|
||||||
|
|
||||||
/* We want to try reconnecting to the current BSC at least once before switching to a new one: */
|
|
||||||
priv->reconnect_to_current_bsc = true;
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_WAIT_RECONNECT, OML_RETRY_TIMER, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void abis_link_failed_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state)
|
|
||||||
{
|
|
||||||
struct abis_link_fsm_priv *priv = fi->priv;
|
|
||||||
struct gsm_bts *bts = priv->bts;
|
|
||||||
|
|
||||||
/* None of the configured BSCs was reachable or there was an existing
|
|
||||||
* OML/RSL connection that broke. Initiate BTS process shut down now. */
|
|
||||||
bts_model_abis_close(bts);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void abis_link_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
|
||||||
{
|
|
||||||
struct abis_link_fsm_priv *priv = fi->priv;
|
|
||||||
struct gsm_bts *bts = priv->bts;
|
|
||||||
|
|
||||||
OSMO_ASSERT(event == ABIS_LINK_EV_VTY_RM_ADDR);
|
|
||||||
|
|
||||||
if (priv->current_bsc == data) {
|
|
||||||
if (llist_count(&bts->bsc_oml_hosts) <= 1)
|
|
||||||
priv->current_bsc = NULL;
|
|
||||||
else
|
|
||||||
pick_next_bsc(fi);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int abis_link_fsm_timer_cb(struct osmo_fsm_inst *fi)
|
|
||||||
{
|
|
||||||
switch (fi->state) {
|
|
||||||
case ABIS_LINK_ST_WAIT_RECONNECT:
|
|
||||||
osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_CONNECTING, 0, 0);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
OSMO_ASSERT(0);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static struct osmo_fsm_state abis_link_fsm_states[] = {
|
|
||||||
[ABIS_LINK_ST_WAIT_RECONNECT] = {
|
|
||||||
.name = "WAIT_RECONNECT",
|
|
||||||
.out_state_mask =
|
|
||||||
S(ABIS_LINK_ST_CONNECTING),
|
|
||||||
},
|
|
||||||
[ABIS_LINK_ST_CONNECTING] = {
|
|
||||||
.name = "CONNECTING",
|
|
||||||
.in_event_mask =
|
|
||||||
S(ABIS_LINK_EV_SIGN_LINK_OML_UP) |
|
|
||||||
S(ABIS_LINK_EV_SIGN_LINK_DOWN),
|
|
||||||
.out_state_mask =
|
|
||||||
S(ABIS_LINK_ST_WAIT_RECONNECT) |
|
|
||||||
S(ABIS_LINK_ST_CONNECTED) |
|
|
||||||
S(ABIS_LINK_ST_FAILED),
|
|
||||||
.onenter = abis_link_connecting_onenter,
|
|
||||||
.action = abis_link_connecting,
|
|
||||||
},
|
|
||||||
[ABIS_LINK_ST_CONNECTED] = {
|
|
||||||
.name = "CONNECTED",
|
|
||||||
.in_event_mask =
|
|
||||||
S(ABIS_LINK_EV_SIGN_LINK_DOWN),
|
|
||||||
.out_state_mask =
|
|
||||||
S(ABIS_LINK_ST_WAIT_RECONNECT),
|
|
||||||
.onenter = abis_link_connected_onenter,
|
|
||||||
.action = abis_link_connected,
|
|
||||||
},
|
|
||||||
[ABIS_LINK_ST_FAILED] = {
|
|
||||||
.name = "FAILED",
|
|
||||||
.onenter = abis_link_failed_onenter,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct osmo_fsm abis_link_fsm = {
|
|
||||||
.name = "abis_link",
|
|
||||||
.states = abis_link_fsm_states,
|
|
||||||
.num_states = ARRAY_SIZE(abis_link_fsm_states),
|
|
||||||
.log_subsys = DABIS,
|
|
||||||
.event_names = abis_link_fsm_event_names,
|
|
||||||
.allstate_action = abis_link_allstate,
|
|
||||||
.allstate_event_mask = S(ABIS_LINK_EV_VTY_RM_ADDR),
|
|
||||||
.timer_cb = abis_link_fsm_timer_cb,
|
|
||||||
};
|
|
||||||
|
|
||||||
int abis_oml_sendmsg(struct msgb *msg)
|
int abis_oml_sendmsg(struct msgb *msg)
|
||||||
{
|
{
|
||||||
struct gsm_bts *bts = msg->trx->bts;
|
struct gsm_bts *bts = msg->trx->bts;
|
||||||
|
|
||||||
if (!bts->oml_link) {
|
if (!bts->oml_link) {
|
||||||
LOGP(DABIS, LOGL_INFO, "Drop Tx OML msg, OML link is down\n");
|
llist_add_tail(&msg->list, &bts->oml_queue);
|
||||||
msgb_free(msg);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
/* osmo-bts uses msg->trx internally, but libosmo-abis uses
|
/* osmo-bts uses msg->trx internally, but libosmo-abis uses
|
||||||
* the signalling link at msg->dst */
|
* the signalling link at msg->dst */
|
||||||
msg->dst = bts->oml_link;
|
msg->dst = bts->oml_link;
|
||||||
return abis_sendmsg(msg);
|
return abis_sendmsg(msg);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void drain_oml_queue(struct gsm_bts *bts)
|
||||||
|
{
|
||||||
|
struct msgb *msg, *msg2;
|
||||||
|
|
||||||
|
llist_for_each_entry_safe(msg, msg2, &bts->oml_queue, list) {
|
||||||
|
/* osmo-bts uses msg->trx internally, but libosmo-abis uses
|
||||||
|
* the signalling link at msg->dst */
|
||||||
|
llist_del(&msg->list);
|
||||||
|
msg->dst = bts->oml_link;
|
||||||
|
abis_sendmsg(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int abis_bts_rsl_sendmsg(struct msgb *msg)
|
int abis_bts_rsl_sendmsg(struct msgb *msg)
|
||||||
{
|
{
|
||||||
@@ -371,30 +98,26 @@ int abis_bts_rsl_sendmsg(struct msgb *msg)
|
|||||||
static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
|
static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
|
||||||
enum e1inp_sign_type type)
|
enum e1inp_sign_type type)
|
||||||
{
|
{
|
||||||
struct e1inp_ts *sign_ts;
|
struct e1inp_sign_link *sign_link = NULL;
|
||||||
struct gsm_bts_trx *trx;
|
struct gsm_bts_trx *trx;
|
||||||
int trx_nr;
|
int trx_nr;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case E1INP_SIGN_OML:
|
case E1INP_SIGN_OML:
|
||||||
sign_ts = e1inp_line_ipa_oml_ts(line);
|
|
||||||
LOGP(DABIS, LOGL_INFO, "OML Signalling link up\n");
|
LOGP(DABIS, LOGL_INFO, "OML Signalling link up\n");
|
||||||
e1inp_ts_config_sign(sign_ts, line);
|
e1inp_ts_config_sign(&line->ts[E1INP_SIGN_OML-1], line);
|
||||||
g_bts->oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML,
|
sign_link = g_bts->oml_link =
|
||||||
g_bts->c0, IPAC_PROTO_OML, 0);
|
e1inp_sign_link_create(&line->ts[E1INP_SIGN_OML-1],
|
||||||
|
E1INP_SIGN_OML, NULL, 255, 0);
|
||||||
if (clock_gettime(CLOCK_MONOTONIC, &g_bts->oml_conn_established_timestamp) != 0)
|
if (clock_gettime(CLOCK_MONOTONIC, &g_bts->oml_conn_established_timestamp) != 0)
|
||||||
memset(&g_bts->oml_conn_established_timestamp, 0,
|
memset(&g_bts->oml_conn_established_timestamp, 0,
|
||||||
sizeof(g_bts->oml_conn_established_timestamp));
|
sizeof(g_bts->oml_conn_established_timestamp));
|
||||||
g_bts->osmo_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OSMO,
|
drain_oml_queue(g_bts);
|
||||||
g_bts->c0, IPAC_PROTO_OSMO, 0);
|
sign_link->trx = g_bts->c0;
|
||||||
osmo_fsm_inst_dispatch(g_bts->abis_link_fi, ABIS_LINK_EV_SIGN_LINK_OML_UP, NULL);
|
bts_link_estab(g_bts);
|
||||||
return g_bts->oml_link;
|
break;
|
||||||
|
|
||||||
case E1INP_SIGN_RSL:
|
|
||||||
/* fall through to default to catch TRXn having type = E1INP_SIGN_RSL + n */
|
|
||||||
default:
|
default:
|
||||||
trx_nr = type - E1INP_SIGN_RSL;
|
trx_nr = type - E1INP_SIGN_RSL;
|
||||||
sign_ts = e1inp_line_ipa_rsl_ts(line, trx_nr);
|
|
||||||
LOGP(DABIS, LOGL_INFO, "RSL Signalling link for TRX%d up\n",
|
LOGP(DABIS, LOGL_INFO, "RSL Signalling link for TRX%d up\n",
|
||||||
trx_nr);
|
trx_nr);
|
||||||
trx = gsm_bts_trx_num(g_bts, trx_nr);
|
trx = gsm_bts_trx_num(g_bts, trx_nr);
|
||||||
@@ -403,23 +126,54 @@ static struct e1inp_sign_link *sign_link_up(void *unit, struct e1inp_line *line,
|
|||||||
trx_nr);
|
trx_nr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
e1inp_ts_config_sign(sign_ts, line);
|
e1inp_ts_config_sign(&line->ts[type-1], line);
|
||||||
trx->rsl_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_RSL,
|
sign_link = trx->rsl_link =
|
||||||
trx, trx->rsl_tei, 0);
|
e1inp_sign_link_create(&line->ts[type-1],
|
||||||
|
E1INP_SIGN_RSL, NULL, 0, 0);
|
||||||
|
sign_link->trx = trx;
|
||||||
trx_link_estab(trx);
|
trx_link_estab(trx);
|
||||||
return trx->rsl_link;
|
break;
|
||||||
}
|
}
|
||||||
return NULL;
|
|
||||||
|
return sign_link;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sign_link_down(struct e1inp_line *line)
|
static void sign_link_down(struct e1inp_line *line)
|
||||||
{
|
{
|
||||||
LOGPIL(line, DABIS, LOGL_ERROR, "Signalling link down\n");
|
struct gsm_bts_trx *trx;
|
||||||
osmo_fsm_inst_dispatch(g_bts->abis_link_fi, ABIS_LINK_EV_SIGN_LINK_DOWN, NULL);
|
LOGP(DABIS, LOGL_ERROR, "Signalling link down\n");
|
||||||
|
|
||||||
|
/* First remove the OML signalling link */
|
||||||
|
if (g_bts->oml_link) {
|
||||||
|
struct timespec now;
|
||||||
|
|
||||||
|
e1inp_sign_link_destroy(g_bts->oml_link);
|
||||||
|
|
||||||
|
/* Log a special notice if the OML connection was dropped relatively quickly. */
|
||||||
|
if (g_bts->oml_conn_established_timestamp.tv_sec != 0 && clock_gettime(CLOCK_MONOTONIC, &now) == 0 &&
|
||||||
|
g_bts->oml_conn_established_timestamp.tv_sec + OSMO_BTS_OML_CONN_EARLY_DISCONNECT >= now.tv_sec) {
|
||||||
|
LOGP(DABIS, LOGL_FATAL, "OML link was closed early within %" PRIu64 " seconds. "
|
||||||
|
"If this situation persists, please check your BTS and BSC configuration files for errors. "
|
||||||
|
"A common error is a mismatch between unit_id configuration parameters of BTS and BSC.\n",
|
||||||
|
(uint64_t)(now.tv_sec - g_bts->oml_conn_established_timestamp.tv_sec));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
g_bts->oml_link = NULL;
|
||||||
|
memset(&g_bts->oml_conn_established_timestamp, 0, sizeof(g_bts->oml_conn_established_timestamp));
|
||||||
|
|
||||||
|
/* Then iterate over the RSL signalling links */
|
||||||
|
llist_for_each_entry(trx, &g_bts->trx_list, list) {
|
||||||
|
if (trx->rsl_link) {
|
||||||
|
e1inp_sign_link_destroy(trx->rsl_link);
|
||||||
|
trx->rsl_link = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bts_model_abis_close(g_bts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* callback for incoming messages from A-bis/IP */
|
/* callback for incoming mesages from A-bis/IP */
|
||||||
static int sign_link_cb(struct msgb *msg)
|
static int sign_link_cb(struct msgb *msg)
|
||||||
{
|
{
|
||||||
struct e1inp_sign_link *link = msg->dst;
|
struct e1inp_sign_link *link = msg->dst;
|
||||||
@@ -436,9 +190,6 @@ static int sign_link_cb(struct msgb *msg)
|
|||||||
case E1INP_SIGN_RSL:
|
case E1INP_SIGN_RSL:
|
||||||
down_rsl(link->trx, msg);
|
down_rsl(link->trx, msg);
|
||||||
break;
|
break;
|
||||||
case E1INP_SIGN_OSMO:
|
|
||||||
down_osmo(link->trx->bts, msg);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
msgb_free(msg);
|
msgb_free(msg);
|
||||||
break;
|
break;
|
||||||
@@ -461,7 +212,7 @@ uint32_t get_signlink_remote_ip(struct e1inp_sign_link *link)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we assume that the socket is AF_INET. As Abis/IP contains
|
/* we assume that the soket is AF_INET. As Abis/IP contains
|
||||||
* lots of hard-coded IPv4 addresses, this safe */
|
* lots of hard-coded IPv4 addresses, this safe */
|
||||||
OSMO_ASSERT(sin.sin_family == AF_INET);
|
OSMO_ASSERT(sin.sin_family == AF_INET);
|
||||||
|
|
||||||
@@ -484,7 +235,7 @@ static int inp_s_cbfn(unsigned int subsys, unsigned int signal,
|
|||||||
|
|
||||||
|
|
||||||
static struct ipaccess_unit bts_dev_info = {
|
static struct ipaccess_unit bts_dev_info = {
|
||||||
.unit_name = "osmo-bts",
|
.unit_name = "sysmoBTS",
|
||||||
.equipvers = "", /* FIXME: read this from hw */
|
.equipvers = "", /* FIXME: read this from hw */
|
||||||
.swversion = PACKAGE_VERSION,
|
.swversion = PACKAGE_VERSION,
|
||||||
.location1 = "",
|
.location1 = "",
|
||||||
@@ -508,36 +259,37 @@ void abis_init(struct gsm_bts *bts)
|
|||||||
{
|
{
|
||||||
g_bts = bts;
|
g_bts = bts;
|
||||||
|
|
||||||
oml_init();
|
oml_init(&bts->mo);
|
||||||
libosmo_abis_init(tall_bts_ctx);
|
libosmo_abis_init(NULL);
|
||||||
|
|
||||||
osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, bts);
|
osmo_signal_register_handler(SS_L_INPUT, &inp_s_cbfn, 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)
|
||||||
{
|
{
|
||||||
struct abis_link_fsm_priv *abis_link_fsm_priv;
|
struct e1inp_line *line;
|
||||||
|
|
||||||
if (llist_empty(&bts->bsc_oml_hosts)) {
|
/* patch in various data from VTY and othe sources */
|
||||||
LOGP(DABIS, LOGL_FATAL, "No BSC configured, cannot start BTS without knowing BSC OML IP\n");
|
line_ops.cfg.ipa.addr = dst_host;
|
||||||
return -EINVAL;
|
osmo_get_macaddr(bts_dev_info.mac_addr, "eth0");
|
||||||
}
|
bts_dev_info.site_id = bts->ip_access.site_id;
|
||||||
|
bts_dev_info.bts_id = bts->ip_access.bts_id;
|
||||||
bts->abis_link_fi = osmo_fsm_inst_alloc(&abis_link_fsm, bts, NULL, LOGL_DEBUG, "abis_link");
|
bts_dev_info.unit_name = model_name;
|
||||||
OSMO_ASSERT(bts->abis_link_fi);
|
if (bts->description)
|
||||||
|
bts_dev_info.unit_name = bts->description;
|
||||||
abis_link_fsm_priv = talloc_zero(bts->abis_link_fi, struct abis_link_fsm_priv);
|
bts_dev_info.location2 = model_name;
|
||||||
OSMO_ASSERT(abis_link_fsm_priv);
|
|
||||||
abis_link_fsm_priv->bts = bts;
|
line = e1inp_line_find(0);
|
||||||
abis_link_fsm_priv->model_name = model_name;
|
if (!line)
|
||||||
bts->abis_link_fi->priv = abis_link_fsm_priv;
|
line = e1inp_line_create(0, "ipa");
|
||||||
|
if (!line)
|
||||||
osmo_fsm_inst_state_chg(bts->abis_link_fi, ABIS_LINK_ST_CONNECTING, 0, 0);
|
return NULL;
|
||||||
|
e1inp_line_bind_ops(line, &line_ops);
|
||||||
return 0;
|
|
||||||
}
|
/* This will open the OML connection now */
|
||||||
|
if (e1inp_line_update(line) < 0)
|
||||||
static __attribute__((constructor)) void abis_link_fsm_init(void)
|
return NULL;
|
||||||
{
|
|
||||||
OSMO_ASSERT(osmo_fsm_register(&abis_link_fsm) == 0);
|
return line;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,136 +0,0 @@
|
|||||||
/* OSMO extenion link associated to same line as oml_link: */
|
|
||||||
|
|
||||||
/* (C) 2021 by sysmocom - s.m.f.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 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/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include <osmocom/core/msgb.h>
|
|
||||||
#include <osmocom/gsm/ipa.h>
|
|
||||||
#include <osmocom/gsm/protocol/ipaccess.h>
|
|
||||||
|
|
||||||
#include <osmo-bts/bts.h>
|
|
||||||
#include <osmo-bts/logging.h>
|
|
||||||
#include <osmo-bts/pcu_if.h>
|
|
||||||
#include <osmo-bts/pcuif_proto.h>
|
|
||||||
|
|
||||||
extern struct gsm_network bts_gsmnet;
|
|
||||||
|
|
||||||
#define OM_HEADROOM_SIZE 128
|
|
||||||
|
|
||||||
////////////////////////////////////////
|
|
||||||
// OSMO ABIS extensions (PCU)
|
|
||||||
///////////////////////////////////////
|
|
||||||
|
|
||||||
static struct msgb *abis_osmo_pcu_msgb_alloc(uint8_t msg_type, uint8_t bts_nr, size_t extra_size)
|
|
||||||
{
|
|
||||||
struct msgb *msg;
|
|
||||||
struct gsm_pcu_if *pcu_prim;
|
|
||||||
msg = msgb_alloc_headroom(OM_HEADROOM_SIZE + sizeof(struct gsm_pcu_if) + extra_size,
|
|
||||||
OM_HEADROOM_SIZE, "IPA/ABIS/OSMO");
|
|
||||||
/* Only header is filled, caller is responible for reserving + filling
|
|
||||||
* message type specific contents: */
|
|
||||||
msgb_put(msg, PCUIF_HDR_SIZE);
|
|
||||||
pcu_prim = (struct gsm_pcu_if *) msgb_data(msg);
|
|
||||||
pcu_prim->msg_type = msg_type;
|
|
||||||
pcu_prim->bts_nr = bts_nr;
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Send a OML NM Message from BSC to BTS */
|
|
||||||
int abis_osmo_sendmsg(struct gsm_bts *bts, struct msgb *msg)
|
|
||||||
{
|
|
||||||
msg->dst = bts->osmo_link;
|
|
||||||
msg->l2h = msg->data;
|
|
||||||
return abis_sendmsg(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Send IPA/OSMO/PCU extension Abis message from PCU to BSC */
|
|
||||||
static int abis_osmo_pcu_sendmsg(struct gsm_bts *bts, struct msgb *msg)
|
|
||||||
{
|
|
||||||
ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_PCU);
|
|
||||||
return abis_osmo_sendmsg(bts, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
int abis_osmo_pcu_tx_container(struct gsm_bts *bts, const struct gsm_pcu_if_container *container)
|
|
||||||
{
|
|
||||||
uint16_t data_length = osmo_load16be(&container->length);
|
|
||||||
struct msgb *msg = abis_osmo_pcu_msgb_alloc(PCU_IF_MSG_CONTAINER, bts->nr, data_length);
|
|
||||||
struct gsm_pcu_if *pcu_prim = (struct gsm_pcu_if *) msgb_data(msg);
|
|
||||||
struct gsm_pcu_if_container *tx_cont = &pcu_prim->u.container;
|
|
||||||
|
|
||||||
msgb_put(msg, sizeof(*tx_cont) + data_length);
|
|
||||||
tx_cont->msg_type = container->msg_type;
|
|
||||||
tx_cont->length = container->length;
|
|
||||||
if (data_length)
|
|
||||||
memcpy(tx_cont->data, container->data, data_length);
|
|
||||||
|
|
||||||
return abis_osmo_pcu_sendmsg(bts, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* incoming IPA/OSMOEXT/PCU Abis message from BSC */
|
|
||||||
static int rx_down_osmo_pcu(struct gsm_bts *bts, struct msgb *msg)
|
|
||||||
{
|
|
||||||
struct gsm_pcu_if *pcu_prim;
|
|
||||||
if (msgb_l2len(msg) < PCUIF_HDR_SIZE) {
|
|
||||||
LOGP(DPCU, LOGL_ERROR, "ABIS_OSMO_PCU message too short\n");
|
|
||||||
oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG,
|
|
||||||
"ABIS_OSMO_PCU message too short\n");
|
|
||||||
msgb_free(msg);
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
pcu_prim = msgb_l2(msg);
|
|
||||||
LOGP(DPCU, LOGL_INFO, "Rx BSC->BTS%d ABIS_OSMO_PCU msg type %u\n",
|
|
||||||
pcu_prim->bts_nr, pcu_prim->msg_type);
|
|
||||||
/* we patch the bts_nr received from BTS with the bts_nr we used to set up in the local PCU */
|
|
||||||
pcu_prim->bts_nr = bts->nr;
|
|
||||||
/* Trim Abis lower layers: */
|
|
||||||
msgb_pull_to_l2(msg);
|
|
||||||
/* we simply forward it to PCUIF: */
|
|
||||||
return pcu_sock_send(&bts_gsmnet, msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* incoming IPA/OSMO extension Abis message from BSC */
|
|
||||||
int down_osmo(struct gsm_bts *bts, struct msgb *msg)
|
|
||||||
{
|
|
||||||
uint8_t *type;
|
|
||||||
|
|
||||||
if (msgb_l2len(msg) < 1) {
|
|
||||||
oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG,
|
|
||||||
"OSMO message too short\n");
|
|
||||||
msgb_free(msg);
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
|
|
||||||
type = msgb_l2(msg);
|
|
||||||
msg->l2h = type + 1;
|
|
||||||
|
|
||||||
switch (*type) {
|
|
||||||
case IPAC_PROTO_EXT_PCU:
|
|
||||||
return rx_down_osmo_pcu(bts, msg);
|
|
||||||
default:
|
|
||||||
oml_tx_failure_event_rep(&bts->mo, NM_SEVER_MAJOR, OSMO_EVT_MAJ_UKWN_MSG,
|
|
||||||
"OSMO message unknown extension %u\n", *type);
|
|
||||||
msgb_free(msg);
|
|
||||||
return -EIO;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user