mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-bts.git
synced 2025-11-17 04:11:42 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a32f0499f | ||
|
|
a5608d092d |
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
|||||||
open_collective: osmocom
|
|
||||||
79
.gitignore
vendored
79
.gitignore
vendored
@@ -4,69 +4,29 @@ Makefile.in
|
|||||||
Makefile
|
Makefile
|
||||||
.deps
|
.deps
|
||||||
|
|
||||||
btsconfig.h
|
|
||||||
btsconfig.h.in
|
|
||||||
|
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
config.log
|
config.log
|
||||||
config.status
|
config.status
|
||||||
config.guess
|
|
||||||
config.sub
|
|
||||||
configure
|
configure
|
||||||
compile
|
|
||||||
depcomp
|
depcomp
|
||||||
install-sh
|
install-sh
|
||||||
missing
|
missing
|
||||||
stamp-h1
|
|
||||||
libtool
|
|
||||||
ltmain.sh
|
|
||||||
core
|
core
|
||||||
core.*
|
core.*
|
||||||
|
|
||||||
# git-version-gen magic
|
contrib/sysmobts-calib/sysmobts-calib
|
||||||
.tarball-version
|
|
||||||
.version
|
|
||||||
|
|
||||||
src/osmo-bts-sysmo/sysmobts-calib
|
|
||||||
src/osmo-bts-sysmo/l1fwd-proxy
|
src/osmo-bts-sysmo/l1fwd-proxy
|
||||||
src/osmo-bts-sysmo/osmo-bts-sysmo
|
src/osmo-bts-sysmo/sysmobts
|
||||||
src/osmo-bts-sysmo/osmo-bts-sysmo-remote
|
src/osmo-bts-sysmo/sysmobts-remote
|
||||||
src/osmo-bts-sysmo/sysmobts-mgr
|
src/osmo-bts-sysmo/sysmobts-mgr
|
||||||
src/osmo-bts-sysmo/sysmobts-util
|
|
||||||
|
|
||||||
src/osmo-bts-lc15/lc15bts-mgr
|
|
||||||
src/osmo-bts-lc15/lc15bts-util
|
|
||||||
src/osmo-bts-lc15/misc/.dirstamp
|
|
||||||
src/osmo-bts-lc15/osmo-bts-lc15
|
|
||||||
|
|
||||||
src/osmo-bts-trx/osmo-bts-trx
|
|
||||||
|
|
||||||
src/osmo-bts-octphy/osmo-bts-octphy
|
|
||||||
|
|
||||||
src/osmo-bts-virtual/osmo-bts-virtual
|
|
||||||
src/osmo-bts-omldummy/osmo-bts-omldummy
|
|
||||||
|
|
||||||
src/osmo-bts-oc2g/osmo-bts-oc2g
|
|
||||||
src/osmo-bts-oc2g/oc2gbts-mgr
|
|
||||||
src/osmo-bts-oc2g/oc2gbts-util
|
|
||||||
src/osmo-bts-oc2g/misc/.dirstamp
|
|
||||||
|
|
||||||
tests/atconfig
|
tests/atconfig
|
||||||
tests/package.m4
|
tests/package.m4
|
||||||
tests/amr/amr_test
|
|
||||||
tests/csd/csd_test
|
|
||||||
tests/agch/agch_test
|
|
||||||
tests/paging/paging_test
|
tests/paging/paging_test
|
||||||
tests/cipher/cipher_test
|
tests/cipher/cipher_test
|
||||||
tests/sysmobts/sysmobts_test
|
|
||||||
tests/meas/meas_test
|
|
||||||
tests/misc/misc_test
|
|
||||||
tests/handover/handover_test
|
|
||||||
tests/tx_power/tx_power_test
|
|
||||||
tests/ta_control/ta_control_test
|
|
||||||
tests/power/ms_power_loop_test
|
|
||||||
tests/power/bs_power_loop_test
|
|
||||||
tests/testsuite
|
tests/testsuite
|
||||||
tests/testsuite.log
|
tests/testsuite.log
|
||||||
|
|
||||||
@@ -74,39 +34,6 @@ tests/testsuite.log
|
|||||||
doc/vty_reference.xml
|
doc/vty_reference.xml
|
||||||
|
|
||||||
# Backups, vi, merges
|
# Backups, vi, merges
|
||||||
*~
|
|
||||||
*.sw?
|
*.sw?
|
||||||
*.orig
|
*.orig
|
||||||
*.sav
|
*.sav
|
||||||
|
|
||||||
# debian
|
|
||||||
.tarball-version
|
|
||||||
debian/autoreconf.after
|
|
||||||
debian/autoreconf.before
|
|
||||||
debian/files
|
|
||||||
debian/*.debhelper.log
|
|
||||||
debian/*.substvars
|
|
||||||
debian/osmo-bts-trx-dbg/
|
|
||||||
debian/osmo-bts-trx/
|
|
||||||
debian/tmp/
|
|
||||||
|
|
||||||
# manuals
|
|
||||||
doc/manuals/*.html
|
|
||||||
doc/manuals/*.svg
|
|
||||||
doc/manuals/*.pdf
|
|
||||||
doc/manuals/vty/*.pdf
|
|
||||||
doc/manuals/*__*.png
|
|
||||||
doc/manuals/*.check
|
|
||||||
doc/manuals/generated/
|
|
||||||
doc/manuals/vty/osmobts-*-vty-reference.xml
|
|
||||||
doc/manuals/vty/osmobts-*-vty-reference.xml.inc.gen
|
|
||||||
doc/manuals/vty/osmobts-*-vty-reference.xml.inc.merged
|
|
||||||
doc/manuals/osmomsc-usermanual.xml
|
|
||||||
doc/manuals/common
|
|
||||||
doc/manuals/build
|
|
||||||
|
|
||||||
contrib/osmo-bts.spec
|
|
||||||
contrib/ber/rtp_ber
|
|
||||||
contrib/ber/rtp_gen_map
|
|
||||||
|
|
||||||
arm-poky-linux-gnueabi-libtool
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[gerrit]
|
|
||||||
host=gerrit.osmocom.org
|
|
||||||
project=osmo-bts
|
|
||||||
12
.mailmap
12
.mailmap
@@ -1,12 +0,0 @@
|
|||||||
Harald Welte <laforge@gnumonks.org>
|
|
||||||
Harald Welte <laforge@gnumonks.org> <laflocal@hanuman.gnumonks.org>
|
|
||||||
Harald Welte <laforge@gnumonks.org> <laflocal@goeller.de.gnumonks.org>
|
|
||||||
Holger Hans Peter Freyther <holger@moiji-mobile.com> <zecke@selfish.org>
|
|
||||||
Holger Hans Peter Freyther <holger@moiji-mobile.com> <ich@tamarin.(none)>
|
|
||||||
Holger Hans Peter Freyther <holgre@moiji-mobile.com> <holger@freyther.de>
|
|
||||||
Andreas Eversberg <jolly@eversberg.eu>
|
|
||||||
Andreas Eversberg <jolly@eversberg.eu> <Andreas.Eversberg@versatel.de>
|
|
||||||
Andreas Eversberg <jolly@eversberg.eu> <root@nuedel.(none)>
|
|
||||||
Pablo Neira Ayuso <pablo@soleta.eu> <pablo@gnumonks.org>
|
|
||||||
Max Suraev <msuraev@sysmocom.de>
|
|
||||||
Tom Tsou <tom.tsou@ettus.com> <tom@tsou.cc>
|
|
||||||
27
Makefile.am
27
Makefile.am
@@ -1,25 +1,14 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
||||||
|
|
||||||
SUBDIRS = include src tests doc contrib
|
SUBDIRS = include src tests
|
||||||
|
|
||||||
|
|
||||||
# package the contrib and doc
|
# package the contrib and doc
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
.version \
|
contrib/dump_docs.py contrib/screenrc-l1fwd contrib/sysmobts.service \
|
||||||
README.md \
|
contrib/l1fwd.init contrib/screenrc-sysmobts contrib/respawn.sh \
|
||||||
contrib/dump_docs.py \
|
contrib/sysmobts.init contrib/sysmobts-calib/Makefile \
|
||||||
debian \
|
contrib/sysmobts-calib/sysmobts-calib.c \
|
||||||
git-version-gen \
|
contrib/sysmobts-calib/sysmobts-layer1.c \
|
||||||
$(NULL)
|
contrib/sysmobts-calib/sysmobts-layer1.h \
|
||||||
|
doc/examples/osmo-bts.cfg
|
||||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
|
||||||
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
|
|
||||||
|
|
||||||
@RELMAKE@
|
|
||||||
|
|
||||||
BUILT_SOURCES = $(top_srcdir)/.version
|
|
||||||
|
|
||||||
$(top_srcdir)/.version:
|
|
||||||
echo $(VERSION) > $@-t && mv $@-t $@
|
|
||||||
dist-hook:
|
|
||||||
echo $(VERSION) > $(distdir)/.tarball-version
|
|
||||||
|
|||||||
55
README
Normal file
55
README
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
Repository for new the Osmocom BTS implementation.
|
||||||
|
|
||||||
|
This code implementes the Layer 2 and higher of a more or less
|
||||||
|
conventional GSM BTS (Base Transceiver Station) - however, using an
|
||||||
|
Abis/IP interface, rather than the old-fashioned E1/T1.
|
||||||
|
|
||||||
|
Specificallt, this includes
|
||||||
|
* BTS-Side implementation of TS 08.58 (RSL) and TS 12.21 (OML)
|
||||||
|
* BTS-Side implementation of LAPDm (using libosmocore/libosmogsm)
|
||||||
|
* A somewhat separated interface between those higher layer parts
|
||||||
|
and the Layer1 interface.
|
||||||
|
|
||||||
|
Right now, only one hardware and Layer1 are supported: The sysmocom
|
||||||
|
sysmoBTS.
|
||||||
|
|
||||||
|
There is some experimental and way incomplete code to use a couple of
|
||||||
|
OsmocomBB phones and run them in the BTS. However, the required code
|
||||||
|
for the Calypso DSP code have not been written yet. This would still
|
||||||
|
require a lot of work.
|
||||||
|
|
||||||
|
Some additional work is being done in using some parts of the OpenBTS
|
||||||
|
L1FEC and glue it against omso-bts. However, this is also still in an
|
||||||
|
early, experimental stage.
|
||||||
|
|
||||||
|
== Known Limitations ==
|
||||||
|
|
||||||
|
As of June 3, 2012, the following known limitations exist in this
|
||||||
|
implementation:
|
||||||
|
|
||||||
|
=== Common Core ===
|
||||||
|
* No Extended BCCH support
|
||||||
|
* System Information limited to 1,2,2bis,2ter,2quater,3,4,5,6,9,13
|
||||||
|
* No RATSCCH in AMR
|
||||||
|
* No OML (TS 12.21) alarms yet (temperature, ...)
|
||||||
|
* Only single-TRX BTS at this point
|
||||||
|
* 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 hand-over support (planned)
|
||||||
|
* No use of TS 08.58 BS Power and MS Power parameters
|
||||||
|
* No support of TS 08.58 MultiRate Control
|
||||||
|
* No support of TS 08.58 Supported Codec Types
|
||||||
|
* No support of Bter frame / ENHANCED MEASUREMENT REPORT
|
||||||
|
|
||||||
|
=== osmo-bts-sysmo ===
|
||||||
|
* No CSD / ECSD support (not planned)
|
||||||
|
* No GPRS/EDGE support (planned)
|
||||||
|
* GSM-R frequency band supported, but no NCH/ASCI/SoLSA
|
||||||
|
* All timeslots on one TRX have to use same training sequence (TSC)
|
||||||
|
* No multi-TRX support yet, though hardware+L1 support stacking
|
||||||
|
* Makes no use of 12.21 Intave Parameters and Interference
|
||||||
|
Level Boundaries
|
||||||
|
* Makes no use of TS 12.21 T3105
|
||||||
|
* Doesn't yet include MAC address in Abis/IP Identity message
|
||||||
138
README.md
138
README.md
@@ -1,138 +0,0 @@
|
|||||||
osmo-bts - Osmocom BTS Implementation
|
|
||||||
====================================
|
|
||||||
|
|
||||||
This repository contains a C-language implementation of a GSM Base
|
|
||||||
Transceiver Station (BTS). It is part of the
|
|
||||||
[Osmocom](https://osmocom.org/) Open Source Mobile Communications
|
|
||||||
project.
|
|
||||||
|
|
||||||
This code implements Layer 2 and higher of a more or less conventional GSM BTS
|
|
||||||
(Base Transceiver Station) - however, using an Abis/IP interface, rather than
|
|
||||||
the old-fashioned E1/T1.
|
|
||||||
|
|
||||||
Specifically, this includes
|
|
||||||
* BTS-side implementation of TS 08.58 (RSL) and TS 12.21 (OML)
|
|
||||||
* BTS-side implementation of LAPDm (using libosmocore/libosmogsm)
|
|
||||||
* A somewhat separated interface between those higher layer parts and the
|
|
||||||
Layer1 interface.
|
|
||||||
|
|
||||||
Several kinds of BTS hardware are supported:
|
|
||||||
* sysmocom sysmoBTS
|
|
||||||
* Octasic octphy
|
|
||||||
* Nutaq litecell 1.5
|
|
||||||
* OpenCellular 2G (OC-2G)
|
|
||||||
* software-defined radio based osmo-bts-trx (e.g. USRP B210, UmTRX, LimeSDR)
|
|
||||||
|
|
||||||
Homepage
|
|
||||||
--------
|
|
||||||
|
|
||||||
The official homepage of the project is
|
|
||||||
<https://osmocom.org/projects/osmobts/wiki>
|
|
||||||
|
|
||||||
GIT Repository
|
|
||||||
--------------
|
|
||||||
|
|
||||||
You can clone from the official osmo-bts.git repository using
|
|
||||||
|
|
||||||
git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
|
|
||||||
|
|
||||||
There is a web interface at <https://gitea.osmocom.org/cellular-infrastructure/osmo-bts>
|
|
||||||
|
|
||||||
Documentation
|
|
||||||
-------------
|
|
||||||
|
|
||||||
User Manuals and VTY reference manuals are [optionally] built in PDF form
|
|
||||||
as part of the build process.
|
|
||||||
|
|
||||||
Pre-rendered PDF version of the current "master" can be found at
|
|
||||||
[User Manual](https://ftp.osmocom.org/docs/latest/osmobts-usermanual.pdf)
|
|
||||||
as well as the VTY reference manuals
|
|
||||||
* [VTY Reference Manual for osmo-bts-sysmo](https://ftp.osmocom.org/docs/latest/osmobts-sysmo-vty-reference.pdf)
|
|
||||||
* [VTY Reference Manual for osmo-bts-trx](https://ftp.osmocom.org/docs/latest/osmobts-trx-vty-reference.pdf)
|
|
||||||
* [VTY Reference Manual for osmo-bts-lc15](https://ftp.osmocom.org/docs/latest/osmobts-lc15-vty-reference.pdf)
|
|
||||||
* [VTY Reference Manual for osmo-bts-oc2g](https://ftp.osmocom.org/docs/latest/osmobts-oc2g-vty-reference.pdf)
|
|
||||||
* [VTY Reference Manual for osmo-bts-octphy](https://ftp.osmocom.org/docs/latest/osmobts-octphy-vty-reference.pdf)
|
|
||||||
|
|
||||||
There also is an
|
|
||||||
[Abis reference Manual](https://ftp.osmocom.org/docs/latest/osmobts-abis.pdf)
|
|
||||||
describing the OsmoBTS specific A-bis dialect.
|
|
||||||
|
|
||||||
Forum
|
|
||||||
-----
|
|
||||||
|
|
||||||
We welcome any osmo-bts related discussions in the
|
|
||||||
[Cellular Network Infrastructure -> 2G RAN (GERAN)](https://discourse.osmocom.org/c/cni/geran)
|
|
||||||
section of the osmocom discourse (web based Forum).
|
|
||||||
|
|
||||||
Mailing List
|
|
||||||
------------
|
|
||||||
|
|
||||||
Discussions related to osmo-bts are happening on the
|
|
||||||
openbsc@lists.osmocom.org mailing list, please see
|
|
||||||
https://lists.osmocom.org/mailman/listinfo/openbsc for subscription
|
|
||||||
options and the list archive.
|
|
||||||
|
|
||||||
Please observe the [Osmocom Mailing List
|
|
||||||
Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
|
|
||||||
when posting.
|
|
||||||
|
|
||||||
Issue Tracker
|
|
||||||
-------------
|
|
||||||
|
|
||||||
We use the [issue tracker of the osmo-bts project on osmocom.org](https://osmocom.org/projects/osmobts/issues) for
|
|
||||||
tracking the state of bug reports and feature requests. Feel free to submit any issues you may find, or help
|
|
||||||
us out by resolving existing issues.
|
|
||||||
|
|
||||||
Contributing
|
|
||||||
------------
|
|
||||||
|
|
||||||
Our coding standards are described at
|
|
||||||
https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
|
|
||||||
|
|
||||||
We use a Gerrit based patch submission/review process for managing
|
|
||||||
contributions. Please see
|
|
||||||
https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for
|
|
||||||
more details
|
|
||||||
|
|
||||||
The current patch queue for osmo-bts can be seen at
|
|
||||||
https://gerrit.osmocom.org/#/q/project:osmo-bts+status:open
|
|
||||||
|
|
||||||
Known Limitations
|
|
||||||
=================
|
|
||||||
|
|
||||||
As of January 2021, the following known limitations exist in this
|
|
||||||
implementation:
|
|
||||||
|
|
||||||
Common Core
|
|
||||||
-----------
|
|
||||||
|
|
||||||
* No Extended BCCH support
|
|
||||||
* System Information limited to 1,2,2bis,2ter,2quater,3,4,5,6,9,13
|
|
||||||
* No RATSCCH in AMR
|
|
||||||
* Will reject TS 12.21 STARTING TIME in SET BTS ATTR / SET CHAN ATTR
|
|
||||||
* No support of TS 08.58 MultiRate Control
|
|
||||||
* No support of TS 08.58 Supported Codec Types
|
|
||||||
* No support of Bter frame / ENHANCED MEASUREMENT REPORT
|
|
||||||
|
|
||||||
osmo-bts-sysmo
|
|
||||||
--------------
|
|
||||||
|
|
||||||
* No CSD / ECSD support (not planned)
|
|
||||||
* GSM-R frequency band supported, but no NCH/ASCI/SoLSA
|
|
||||||
* All timeslots on one TRX have to use same training sequence (TSC)
|
|
||||||
* No multi-TRX support yet, though hardware+L1 support stacking
|
|
||||||
* Makes no use of 12.21 Intave Parameters and Interference
|
|
||||||
Level Boundaries
|
|
||||||
* MphConfig.CNF can be returned to the wrong callback. E.g. with Tx Power
|
|
||||||
and ciphering. The dispatch should take a look at the hLayer3.
|
|
||||||
|
|
||||||
osmo-bts-octphy
|
|
||||||
---------------
|
|
||||||
|
|
||||||
* No support of EFR, HR voice codec (lack of PHY support?)
|
|
||||||
* No re-transmission of PHY primitives in case of time-out
|
|
||||||
* Link Quality / Measurement processing incomplete
|
|
||||||
* impossible to modify encryption parameters using RSL MODE MODIFY
|
|
||||||
* no clear indication of nominal transmit power, various power related
|
|
||||||
computations are likely off
|
|
||||||
* no OML attribute validation during bts_model_check_oml()
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
|
|
||||||
# according to https://osmocom.org/projects/cellular-infrastructure/wiki/Make_a_new_release
|
|
||||||
# In short: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
|
|
||||||
# LIBVERSION=c:r:a
|
|
||||||
# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a.
|
|
||||||
# If any interfaces have been added, removed, or changed since the last update: c + 1:0:a.
|
|
||||||
# If any interfaces have been added since the last public release: c:r:a + 1.
|
|
||||||
# If any interfaces have been removed or changed since the last public release: c:r:0.
|
|
||||||
#library what description / commit summary line
|
|
||||||
438
configure.ac
438
configure.ac
@@ -1,455 +1,63 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script
|
dnl Process this file with autoconf to produce a configure script
|
||||||
AC_INIT([osmo-bts],
|
AC_INIT([osmo-bts],
|
||||||
m4_esyscmd([./git-version-gen .tarball-version]),
|
m4_esyscmd([./git-version-gen .tarball-version]),
|
||||||
[openbsc@lists.osmocom.org])
|
[openbsc-devel@lists.openbsc.org])
|
||||||
|
|
||||||
dnl *This* is the root dir, even if an install-sh exists in ../ or ../../
|
|
||||||
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])])
|
||||||
|
|
||||||
dnl include release helper
|
|
||||||
RELMAKE='-include osmo-release.mk'
|
|
||||||
AC_SUBST([RELMAKE])
|
|
||||||
|
|
||||||
dnl checks for programs
|
dnl checks for programs
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
LT_INIT
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang
|
|
||||||
AS_CASE(["$LD"],[*clang*],
|
|
||||||
[AS_CASE(["${host_os}"],
|
|
||||||
[*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])])
|
|
||||||
|
|
||||||
dnl check for pkg-config (explained in detail in libosmocore/configure.ac)
|
|
||||||
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
|
|
||||||
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
|
|
||||||
AC_MSG_WARN([You need to install pkg-config])
|
|
||||||
fi
|
|
||||||
PKG_PROG_PKG_CONFIG([0.20])
|
|
||||||
|
|
||||||
dnl checks for header files
|
dnl checks for header files
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
|
||||||
dnl Checks for typedefs, structures and compiler characteristics
|
dnl Checks for typedefs, structures and compiler characteristics
|
||||||
|
|
||||||
AC_ARG_ENABLE(sanitize,
|
|
||||||
[AS_HELP_STRING([--enable-sanitize], [Compile with address sanitizer enabled], )],
|
|
||||||
[sanitize=$enableval], [sanitize="no"])
|
|
||||||
if test x"$sanitize" = x"yes"
|
|
||||||
then
|
|
||||||
CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
|
|
||||||
CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(werror,
|
|
||||||
[AS_HELP_STRING(
|
|
||||||
[--enable-werror],
|
|
||||||
[Turn all compiler warnings into errors, with exceptions:
|
|
||||||
a) deprecation (allow upstream to mark deprecation without breaking builds);
|
|
||||||
b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds)
|
|
||||||
]
|
|
||||||
)],
|
|
||||||
[werror=$enableval], [werror="no"])
|
|
||||||
if test x"$werror" = x"yes"
|
|
||||||
then
|
|
||||||
WERROR_FLAGS="-Werror"
|
|
||||||
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
|
|
||||||
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
|
|
||||||
CFLAGS="$CFLAGS $WERROR_FLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl checks for libraries
|
dnl checks for libraries
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.11.0)
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.9)
|
||||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.11.0)
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty)
|
||||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.11.0)
|
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 0.0.7)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.11.0)
|
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.3)
|
||||||
PKG_CHECK_MODULES(LIBOSMOCODEC, libosmocodec >= 1.11.0)
|
|
||||||
PKG_CHECK_MODULES(LIBOSMOCODING, libosmocoding >= 1.11.0)
|
|
||||||
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 2.0.0)
|
|
||||||
PKG_CHECK_MODULES(LIBOSMOTRAU, libosmotrau >= 2.0.0)
|
|
||||||
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.6.0)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable support for sysmobts calibration tool])
|
AC_MSG_CHECKING([whether to enable sysmocom-bts hardware support])
|
||||||
AC_ARG_ENABLE(sysmobts-calib,
|
|
||||||
AC_HELP_STRING([--enable-sysmobts-calib],
|
|
||||||
[enable code for sysmobts calibration tool [default=no]]),
|
|
||||||
[enable_sysmobts_calib="yes"],[enable_sysmobts_calib="no"])
|
|
||||||
AC_MSG_RESULT([$enable_sysmobts_calib])
|
|
||||||
AM_CONDITIONAL(ENABLE_SYSMOBTS_CALIB, test "x$enable_sysmobts_calib" = "xyes")
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable support for sysmoBTS L1/PHY support])
|
|
||||||
AC_ARG_ENABLE(sysmocom-bts,
|
AC_ARG_ENABLE(sysmocom-bts,
|
||||||
AC_HELP_STRING([--enable-sysmocom-bts],
|
AC_HELP_STRING([--enable-sysmocom-bts],
|
||||||
[enable code for sysmoBTS L1/PHY [default=no]]),
|
[enable code for sysmocom femto-bts [default=no]]),
|
||||||
[enable_sysmocom_bts="yes"],[enable_sysmocom_bts="no"])
|
[enable_sysmocom_bts="yes"],[enable_sysmocom_bts="no"])
|
||||||
AC_ARG_WITH([sysmobts], [AS_HELP_STRING([--with-sysmobts=INCLUDE_DIR], [Location of the sysmobts API header files, implies --enable-sysmocom-bts])],
|
|
||||||
[sysmobts_incdir="$withval"],[sysmobts_incdir="$incdir"])
|
|
||||||
if test "x$sysmobts_incdir" != "x"; then
|
|
||||||
# --with-sysmobts was passed, imply enable_sysmocom_bts
|
|
||||||
enable_sysmocom_bts="yes"
|
|
||||||
fi
|
|
||||||
AC_SUBST([SYSMOBTS_INCDIR], -I$sysmobts_incdir)
|
|
||||||
AC_MSG_RESULT([$enable_sysmocom_bts])
|
AC_MSG_RESULT([$enable_sysmocom_bts])
|
||||||
AM_CONDITIONAL(ENABLE_SYSMOBTS, test "x$enable_sysmocom_bts" = "xyes")
|
AM_CONDITIONAL(ENABLE_SYSMOBTS, test "x$enable_sysmocom_bts" = "xyes")
|
||||||
if test "$enable_sysmocom_bts" = "yes"; then
|
|
||||||
oldCPPFLAGS=$CPPFLAGS
|
|
||||||
CPPFLAGS="$CPPFLAGS $SYSMOBTS_INCDIR -I$srcdir/include"
|
|
||||||
AC_CHECK_HEADER([sysmocom/femtobts/superfemto.h],[],
|
|
||||||
[AC_MSG_ERROR([sysmocom/femtobts/superfemto.h can not be found in $sysmobts_incdir])],
|
|
||||||
[#include <sysmocom/femtobts/superfemto.h>])
|
|
||||||
|
|
||||||
# Check for the sbts2050_header.h that was added after the 3.6 release
|
# We share gsm_data.h with OpenBSC and need to be pointed to the source
|
||||||
AC_CHECK_HEADER([sysmocom/femtobts/sbts2050_header.h], [sysmo_uc_header="yes"], [])
|
# directory of OpenBSC for now.
|
||||||
if test "$sysmo_uc_header" = "yes" ; then
|
AC_ARG_WITH([openbsc],
|
||||||
AC_DEFINE(BUILD_SBTS2050, 1, [Define if we want to build SBTS2050])
|
[AS_HELP_STRING([--with-openbsc=INCLUDE_DIR],
|
||||||
fi
|
[OpenBSC include directory for openbsc/gsm_data_shared.h])],
|
||||||
|
[openbsc_incdir="$withval"],
|
||||||
|
[openbsc_incdir="`cd $srcdir; pwd`/../openbsc/openbsc/include"])
|
||||||
|
AC_SUBST([OPENBSC_INCDIR], $openbsc_incdir)
|
||||||
|
|
||||||
PKG_CHECK_MODULES(LIBGPS, libgps)
|
oldCPPFLAGS=$CPPFLAGS
|
||||||
CPPFLAGS=$oldCPPFLAGS
|
CPPFLAGS="$CPPFLAGS -I$OPENBSC_INCDIR $LIBOSMOCORE_CFLAGS"
|
||||||
fi
|
AC_CHECK_HEADER([openbsc/gsm_data_shared.h],[],
|
||||||
AM_CONDITIONAL(BUILD_SBTS2050, test "x$sysmo_uc_header" = "xyes")
|
[AC_MSG_ERROR([openbsc/gsm_data_shared.h can not be found in $openbsc_incdir])],
|
||||||
|
[])
|
||||||
AC_MSG_CHECKING([whether to enable support for osmo-trx based L1/PHY support])
|
CPPFLAGS=$oldCPPFLAGS
|
||||||
AC_ARG_ENABLE(trx,
|
|
||||||
AC_HELP_STRING([--enable-trx],
|
|
||||||
[enable code for osmo-trx L1/PHY [default=no]]),
|
|
||||||
[enable_trx="yes"],[enable_trx="no"])
|
|
||||||
AC_MSG_RESULT([$enable_trx])
|
|
||||||
AM_CONDITIONAL(ENABLE_TRX, test "x$enable_trx" = "xyes")
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable support for Octasic OCTPHY-2G])
|
|
||||||
AC_ARG_ENABLE(octphy,
|
|
||||||
AC_HELP_STRING([--enable-octphy],
|
|
||||||
[enable code for Octasic OCTPHY-2G [default=no]]),
|
|
||||||
[enable_octphy="yes"],[enable_octphy="no"])
|
|
||||||
AC_ARG_WITH([octsdr-2g], [AS_HELP_STRING([--with-octsdr-2g], [Location of the OCTSDR-2G API header files])],
|
|
||||||
[octsdr2g_incdir="$withval"],[octsdr2g_incdir="`cd $srcdir; pwd`/src/osmo-bts-octphy/"])
|
|
||||||
AC_SUBST([OCTSDR2G_INCDIR], -I$octsdr2g_incdir)
|
|
||||||
AC_MSG_RESULT([$enable_octphy])
|
|
||||||
AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes")
|
|
||||||
if test "$enable_octphy" = "yes" ; then
|
|
||||||
oldCPPFLAGS=$CPPFLAGS
|
|
||||||
CPPFLAGS="$CPPFLAGS $OCTSDR2G_INCDIR -I$srcdir/include"
|
|
||||||
|
|
||||||
AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[],
|
|
||||||
[AC_MSG_ERROR([octphy/octvc1/gsm/octvc1_gsm_default.h can not be found in $octsdr2g_incdir])],
|
|
||||||
[#include <octphy/octvc1/gsm/octvc1_gsm_default.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn],
|
|
||||||
AC_DEFINE([OCTPHY_MULTI_TRX],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files support multi-trx]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/gsm/octvc1_gsm_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_RF_PORT_RX_STATS.Frequency],
|
|
||||||
AC_DEFINE([OCTPHY_USE_FREQUENCY],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files support tOCTVC1_RADIO_FREQUENCY_VALUE type]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_RF_PORT_INFO_ANTENNA_TX_CONFIG_RSP.TxConfig],
|
|
||||||
AC_DEFINE([OCTPHY_USE_TX_CONFIG],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files support tOCTVC1_HW_RF_PORT_ANTENNA_TX_CONFIG type]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_RF_PORT_INFO_ANTENNA_RX_CONFIG_RSP.RxConfig],
|
|
||||||
AC_DEFINE([OCTPHY_USE_RX_CONFIG],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files support tOCTVC1_HW_RF_PORT_ANTENNA_RX_CONFIG type]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_GSM_RF_CONFIG.ulTxAntennaId],
|
|
||||||
AC_DEFINE([OCTPHY_USE_ANTENNA_ID],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files support antenna ids in tOCTVC1_GSM_RF_CONFIG]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/gsm/octvc1_gsm_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_INFO_RSP.ulClkSourceSelection],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLK_SOURCE_SELECTION],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulClkSourceSelection in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_INFO_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.lClockError],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_CLOCK_ERROR],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports lClockError in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.lDroppedCycles],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_DROPPED_CYCLES],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports lDroppedCycles in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulPllFreqHz],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_PLL_FREQ_HZ],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulPllFreqHz in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulPllFractionalFreqHz],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_PLL_FRACTIONAL_FREQ_HZ],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulPllFractionalFreqHz in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulSlipCnt],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_SLIP_CNT],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulSlipCnt in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulSyncLosseCnt],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_SYNC_LOSSE_CNT],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulSyncLosseCnt in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulSyncLossCnt],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_SYNC_LOSS_CNT],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulSyncLossCnt in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulSourceState],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_SOURCE_STATE],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulSourceState in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulDacState],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_DAC_STATE],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulDacState in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP.ulDriftElapseTimeUs],
|
|
||||||
AC_DEFINE([OCTPHY_USE_CLOCK_SYNC_MGR_STATS_DRIFT_ELAPSE_TIME_US],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files supports ulDriftElapseTimeUs in tOCTVC1_HW_MSG_CLOCK_SYNC_MGR_STATS_RSP]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/hw/octvc1_hw_api.h>])
|
|
||||||
|
|
||||||
AC_CHECK_MEMBER([tOCTVC1_GSM_MSG_OVERSAMPLE_SELECT_16X_MODIFY_CMD.ulOversample16xEnableFlag],
|
|
||||||
AC_DEFINE([OCTPHY_USE_16X_OVERSAMPLING],
|
|
||||||
[1],
|
|
||||||
[Define to 1 if your octphy header files support 16x oversampling]),
|
|
||||||
[],
|
|
||||||
[#include <octphy/octvc1/gsm/octvc1_gsm_api.h>])
|
|
||||||
|
|
||||||
CPPFLAGS=$oldCPPFLAGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable NuRAN Wireless Litecell 1.5 hardware support])
|
|
||||||
AC_ARG_ENABLE(litecell15,
|
|
||||||
AC_HELP_STRING([--enable-litecell15],
|
|
||||||
[enable code for NuRAN Wireless Litecell15 bts [default=no]]),
|
|
||||||
[enable_litecell15="yes"],[enable_litecell15="no"])
|
|
||||||
AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])],
|
|
||||||
[litecell15_incdir="$withval"],[litecell15_incdir="$incdir"])
|
|
||||||
AC_SUBST([LITECELL15_INCDIR], -I$litecell15_incdir)
|
|
||||||
AC_MSG_RESULT([$enable_litecell15])
|
|
||||||
AM_CONDITIONAL(ENABLE_LC15BTS, test "x$enable_litecell15" = "xyes")
|
|
||||||
if test "$enable_litecell15" = "yes"; then
|
|
||||||
oldCPPFLAGS=$CPPFLAGS
|
|
||||||
CPPFLAGS="$CPPFLAGS $LITECELL15_INCDIR -I$srcdir/include"
|
|
||||||
AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[],
|
|
||||||
[AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])],
|
|
||||||
[#include <nrw/litecell15/litecell15.h>])
|
|
||||||
PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd)
|
|
||||||
CPPFLAGS=$oldCPPFLAGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to enable NuRAN Wireless OC-2G hardware support])
|
|
||||||
AC_ARG_ENABLE(oc2g,
|
|
||||||
AC_HELP_STRING([--enable-oc2g],
|
|
||||||
[enable code for NuRAN Wireless OC-2G bts [default=no]]),
|
|
||||||
[enable_oc2g="yes"],[enable_oc2g="no"])
|
|
||||||
AC_ARG_WITH([oc2g], [AS_HELP_STRING([--with-oc2g=INCLUDE_DIR], [Location of the OC-2G API header files])],
|
|
||||||
[oc2g_incdir="$withval"],[oc2g_incdir="$incdir"])
|
|
||||||
AC_SUBST([OC2G_INCDIR], -I$oc2g_incdir)
|
|
||||||
AC_MSG_RESULT([$enable_oc2g])
|
|
||||||
AM_CONDITIONAL(ENABLE_OC2GBTS, test "x$enable_oc2g" = "xyes")
|
|
||||||
if test "$enable_oc2g" = "yes"; then
|
|
||||||
oldCPPFLAGS=$CPPFLAGS
|
|
||||||
CPPFLAGS="$CPPFLAGS $OC2G_INCDIR -I$srcdir/include"
|
|
||||||
AC_CHECK_HEADER([nrw/oc2g/oc2g.h],[],
|
|
||||||
[AC_MSG_ERROR([nrw/oc2g/oc2g.h can not be found in $oc2g_incdir])],
|
|
||||||
[#include <nrw/oc2g/oc2g.h>])
|
|
||||||
PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd)
|
|
||||||
PKG_CHECK_MODULES(LIBGPS, libgps)
|
|
||||||
CPPFLAGS=$oldCPPFLAGS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Generate manuals
|
|
||||||
AC_ARG_ENABLE(manuals,
|
|
||||||
[AS_HELP_STRING(
|
|
||||||
[--enable-manuals],
|
|
||||||
[Generate manual PDFs [default=no]],
|
|
||||||
)],
|
|
||||||
[osmo_ac_build_manuals=$enableval], [osmo_ac_build_manuals="no"])
|
|
||||||
AM_CONDITIONAL([BUILD_MANUALS], [test x"$osmo_ac_build_manuals" = x"yes"])
|
|
||||||
AC_ARG_VAR(OSMO_GSM_MANUALS_DIR, [path to common osmo-gsm-manuals files, overriding pkg-config and "../osmo-gsm-manuals"
|
|
||||||
fallback])
|
|
||||||
if test x"$osmo_ac_build_manuals" = x"yes"
|
|
||||||
then
|
|
||||||
# Find OSMO_GSM_MANUALS_DIR (env, pkg-conf, fallback)
|
|
||||||
if test -n "$OSMO_GSM_MANUALS_DIR"; then
|
|
||||||
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from env)"
|
|
||||||
else
|
|
||||||
OSMO_GSM_MANUALS_DIR="$($PKG_CONFIG osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)"
|
|
||||||
if test -n "$OSMO_GSM_MANUALS_DIR"; then
|
|
||||||
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from pkg-conf)"
|
|
||||||
else
|
|
||||||
OSMO_GSM_MANUALS_DIR="../osmo-gsm-manuals"
|
|
||||||
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (fallback)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if ! test -d "$OSMO_GSM_MANUALS_DIR"; then
|
|
||||||
AC_MSG_ERROR("OSMO_GSM_MANUALS_DIR does not exist! Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR.")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Find and run check-depends
|
|
||||||
CHECK_DEPENDS="$OSMO_GSM_MANUALS_DIR/check-depends.sh"
|
|
||||||
if ! test -x "$CHECK_DEPENDS"; then
|
|
||||||
CHECK_DEPENDS="osmo-gsm-manuals-check-depends"
|
|
||||||
fi
|
|
||||||
if ! $CHECK_DEPENDS; then
|
|
||||||
AC_MSG_ERROR("missing dependencies for --enable-manuals")
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Put in Makefile with absolute path
|
|
||||||
OSMO_GSM_MANUALS_DIR="$(realpath "$OSMO_GSM_MANUALS_DIR")"
|
|
||||||
AC_SUBST([OSMO_GSM_MANUALS_DIR])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_ENABLE([external_tests],
|
|
||||||
AC_HELP_STRING([--enable-external-tests],
|
|
||||||
[Include the VTY/CTRL tests in make check [default=no]]),
|
|
||||||
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
|
|
||||||
if test "x$enable_ext_tests" = "xyes" ; then
|
|
||||||
AC_CHECK_PROG(PYTHON3_AVAIL,python3,yes)
|
|
||||||
if test "x$PYTHON3_AVAIL" != "xyes" ; then
|
|
||||||
AC_MSG_ERROR([Please install python3 to run the VTY/CTRL tests.])
|
|
||||||
fi
|
|
||||||
AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes)
|
|
||||||
if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
|
|
||||||
AC_MSG_ERROR([Please install https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests to run the VTY/CTRL tests.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
|
|
||||||
AC_MSG_RESULT([$enable_ext_tests])
|
|
||||||
AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
|
|
||||||
|
|
||||||
#
|
|
||||||
# SystemTap support
|
|
||||||
#
|
|
||||||
AC_MSG_CHECKING([whether to include systemtap tracing support])
|
|
||||||
AC_ARG_ENABLE([systemtap],
|
|
||||||
[AS_HELP_STRING([--enable-systemtap],
|
|
||||||
[Enable inclusion of systemtap trace support])],
|
|
||||||
[ENABLE_SYSTEMTAP="${enableval}"], [ENABLE_SYSTEMTAP='no'])
|
|
||||||
AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$ENABLE_SYSTEMTAP = xyes])
|
|
||||||
AC_MSG_RESULT(${ENABLE_SYSTEMTAP})
|
|
||||||
|
|
||||||
if test "x${ENABLE_SYSTEMTAP}" = xyes; then
|
|
||||||
# Additional configuration for --enable-systemtap is HERE
|
|
||||||
AC_CHECK_PROGS(DTRACE, dtrace)
|
|
||||||
if test -z "$DTRACE"; then
|
|
||||||
AC_MSG_ERROR([dtrace not found])
|
|
||||||
fi
|
|
||||||
AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
|
|
||||||
[SDT_H_FOUND='no';
|
|
||||||
AC_MSG_ERROR([systemtap support needs sys/sdt.h header])])
|
|
||||||
AC_DEFINE([HAVE_SYSTEMTAP], [1], [Define to 1 if using SystemTap probes.])
|
|
||||||
AC_ARG_WITH([tapset-install-dir],
|
|
||||||
[AS_HELP_STRING([--with-tapset-install-dir],
|
|
||||||
[The absolute path where the tapset dir will be installed])],
|
|
||||||
[if test "x${withval}" = x; then
|
|
||||||
ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"
|
|
||||||
else
|
|
||||||
ABS_TAPSET_DIR="${withval}"
|
|
||||||
fi], [ABS_TAPSET_DIR="\$(datadir)/systemtap/tapset"])
|
|
||||||
AC_SUBST(ABS_TAPSET_DIR)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# https://www.freedesktop.org/software/systemd/man/daemon.html
|
|
||||||
AC_ARG_WITH([systemdsystemunitdir],
|
|
||||||
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
|
|
||||||
[with_systemdsystemunitdir=auto])
|
|
||||||
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
|
|
||||||
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
|
|
||||||
|
|
||||||
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
|
|
||||||
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
|
|
||||||
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
|
|
||||||
with_systemdsystemunitdir=no],
|
|
||||||
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
|
|
||||||
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
|
|
||||||
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
|
|
||||||
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
|
|
||||||
|
|
||||||
AC_MSG_RESULT([CFLAGS="$CFLAGS"])
|
|
||||||
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
|
|
||||||
|
|
||||||
AM_CONFIG_HEADER(btsconfig.h)
|
|
||||||
|
|
||||||
AC_OUTPUT(
|
AC_OUTPUT(
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/common/Makefile
|
src/common/Makefile
|
||||||
src/osmo-bts-virtual/Makefile
|
|
||||||
src/osmo-bts-omldummy/Makefile
|
|
||||||
src/osmo-bts-sysmo/Makefile
|
src/osmo-bts-sysmo/Makefile
|
||||||
src/osmo-bts-lc15/Makefile
|
dnl src/osmo-bts-bb/Makefile
|
||||||
src/osmo-bts-oc2g/Makefile
|
|
||||||
src/osmo-bts-trx/Makefile
|
|
||||||
src/osmo-bts-octphy/Makefile
|
|
||||||
include/Makefile
|
include/Makefile
|
||||||
include/osmo-bts/Makefile
|
include/osmo-bts/Makefile
|
||||||
tests/Makefile
|
tests/Makefile
|
||||||
tests/paging/Makefile
|
tests/paging/Makefile
|
||||||
tests/agch/Makefile
|
|
||||||
tests/cipher/Makefile
|
tests/cipher/Makefile
|
||||||
tests/sysmobts/Makefile
|
|
||||||
tests/misc/Makefile
|
|
||||||
tests/handover/Makefile
|
|
||||||
tests/ta_control/Makefile
|
|
||||||
tests/tx_power/Makefile
|
|
||||||
tests/power/Makefile
|
|
||||||
tests/meas/Makefile
|
|
||||||
tests/amr/Makefile
|
|
||||||
tests/csd/Makefile
|
|
||||||
doc/Makefile
|
|
||||||
doc/examples/Makefile
|
|
||||||
doc/manuals/Makefile
|
|
||||||
contrib/Makefile
|
|
||||||
contrib/ber/Makefile
|
|
||||||
contrib/systemd/Makefile
|
|
||||||
Makefile)
|
Makefile)
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
SUBDIRS = systemd ber
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
AM_CPPFLAGS = \
|
|
||||||
$(all_includes) \
|
|
||||||
-I$(top_srcdir)/include \
|
|
||||||
-I$(top_builddir)/include \
|
|
||||||
-I$(builddir) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
AM_CFLAGS = \
|
|
||||||
-Wall \
|
|
||||||
$(LIBOSMOCORE_CFLAGS) \
|
|
||||||
$(LIBOSMOTRAU_CFLAGS) \
|
|
||||||
$(LIBOSMOCODEC_CFLAGS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
LDADD = \
|
|
||||||
$(LIBOSMOCORE_LIBS) \
|
|
||||||
$(LIBOSMOTRAU_LIBS) \
|
|
||||||
$(LIBOSMOCODEC_LIBS) \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
noinst_PROGRAMS = rtp_ber rtp_gen_map
|
|
||||||
|
|
||||||
rtp_ber_SOURCES = rtp_ber.c codec_bit_class.h
|
|
||||||
|
|
||||||
rtp_gen_map_SOURCES = rtp_gen_map.c
|
|
||||||
|
|
||||||
update_codec_bit_class_h: rtp_gen_map
|
|
||||||
$(AM_V_GEN)./$< > $(top_srcdir)/contrib/ber/codec_bit_class.h
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
BER testing tool
|
|
||||||
----------------
|
|
||||||
|
|
||||||
* Check all configs (MSC/BSC/BTS) for proper codec support
|
|
||||||
- FR enabled
|
|
||||||
- EFR enabled
|
|
||||||
- AMR 12.2 enabled (and all other modes disabled !)
|
|
||||||
- Use `amr-payload octet-aligned` in BSC config
|
|
||||||
|
|
||||||
* Check BTS config
|
|
||||||
- Disable jitter buffer : `bts N / rtp jitter-buffer 0`
|
|
||||||
|
|
||||||
* Check BSC config
|
|
||||||
- Disable radio timeout : `network / bts n / radio-link-timeout infinite`
|
|
||||||
|
|
||||||
* Start BER testing tool
|
|
||||||
- `./rtp_ber 4000`
|
|
||||||
|
|
||||||
* On the MSC CLI, start a silent-call, then request GSM to test loop
|
|
||||||
- `subscriber imsi <XXX> silent-call start tch/f speech-amr`
|
|
||||||
- `subscriber imsi <XXX> ms-test close-loop b`
|
|
||||||
|
|
||||||
Don't forget to terminate the loop and terminate the silent call !
|
|
||||||
|
|
||||||
- `subscriber imsi <XXX> ms-test open-loop`
|
|
||||||
- `subscriber imsi <XXX> silent-call stop`
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
static const int gsm_fr_bitclass[] = {
|
|
||||||
-1, -1, -1, -1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 2,
|
|
||||||
0, 0, 1, 2, 2, 0, 0, 1, 2, 2, 0, 1, 1, 2, 0, 1,
|
|
||||||
2, 2, 0, 1, 2, 1, 2, 2, 0, 0, 0, 0, 0, 0, 1, 1,
|
|
||||||
1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1,
|
|
||||||
1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1,
|
|
||||||
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2,
|
|
||||||
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
|
|
||||||
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2,
|
|
||||||
1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1,
|
|
||||||
1, 2, 1, 1, 2, 1, 1, 2, 0, 0, 0, 0, 0, 0, 1, 1,
|
|
||||||
1, 1, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1,
|
|
||||||
1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1,
|
|
||||||
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2,
|
|
||||||
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
|
|
||||||
2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2,
|
|
||||||
1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1,
|
|
||||||
2, 2, 1, 2, 2, 1, 2, 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const int gsm_efr_bitclass[] = {
|
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,
|
|
||||||
0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0,
|
|
||||||
1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1,
|
|
||||||
1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
|
|
||||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
|
|
||||||
1, 1, 1, 1, 2, 2, 1, 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
static const int gsm_amr_12_2_bitclass[] = {
|
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
||||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
||||||
1, 1, 1, 1, -1, -1, -1, -1,
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,483 +0,0 @@
|
|||||||
/* RTP based GSM BER testing for osmo-bts, implementing ideas described in
|
|
||||||
* https://osmocom.org/projects/osmobts/wiki/BER_Testing
|
|
||||||
*
|
|
||||||
* In short: The command transmits a PRBS sequence encapsulated in RTP frames, which are sent
|
|
||||||
* to the BTS, which transmits that data in the (unimpaired) downlink. The mobile station
|
|
||||||
* receives the data and is instructed to loop it back in the (possibly impaired) uplink.
|
|
||||||
* The BTS receives that uplink, puts in in RTP frames which end up being received back by this
|
|
||||||
* very tool. By correlating the received RTP with the PRBS sequence, this tool can compute
|
|
||||||
* the BER (Bit Error Rate) of the (possibly impaired) uplink. Doing this with different
|
|
||||||
* RF channel model simulators in the uplink allows to establish BER at different levels and
|
|
||||||
* channel conditions. */
|
|
||||||
|
|
||||||
/* (C) 2019 sysmocom - s.f.m.c. GmbH; Author: Sylvain Munaut
|
|
||||||
* All Rights Reserved
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
|
|
||||||
#include <osmocom/codec/codec.h>
|
|
||||||
#include <osmocom/core/logging.h>
|
|
||||||
#include <osmocom/core/prbs.h>
|
|
||||||
#include <osmocom/core/timer.h>
|
|
||||||
#include <osmocom/core/utils.h>
|
|
||||||
#include <osmocom/trau/osmo_ortp.h>
|
|
||||||
|
|
||||||
#include <codec_bit_class.h>
|
|
||||||
|
|
||||||
|
|
||||||
struct app_state {
|
|
||||||
struct osmo_rtp_socket *rs;
|
|
||||||
|
|
||||||
enum {
|
|
||||||
WAIT_CONN = 0, /* Wait for incoming connection */
|
|
||||||
WAIT_LOOP, /* Wait for a somewhat valid packet to start measuring */
|
|
||||||
RUNNING, /* Main state */
|
|
||||||
} state;
|
|
||||||
|
|
||||||
int pt;
|
|
||||||
|
|
||||||
int ref_len;
|
|
||||||
uint8_t ref_bytes[GSM_FR_BYTES]; /* FR is the largest possible one */
|
|
||||||
ubit_t ref_bits[8*GSM_FR_BYTES];
|
|
||||||
|
|
||||||
struct osmo_timer_list rtp_timer;
|
|
||||||
|
|
||||||
uint16_t rx_last_seq;
|
|
||||||
uint32_t rx_last_ts;
|
|
||||||
uint32_t rx_idx;
|
|
||||||
uint32_t tx_idx;
|
|
||||||
|
|
||||||
const int *err_tbl; /* Classification table */
|
|
||||||
int err_frames; /* Number of accumulated frames */
|
|
||||||
int err_cnt[3]; /* Bit error counter */
|
|
||||||
int err_tot[3]; /* Total # bits in that class */
|
|
||||||
};
|
|
||||||
|
|
||||||
#define FLOW_REG_TX_MAX_ADVANCE 200
|
|
||||||
#define FLOW_REG_TX_MIN_ADVANCE 50
|
|
||||||
|
|
||||||
|
|
||||||
const struct log_info log_info;
|
|
||||||
|
|
||||||
|
|
||||||
static const uint8_t amr_size_by_ft[] = {
|
|
||||||
[0] = 12, /* 4.75 */
|
|
||||||
[1] = 13, /* 5.15 */
|
|
||||||
[2] = 15, /* 5.9 */
|
|
||||||
[3] = 17, /* 6.7 */
|
|
||||||
[4] = 19, /* 7.4 */
|
|
||||||
[5] = 20, /* 7.95 */
|
|
||||||
[6] = 26, /* 10.2 */
|
|
||||||
[7] = 31, /* 12.2 */
|
|
||||||
[8] = 5, /* SID */
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char * const amr_rate_by_ft[] = {
|
|
||||||
[0] = "4.75",
|
|
||||||
[1] = "5.15",
|
|
||||||
[2] = "5.9",
|
|
||||||
[3] = "6.7",
|
|
||||||
[4] = "7.4",
|
|
||||||
[5] = "7.95",
|
|
||||||
[6] = "10.2",
|
|
||||||
[7] = "12.2",
|
|
||||||
[8] = "SID",
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gsm_fr_gen_ref(struct app_state *as)
|
|
||||||
{
|
|
||||||
struct osmo_prbs_state pn9;
|
|
||||||
|
|
||||||
/* Length */
|
|
||||||
as->ref_len = GSM_FR_BYTES;
|
|
||||||
|
|
||||||
/* Marker */
|
|
||||||
as->ref_bits[0] = 1;
|
|
||||||
as->ref_bits[1] = 1;
|
|
||||||
as->ref_bits[2] = 0;
|
|
||||||
as->ref_bits[3] = 1;
|
|
||||||
|
|
||||||
/* PN */
|
|
||||||
osmo_prbs_state_init(&pn9, &osmo_prbs9);
|
|
||||||
pn9.state = 31;
|
|
||||||
osmo_prbs_get_ubits(&as->ref_bits[4], 260, &pn9);
|
|
||||||
|
|
||||||
/* Convert to bytes */
|
|
||||||
osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 8*GSM_FR_BYTES, 0);
|
|
||||||
|
|
||||||
/* Init error classes */
|
|
||||||
as->err_tot[0] = 50;
|
|
||||||
as->err_tot[1] = 132;
|
|
||||||
as->err_tot[2] = 78;
|
|
||||||
as->err_tbl = gsm_fr_bitclass;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gsm_efr_gen_ref(struct app_state *as)
|
|
||||||
{
|
|
||||||
struct osmo_prbs_state pn9;
|
|
||||||
|
|
||||||
/* Length */
|
|
||||||
as->ref_len = GSM_EFR_BYTES;
|
|
||||||
|
|
||||||
/* Marker */
|
|
||||||
as->ref_bits[0] = 1;
|
|
||||||
as->ref_bits[1] = 1;
|
|
||||||
as->ref_bits[2] = 0;
|
|
||||||
as->ref_bits[3] = 0;
|
|
||||||
|
|
||||||
/* PN */
|
|
||||||
osmo_prbs_state_init(&pn9, &osmo_prbs9);
|
|
||||||
pn9.state = 31;
|
|
||||||
osmo_prbs_get_ubits(&as->ref_bits[4], 244, &pn9);
|
|
||||||
|
|
||||||
/* Convert to bytes */
|
|
||||||
osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 8*GSM_EFR_BYTES, 0);
|
|
||||||
|
|
||||||
/* Init error classes */
|
|
||||||
as->err_tot[0] = 50;
|
|
||||||
as->err_tot[1] = 125;
|
|
||||||
as->err_tot[2] = 73;
|
|
||||||
as->err_tbl = gsm_efr_bitclass;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gsm_amr_gen_ref(struct app_state *as)
|
|
||||||
{
|
|
||||||
struct osmo_prbs_state pn9;
|
|
||||||
uint8_t hdr[2];
|
|
||||||
|
|
||||||
/* Length */
|
|
||||||
as->ref_len = 33;
|
|
||||||
|
|
||||||
/* Header */
|
|
||||||
hdr[0] = 0x70;
|
|
||||||
hdr[1] = 0x3c;
|
|
||||||
osmo_pbit2ubit_ext(as->ref_bits, 0, hdr, 0, 16, 0);
|
|
||||||
|
|
||||||
/* PN */
|
|
||||||
osmo_prbs_state_init(&pn9, &osmo_prbs9);
|
|
||||||
pn9.state = 31;
|
|
||||||
osmo_prbs_get_ubits(&as->ref_bits[16], 244, &pn9);
|
|
||||||
|
|
||||||
/* Unused bits */
|
|
||||||
as->ref_bits[260] = 0;
|
|
||||||
as->ref_bits[261] = 0;
|
|
||||||
as->ref_bits[262] = 0;
|
|
||||||
as->ref_bits[263] = 0;
|
|
||||||
|
|
||||||
/* Convert to bytes */
|
|
||||||
osmo_ubit2pbit_ext(as->ref_bytes, 0, as->ref_bits, 0, 264, 0);
|
|
||||||
|
|
||||||
/* Init error classes */
|
|
||||||
as->err_tot[0] = 81;
|
|
||||||
as->err_tot[1] = 163;
|
|
||||||
as->err_tot[2] = -1;
|
|
||||||
as->err_tbl = gsm_amr_12_2_bitclass;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
_gsm_gen_ref(struct app_state *as)
|
|
||||||
{
|
|
||||||
switch (as->pt) {
|
|
||||||
case RTP_PT_GSM_FULL:
|
|
||||||
_gsm_fr_gen_ref(as);
|
|
||||||
break;
|
|
||||||
case RTP_PT_GSM_EFR:
|
|
||||||
_gsm_efr_gen_ref(as);
|
|
||||||
break;
|
|
||||||
case RTP_PT_AMR:
|
|
||||||
_gsm_amr_gen_ref(as);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fprintf(stderr, "[!] Unsupported payload type for BER measurement\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
_gsm_ber(struct app_state *as, const uint8_t *payload, unsigned int payload_len)
|
|
||||||
{
|
|
||||||
ubit_t rx_bits[8*33];
|
|
||||||
int err[3]; /* Class 1a, 1b, 2 */
|
|
||||||
int ones;
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
if (payload) {
|
|
||||||
/* Process real-payload */
|
|
||||||
osmo_pbit2ubit_ext(rx_bits, 0, payload, 0, 8*payload_len, 0);
|
|
||||||
|
|
||||||
err[0] = err[1] = err[2] = 0;
|
|
||||||
ones = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < 8 * payload_len; i++) {
|
|
||||||
j = as->err_tbl[i];
|
|
||||||
if (j >= 0) {
|
|
||||||
err[j] += rx_bits[i] ^ as->ref_bits[i];
|
|
||||||
ones += rx_bits[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ones < 32) { // This frames is probably us underrunning Tx, don't use it
|
|
||||||
fprintf(stderr, "[w] Frame ignored as probably TX underrun %d %d\n", as->tx_idx, as->rx_idx);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* No payload -> Lost frame completely */
|
|
||||||
err[0] = as->err_tot[0] / 2;
|
|
||||||
err[1] = as->err_tot[1] / 2;
|
|
||||||
err[2] = as->err_tot[2] / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (as->state == RUNNING) {
|
|
||||||
/* Update records */
|
|
||||||
if (err[0] != 0) {
|
|
||||||
/* Class 1a bits bad -> Frame error */
|
|
||||||
as->err_cnt[0]++;
|
|
||||||
}
|
|
||||||
|
|
||||||
as->err_cnt[1] += err[1]; /* Class 1b */
|
|
||||||
as->err_cnt[2] += err[2]; /* class 2 */
|
|
||||||
|
|
||||||
as->err_frames++;
|
|
||||||
|
|
||||||
/* Enough for a read-out ? */
|
|
||||||
if (as->err_frames == 200) {
|
|
||||||
printf("FBER: %4.2f C1b RBER: %5.3f C2 RBER: %5.3f\n",
|
|
||||||
100.0f * as->err_cnt[0] / as->err_frames,
|
|
||||||
100.0f * as->err_cnt[1] / (as->err_tot[1] * as->err_frames),
|
|
||||||
100.0f * as->err_cnt[2] / (as->err_tot[2] * as->err_frames)
|
|
||||||
);
|
|
||||||
memset(as->err_cnt, 0, sizeof(as->err_cnt));
|
|
||||||
as->err_frames = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return err[0] != 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
_rtp_check_payload_type(const uint8_t *payload, unsigned int payload_len)
|
|
||||||
{
|
|
||||||
uint8_t ft;
|
|
||||||
int pt = -1;
|
|
||||||
|
|
||||||
switch (payload_len) {
|
|
||||||
case GSM_FR_BYTES: /* FR or AMR 12.2k */
|
|
||||||
/* Check for AMR */
|
|
||||||
ft = (payload[1] >> 3) & 0xf;
|
|
||||||
if (ft == 7)
|
|
||||||
pt = RTP_PT_AMR;
|
|
||||||
|
|
||||||
/* Check for FR */
|
|
||||||
else if ((payload[0] & 0xF0) == 0xD0)
|
|
||||||
pt = RTP_PT_GSM_FULL;
|
|
||||||
|
|
||||||
/* None of the above */
|
|
||||||
else
|
|
||||||
fprintf(stderr, "[!] FR without 0xD0 signature or AMR with unknwon Frame Type ?!?\n");
|
|
||||||
|
|
||||||
break;
|
|
||||||
case GSM_EFR_BYTES: /* EFR */
|
|
||||||
if ((payload[0] & 0xF0) != 0xC0)
|
|
||||||
fprintf(stderr, "[!] EFR without 0xC0 signature ?!?\n");
|
|
||||||
pt = RTP_PT_GSM_EFR;
|
|
||||||
break;
|
|
||||||
case GSM_HR_BYTES: /* HR */
|
|
||||||
pt = RTP_PT_GSM_HALF;
|
|
||||||
break;
|
|
||||||
default: /* AMR */
|
|
||||||
{
|
|
||||||
uint8_t cmr, cmi, sti;
|
|
||||||
cmr = payload[0] >> 4;
|
|
||||||
ft = (payload[1] >> 3) & 0xf;
|
|
||||||
|
|
||||||
if (payload_len != amr_size_by_ft[ft]+2)
|
|
||||||
fprintf(stderr, "AMR FT %u(%s) but size %u\n",
|
|
||||||
ft, amr_rate_by_ft[ft], payload_len);
|
|
||||||
|
|
||||||
switch (ft) {
|
|
||||||
case 0: case 1: case 2: case 3:
|
|
||||||
case 4: case 5: case 6: case 7:
|
|
||||||
cmi = ft;
|
|
||||||
printf("AMR SPEECH with FT/CMI %u(%s), "
|
|
||||||
"CMR %u\n",
|
|
||||||
cmi, amr_rate_by_ft[cmi],
|
|
||||||
cmr);
|
|
||||||
break;
|
|
||||||
case 8: /* SID */
|
|
||||||
cmi = (payload[2+4] >> 1) & 0x7;
|
|
||||||
sti = payload[2+4] & 0x10;
|
|
||||||
printf("AMR SID %s with CMI %u(%s), CMR %u(%s)\n",
|
|
||||||
sti ? "UPDATE" : "FIRST",
|
|
||||||
cmi, amr_rate_by_ft[cmi],
|
|
||||||
cmr, amr_rate_by_ft[cmr]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
rtp_timer_cb(void *priv)
|
|
||||||
{
|
|
||||||
struct app_state *as = (struct app_state *)priv;
|
|
||||||
|
|
||||||
/* Send at least one frame if we're not too far ahead */
|
|
||||||
if (as->tx_idx < (as->rx_idx + FLOW_REG_TX_MAX_ADVANCE)) {
|
|
||||||
osmo_rtp_send_frame(as->rs, as->ref_bytes, as->ref_len, GSM_RTP_DURATION);
|
|
||||||
as->tx_idx++;
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "Skipped\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Then maybe a second one to try and catch up to RX */
|
|
||||||
if (as->tx_idx < (as->rx_idx + FLOW_REG_TX_MIN_ADVANCE)) {
|
|
||||||
osmo_rtp_send_frame(as->rs, as->ref_bytes, as->ref_len, GSM_RTP_DURATION);
|
|
||||||
as->tx_idx++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Re-schedule */
|
|
||||||
osmo_timer_schedule(&as->rtp_timer, 0, 20000);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
rtp_seq_num_diff(uint16_t new, uint16_t old)
|
|
||||||
{
|
|
||||||
int d = (int)new - (int)old;
|
|
||||||
while (d > 49152)
|
|
||||||
d -= 65536;
|
|
||||||
while (d < -49152)
|
|
||||||
d += 65536;
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
rtp_rx_cb(struct osmo_rtp_socket *rs,
|
|
||||||
const uint8_t *payload, unsigned int payload_len,
|
|
||||||
uint16_t seq_number, uint32_t timestamp, bool marker)
|
|
||||||
{
|
|
||||||
struct app_state *as = (struct app_state *)rs->priv;
|
|
||||||
int pt, rc, d;
|
|
||||||
|
|
||||||
// printf("Rx(%u, %d, %d, %d): %s\n", payload_len, seq_number, timestamp, marker, osmo_hexdump(payload, payload_len));
|
|
||||||
|
|
||||||
/* Identify payload */
|
|
||||||
pt = _rtp_check_payload_type(payload, payload_len);
|
|
||||||
|
|
||||||
/* First packet ? */
|
|
||||||
if (as->state == WAIT_CONN) {
|
|
||||||
/* Setup for this payload type */
|
|
||||||
as->pt = pt;
|
|
||||||
osmo_rtp_socket_set_pt(as->rs, pt);
|
|
||||||
_gsm_gen_ref(as);
|
|
||||||
|
|
||||||
/* Timer every 20 ms */
|
|
||||||
osmo_timer_setup(&as->rtp_timer, rtp_timer_cb, as);
|
|
||||||
osmo_timer_add(&as->rtp_timer);
|
|
||||||
osmo_timer_schedule(&as->rtp_timer, 0, 20000);
|
|
||||||
|
|
||||||
/* Init our time tracking */
|
|
||||||
as->rx_last_seq = seq_number;
|
|
||||||
as->rx_last_ts = timestamp;
|
|
||||||
|
|
||||||
/* Now we wait for a loop */
|
|
||||||
as->state = WAIT_LOOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* RX sequence & timstamp tracking */
|
|
||||||
if (rtp_seq_num_diff(seq_number, as->rx_last_seq) > 1)
|
|
||||||
fprintf(stderr, "[!] RTP sequence number discontinuity (%d -> %d)\n", as->rx_last_seq, seq_number);
|
|
||||||
|
|
||||||
d = (timestamp - as->rx_last_ts) / GSM_RTP_DURATION;
|
|
||||||
|
|
||||||
as->rx_idx += d;
|
|
||||||
as->rx_last_seq = seq_number;
|
|
||||||
as->rx_last_ts = timestamp;
|
|
||||||
|
|
||||||
/* Account for missing frames in BER tracking */
|
|
||||||
if (d > 1) {
|
|
||||||
fprintf(stderr, "[!] RTP %d missing frames assumed lost @%d\n", d-1, seq_number);
|
|
||||||
while (--d)
|
|
||||||
_gsm_ber(as, NULL, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* BER analysis */
|
|
||||||
rc = _gsm_ber(as, payload, payload_len);
|
|
||||||
|
|
||||||
if ((as->state == WAIT_LOOP) && (rc == 0))
|
|
||||||
as->state = RUNNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
struct app_state _as, *as = &_as;
|
|
||||||
int rc, port;
|
|
||||||
|
|
||||||
/* Args */
|
|
||||||
if (argc < 2)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
port = atoi(argv[1]);
|
|
||||||
|
|
||||||
/* App init */
|
|
||||||
memset(as, 0x00, sizeof(struct app_state));
|
|
||||||
|
|
||||||
log_init(&log_info, NULL);
|
|
||||||
osmo_rtp_init(NULL);
|
|
||||||
|
|
||||||
/* Start auto-connect RTP socket */
|
|
||||||
as->rs = osmo_rtp_socket_create(NULL, 0);
|
|
||||||
|
|
||||||
as->rs->priv = as;
|
|
||||||
as->rs->rx_cb = rtp_rx_cb;
|
|
||||||
|
|
||||||
/* Jitter buffer gets in the way, we want the raw traffic */
|
|
||||||
osmo_rtp_socket_set_param(as->rs, OSMO_RTP_P_JIT_ADAP, 0);
|
|
||||||
osmo_rtp_socket_set_param(as->rs, OSMO_RTP_P_JITBUF, 0);
|
|
||||||
|
|
||||||
/* Bind to requested port */
|
|
||||||
fprintf(stderr, "[+] Binding RTP socket on port %u...\n", port);
|
|
||||||
rc = osmo_rtp_socket_bind(as->rs, "0.0.0.0", port);
|
|
||||||
if (rc < 0) {
|
|
||||||
fprintf(stderr, "[!] error binding RTP socket: %d\n", rc);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We 'connect' to the first source we hear from */
|
|
||||||
osmo_rtp_socket_autoconnect(as->rs);
|
|
||||||
|
|
||||||
/* Main loop */
|
|
||||||
while (1)
|
|
||||||
osmo_select_main(0);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
/* utility to generate codec_bit_class.h, a file with structures
|
|
||||||
* describing which [protection] class each bit of a given codec frame belongs to */
|
|
||||||
|
|
||||||
/* (C) 2019 sysmocom - s.f.m.c. GmbH; Author: Sylvain Munaut
|
|
||||||
* All Rights Reserved
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <osmocom/codec/codec.h>
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
gen_table_fr(int *tbl)
|
|
||||||
{
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
tbl[0] = tbl[1] = tbl[2] = tbl[3] = -1;
|
|
||||||
|
|
||||||
for (i = 0; i < 260; i++) {
|
|
||||||
j = 4 + gsm610_bitorder[i];
|
|
||||||
if (i < 50)
|
|
||||||
tbl[j] = 0; /* Class 1a */
|
|
||||||
else if (i < 182)
|
|
||||||
tbl[j] = 1; /* Class 1b */
|
|
||||||
else
|
|
||||||
tbl[j] = 2; /* Class 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
return GSM_FR_BYTES * 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
gen_table_efr(int *tbl)
|
|
||||||
{
|
|
||||||
int i, j, k;
|
|
||||||
|
|
||||||
tbl[0] = tbl[1] = tbl[2] = tbl[3] = -1;
|
|
||||||
|
|
||||||
for (i = 0; i < 260; i++) {
|
|
||||||
j = gsm660_bitorder[i];
|
|
||||||
|
|
||||||
if (j < 71)
|
|
||||||
k = j;
|
|
||||||
else if (j < 73)
|
|
||||||
k = 71;
|
|
||||||
else if (j < 123)
|
|
||||||
k = j - 2;
|
|
||||||
else if (j < 125)
|
|
||||||
k = 119;
|
|
||||||
else if (j < 178)
|
|
||||||
k = j - 4;
|
|
||||||
else if (j < 180)
|
|
||||||
k = 172;
|
|
||||||
else if (j < 230)
|
|
||||||
k = j - 6;
|
|
||||||
else if (j < 232)
|
|
||||||
k = 222;
|
|
||||||
else if (j < 252)
|
|
||||||
k = j - 8;
|
|
||||||
else
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (i < 50)
|
|
||||||
tbl[k] = 0; /* Class 1a */
|
|
||||||
else if (i < 182)
|
|
||||||
tbl[k] = 1; /* Class 1b */
|
|
||||||
else
|
|
||||||
tbl[k] = 2; /* Class 2 */
|
|
||||||
}
|
|
||||||
|
|
||||||
return GSM_EFR_BYTES * 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
gen_table_amr_12_2(int *tbl)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
|
||||||
tbl[i] = -1;
|
|
||||||
|
|
||||||
for (i = 0; i < 244; i++)
|
|
||||||
tbl[i+16] = i < 81 ? 0 : 1;
|
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
|
||||||
tbl[i+16+244] = -1;
|
|
||||||
|
|
||||||
return 8 * 33;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
print_table(const char *name, int *tbl, int len)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
printf("static const int %s[] = {\n", name);
|
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
|
||||||
if ((i & 15) == 0)
|
|
||||||
printf("\t");
|
|
||||||
|
|
||||||
printf("%2d", tbl[i]);
|
|
||||||
|
|
||||||
if (((i & 15) == 15) || (i == len-1))
|
|
||||||
printf(",\n");
|
|
||||||
else
|
|
||||||
printf(", ");
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("};\n\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
int tbl[33*8];
|
|
||||||
int rv;
|
|
||||||
|
|
||||||
rv = gen_table_fr(tbl);
|
|
||||||
print_table("gsm_fr_bitclass", tbl, rv);
|
|
||||||
|
|
||||||
rv = gen_table_efr(tbl);
|
|
||||||
print_table("gsm_efr_bitclass", tbl, rv);
|
|
||||||
|
|
||||||
rv = gen_table_amr_12_2(tbl);
|
|
||||||
print_table("gsm_amr_12_2_bitclass", tbl, rv);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
#!/usr/bin/gawk -f
|
|
||||||
|
|
||||||
# Expected input format: FN TYPE
|
|
||||||
|
|
||||||
BEGIN {
|
|
||||||
DELTA = 0
|
|
||||||
ERR = 0
|
|
||||||
FORCE = 0
|
|
||||||
FN = 0
|
|
||||||
SILENCE = 0
|
|
||||||
TYPE = ""
|
|
||||||
CHK = ""
|
|
||||||
U_MAX = 8 * 20 + 120 / 26
|
|
||||||
U_MIN = 8 * 20 - 120 / 26
|
|
||||||
F_MAX = 3 * 20 + 120 / 26
|
|
||||||
F_MIN = 3 * 20 - 120 / 26
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
if (NR > 2) { # we have data from previous record to compare to
|
|
||||||
DELTA = ($1 - FN) * 120 / 26
|
|
||||||
CHK = "OK"
|
|
||||||
if ("FACCH" == $2 && "ONSET" == TYPE) { # ONSET due to FACCH is NOT a talkspurt
|
|
||||||
SILENCE = 1
|
|
||||||
}
|
|
||||||
if (("UPDATE" == TYPE || "FIRST" == TYPE) && ("FACCH" == $2 || "SPEECH" == $2)) { # check for missing ONSET:
|
|
||||||
CHK = "FAIL: missing ONSET (" $2 ") after " TYPE "."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
if ("SID_P1" == $2) {
|
|
||||||
CHK = "FAIL: regular AMR payload with FT SID and STI=0 (should be either pyaload Update or STI=1)."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
if ("FORCED_FIRST" == $2 || "FORCED_NODATA" == $2 || "FORCED_F_P2" == $2 || "FORCED_F_INH" == $2 || "FORCED_U_INH" == $2) {
|
|
||||||
CHK = "FAIL: event " $2 " inserted by DSP."
|
|
||||||
FORCE++
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
if ("FIRST_P2" != $2 && "FIRST_P1" == TYPE) {
|
|
||||||
CHK = "FAIL: " TYPE " followed by " $2 " instead of P2."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
if ("FIRST" == $2 && "FIRST" == TYPE) {
|
|
||||||
CHK = "FAIL: multiple SID FIRST in a row."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
if ("OK" == CHK && "ONSET" != $2) { # check inter-SID distances:
|
|
||||||
if ("UPDATE" == TYPE) {
|
|
||||||
if (DELTA > U_MAX) {
|
|
||||||
CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too big " DELTA "ms > " U_MAX "ms."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
if ("UPDATE" == $2 && DELTA < U_MIN) {
|
|
||||||
CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " U_MIN "ms."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ("FIRST" == TYPE) {
|
|
||||||
if (DELTA > F_MAX) {
|
|
||||||
CHK = "FAIL: delta (" $1 - FN "fn) from previous SID FIRST (@" FN ") too big " DELTA "ms > " F_MAX "ms."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
if ("UPDATE" == $2 && DELTA < F_MIN) {
|
|
||||||
CHK = "FAIL: delta (" $1 - FN "fn) from previous SID UPDATE (@" FN ") too small " DELTA "ms < " F_MIN "ms."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ("FACCH" == TYPE && "FIRST" != $2 && "FACCH" != $2 && 1 == SILENCE) { # check FACCH handling
|
|
||||||
CHK = "FAIL: incorrect silence resume with " $2 " after FACCH."
|
|
||||||
ERR++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ("SPEECH" == $2 || "ONSET" == $2) { # talkspurt
|
|
||||||
SILENCE = 0
|
|
||||||
}
|
|
||||||
if ("UPDATE" == $2 || "FIRST" == $2) { # silence
|
|
||||||
SILENCE = 1
|
|
||||||
}
|
|
||||||
print $1, $2, CHK
|
|
||||||
if ($2 != "EMPTY") { # skip over EMPTY records
|
|
||||||
TYPE = $2
|
|
||||||
FN = $1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
END {
|
|
||||||
print "Check completed: found " ERR " errors (" FORCE " events inserted by DSP) in " NR " records."
|
|
||||||
}
|
|
||||||
@@ -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/osmo-bts.cfg"], env = env,
|
||||||
stdin=None, stdout=None)
|
stdin=None, stdout=None)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
/* GPLv3+ to read sysmobts-v2 revD or later EEPROM from userspace */
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <linux/i2c.h>
|
|
||||||
#include <linux/i2c-dev.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* Can read a 16bit at24 eeprom with 8192 byte in storage (24c64) */
|
|
||||||
static int dump_eeprom(int fd, int out)
|
|
||||||
{
|
|
||||||
#define STEP 8192
|
|
||||||
#define SIZE 8192
|
|
||||||
uint8_t buf[STEP + 2];
|
|
||||||
int rc = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < SIZE; i += STEP) {
|
|
||||||
/* write the address */
|
|
||||||
buf[0] = i >> 8;
|
|
||||||
buf[1] = i;
|
|
||||||
rc = write(fd, buf, 2);
|
|
||||||
if (rc != 2) {
|
|
||||||
fprintf(stderr, "writing address failed: %d/%d/%s\n", rc, errno, strerror(errno));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* execute step amount of reads */
|
|
||||||
rc = read(fd, buf, STEP);
|
|
||||||
if (rc != STEP) {
|
|
||||||
fprintf(stderr, "Failed to read: %d/%d/%s\n", rc, errno, strerror(errno));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
write(out, buf, STEP);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int i2c_fd, out_fd;
|
|
||||||
char *filename = "/dev/i2c-1";
|
|
||||||
char *out_file = "eeprom.out";
|
|
||||||
int addr = 0x50;
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
i2c_fd = open(filename, O_RDWR);
|
|
||||||
if (i2c_fd < 0) {
|
|
||||||
fprintf(stderr, "Failed to open i2c device %d/%d/%s\n",
|
|
||||||
i2c_fd, errno, strerror(errno));
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* force using that address it is already bound with a driver */
|
|
||||||
rc = ioctl(i2c_fd, I2C_SLAVE_FORCE, addr);
|
|
||||||
if (rc < 0) {
|
|
||||||
fprintf(stderr, "Failed to claim i2c device %d/%d/%s\n",
|
|
||||||
rc, errno, strerror(errno));
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (argc >= 2)
|
|
||||||
out_file = argv[1];
|
|
||||||
out_fd = open(out_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
|
||||||
if (out_fd < 0) {
|
|
||||||
fprintf(stderr, "Failed to open out device %s %d/%d/%s\n",
|
|
||||||
out_file, rc, errno, strerror(errno));
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dump_eeprom(i2c_fd, out_fd) != 0) {
|
|
||||||
unlink(out_file);
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# jenkins build helper script for osmo-bts. This is how we build on jenkins.osmocom.org
|
|
||||||
#
|
|
||||||
# environment variables:
|
|
||||||
# * FIRMWARE_VERSION: which firmware version to build ("master", "femtobts_v2.7", ...)
|
|
||||||
# * WITH_MANUALS: build manual PDFs if set to "1"
|
|
||||||
# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
|
|
||||||
#
|
|
||||||
# usage: jenkins_bts_model.sh BTS_MODEL
|
|
||||||
# * BTS_MODEL: which BTS model specific script to run ("sysmo", "oct", ...)
|
|
||||||
#
|
|
||||||
|
|
||||||
bts_model="$1"
|
|
||||||
|
|
||||||
if [ "x$bts_model" = "x" ]; then
|
|
||||||
echo "Error: You have to specify the BTS model as first argument, e.g. $0 sysmo"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "./contrib" ]; then
|
|
||||||
echo "Run ./contrib/jenkins_bts_model.sh from the root of the osmo-bts tree"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -x -e
|
|
||||||
|
|
||||||
case "$bts_model" in
|
|
||||||
|
|
||||||
sysmo)
|
|
||||||
./contrib/jenkins_sysmobts.sh
|
|
||||||
;;
|
|
||||||
|
|
||||||
oct)
|
|
||||||
./contrib/jenkins_oct.sh
|
|
||||||
;;
|
|
||||||
|
|
||||||
lc15)
|
|
||||||
./contrib/jenkins_lc15.sh
|
|
||||||
;;
|
|
||||||
|
|
||||||
oc2g)
|
|
||||||
./contrib/jenkins_oc2g.sh
|
|
||||||
;;
|
|
||||||
|
|
||||||
trx)
|
|
||||||
./contrib/jenkins_bts_trx.sh
|
|
||||||
;;
|
|
||||||
|
|
||||||
oct+trx)
|
|
||||||
./contrib/jenkins_oct_and_bts_trx.sh
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
set +x
|
|
||||||
echo "Unknown BTS model '$bts_model'"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# jenkins build helper script for osmo-bts-trx
|
|
||||||
|
|
||||||
# shellcheck source=contrib/jenkins_common.sh
|
|
||||||
. $(dirname "$0")/jenkins_common.sh
|
|
||||||
|
|
||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
|
||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
|
||||||
|
|
||||||
cd "$deps"
|
|
||||||
|
|
||||||
configure_flags="\
|
|
||||||
--enable-sanitize \
|
|
||||||
--enable-werror \
|
|
||||||
--enable-trx \
|
|
||||||
--enable-external-tests \
|
|
||||||
"
|
|
||||||
|
|
||||||
build_bts "osmo-bts-trx" "$configure_flags"
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# this is a common helper script that is shared among all BTS model
|
|
||||||
# specific helper scripts like jenkins_sysmobts.sh. You shouldn't call
|
|
||||||
# this directly, but rather indirectly via the bts-specific scripts
|
|
||||||
|
|
||||||
if ! [ -x "$(command -v osmo-deps.sh)" ]; then
|
|
||||||
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
base="$PWD"
|
|
||||||
deps="$base/deps"
|
|
||||||
inst="$deps/install"
|
|
||||||
|
|
||||||
export deps inst
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
|
||||||
|
|
||||||
mkdir -p "$deps"
|
|
||||||
|
|
||||||
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
|
|
||||||
|
|
||||||
# generic project build function, usage:
|
|
||||||
# build "PROJECT-NAME" "CONFIGURE OPTIONS"
|
|
||||||
build_bts() {
|
|
||||||
set +x
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo " =============================== $1 ==============================="
|
|
||||||
echo
|
|
||||||
set -x
|
|
||||||
|
|
||||||
cd $deps
|
|
||||||
osmo-deps.sh libosmocore
|
|
||||||
cd $base
|
|
||||||
shift
|
|
||||||
|
|
||||||
# Manuals: build
|
|
||||||
conf_flags="$*"
|
|
||||||
if [ "$WITH_MANUALS" = "1" ]; then
|
|
||||||
conf_flags="$conf_flags --enable-manuals"
|
|
||||||
export PATH="$inst/bin:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
autoreconf --install --force
|
|
||||||
./configure $conf_flags
|
|
||||||
$MAKE $PARALLEL_MAKE
|
|
||||||
$MAKE check || cat-testlogs.sh
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS="$conf_flags" $MAKE $PARALLEL_MAKE distcheck || cat-testlogs.sh
|
|
||||||
|
|
||||||
# Manuals: publish
|
|
||||||
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
|
|
||||||
$MAKE -C "$base/doc/manuals" publish
|
|
||||||
fi
|
|
||||||
|
|
||||||
$MAKE $PARALLEL_MAKE maintainer-clean
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# jenkins build helper script for osmo-bts-lc15
|
|
||||||
|
|
||||||
# shellcheck source=contrib/jenkins_common.sh
|
|
||||||
. $(dirname "$0")/jenkins_common.sh
|
|
||||||
|
|
||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
|
||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
|
||||||
|
|
||||||
cd "$deps"
|
|
||||||
osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
|
|
||||||
|
|
||||||
configure_flags="\
|
|
||||||
--enable-sanitize \
|
|
||||||
--with-litecell15=$deps/layer1-headers/inc/ \
|
|
||||||
--enable-litecell15 \
|
|
||||||
"
|
|
||||||
|
|
||||||
build_bts "osmo-bts-lc15" "$configure_flags"
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# jenkins build helper script for osmo-bts-oc2g
|
|
||||||
|
|
||||||
# shellcheck source=contrib/jenkins_common.sh
|
|
||||||
. $(dirname "$0")/jenkins_common.sh
|
|
||||||
|
|
||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
|
||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
|
||||||
|
|
||||||
cd "$deps"
|
|
||||||
osmo-layer1-headers.sh oc2g "$FIRMWARE_VERSION"
|
|
||||||
|
|
||||||
configure_flags="\
|
|
||||||
--enable-sanitize \
|
|
||||||
--with-oc2g=$deps/layer1-headers/inc/ \
|
|
||||||
--enable-oc2g \
|
|
||||||
"
|
|
||||||
|
|
||||||
build_bts "osmo-bts-oc2g" "$configure_flags"
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# jenkins build helper script for osmo-bts-octphy
|
|
||||||
|
|
||||||
# shellcheck source=contrib/jenkins_common.sh
|
|
||||||
. $(dirname "$0")/jenkins_common.sh
|
|
||||||
|
|
||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
|
||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
|
||||||
|
|
||||||
cd "$deps"
|
|
||||||
osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
|
|
||||||
|
|
||||||
configure_flags="\
|
|
||||||
--enable-sanitize \
|
|
||||||
--enable-werror \
|
|
||||||
--with-octsdr-2g=$deps/layer1-headers/ \
|
|
||||||
--enable-octphy \
|
|
||||||
"
|
|
||||||
|
|
||||||
build_bts "osmo-bts-octphy" "$configure_flags"
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# jenkins build helper script for osmo-bts-octphy + osmo-bts-trx
|
|
||||||
|
|
||||||
# shellcheck source=contrib/jenkins_common.sh
|
|
||||||
. $(dirname "$0")/jenkins_common.sh
|
|
||||||
|
|
||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
|
||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
|
||||||
|
|
||||||
cd "$deps"
|
|
||||||
|
|
||||||
osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
|
|
||||||
|
|
||||||
configure_flags="\
|
|
||||||
--enable-werror \
|
|
||||||
--with-octsdr-2g=$deps/layer1-headers/ \
|
|
||||||
--enable-octphy \
|
|
||||||
--enable-trx \
|
|
||||||
--enable-external-tests \
|
|
||||||
"
|
|
||||||
|
|
||||||
build_bts "osmo-bts-octphy+trx" "$configure_flags"
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# jenkins build helper script for osmo-bts-sysmo
|
|
||||||
|
|
||||||
# shellcheck source=contrib/jenkins_common.sh
|
|
||||||
. $(dirname "$0")/jenkins_common.sh
|
|
||||||
|
|
||||||
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
||||||
export LD_LIBRARY_PATH="$inst/lib"
|
|
||||||
|
|
||||||
osmo-build-dep.sh libosmocore "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-netif "" --disable-doxygen
|
|
||||||
osmo-build-dep.sh libosmo-abis "" --disable-dahdi
|
|
||||||
|
|
||||||
cd "$deps"
|
|
||||||
osmo-layer1-headers.sh sysmo "$FIRMWARE_VERSION"
|
|
||||||
mkdir -p "$inst/include/sysmocom/femtobts"
|
|
||||||
ln -s $deps/layer1-headers/include/* "$inst/include/sysmocom/femtobts/"
|
|
||||||
|
|
||||||
configure_flags="\
|
|
||||||
--enable-sanitize \
|
|
||||||
--enable-werror \
|
|
||||||
--enable-sysmocom-bts \
|
|
||||||
--with-sysmobts=$inst/include/ \
|
|
||||||
--enable-external-tests \
|
|
||||||
"
|
|
||||||
|
|
||||||
# This will not work for the femtobts
|
|
||||||
if [ $FIRMWARE_VERSION != "femtobts_v2.7" ]; then
|
|
||||||
configure_flags="$configure_flags --enable-sysmobts-calib"
|
|
||||||
fi
|
|
||||||
|
|
||||||
build_bts "osmo-bts-sysmo" "$configure_flags"
|
|
||||||
|
|
||||||
osmo-clean-workspace.sh
|
|
||||||
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
|
||||||
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
|
||||||
4
contrib/screenrc-sysmobts
Normal file
4
contrib/screenrc-sysmobts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
chdir /tmp
|
||||||
|
screen -t BTS 0 /etc/osmocom/respawn.sh /usr/bin/sysmobts -c /etc/osmocom/osmo-bts.cfg -M
|
||||||
|
screen -t PCU 1 /etc/osmocom/respawn-only.sh /usr/bin/osmo-pcu -c /etc/osmocom/osmo-pcu.cfg
|
||||||
|
detach
|
||||||
@@ -1,91 +0,0 @@
|
|||||||
#!/usr/bin/gawk -f
|
|
||||||
|
|
||||||
# Usage example:
|
|
||||||
# tshark -2 -t r -E 'header=n' -E 'separator=,' -E 'quote=n' -T fields -e gsmtap.frame_nr -e gsmtap.ts -e gsmtap.arfcn -e _ws.col.Info -Y 'gsmtap' -r test.pcapng.gz | grep Information | env ARFCN=878 ./si_check.gawk
|
|
||||||
# read summary on number of bis/ter messages and adjust BT_BOTH and BT_NONE environment variables accordingly
|
|
||||||
|
|
||||||
BEGIN {
|
|
||||||
FS = ","
|
|
||||||
FAILED = 0
|
|
||||||
IGNORE = 0
|
|
||||||
BIS = 0
|
|
||||||
TER = 0
|
|
||||||
QUA = 0
|
|
||||||
BT_BOTH = ENVIRON["BOTH"]
|
|
||||||
BT_NONE = ENVIRON["NONE"]
|
|
||||||
TC_INDEX = 0
|
|
||||||
TC4[4] = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
{ # expected .csv input as follows: gsmtap.frame_nr,gsmtap.ts,gsmtap.arfcn,_ws.col.Info
|
|
||||||
if ("ARFCN" in ENVIRON) { # ARFCN filtering is enabled
|
|
||||||
if (ENVIRON["ARFCN"] != $3) { # ignore other ARFCNs
|
|
||||||
IGNORE++
|
|
||||||
next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type = get_si_type($4)
|
|
||||||
tc = get_tc($1)
|
|
||||||
result = "FAIL"
|
|
||||||
|
|
||||||
if (1 == check_si_tc(tc, type)) { result = "OK" }
|
|
||||||
else { FAILED++ }
|
|
||||||
|
|
||||||
if (4 == tc) {
|
|
||||||
TC4[TC_INDEX] = type
|
|
||||||
TC_INDEX = int((TC_INDEX + 1) % 4)
|
|
||||||
if (0 == check_tc4c(type) && "OK" == result) {
|
|
||||||
result = "FAIL"
|
|
||||||
FAILED++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (type == "2bis") { BIS++ }
|
|
||||||
if (type == "2ter") { TER++ }
|
|
||||||
if (type == "2quater") { QUA++ }
|
|
||||||
# for (i in TC4) print TC4[i] # debugging
|
|
||||||
printf "ARFCN=%d FN=%d TS=%d TC=%d TYPE=%s %s\n", $3, $1, $2, tc, type, result
|
|
||||||
}
|
|
||||||
|
|
||||||
END {
|
|
||||||
printf "check completed: total %d, failed %d, ignored %d, ok %d\nSI2bis = %d, SI2ter = %d, SI2quater = %d\n", NR, FAILED, IGNORE, NR - FAILED - IGNORE, BIS, TER, QUA
|
|
||||||
if ((BIS > 0 || TER > 0) && BT_NONE) { printf "please re-run with correct environment: unset 'NONE' variable\n" }
|
|
||||||
if ((BIS > 0 && TER > 0) && !BT_BOTH) { printf "please re-run with correct environment: set 'BOTH' variable\n" }
|
|
||||||
}
|
|
||||||
|
|
||||||
func get_si_type(s, x) { # we rely on format of Info column in wireshark output - if it's changed we're screwed
|
|
||||||
return x[split(s, x, " ")]
|
|
||||||
}
|
|
||||||
|
|
||||||
func get_tc(f) { # N. B: all numbers in awk are float
|
|
||||||
return int(int(f / 51) % 8)
|
|
||||||
}
|
|
||||||
|
|
||||||
func check_tc4c(si, count) { # check for "once in 4 consecutive occurrences" rule
|
|
||||||
count = 0
|
|
||||||
if ("2quater" != si || "2ter" != si) { return 1 } # rules is not applicable to other types
|
|
||||||
if (BT_NONE && "2quater" == si) { return 0 } # should be on TC=5 instead
|
|
||||||
if (!BT_BOTH && "2ter" == si) { return 0 } # should be on TC=5 instead
|
|
||||||
if (0 in TC4 && 1 in TC4 && 2 in TC4 && 3 in TC4) { # only check if we have 4 consecutive occurrences already
|
|
||||||
if (si == TC4[0]) { count++ }
|
|
||||||
if (si == TC4[1]) { count++ }
|
|
||||||
if (si == TC4[2]) { count++ }
|
|
||||||
if (si == TC4[3]) { count++ }
|
|
||||||
if (0 == count) { return 0 }
|
|
||||||
}
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
func check_si_tc(tc, si) { # check that SI scheduling on BCCH Norm is matching rules from 3GPP TS 05.02 § 6.3.1.3
|
|
||||||
switch (si) {
|
|
||||||
case "1": return (0 == tc) ? 1 : 0
|
|
||||||
case "2": return (1 == tc) ? 1 : 0
|
|
||||||
case "2bis": return (5 == tc) ? 1 : 0
|
|
||||||
case "13": return (4 == tc) ? 1 : 0
|
|
||||||
case "9": return (4 == tc) ? 1 : 0
|
|
||||||
case "2ter": if (BT_BOTH) { return (4 == tc) ? 1 : 0 } else { return (5 == tc) ? 1 : 0 }
|
|
||||||
case "2quater": if (BT_NONE) { return (5 == tc) ? 1 : 0 } else { return (4 == tc) ? 1 : 0 }
|
|
||||||
case "3": return (2 == tc || 6 == tc) ? 1 : 0
|
|
||||||
case "4": return (3 == tc || 7 == tc) ? 1 : 0
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Split common DSP call log file (produced by superfemto-compatible firmware) into 4 separate call leg files (MO/MT & DL/UL) with events in format "FN EVENT_TYPE":
|
|
||||||
# MO Mobile Originated
|
|
||||||
# MT Mobile Terminated
|
|
||||||
# DL DownLink (BTS -> L1)
|
|
||||||
# UL UpLink (L1 -> BTS)
|
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
|
||||||
echo "expecting DSP log file name as parameter"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# MO handle appear 1st in the logs
|
|
||||||
MO=$(grep 'h=' $1 | head -n 1 | cut -f2 -d',' | cut -f2 -d= | cut -f1 -d']')
|
|
||||||
|
|
||||||
# direction markers:
|
|
||||||
DLST="_CodeBurst"
|
|
||||||
ULST="_DecodeAndIdentify"
|
|
||||||
|
|
||||||
# DL sed filters:
|
|
||||||
D_EMP='s/ Empty frame request!/EMPTY/i'
|
|
||||||
D_FAC='s/ Coding a FACCH\/. frame !!/FACCH/i'
|
|
||||||
D_FST='s/ Coding a RTP SID First frame !!/FIRST/i'
|
|
||||||
D_FS1='s/ Coding a SID First P1 frame !!/FIRST_P1/i'
|
|
||||||
D_FS2='s/ Coding a SID First P2 frame !!/FIRST_P2/i'
|
|
||||||
D_RP1='s/ Coding a RTP SID P1 frame !!/SID_P1/i'
|
|
||||||
D_UPD='s/ Coding a RTP SID Update frame !!/UPDATE/i'
|
|
||||||
D_SPE='s/ Coding a RTP Speech frame !!/SPEECH/i'
|
|
||||||
D_ONS='s/ Coding a Onset frame !!/ONSET/i'
|
|
||||||
D_FO1='s/ A speech frame is following a NoData or SID First without an Onset./FORCED_FIRST/i'
|
|
||||||
D_FO2='s/ A speech frame is following a NoData without an Onset./FORCED_NODATA/i'
|
|
||||||
D_FP2='s/ A speech frame is following a NoData or SID_FIRST_P2 without an Onset./FORCED_F_P2/i'
|
|
||||||
D_FIN='s/ A speech frame is following a SID_FIRST without inhibit. A SID_FIRST_INH will be inserted./FORCED_F_INH/i'
|
|
||||||
D_UIN='s/ A speech frame is following a SID_UPDATE without inhibit. A SID_UPDATE_INH will be inserted./FORCED_U_INH/i'
|
|
||||||
|
|
||||||
# UL sed filters:
|
|
||||||
U_NOD='s/ It is a No Data frame !!/NODATA/i'
|
|
||||||
U_ONS='s/ It is an ONSET frame !!/ONSET/i'
|
|
||||||
U_UPD='s/ It is a SID UPDATE frame !!/UPDATE/i'
|
|
||||||
U_FST='s/ It is a SID FIRST frame !!/FIRST/i'
|
|
||||||
U_FP1='s/ It is a SID-First P1 frame !!/FIRST_P1/i'
|
|
||||||
U_FP2='s/ It is a SID-First P2 frame !!/FIRST_P2/i'
|
|
||||||
U_SPE='s/ It is a SPEECH frame *!!/SPEECH/i'
|
|
||||||
U_UIN='s/ It is a SID update InH frame !!/UPD_INH/i'
|
|
||||||
U_FIN='s/ It is a SID-First InH frame !!/FST_INH/i'
|
|
||||||
U_RAT='s/ It is a RATSCCH data frame !!/RATSCCH/i'
|
|
||||||
|
|
||||||
DL () { # filter downlink-related entries
|
|
||||||
grep $DLST $1 > $1.DL.tmp
|
|
||||||
}
|
|
||||||
|
|
||||||
UL () { # uplink does not require special fix
|
|
||||||
grep $ULST $1 > $1.UL.tmp.fix
|
|
||||||
}
|
|
||||||
|
|
||||||
DL $1
|
|
||||||
UL $1
|
|
||||||
|
|
||||||
FIX() { # add MO/MT marker from preceding line to inserted ONSETs so filtering works as expected
|
|
||||||
cat $1.DL.tmp | awk 'BEGIN{ FS=" h="; H="" } { if (NF > 1) { H = $2; print $1 "h=" $2 } else { print $1 ", h=" H } }' > $1.DL.tmp.fix
|
|
||||||
}
|
|
||||||
|
|
||||||
FIX $1
|
|
||||||
|
|
||||||
MO() { # filter MO call DL or UL logs
|
|
||||||
grep "h=$MO" $1.tmp.fix > $1.MO.raw
|
|
||||||
}
|
|
||||||
|
|
||||||
MT() { # filter MT call DL or UL logs
|
|
||||||
grep -v "h=$MO" $1.tmp.fix > $1.MT.raw
|
|
||||||
}
|
|
||||||
|
|
||||||
MO $1.DL
|
|
||||||
MT $1.DL
|
|
||||||
MO $1.UL
|
|
||||||
MT $1.UL
|
|
||||||
|
|
||||||
PREP() { # prepare logs for reformatting
|
|
||||||
cat $1.raw | cut -f2 -d')' | cut -f1 -d',' | cut -f2 -d'>' | sed 's/\[u32Fn/fn/' | sed 's/\[ u32Fn/fn/' | sed 's/fn = /fn=/' | sed 's/fn=//' | sed 's/\[Fn=//' | sed 's/ An Onset will be inserted.//' > $1.tmp1
|
|
||||||
}
|
|
||||||
|
|
||||||
PREP "$1.DL.MT"
|
|
||||||
PREP "$1.DL.MO"
|
|
||||||
PREP "$1.UL.MT"
|
|
||||||
PREP "$1.UL.MO"
|
|
||||||
|
|
||||||
RD() { # reformat DL logs for consistency checks
|
|
||||||
cat $1.tmp1 | sed "$D_FST" | sed "$D_SPE" | sed "$D_FS1" | sed "$D_FS2" | sed "$D_UIN" | sed "$D_FIN" | sed "$D_UPD" | sed "$D_INH" | sed "$D_RP1" | sed "$D_ONS" | sed "$D_EMP" | sed "$D_FAC" | sed "$D_FO1" | sed "$D_FO2" | sed "$D_FP2" > $1.tmp2
|
|
||||||
}
|
|
||||||
|
|
||||||
RU() { # reformat UL logs for consistency checks
|
|
||||||
cat $1.tmp1 | sed "$U_FST" | sed "$U_SPE" | sed "$U_FP1" | sed "$U_FP2" | sed "$U_UPD" | sed "$U_ONS" | sed "$U_NOD" | sed "$U_UIN" | sed "$U_FIN" | sed "$U_RAT" > $1.tmp2
|
|
||||||
}
|
|
||||||
|
|
||||||
RD "$1.DL.MT"
|
|
||||||
RD "$1.DL.MO"
|
|
||||||
RU "$1.UL.MT"
|
|
||||||
RU "$1.UL.MO"
|
|
||||||
|
|
||||||
SW() { # swap fields
|
|
||||||
cat $1.tmp2 | awk '{ print $2, $1 }' > $1
|
|
||||||
}
|
|
||||||
|
|
||||||
SW "$1.DL.MT"
|
|
||||||
SW "$1.DL.MO"
|
|
||||||
SW "$1.UL.MT"
|
|
||||||
SW "$1.UL.MO"
|
|
||||||
|
|
||||||
rm $1.*.tmp*
|
|
||||||
10
contrib/sysmobts-calib/Makefile
Normal file
10
contrib/sysmobts-calib/Makefile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
CFLAGS=`pkg-config --cflags libosmocore` -Wall -Werror
|
||||||
|
LIBS=`pkg-config --libs libosmocore libosmogsm`
|
||||||
|
|
||||||
|
all: sysmobts-calib
|
||||||
|
|
||||||
|
sysmobts-calib: sysmobts-calib.o sysmobts-layer1.o
|
||||||
|
$(CC) $(CPPFLAGS) -o $@ $^ -lrt $(LIBS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -f sysmobts-calib *.o
|
||||||
@@ -318,16 +318,6 @@ static int calib_get_clock_error(void)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Empiric gps error determination. With revE and firmware v3.3
|
|
||||||
* the clock error for TCXO to GPS appears to have a different
|
|
||||||
* sign. The device in question doesn't have a networklisten mode
|
|
||||||
* so it is impossible to verify that this only applies to GPS.
|
|
||||||
*/
|
|
||||||
if (source == SuperFemto_ClkSrcId_GpsPps)
|
|
||||||
clkErr *= -1;
|
|
||||||
|
|
||||||
|
|
||||||
/* this is an absolute clock error */
|
/* this is an absolute clock error */
|
||||||
printf("The calibration value is: %d\n", clkErr);
|
printf("The calibration value is: %d\n", clkErr);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -310,36 +310,19 @@ int print_system_info()
|
|||||||
#ifdef FEMTOBTS_NO_BOARD_VERSION
|
#ifdef FEMTOBTS_NO_BOARD_VERSION
|
||||||
#define BOARD_REV(x) -1
|
#define BOARD_REV(x) -1
|
||||||
#define BOARD_OPT(x) -1
|
#define BOARD_OPT(x) -1
|
||||||
#define COMPILED_MAJOR (FEMTOBTS_API_VERSION >> 16)
|
|
||||||
#define COMPILED_MINOR ((FEMTOBTS_API_VERSION >> 8) & 0xff)
|
|
||||||
#define COMPILED_BUILD (FEMTOBTS_API_VERSION & 0xff)
|
|
||||||
#else
|
#else
|
||||||
#define BOARD_REV(x) x.u.systemInfoCnf.boardVersion.rev
|
#define BOARD_REV(x) x.u.systemInfoCnf.boardVersion.rev
|
||||||
#define BOARD_OPT(x) x.u.systemInfoCnf.boardVersion.option
|
#define BOARD_OPT(x) x.u.systemInfoCnf.boardVersion.option
|
||||||
#define COMPILED_MAJOR (SUPERFEMTO_API_VERSION >> 16)
|
|
||||||
#define COMPILED_MINOR ((SUPERFEMTO_API_VERSION >> 8) & 0xff)
|
|
||||||
#define COMPILED_BUILD (SUPERFEMTO_API_VERSION & 0xff)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("Compiled against: v%u.%u.%u\n",
|
printf("DSP v%d.%d.%d FPGA v%d.%d.%d Rev: %d Option: %d\n",
|
||||||
COMPILED_MAJOR, COMPILED_MINOR, COMPILED_BUILD);
|
|
||||||
printf("Running DSP v%d.%d.%d FPGA v%d.%d.%d Rev: %d Option: %d\n",
|
|
||||||
INFO_DSP(prim).major, INFO_DSP(prim).minor, INFO_DSP(prim).build,
|
INFO_DSP(prim).major, INFO_DSP(prim).minor, INFO_DSP(prim).build,
|
||||||
INFO_FPGA(prim).major, INFO_FPGA(prim).minor, INFO_FPGA(prim).build,
|
INFO_FPGA(prim).major, INFO_FPGA(prim).minor, INFO_FPGA(prim).build,
|
||||||
BOARD_REV(prim), BOARD_OPT(prim));
|
BOARD_REV(prim), BOARD_OPT(prim));
|
||||||
|
|
||||||
if (COMPILED_MAJOR != INFO_DSP(prim).major || COMPILED_MINOR != INFO_DSP(prim).minor) {
|
|
||||||
printf("WARNING! WARNING! WARNING! WARNING! WARNING\n");
|
|
||||||
printf("You might run this against an incompatible firmware.\n");
|
|
||||||
printf("Continuing anyway but the result might be broken\n");
|
|
||||||
}
|
|
||||||
#undef INFO_DSP
|
#undef INFO_DSP
|
||||||
#undef INFO_FPGA
|
#undef INFO_FPGA
|
||||||
#undef BOARD_REV
|
#undef BOARD_REV
|
||||||
#undef BOARD_OPT
|
#undef BOARD_OPT
|
||||||
#undef COMPILED_MAJOR
|
|
||||||
#undef COMPILED_MINOR
|
|
||||||
#undef COMPILED_BUILD
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,6 +420,7 @@ int follow_sch(int band, int arfcn, int clock, int ref, HANDLE *layer1)
|
|||||||
prim.u.mphConnectReq.hLayer1 = *layer1;
|
prim.u.mphConnectReq.hLayer1 = *layer1;
|
||||||
prim.u.mphConnectReq.u8Tn = 0;
|
prim.u.mphConnectReq.u8Tn = 0;
|
||||||
prim.u.mphConnectReq.logChComb = GsmL1_LogChComb_IV;
|
prim.u.mphConnectReq.logChComb = GsmL1_LogChComb_IV;
|
||||||
|
printf("FIVE\n");
|
||||||
rc = send_recv_sig_prim(GsmL1_PrimId_MphConnectReq, &prim);
|
rc = send_recv_sig_prim(GsmL1_PrimId_MphConnectReq, &prim);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
printf("Failed to connect.\n");
|
printf("Failed to connect.\n");
|
||||||
@@ -622,7 +606,7 @@ int set_clock_cor(int clock_cor, int calib, int source)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (prim.u.rfClockSetupCnf.status != GsmL1_Status_Success) {
|
if (prim.u.rfClockSetupCnf.status != GsmL1_Status_Success) {
|
||||||
printf("Clock setup was not successful.\n");
|
printf("Clock setup was not successfull.\n");
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
15
contrib/sysmobts.service
Normal file
15
contrib/sysmobts.service
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=sysmocom sysmoBTS
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStartPre=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
|
||||||
|
ExecStart=/usr/bin/sysmobts -s -c /etc/osmocom/osmo-bts.cfg
|
||||||
|
ExecStartPost=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
|
||||||
|
ExecStartPost=/bin/sh -c 'cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0'
|
||||||
|
Restart=always
|
||||||
|
RestartSec=2
|
||||||
|
|
||||||
|
# The msg queues must be read fast enough
|
||||||
|
CPUSchedulingPolicy=rr
|
||||||
|
CPUSchedulingPriority=1
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
EXTRA_DIST = \
|
|
||||||
lc15bts-mgr.service \
|
|
||||||
oc2gbts-mgr.service \
|
|
||||||
osmo-bts-lc15.service \
|
|
||||||
osmo-bts-oc2g.service \
|
|
||||||
osmo-bts-sysmo.service \
|
|
||||||
osmo-bts-trx.service \
|
|
||||||
osmo-bts-virtual.service \
|
|
||||||
sysmobts-mgr.service
|
|
||||||
|
|
||||||
if HAVE_SYSTEMD
|
|
||||||
SYSTEMD_SERVICES = osmo-bts-virtual.service
|
|
||||||
|
|
||||||
|
|
||||||
if ENABLE_SYSMOBTS
|
|
||||||
SYSTEMD_SERVICES += osmo-bts-sysmo.service sysmobts-mgr.service
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_TRX
|
|
||||||
SYSTEMD_SERVICES += osmo-bts-trx.service
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_LC15BTS
|
|
||||||
SYSTEMD_SERVICES += osmo-bts-lc15.service lc15bts-mgr.service
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_OC2GBTS
|
|
||||||
SYSTEMD_SERVICES += osmo-bts-oc2g.service oc2gbts-mgr.service
|
|
||||||
endif
|
|
||||||
|
|
||||||
systemdsystemunit_DATA = $(SYSTEMD_SERVICES)
|
|
||||||
endif # HAVE_SYSTEMD
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=osmo-bts manager for LC15 / sysmoBTS 2100
|
|
||||||
After=lc15-sysdev-remap.service
|
|
||||||
Wants=lc15-sysdev-remap.service
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
NotifyAccess=all
|
|
||||||
WatchdogSec=21780s
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
# Make sure directories and symbolic link exist
|
|
||||||
ExecStartPre=/bin/sh -c 'test -d /mnt/storage/var/run/lc15bts-mgr || mkdir -p /mnt/storage/var/run/lc15bts-mgr ; test -d /var/run/lc15bts-mgr || ln -sf /mnt/storage/var/run/lc15bts-mgr/ /var/run'
|
|
||||||
# Make sure BTS operation hour exist
|
|
||||||
ExecStartPre=/bin/sh -c 'test -f /mnt/storage/var/run/lc15bts-mgr/hours-running || echo 0 > /mnt/storage/var/run/lc15bts-mgr/hours-running'
|
|
||||||
# Shutdown all PA correctly
|
|
||||||
ExecStartPre=/bin/sh -c 'echo disabled > /var/lc15/pa-state/pa0/state; echo disabled > /var/lc15/pa-state/pa1/state'
|
|
||||||
ExecStartPre=/bin/sh -c 'echo 0 > /var/lc15/pa-supply/max_microvolts; echo 0 > /var/lc15/pa-supply/min_microvolts'
|
|
||||||
|
|
||||||
ExecStart=/usr/bin/lc15bts-mgr -s -c /etc/osmocom/lc15bts-mgr.cfg
|
|
||||||
|
|
||||||
# Shutdown all PA correctly
|
|
||||||
ExecStopPost=/bin/sh -c 'echo disabled > /var/lc15/pa-state/pa0/state; echo disabled > /var/lc15/pa-state/pa1/state'
|
|
||||||
ExecStopPost=/bin/sh -c 'echo 0 > /var/lc15/pa-supply/max_microvolts; echo 0 > /var/lc15/pa-supply/min_microvolts'
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Alias=osmo-bts-mgr.service
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=osmo-bts manager for OC-2G
|
|
||||||
After=oc2g-sysdev-remap.service
|
|
||||||
Wants=oc2g-sysdev-remap.service
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
NotifyAccess=all
|
|
||||||
WatchdogSec=21780s
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
# Make sure directories and symbolic link exist
|
|
||||||
ExecStartPre=/bin/sh -c 'test -d /mnt/storage/var/run/oc2gbts-mgr || mkdir -p /mnt/storage/var/run/oc2gbts-mgr ; test -d /var/run/oc2gbts-mgr || ln -sf /mnt/storage/var/run/oc2gbts-mgr/ /var/run'
|
|
||||||
# Make sure BTS operation hour exist
|
|
||||||
ExecStartPre=/bin/sh -c 'test -f /mnt/storage/var/run/oc2gbts-mgr/hours-running || echo 0 > /mnt/storage/var/run/oc2gbts-mgr/hours-running'
|
|
||||||
# Shutdown all PA correctly
|
|
||||||
ExecStartPre=/bin/sh -c 'echo disabled > /var/oc2g/pa-state/pa0/state;'
|
|
||||||
#ExecStartPre=/bin/sh -c 'echo 0 > /var/oc2g/pa-supply/max_microvolts; echo 0 > /var/oc2g/pa-supply/min_microvolts'
|
|
||||||
|
|
||||||
ExecStart=/usr/bin/oc2gbts-mgr -s -c /etc/osmocom/oc2gbts-mgr.cfg
|
|
||||||
|
|
||||||
# Shutdown all PA correctly
|
|
||||||
ExecStopPost=/bin/sh -c 'echo disabled > /var/oc2g/pa-state/pa0/state;'
|
|
||||||
#ExecStopPost=/bin/sh -c 'echo 0 > /var/oc2g/pa-supply/max_microvolts; echo 0 > /var/oc2g/pa-supply/min_microvolts'
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Alias=osmo-bts-mgr.service
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=osmo-bts for LC15 / sysmoBTS 2100
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/bin/osmo-bts-lc15 -t 2 -s -c /etc/osmocom/osmo-bts-lc15.cfg -M
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
RuntimeDirectory=osmo-bts
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
# CPU scheduling policy:
|
|
||||||
CPUSchedulingPolicy=rr
|
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Alias=osmo-bts.service
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=osmo-bts for OC-2G
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/bin/osmo-bts-oc2g -s -c /etc/osmocom/osmo-bts-oc2g.cfg -M
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
RuntimeDirectory=osmo-bts
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
# CPU scheduling policy:
|
|
||||||
CPUSchedulingPolicy=rr
|
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Alias=osmo-bts.service
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=osmo-bts for sysmocom sysmoBTS
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStartPre=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
|
|
||||||
ExecStart=/usr/bin/osmo-bts-sysmo -s -c /etc/osmocom/osmo-bts-sysmo.cfg -M
|
|
||||||
ExecStopPost=/bin/sh -c 'echo 0 > /sys/class/leds/activity_led/brightness'
|
|
||||||
ExecStopPost=/bin/sh -c 'cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 ; sleep 3s; cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0; sleep 1s'
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
# CPU scheduling policy:
|
|
||||||
CPUSchedulingPolicy=rr
|
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
|
||||||
CPUSchedulingPriority=20
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Alias=sysmobts.service
|
|
||||||
Alias=osmo-bts.service
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Osmocom osmo-bts for osmo-trx
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/bin/osmo-bts-trx -s -c /etc/osmocom/osmo-bts-trx.cfg
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
User=osmocom
|
|
||||||
Group=osmocom
|
|
||||||
AmbientCapabilities=CAP_SYS_NICE
|
|
||||||
|
|
||||||
# CPU scheduling policy:
|
|
||||||
CPUSchedulingPolicy=rr
|
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Osmocom GSM BTS for virtual Um layer based on GSMTAP/UDP
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/bin/osmo-bts-virtual -s -c /etc/osmocom/osmo-bts-virtual.cfg
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
User=osmocom
|
|
||||||
Group=osmocom
|
|
||||||
AmbientCapabilities=CAP_SYS_NICE
|
|
||||||
|
|
||||||
# CPU scheduling policy:
|
|
||||||
CPUSchedulingPolicy=rr
|
|
||||||
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
|
|
||||||
CPUSchedulingPriority=11
|
|
||||||
# See sched(7) for further details on real-time policies and priorities
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=osmo-bts manager for sysmoBTS
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/bin/sysmobts-mgr -ns -c /etc/osmocom/sysmobts-mgr.cfg
|
|
||||||
StateDirectory=osmocom
|
|
||||||
WorkingDirectory=%S/osmocom
|
|
||||||
Restart=always
|
|
||||||
RestartSec=2
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Alias=osmo-bts-mgr.service
|
|
||||||
2710
debian/changelog
vendored
2710
debian/changelog
vendored
File diff suppressed because it is too large
Load Diff
1
debian/compat
vendored
1
debian/compat
vendored
@@ -1 +0,0 @@
|
|||||||
10
|
|
||||||
75
debian/control
vendored
75
debian/control
vendored
@@ -1,75 +0,0 @@
|
|||||||
Source: osmo-bts
|
|
||||||
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
|
|
||||||
Section: net
|
|
||||||
Priority: optional
|
|
||||||
Build-Depends: debhelper (>= 10),
|
|
||||||
pkg-config,
|
|
||||||
dh-autoreconf,
|
|
||||||
autotools-dev,
|
|
||||||
pkg-config,
|
|
||||||
libosmocore-dev (>= 1.11.0),
|
|
||||||
libosmo-abis-dev (>= 2.0.0),
|
|
||||||
libosmo-netif-dev (>= 1.6.0),
|
|
||||||
libgps-dev,
|
|
||||||
txt2man,
|
|
||||||
osmo-gsm-manuals-dev (>= 1.6.0)
|
|
||||||
Standards-Version: 3.9.8
|
|
||||||
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
|
|
||||||
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-bts
|
|
||||||
Homepage: https://projects.osmocom.org/projects/osmobts
|
|
||||||
|
|
||||||
Package: osmo-bts
|
|
||||||
Architecture: any
|
|
||||||
Depends: osmo-bts-trx, osmo-bts-virtual, ${misc:Depends}
|
|
||||||
Description: Base Transceiver Station for GSM
|
|
||||||
OsmoBTS is a software implementation of Layer2/3 of a BTS. It implements the
|
|
||||||
following protocols/interfaces:
|
|
||||||
LAPDm (GSM 04.06)
|
|
||||||
RTP
|
|
||||||
A-bis/IP in IPA multiplex
|
|
||||||
OML (GSM TS 12.21)
|
|
||||||
RSL (GSM TS 08.58)
|
|
||||||
.
|
|
||||||
OsmoBTS is modular and has support for multiple back-ends. A back-end talks to
|
|
||||||
a specific L1/PHY implementation of the respective BTS hardware. Based on this
|
|
||||||
architecture, it should be relatively easy to add a new back-end to support
|
|
||||||
so-far unsupported GSM PHY/L1 and associated hardware.
|
|
||||||
|
|
||||||
Package: osmo-bts-trx
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: osmo-bts-trx GSM BTS with osmo-trx
|
|
||||||
osmo-bts-trx to be used with the osmo-trx application
|
|
||||||
|
|
||||||
Package: osmo-bts-trx-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmo-bts-trx (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the osmo-bts-trx
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmo-bts-virtual
|
|
||||||
Architecture: any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
|
||||||
Description: Virtual Osmocom GSM BTS (no RF hardware; GSMTAP/UDP)
|
|
||||||
This version of OsmoBTS doesn't use actual GSM PHY/Hardware/RF, but
|
|
||||||
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: osmo-bts-virtual-dbg
|
|
||||||
Architecture: any
|
|
||||||
Section: debug
|
|
||||||
Priority: extra
|
|
||||||
Depends: osmo-bts-virtual (= ${binary:Version}), ${misc:Depends}
|
|
||||||
Description: Debug symbols for the osmo-bts-virtual
|
|
||||||
Make debugging possible
|
|
||||||
|
|
||||||
Package: osmo-bts-doc
|
|
||||||
Architecture: all
|
|
||||||
Section: doc
|
|
||||||
Priority: optional
|
|
||||||
Depends: ${misc:Depends}
|
|
||||||
Description: ${misc:Package} PDF documentation
|
|
||||||
Various manuals: user manual, VTY reference manual and/or
|
|
||||||
protocol/interface manuals.
|
|
||||||
81
debian/copyright
vendored
81
debian/copyright
vendored
@@ -1,81 +0,0 @@
|
|||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: osmo-bts
|
|
||||||
Source: http://cgit.osmocom.org/osmo-bts/
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 2008-2014 Harald Welte <laforge@gnumonks.org>
|
|
||||||
2009,2011,2013 Andreas Eversberg <jolly@eversberg.eu>
|
|
||||||
2010,2011 On-Waves
|
|
||||||
2012-2015 Holger Hans Peter Freyther
|
|
||||||
2014 sysmocom s.f.m.c. Gmbh
|
|
||||||
2015 Alexander Chemeris <Alexander.Chemeris@fairwaves.co>
|
|
||||||
License: AGPL-3+
|
|
||||||
|
|
||||||
Files: src/osmo-bts-sysmo/eeprom.c
|
|
||||||
src/osmo-bts-sysmo/eeprom.h
|
|
||||||
Copyright: 2012 Nutaq
|
|
||||||
License: MIT
|
|
||||||
Comment: Yves Godin is the author
|
|
||||||
|
|
||||||
Files: src/common/pcu_sock.c
|
|
||||||
Copyright: 2008-2010 Harald Welte <laforge@gnumonks.org>
|
|
||||||
2009-2012 Andreas Eversberg <jolly@eversberg.eu>
|
|
||||||
2012 Holger Hans Peter Freyther
|
|
||||||
License: GPL-2+
|
|
||||||
|
|
||||||
Files: debian/*
|
|
||||||
Copyright: 2015-2016 Ruben Undheim <ruben.undheim@gmail.com>
|
|
||||||
License: AGPL-3+
|
|
||||||
|
|
||||||
|
|
||||||
License: AGPL-3+
|
|
||||||
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/>.
|
|
||||||
|
|
||||||
|
|
||||||
License: GPL-2+
|
|
||||||
This package is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
.
|
|
||||||
On Debian systems, the complete text of the GNU General
|
|
||||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
|
||||||
|
|
||||||
|
|
||||||
License: MIT
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
.
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
1
debian/osmo-bts-doc.install
vendored
1
debian/osmo-bts-doc.install
vendored
@@ -1 +0,0 @@
|
|||||||
usr/share/doc/osmo-bts-doc/*.pdf
|
|
||||||
5
debian/osmo-bts-trx.install
vendored
5
debian/osmo-bts-trx.install
vendored
@@ -1,5 +0,0 @@
|
|||||||
etc/osmocom/osmo-bts-trx.cfg
|
|
||||||
lib/systemd/system/osmo-bts-trx.service
|
|
||||||
usr/bin/osmo-bts-trx
|
|
||||||
usr/share/doc/osmo-bts/examples/osmo-bts-trx/osmo-bts-trx.cfg
|
|
||||||
usr/share/doc/osmo-bts/examples/osmo-bts-trx/osmo-bts-trx-calypso.cfg
|
|
||||||
39
debian/osmo-bts-trx.postinst
vendored
39
debian/osmo-bts-trx.postinst
vendored
@@ -1,39 +0,0 @@
|
|||||||
#!/bin/sh -e
|
|
||||||
case "$1" in
|
|
||||||
configure)
|
|
||||||
# Create the osmocom group and user (if it doesn't exist yet)
|
|
||||||
if ! getent group osmocom >/dev/null; then
|
|
||||||
groupadd --system osmocom
|
|
||||||
fi
|
|
||||||
if ! getent passwd osmocom >/dev/null; then
|
|
||||||
useradd \
|
|
||||||
--system \
|
|
||||||
--gid osmocom \
|
|
||||||
--home-dir /var/lib/osmocom \
|
|
||||||
--shell /sbin/nologin \
|
|
||||||
--comment "Open Source Mobile Communications" \
|
|
||||||
osmocom
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix permissions of previous (root-owned) install (OS#4107)
|
|
||||||
if dpkg --compare-versions "$2" le "1.13.0"; then
|
|
||||||
if [ -e /etc/osmocom/osmo-bts-trx.cfg ]; then
|
|
||||||
chown -v osmocom:osmocom /etc/osmocom/osmo-bts-trx.cfg
|
|
||||||
chmod -v 0660 /etc/osmocom/osmo-bts-trx.cfg
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /etc/osmocom ]; then
|
|
||||||
chown -v root:osmocom /etc/osmocom
|
|
||||||
chmod -v 2775 /etc/osmocom
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /var/lib/osmocom
|
|
||||||
chown -R -v osmocom:osmocom /var/lib/osmocom
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# dh_installdeb(1) will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
5
debian/osmo-bts-virtual.install
vendored
5
debian/osmo-bts-virtual.install
vendored
@@ -1,5 +0,0 @@
|
|||||||
etc/osmocom/osmo-bts-virtual.cfg
|
|
||||||
lib/systemd/system/osmo-bts-virtual.service
|
|
||||||
usr/bin/osmo-bts-virtual
|
|
||||||
usr/bin/osmo-bts-omldummy
|
|
||||||
usr/share/doc/osmo-bts/examples/osmo-bts-virtual/osmo-bts-virtual.cfg
|
|
||||||
39
debian/osmo-bts-virtual.postinst
vendored
39
debian/osmo-bts-virtual.postinst
vendored
@@ -1,39 +0,0 @@
|
|||||||
#!/bin/sh -e
|
|
||||||
case "$1" in
|
|
||||||
configure)
|
|
||||||
# Create the osmocom group and user (if it doesn't exist yet)
|
|
||||||
if ! getent group osmocom >/dev/null; then
|
|
||||||
groupadd --system osmocom
|
|
||||||
fi
|
|
||||||
if ! getent passwd osmocom >/dev/null; then
|
|
||||||
useradd \
|
|
||||||
--system \
|
|
||||||
--gid osmocom \
|
|
||||||
--home-dir /var/lib/osmocom \
|
|
||||||
--shell /sbin/nologin \
|
|
||||||
--comment "Open Source Mobile Communications" \
|
|
||||||
osmocom
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix permissions of previous (root-owned) install (OS#4107)
|
|
||||||
if dpkg --compare-versions "$2" le "1.13.0"; then
|
|
||||||
if [ -e /etc/osmocom/osmo-bts-virtual.cfg ]; then
|
|
||||||
chown -v osmocom:osmocom /etc/osmocom/osmo-bts-virtual.cfg
|
|
||||||
chmod -v 0660 /etc/osmocom/osmo-bts-virtual.cfg
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /etc/osmocom ]; then
|
|
||||||
chown -v root:osmocom /etc/osmocom
|
|
||||||
chmod -v 2775 /etc/osmocom
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /var/lib/osmocom
|
|
||||||
chown -R -v osmocom:osmocom /var/lib/osmocom
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# dh_installdeb(1) will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
32
debian/rules
vendored
32
debian/rules
vendored
@@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
|
|
||||||
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
|
|
||||||
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
|
|
||||||
|
|
||||||
#export DH_VERBOSE=1
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|
||||||
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@ --with=systemd --with autoreconf --fail-missing
|
|
||||||
|
|
||||||
override_dh_strip:
|
|
||||||
dh_strip --package=osmo-bts-virtual --dbg-package=osmo-bts-virtual-dbg
|
|
||||||
dh_strip --package=osmo-bts-trx --dbg-package=osmo-bts-trx-dbg
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
dh_auto_configure -- --enable-trx --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
|
|
||||||
|
|
||||||
override_dh_clean:
|
|
||||||
dh_clean
|
|
||||||
$(RM) tests/package.m4
|
|
||||||
$(RM) tests/testsuite
|
|
||||||
|
|
||||||
# Print test results in case of a failure
|
|
||||||
override_dh_auto_test:
|
|
||||||
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
|
|
||||||
|
|
||||||
# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers)
|
|
||||||
override_dh_compress:
|
|
||||||
dh_compress -X.pdf
|
|
||||||
1
debian/source/format
vendored
1
debian/source/format
vendored
@@ -1 +0,0 @@
|
|||||||
3.0 (native)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
SUBDIRS = \
|
|
||||||
examples \
|
|
||||||
manuals \
|
|
||||||
$(NULL)
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
The osmo-bts control interface is currently supporting the following operations:
|
|
||||||
|
|
||||||
h2. generic
|
|
||||||
|
|
||||||
h3. trx.0.thermal-attenuation
|
|
||||||
|
|
||||||
The idea of this parameter is to attenuate the system output power as part of
|
|
||||||
thermal management. In some cases the PA might be passing a critical level,
|
|
||||||
so an external control process can use this attribute to reduce the system
|
|
||||||
output power.
|
|
||||||
|
|
||||||
Please note that all values in the context of transmit power calculation
|
|
||||||
are integers in milli-dB (1/10000 bel), so the below example is setting
|
|
||||||
the attenuation at 3 dB:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
bsc_control.py -d localhost -p 4238 -s trx.0.thermal-attenuation 3000
|
|
||||||
Got message: SET_REPLY 1 trx.0.thermal-attenuation 3000
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
bsc_control.py -d localhost -p 4238 -g trx.0.thermal-attenuation
|
|
||||||
Got message: GET_REPLY 1 trx.0.thermal-attenuation 3000
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
h2. sysmobts specific
|
|
||||||
|
|
||||||
h3. trx.0.clock-info
|
|
||||||
|
|
||||||
obtain information on the current clock status:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
bsc_control.py -d localhost -p 4238 -g trx.0.clock-info
|
|
||||||
Got message: GET_REPLY 1 trx.0.clock-info -100,ocxo,0,0,gps
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
which is to be interpreted as:
|
|
||||||
* current clock correction value is -100 ppb
|
|
||||||
* current clock source is OCXO
|
|
||||||
* deviation between clock source and calibration source is 0 ppb
|
|
||||||
* resolution of clock error measurement is 0 ppt (0 means no result yet)
|
|
||||||
* current calibration source is GPS
|
|
||||||
|
|
||||||
When this attribute is set, any value passed on is discarded, but the clock
|
|
||||||
calibration process is re-started.
|
|
||||||
|
|
||||||
|
|
||||||
h3. trx.0.clock-correction
|
|
||||||
|
|
||||||
This attribute can get and set the current clock correction value:
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
bsc_control.py -d localhost -p 4238 -g trx.0.clock-correction
|
|
||||||
Got message: GET_REPLY 1 trx.0.clock-correction -100
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
bsc_control.py -d localhost -p 4238 -s trx.0.clock-correction -- -99
|
|
||||||
Got message: SET_REPLY 1 trx.0.clock-correction success
|
|
||||||
</pre>
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
# all config examples must be listed here unconditionally, so that
|
|
||||||
# all of them end up in the release tarball (see OS#6349)
|
|
||||||
EXTRA_DIST = \
|
|
||||||
trx/osmo-bts-trx.cfg \
|
|
||||||
trx/osmo-bts-trx-calypso.cfg \
|
|
||||||
octphy/osmo-bts-trx2dsp1.cfg \
|
|
||||||
octphy/osmo-bts-octphy.cfg \
|
|
||||||
oc2g/osmo-bts-oc2g.cfg \
|
|
||||||
oc2g/oc2gbts-mgr.cfg \
|
|
||||||
sysmo/sysmobts-mgr.cfg \
|
|
||||||
sysmo/osmo-bts-sysmo.cfg \
|
|
||||||
litecell15/osmo-bts-lc15.cfg \
|
|
||||||
litecell15/lc15bts-mgr.cfg \
|
|
||||||
virtual/osmo-bts-virtual.cfg \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
doc_virtualdir = $(docdir)/examples/osmo-bts-virtual
|
|
||||||
doc_virtual_DATA = \
|
|
||||||
virtual/osmo-bts-virtual.cfg
|
|
||||||
OSMOCONF_FILES = virtual/osmo-bts-virtual.cfg
|
|
||||||
|
|
||||||
if ENABLE_SYSMOBTS
|
|
||||||
doc_sysmodir = $(docdir)/examples/osmo-bts-sysmo
|
|
||||||
doc_sysmo_DATA = \
|
|
||||||
sysmo/osmo-bts-sysmo.cfg \
|
|
||||||
sysmo/sysmobts-mgr.cfg
|
|
||||||
OSMOCONF_FILES += sysmo/osmo-bts-sysmo.cfg sysmo/sysmobts-mgr.cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_TRX
|
|
||||||
doc_trxdir = $(docdir)/examples/osmo-bts-trx
|
|
||||||
doc_trx_DATA = \
|
|
||||||
trx/osmo-bts-trx.cfg \
|
|
||||||
trx/osmo-bts-trx-calypso.cfg
|
|
||||||
OSMOCONF_FILES += trx/osmo-bts-trx.cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_OCTPHY
|
|
||||||
doc_octphydir = $(docdir)/examples/osmo-bts-octphy
|
|
||||||
doc_octphy_DATA = \
|
|
||||||
octphy/osmo-bts-trx2dsp1.cfg \
|
|
||||||
octphy/osmo-bts-octphy.cfg
|
|
||||||
OSMOCONF_FILES += octphy/osmo-bts-octphy.cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_LC15BTS
|
|
||||||
doc_lc15dir = $(docdir)/examples/osmo-bts-lc15
|
|
||||||
doc_lc15_DATA = \
|
|
||||||
litecell15/osmo-bts-lc15.cfg \
|
|
||||||
litecell15/lc15bts-mgr.cfg
|
|
||||||
OSMOCONF_FILES += litecell15/osmo-bts-lc15.cfg litecell15/lc15bts-mgr.cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_OC2GBTS
|
|
||||||
doc_oc2gdir = $(docdir)/examples/osmo-bts-oc2g
|
|
||||||
doc_oc2g_DATA = \
|
|
||||||
oc2g/osmo-bts-oc2g.cfg \
|
|
||||||
oc2g/oc2gbts-mgr.cfg
|
|
||||||
OSMOCONF_FILES += oc2g/osmo-bts-oc2g.cfg oc2g/oc2gbts-mgr.cfg
|
|
||||||
endif
|
|
||||||
|
|
||||||
osmoconfdir = $(sysconfdir)/osmocom
|
|
||||||
osmoconf_DATA = $(OSMOCONF_FILES)
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
!
|
|
||||||
! lc15bts-mgr (0.3.0.284-a7c2-dirty) configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level temp info
|
|
||||||
logging level fw info
|
|
||||||
logging level find info
|
|
||||||
logging level calib info
|
|
||||||
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
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
lc15bts-mgr
|
|
||||||
limits supply_volt
|
|
||||||
threshold warning min 17500
|
|
||||||
threshold critical min 19000
|
|
||||||
limits tx0_vswr
|
|
||||||
threshold warning max 1000
|
|
||||||
limits tx1_vswr
|
|
||||||
threshold warning max 1000
|
|
||||||
limits supply_pwr
|
|
||||||
threshold warning max 110
|
|
||||||
threshold critical max 120
|
|
||||||
limits pa0_pwr
|
|
||||||
threshold warning max 50
|
|
||||||
threshold critical max 60
|
|
||||||
limits pa1_pwr
|
|
||||||
threshold warning max 50
|
|
||||||
threshold critical max 60
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS (0.0.1.100-0455-dirty) configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl info
|
|
||||||
logging level oml info
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas notice
|
|
||||||
logging level pag info
|
|
||||||
logging level l1c info
|
|
||||||
logging level l1p info
|
|
||||||
logging level dsp debug
|
|
||||||
logging level abis notice
|
|
||||||
logging level rtp notice
|
|
||||||
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
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
phy 0
|
|
||||||
instance 0
|
|
||||||
trx-calibration-path /mnt/rom/factory/calib
|
|
||||||
phy 1
|
|
||||||
instance 0
|
|
||||||
trx-calibration-path /mnt/rom/factory/calib
|
|
||||||
bts 0
|
|
||||||
band 900
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
oml remote-ip 192.168.234.185
|
|
||||||
trx 0
|
|
||||||
phy 0 instance 0
|
|
||||||
trx 1
|
|
||||||
phy 1 instance 0
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
!
|
|
||||||
! oc2gbts-mgr (0.3.0.284-a7c2-dirty) configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level temp info
|
|
||||||
logging level fw info
|
|
||||||
logging level find info
|
|
||||||
logging level calib info
|
|
||||||
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
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
oc2gbts-mgr
|
|
||||||
limits supply_volt
|
|
||||||
threshold warning min 17500
|
|
||||||
threshold critical min 19000
|
|
||||||
limits supply_pwr
|
|
||||||
threshold warning max 110
|
|
||||||
threshold critical max 120
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS (0.0.1.100-0455-dirty) configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl info
|
|
||||||
logging level oml info
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas notice
|
|
||||||
logging level pag info
|
|
||||||
logging level l1c info
|
|
||||||
logging level l1p info
|
|
||||||
logging level dsp debug
|
|
||||||
logging level abis notice
|
|
||||||
logging level rtp notice
|
|
||||||
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
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
phy 0
|
|
||||||
instance 0
|
|
||||||
trx-calibration-path /mnt/rom/factory/calib
|
|
||||||
bts 0
|
|
||||||
band 900
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
oml remote-ip 10.42.0.1
|
|
||||||
trx 0
|
|
||||||
phy 0 instance 0
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS () configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl info
|
|
||||||
logging level oml info
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas notice
|
|
||||||
logging level pag info
|
|
||||||
logging level l1c info
|
|
||||||
logging level l1p info
|
|
||||||
logging level dsp info
|
|
||||||
logging level abis notice
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
phy 0
|
|
||||||
octphy hw-addr 00:0C:90:2e:80:1e
|
|
||||||
octphy net-device eth0.2342
|
|
||||||
instance 0
|
|
||||||
bts 0
|
|
||||||
band 1800
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
oml remote-ip 127.0.0.1
|
|
||||||
trx 0
|
|
||||||
phy 0 instance 0
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS () configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl info
|
|
||||||
logging level oml info
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas notice
|
|
||||||
logging level pag info
|
|
||||||
logging level l1c info
|
|
||||||
logging level l1p info
|
|
||||||
logging level dsp info
|
|
||||||
logging level abis notice
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
phy 0
|
|
||||||
octphy hw-addr 00:0c:de:ad:fa:ce
|
|
||||||
octphy net-device eth2
|
|
||||||
instance 0
|
|
||||||
instance 1
|
|
||||||
bts 0
|
|
||||||
band 1800
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
oml remote-ip 127.0.0.1
|
|
||||||
trx 0
|
|
||||||
phy 0 instance 0
|
|
||||||
trx 1
|
|
||||||
phy 0 instance 1
|
|
||||||
26
doc/examples/osmo-bts.cfg
Normal file
26
doc/examples/osmo-bts.cfg
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
!
|
||||||
|
! OsmoBTS () configuration saved from vty
|
||||||
|
!!
|
||||||
|
!
|
||||||
|
log stderr
|
||||||
|
logging color 0
|
||||||
|
logging timestamp 0
|
||||||
|
logging level all everything
|
||||||
|
logging level rsl info
|
||||||
|
logging level oml info
|
||||||
|
logging level rll notice
|
||||||
|
logging level rr notice
|
||||||
|
logging level meas notice
|
||||||
|
logging level pag info
|
||||||
|
logging level l1c info
|
||||||
|
logging level l1p info
|
||||||
|
logging level dsp debug
|
||||||
|
logging level abis notice
|
||||||
|
!
|
||||||
|
line vty
|
||||||
|
no login
|
||||||
|
!
|
||||||
|
bts 0
|
||||||
|
band 1800
|
||||||
|
ipa unit-id 1234 0
|
||||||
|
oml remote-ip 192.168.100.11
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS () configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl info
|
|
||||||
logging level oml info
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas notice
|
|
||||||
logging level pag info
|
|
||||||
logging level l1c info
|
|
||||||
logging level l1p info
|
|
||||||
logging level dsp info
|
|
||||||
logging level abis notice
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
phy 0
|
|
||||||
instance 0
|
|
||||||
bts 0
|
|
||||||
band 1800
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
oml remote-ip 10.1.2.3
|
|
||||||
trx 0
|
|
||||||
phy 0 instance 0
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
!
|
|
||||||
! SysmoMgr (0.3.0.141-33e5) configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level temp info
|
|
||||||
logging level fw info
|
|
||||||
logging level find info
|
|
||||||
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
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
sysmobts-mgr
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS configuration example for CalypsoBTS
|
|
||||||
! https://osmocom.org/projects/baseband/wiki/CalypsoBTS
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl notice
|
|
||||||
logging level oml notice
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas error
|
|
||||||
logging level pag error
|
|
||||||
logging level l1c error
|
|
||||||
logging level l1p error
|
|
||||||
logging level dsp error
|
|
||||||
logging level abis error
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
phy 0
|
|
||||||
instance 0
|
|
||||||
osmotrx ip local 127.0.0.1
|
|
||||||
osmotrx ip remote 127.0.0.1
|
|
||||||
osmotrx legacy-setbsic
|
|
||||||
osmotrx fn-advance 20
|
|
||||||
osmotrx rts-advance 5
|
|
||||||
bts 0
|
|
||||||
oml remote-ip 127.0.0.1
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
band 900
|
|
||||||
trx 0
|
|
||||||
phy 0 instance 0
|
|
||||||
nominal-tx-power 23
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS () configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl notice
|
|
||||||
logging level oml notice
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas error
|
|
||||||
logging level pag error
|
|
||||||
logging level l1c error
|
|
||||||
logging level l1p error
|
|
||||||
logging level dsp error
|
|
||||||
logging level abis error
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
phy 0
|
|
||||||
instance 0
|
|
||||||
osmotrx ip local 127.0.0.1
|
|
||||||
osmotrx ip remote 127.0.0.1
|
|
||||||
bts 0
|
|
||||||
band 1800
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
oml remote-ip 127.0.0.1
|
|
||||||
trx 0
|
|
||||||
phy 0 instance 0
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
!
|
|
||||||
! OsmoBTS (0.4.0.216-bc49-dirty) configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
log stderr
|
|
||||||
logging color 1
|
|
||||||
logging print category-hex 0
|
|
||||||
logging print category 1
|
|
||||||
logging timestamp 0
|
|
||||||
logging print file basename last
|
|
||||||
logging print level 1
|
|
||||||
logging level rsl info
|
|
||||||
logging level oml info
|
|
||||||
logging level rll notice
|
|
||||||
logging level rr notice
|
|
||||||
logging level meas notice
|
|
||||||
logging level pag info
|
|
||||||
logging level l1c info
|
|
||||||
logging level l1p info
|
|
||||||
logging level dsp error
|
|
||||||
logging level pcu notice
|
|
||||||
logging level ho debug
|
|
||||||
logging level trx notice
|
|
||||||
logging level loop notice
|
|
||||||
logging level abis debug
|
|
||||||
logging level rtp notice
|
|
||||||
logging level sum error
|
|
||||||
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 error
|
|
||||||
!
|
|
||||||
line vty
|
|
||||||
no login
|
|
||||||
!
|
|
||||||
e1_input
|
|
||||||
e1_line 0 driver ipa
|
|
||||||
e1_line 0 port 0
|
|
||||||
no e1_line 0 keepalive
|
|
||||||
phy 0
|
|
||||||
instance 0
|
|
||||||
bts 0
|
|
||||||
band DCS1800
|
|
||||||
ipa unit-id 6969 0
|
|
||||||
oml remote-ip 127.0.0.1
|
|
||||||
rtp jitter-buffer 100
|
|
||||||
paging queue-size 200
|
|
||||||
paging lifetime 0
|
|
||||||
min-qual-rach 50
|
|
||||||
min-qual-norm -5
|
|
||||||
trx 0
|
|
||||||
power-ramp max-initial 23000 mdBm
|
|
||||||
power-ramp step-size 2000 mdB
|
|
||||||
power-ramp step-interval 1
|
|
||||||
ms-power-control osmo
|
|
||||||
phy 0 instance 0
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
EXTRA_DIST = dtx.dot \
|
|
||||||
osmobts-abis.adoc \
|
|
||||||
osmobts-abis-docinfo.xml \
|
|
||||||
osmobts-usermanual.adoc \
|
|
||||||
osmobts-usermanual-docinfo.xml \
|
|
||||||
rtp-amr.adoc \
|
|
||||||
rtp-amr-docinfo.xml \
|
|
||||||
regen_doc.sh \
|
|
||||||
abis \
|
|
||||||
chapters \
|
|
||||||
vty
|
|
||||||
|
|
||||||
if BUILD_MANUALS
|
|
||||||
ASCIIDOC = osmobts-usermanual.adoc osmobts-abis.adoc rtp-amr.adoc
|
|
||||||
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc
|
|
||||||
osmobts-usermanual.pdf: $(srcdir)/chapters/*.adoc
|
|
||||||
osmobts-abis.pdf: $(srcdir)/abis/*.adoc $(srcdir)/abis/*.msc
|
|
||||||
rtp-amr.pdf: $(srcdir)/dtx.dot
|
|
||||||
|
|
||||||
# NOTE: osmo-bts-omldummy has no VTY interface
|
|
||||||
VARIANTS = virtual
|
|
||||||
|
|
||||||
if ENABLE_SYSMOBTS
|
|
||||||
VARIANTS += sysmo
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_TRX
|
|
||||||
VARIANTS += trx
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_OCTPHY
|
|
||||||
VARIANTS += octphy
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_LC15BTS
|
|
||||||
VARIANTS += lc15
|
|
||||||
endif
|
|
||||||
|
|
||||||
if ENABLE_OC2GBTS
|
|
||||||
VARIANTS += oc2g
|
|
||||||
endif
|
|
||||||
|
|
||||||
# This is a significantly modified, multi-target adopted copy of
|
|
||||||
# $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
|
|
||||||
include $(srcdir)/vty/Makefile.vty-reference.inc
|
|
||||||
|
|
||||||
OSMO_REPOSITORY = osmo-bts
|
|
||||||
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
|
|
||||||
endif
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="BTS"], bsc [label="BSC"];
|
|
||||||
|
|
||||||
bts => bsc [label="TCP Connect (Port 3002, OML)"];
|
|
||||||
bts box bsc [label="IPA CCM Identification (Port 3002)"];
|
|
||||||
bts <= bsc [label="OML Configuration of BTS via OML"];
|
|
||||||
...;
|
|
||||||
bts <= bsc [label="OML (TRX=0) IPA RSL CONNECT"];
|
|
||||||
bts => bsc [label="TCP Connect (Port 3003, RSL, TRX 0)"];
|
|
||||||
bts box bsc [label="IPA CCM Identification Port 3003"];
|
|
||||||
bts <= bsc [label="RSL BCCH filling (System Information)"];
|
|
||||||
bts <= bsc [label="RSL SACCH filling (SI 5/6)"];
|
|
||||||
...;
|
|
||||||
bts <= bsc [label="OML (TRX=1) IPA RSL CONNECT"];
|
|
||||||
bts => bsc [label="TCP Connect (Port 3003, RSL, TRX 1)"];
|
|
||||||
bts box bsc [label="IPA CCM Identification (Port 3003)"];
|
|
||||||
bts <= bsc [label="RSL SACCH filling (SI 5/6)"];
|
|
||||||
...;
|
|
||||||
bts <= bsc [label="OML (TRX=N) IPA RSL CONNECT"];
|
|
||||||
bts => bsc [label="TCP Connect (Port 3003, RSL, TRX N)"];
|
|
||||||
bts box bsc [label="IPA CCM Identification (Port 3003)"];
|
|
||||||
bts <= bsc [label="RSL SACCH filling (SI 5/6)"];
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = "1.2";
|
|
||||||
phy,bts,pcu,bsc;
|
|
||||||
|
|
||||||
phy box bsc [ label = "PDCH Deactivation" ];
|
|
||||||
bsc => bts [ label = "IPAC PDCH DEACT" ];
|
|
||||||
--- [ label = "Disconnect PDTCH" ];
|
|
||||||
bts => pcu [ label = "info ind (Deactivate)" ];
|
|
||||||
pcu => bts [ label = "chan Deactivate request" ];
|
|
||||||
bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ];
|
|
||||||
phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ];
|
|
||||||
bts => phy [ label = "L1 chan Disconnect PDTCH" ];
|
|
||||||
phy -> bts [ label = "L1 chan Disconnect confirm" ];
|
|
||||||
--- [ label = "Connect TCH" ];
|
|
||||||
bts => phy [ label = "L1 chan Connect TCH" ];
|
|
||||||
phy -> bts [ label = "L1 chan Connect confirm" ];
|
|
||||||
bts => bsc [ label = "IPAC PDCH DEACT ACK" ];
|
|
||||||
|
|
||||||
phy box bsc [ label = "Now BSC may use TCH (example)" ];
|
|
||||||
bsc => bts [ label = "Activate TCH/F" ];
|
|
||||||
bts => phy [ label = "L1 chan Activate SAPIs" ];
|
|
||||||
--- [ label = "Voice call..." ];
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = "1.2";
|
|
||||||
phy,bts,pcu,bsc;
|
|
||||||
|
|
||||||
--- [ label = "...Voice call ends" ];
|
|
||||||
bsc => bts [ label = "Deactivate TCH/F" ];
|
|
||||||
bts => phy [ label = "L1 chan Deactivate SAPIs" ];
|
|
||||||
|
|
||||||
phy box bsc [ label = "PDCH Activation" ];
|
|
||||||
bsc => bts [ label = "IPAC PDCH ACT" ];
|
|
||||||
--- [ label = "Disconnect TCH" ];
|
|
||||||
bts => phy [ label = "L1 chan Disconnect TCH" ];
|
|
||||||
phy -> bts [ label = "L1 chan Disconnect confirm" ];
|
|
||||||
--- [ label = "Connect PDTCH" ];
|
|
||||||
bts => phy [ label = "L1 chan Connect PDTCH" ];
|
|
||||||
phy -> bts [ label = "L1 chan Connect confirm" ];
|
|
||||||
bts => pcu [ label = "info ind (Activate)" ];
|
|
||||||
pcu => bts [ label = "chan Activate request" ];
|
|
||||||
bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ];
|
|
||||||
phy -> bts [ label = "L1 chan Activate SAPIs confirm" ];
|
|
||||||
bts => bsc [ label = "IPAC PDCH ACT ACK" ];
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = "1.5";
|
|
||||||
phy,bts,pcu,bsc;
|
|
||||||
|
|
||||||
bts => bsc [ label = "RSL Chan Requested" ];
|
|
||||||
phy box bsc [ label = "TS is in PDCH mode, deactivate" ];
|
|
||||||
bsc => bts [ label = "RSL RF Channel Release (PDCH)" ];
|
|
||||||
bts => pcu [ label = "Info Ind (Deactivate)" ];
|
|
||||||
pcu => bts [ label = "Chan Deactivate request" ];
|
|
||||||
bts => phy [ label = "L1 chan Deactivate PDTCH SAPIs" ];
|
|
||||||
phy -> bts [ label = "L1 chan Deactivate SAPIs confirm" ];
|
|
||||||
bts -> bsc [ label = "RSL RF Channel Release Ack (PDCH)" ];
|
|
||||||
|
|
||||||
phy box bsc [ label = "Activate TCH/H" ];
|
|
||||||
bsc => bts [ label = "RSL Channel Activation (TCH/H)" ];
|
|
||||||
--- [ label = "BTS notices: chan still connected as PDTCH, reconnect" ];
|
|
||||||
bts => phy [ label = "L1 chan Disconnect PDTCH" ];
|
|
||||||
phy -> bts [ label = "L1 chan Disconnect confirm" ];
|
|
||||||
bts => phy [ label = "L1 chan Connect TCH/H" ];
|
|
||||||
phy -> bts [ label = "L1 chan Connect confirm" ];
|
|
||||||
--- [ label = "chan reconnect as TCH/H complete" ];
|
|
||||||
bts => phy [ label = "L1 chan Activate SAPIs" ];
|
|
||||||
bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ];
|
|
||||||
--- [ label = "Voice call 1 commences..." ];
|
|
||||||
|
|
||||||
phy box bsc [ label = "A second voice call is requested" ];
|
|
||||||
bts => bsc [ label = "RSL Chan Requested" ];
|
|
||||||
phy box bsc [ label = "BSC finds second slot on dynamic TS in TCH/H mode" ];
|
|
||||||
bsc => bts [ label = "RSL Channel Activation (TCH/H)" ];
|
|
||||||
bts => phy [ label = "L1 chan Activate SAPIs" ];
|
|
||||||
bts -> bsc [ label = "RSL Channel Activation Ack (TCH/H)" ];
|
|
||||||
--- [ label = "Voice call 2 commences..." ];
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = "1.5";
|
|
||||||
phy,bts,pcu,bsc;
|
|
||||||
|
|
||||||
--- [ label = "...Voice call 1 ends" ];
|
|
||||||
bts => bsc [ label = "Release Ind" ];
|
|
||||||
bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ];
|
|
||||||
bts => phy [ label = "L1 chan Deactivate SAPIs" ];
|
|
||||||
bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ];
|
|
||||||
--- [ label = "BSC notices: one chan still in use"];
|
|
||||||
|
|
||||||
--- [ label = "...Voice call 2 ends" ];
|
|
||||||
bts => bsc [ label = "Release Ind" ];
|
|
||||||
bsc => bts [ label = "RSL RF Channel Release (TCH/H)" ];
|
|
||||||
bts => phy [ label = "L1 chan Deactivate SAPIs" ];
|
|
||||||
bts -> bsc [ label = "RSL RF Channel Release Ack (TCH/H)" ];
|
|
||||||
|
|
||||||
phy box bsc [ label = "If all channels on TS are released, PDCH Activation" ];
|
|
||||||
bsc => bts [ label = "RSL Channel Activation (PDCH)" ];
|
|
||||||
bts -> bsc [ label = "RSL Channel Activation Ack (PDCH) (unconditionally)" ];
|
|
||||||
--- [ label = "BTS notices: chan still connected as TCH/H, reconnect" ];
|
|
||||||
bts => phy [ label = "L1 chan Disconnect TCH/H" ];
|
|
||||||
phy -> bts [ label = "L1 chan Disconnect confirm" ];
|
|
||||||
bts => phy [ label = "L1 chan Connect PDTCH" ];
|
|
||||||
phy -> bts [ label = "L1 chan Connect confirm" ];
|
|
||||||
--- [ label = "chan reconnect as PDTCH complete" ];
|
|
||||||
bts => pcu [ label = "Info Ind (Activate)" ];
|
|
||||||
pcu => bts [ label = "chan Activate request" ];
|
|
||||||
bts => phy [ label = "L1 chan Activate PDTCH SAPIs" ];
|
|
||||||
phy -> bts [ label = "L1 chan Activate SAPIs confirm" ];
|
|
||||||
}
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
== IPA Multiplex
|
|
||||||
|
|
||||||
The ETSI/3GPP specifications for A-bis transport (ETSI/3GPP TS 08.56)
|
|
||||||
specify the transmission of RSL and OML messages over a LAPD based
|
|
||||||
framing on top of 64kBit/s signalling times slots (B-channels) on E1
|
|
||||||
lines.
|
|
||||||
|
|
||||||
OsmoBTS does not implement this LAPD based transport, but instead
|
|
||||||
implements A-bis over IP in a flavor first observed by ip.access nanoBTS
|
|
||||||
products. The OsmoBTS implementation is a clean-room re-implementation
|
|
||||||
based on the observation and dissection of protocol traces.
|
|
||||||
|
|
||||||
LAPD as used in E1 signalling channels provides in-order transmission
|
|
||||||
and reliable delivery. This is why TCP was chosen as Layer 4 transport
|
|
||||||
protocol on top of IP. TCP however, is a stream based transport
|
|
||||||
protocol, which doesn't preserve the boundaries of messages.
|
|
||||||
|
|
||||||
To work around this shortcoming, an additional framing layer called the
|
|
||||||
IPA multiplex was introduced between TCP and the RSL and OML messages.
|
|
||||||
|
|
||||||
.Protocol Stacking
|
|
||||||
[width="30%"]
|
|
||||||
|===
|
|
||||||
|RSL + OML (this document)
|
|
||||||
|IPA (this document)
|
|
||||||
|TCP (IETF RFC 793)
|
|
||||||
|IP (IETF RFC 791)
|
|
||||||
|Ethernet (IEEE 802.3)
|
|
||||||
|===
|
|
||||||
|
|
||||||
=== IPA Header
|
|
||||||
|
|
||||||
Each higher-layer PDU is encapsulated by a three-byte IPA header with
|
|
||||||
the following structure:
|
|
||||||
|
|
||||||
.IPA Header Structure
|
|
||||||
[options="header",cols="10%,15%,15%,60%"]
|
|
||||||
|===
|
|
||||||
|Offset (Octets)|Length|Name|Description
|
|
||||||
|0|2|Length|Length of the variable-length payload section in network
|
|
||||||
byte order (excluding the length of the IPA Header)
|
|
||||||
|2|1|Stream Identifier|Identifies the stream of the payload
|
|
||||||
|3|Variable|Payload|higher-layer PDU (i.e. RSL or OML message)
|
|
||||||
|===
|
|
||||||
|
|
||||||
=== IPA Stream Identifiers
|
|
||||||
|
|
||||||
The IPA Stream Identifier serves to differentiate different streams
|
|
||||||
within the multiplex. In the context of A-bis, it can be seen as
|
|
||||||
analogous to the LAPD TEI on classic A-bis over E1.
|
|
||||||
|
|
||||||
The following IPA stream identifiers are being used in A-bis/IP:
|
|
||||||
|
|
||||||
.IPA Stream Identifiers
|
|
||||||
[options="header",width="70%",cols="20%,20%,60%"]
|
|
||||||
|===
|
|
||||||
|Value (Hex)|Name|Description
|
|
||||||
|0x00|RSL|A-bis RSL according to this document, TRX 0
|
|
||||||
|0x01|RSL|A-bis RSL according to this document, TRX 1
|
|
||||||
|0x0n|RSL|A-bis RSL according to this document, TRX n
|
|
||||||
|0xfe|CCM|IPA Connection Management
|
|
||||||
|0xff|OML|A-bis OML according to this document
|
|
||||||
|===
|
|
||||||
|
|
||||||
|
|
||||||
=== IPA Connection Management (CCM)
|
|
||||||
|
|
||||||
The IPA Connection Management is a sub-layer underneath the IPA
|
|
||||||
multiplex which is used to manage the connection itself. It supports
|
|
||||||
functions like Identity Management and Keep-Alive.
|
|
||||||
|
|
||||||
==== Identity Management
|
|
||||||
|
|
||||||
When a BTS connects to the BSC, the BSC must identify the connected BTS
|
|
||||||
somehow. In ETSI/3GPP A-bis, the E1 multiplex + signalling timeslot
|
|
||||||
number is used for this. In IP, there is no similar usable identity.
|
|
||||||
Hence, the Unit ID is used for this purpose.
|
|
||||||
|
|
||||||
.Procedure for IPA peer identification is as follows
|
|
||||||
[options="header",cols="20%,80%"]
|
|
||||||
|===
|
|
||||||
|Direction|Operation
|
|
||||||
|BTS -> BSC|BTS connects the TCP connection to be used with IPA
|
|
||||||
|BTS <- BSC|BSC requests BTS identity with ID_GET
|
|
||||||
|BTS -> BSC|BTS responds BTS Unit ID with ID_RESP
|
|
||||||
|BTS <- BSC|BSC responds with ID_ACK, if the Unit ID is known to the BSC
|
|
||||||
|===
|
|
||||||
|
|
||||||
Following the above peer identification procedure, transfer of
|
|
||||||
higher-level messages such as OML or RSL commences.
|
|
||||||
|
|
||||||
==== IPA CCM Messages
|
|
||||||
|
|
||||||
IPA CCM supports the following messages
|
|
||||||
|
|
||||||
.IPA CCM Messages
|
|
||||||
[options="header"]
|
|
||||||
[cols="10%,15%,75%"]
|
|
||||||
|===
|
|
||||||
|Value|Name|Purpose
|
|
||||||
|0x00|PING|Request a PONG from the peer
|
|
||||||
|0x01|PONG|Response to a PING
|
|
||||||
|0x04|ID_GET|Request Identity from peer
|
|
||||||
|0x05|ID_RESP|Response to ID_GET
|
|
||||||
|0x06|ID_ACK|Identity Acknowledged
|
|
||||||
|===
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="BTS"], bsc [label="BSC"];
|
|
||||||
# this is for the BTS Object
|
|
||||||
--- [label="Initial state after establishing OML"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Notinstalled/Locked)"];
|
|
||||||
--- [label="MO requests software activation"];
|
|
||||||
bts => bsc [label="SW Activate Req"];
|
|
||||||
bts <= bsc [label="SW Activate Req Ack"];
|
|
||||||
--- [label="BTS instructs BTS to activate software"];
|
|
||||||
bts <= bsc [label="Activate SW"];
|
|
||||||
bts => bsc [label="Activate SW Ack"];
|
|
||||||
--- [label="MO reports new state after SW activation"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
bts => bsc [label="SW Activated Report"];
|
|
||||||
--- [label="Configure the MO with its attributes"];
|
|
||||||
bts <= bsc [label="Set BTS Attributes"];
|
|
||||||
bts => bsc [label="Set BTS Attributes Ack"];
|
|
||||||
bts <= bsc [label="OPSTART"];
|
|
||||||
bts => bsc [label="OPSTART ACK"];
|
|
||||||
--- [label="As this object is locked, we need to unlock it"];
|
|
||||||
bts <= bsc [label="Change Adm State (Unlocked)"];
|
|
||||||
bts => bsc [label="Change Adm State Ack (Unlocked)"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Dependency/Unlocked)"];
|
|
||||||
--- [label="Initialize Radio Transceiver, Radio Carrier, Channels"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Enabled/OK)"];
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="Radio Carrier"], bsc [label="BSC"];
|
|
||||||
--- [label="Initial state after establishing OML"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Notinstalled/Locked)"];
|
|
||||||
--- [label="MO requests software activation"];
|
|
||||||
bts => bsc [label="SW Activate Req"];
|
|
||||||
bts <= bsc [label="SW Activate Req Ack"];
|
|
||||||
--- [label="BTS instructs BTS to activate software"];
|
|
||||||
bts <= bsc [label="Activate SW"];
|
|
||||||
bts => bsc [label="Activate SW Ack"];
|
|
||||||
--- [label="MO reports new state after SW activation"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Offline)"];
|
|
||||||
bts => bsc [label="SW Activated Report"];
|
|
||||||
--- [label="Configure the MO with its attributes"];
|
|
||||||
bts <= bsc [label="Set Radio Carrier Attributes"];
|
|
||||||
bts => bsc [label="Set Radio Carrier Attributes Ack"];
|
|
||||||
bts <= bsc [label="OPSTART"];
|
|
||||||
bts => bsc [label="OPSTART ACK"];
|
|
||||||
--- [label="As this object is locked, we need to unlock it"];
|
|
||||||
bts <= bsc [label="Change Adm State (Unlocked)"];
|
|
||||||
bts => bsc [label="Change Adm State Ack (Unlocked)"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/OK/Unlocked)"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Enabled)"];
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="Channel"], bsc [label="BSC"];
|
|
||||||
--- [label="Initial state after establishing OML"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Notinstalled/Locked)"];
|
|
||||||
--- [label="MO reports new state after SW activation of Baseband Transceiver"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
bts => bsc [label="SW Activated Report"];
|
|
||||||
--- [label="Configure the MO with its attributes"];
|
|
||||||
bts <= bsc [label="Set Channel Attributes"];
|
|
||||||
bts => bsc [label="Set Channel Attributes Ack"];
|
|
||||||
bts <= bsc [label="OPSTART"];
|
|
||||||
bts => bsc [label="OPSTART ACK"];
|
|
||||||
--- [label="As this object is locked, we need to unlock it"];
|
|
||||||
bts <= bsc [label="Change Adm State (Unlocked)"];
|
|
||||||
bts => bsc [label="Change Adm State Ack (Unlocked)"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Dependency/Unlocked)"];
|
|
||||||
--- [label="Initialize Radio Carrier / Baseband Transceiver"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Offline)"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Enabled/OK)"];
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="Site Manager"], bsc [label="BSC"];
|
|
||||||
# this is for the Site Manager Object
|
|
||||||
--- [label="Initial state after establishing OML"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Notinstalled)"];
|
|
||||||
--- [label="MO requests software activation"];
|
|
||||||
bts => bsc [label="SW Activate Req"];
|
|
||||||
bts <= bsc [label="SW Activate Req Ack"];
|
|
||||||
--- [label="BTS instructs BTS to activate software"];
|
|
||||||
bts <= bsc [label="Activate SW"];
|
|
||||||
bts => bsc [label="Activate SW Ack"];
|
|
||||||
--- [label="MO reports new state after SW activation"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Enabled)"];
|
|
||||||
bts => bsc [label="SW Activated Report"];
|
|
||||||
bts <= bsc [label="OPSTART"];
|
|
||||||
bts => bsc [label="OPSTART ACK"];
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="Baseband Transceiver"], bsc [label="BSC"];
|
|
||||||
--- [label="Initial state after establishing OML"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Notinstalled/Locked)"];
|
|
||||||
--- [label="MO requests software activation"];
|
|
||||||
bts => bsc [label="SW Activate Req"];
|
|
||||||
bts <= bsc [label="SW Activate Req Ack"];
|
|
||||||
--- [label="BTS instructs BTS to activate software"];
|
|
||||||
bts <= bsc [label="Activate SW"];
|
|
||||||
bts => bsc [label="Activate SW Ack"];
|
|
||||||
--- [label="MO reports new state after SW activation"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
bts => bsc [label="SW Activated Report"];
|
|
||||||
--- [label="BSC requests RSL establishment"];
|
|
||||||
bts <= bsc [label="IPA RSL Connect"];
|
|
||||||
bts => bsc [label="IPA RSL Connect ACK"];
|
|
||||||
bts <= bsc [label="OPSTART"];
|
|
||||||
bts => bsc [label="OPSTART ACK"];
|
|
||||||
--- [label="As this object is locked, we need to unlock it"];
|
|
||||||
bts <= bsc [label="Change Adm State (Unlocked)"];
|
|
||||||
bts => bsc [label="Change Adm State Ack (Unlocked)"];
|
|
||||||
bts => bsc [label="STATE CHG REP (Disabled/Dependency/Unlocked)"];
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = 2;
|
|
||||||
|
|
||||||
chan [label="Channel"], rc [label="Radio Carrier"], smg [label="Site Manager"], bts [label="BTS"], bsc [label="BSC"];
|
|
||||||
|
|
||||||
bts => bsc [label="TCP Connect (Port 3003, OML)"];
|
|
||||||
bts box bsc [label="IPA CCM Identification (Port 3003)"];
|
|
||||||
|||;
|
|
||||||
smg => bsc [label="(Site Mgr) STATE CHG REP (Disabled/NotInstalled)"];
|
|
||||||
bts => bsc [label="(BTS) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
rc => bsc [label="(TRANSC) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 0) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 1) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 2) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 3) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 4) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 5) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 6) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
chan => bsc [label="(Ch 7) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
rc => bsc [label="(RC) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
bts => bsc [label="(GPRS-NSE) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
bts => bsc [label="(GPRS-CELL) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
bts => bsc [label="(GPRS-NSVC0) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
bts => bsc [label="(GPRS-NSVC1) STATE CHG REP (Disabled/NotInstalled/Locked)"];
|
|
||||||
|||;
|
|
||||||
smg => bsc [label="(Site Mgr) SW Activate Req"];
|
|
||||||
smg <= bsc [label="(Site Mgr) SW Activate Req Ack"];
|
|
||||||
smg <= bsc [label="(Site Mgr) Activate SW"];
|
|
||||||
smg => bsc [label="(Site Mgr) Activate SW Ack"];
|
|
||||||
smg => bsc [label="(Site Mgr) STATE CHG REP (Enabled)"];
|
|
||||||
smg => bsc [label="(Site Mgr) SW Activated Report"];
|
|
||||||
smg <= bsc [label="(Site Mgr) OPSTART"];
|
|
||||||
smg => bsc [label="(Site Mgr) OPSTART ACK"];
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = 2;
|
|
||||||
|
|
||||||
chan [label="Channel"], rc [label="Radio Carrier"], bts [label="BTS"], bsc [label="BSC"];
|
|
||||||
|
|
||||||
bts box bsc [label="OML Connect + Site Manager Init"];
|
|
||||||
...;
|
|
||||||
bts => bsc [label="(BTS) SW Activate Req"];
|
|
||||||
bts <= bsc [label="(BTS) SW Activate Req Ack"];
|
|
||||||
bts <= bsc [label="(BTS) Activate SW"];
|
|
||||||
bts => bsc [label="(BTS) Activate SW Ack"];
|
|
||||||
bts => bsc [label="(BTS) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
bts => bsc [label="(BTS) SW Activated Report"];
|
|
||||||
|||;
|
|
||||||
rc => bsc [label="(TRANSC) SW Activate Req"];
|
|
||||||
rc => bsc [label="(RC) SW Activated Req"];
|
|
||||||
|||;
|
|
||||||
bts <= bsc [label="(BTS) Set BTS Attributes"];
|
|
||||||
bts => bsc [label="(BTS) Set BTS Attributes Ack"];
|
|
||||||
bts <= bsc [label="(BTS) OPSTART"];
|
|
||||||
bts => bsc [label="(BTS) OPSTART Ack"];
|
|
||||||
|||;
|
|
||||||
bts <= bsc [label="(BTS) Change Adm State (Unlocked)"];
|
|
||||||
bts => bsc [label="(BTS) Change Adm State ACK (Unlocked)"];
|
|
||||||
bts => bsc [label="(BTS) STATE CHG REP (Disabled/Dependency/Unlcoked)"];
|
|
||||||
|||;
|
|
||||||
rc <= bsc [label="(TRANSC) SW Activate Req Ack"];
|
|
||||||
rc <= bsc [label="(TRANSC) Activate SW"];
|
|
||||||
rc => bsc [label="(TRANSC) Activate SW Ack"];
|
|
||||||
rc => bsc [label="(TRANSC) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
rc => bsc [label="(TRANSC) SW Activated Report"];
|
|
||||||
|
|
||||||
chan => bsc [label="(CHAN 0) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
chan => bsc [label="(CHAN 1) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
chan => bsc [label="(CHAN 2) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
chan => bsc [label="(CHAN 3) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
chan => bsc [label="(CHAN 4) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
chan => bsc [label="(CHAN 5) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
chan => bsc [label="(CHAN 6) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
chan => bsc [label="(CHAN 7) STATE CHG REP (Disabled/Dependency)"];
|
|
||||||
|||;
|
|
||||||
chan => bsc [label="(CHAN 0) SW Activated Report"];
|
|
||||||
chan => bsc [label="(CHAN 1) SW Activated Report"];
|
|
||||||
chan => bsc [label="(CHAN 2) SW Activated Report"];
|
|
||||||
chan => bsc [label="(CHAN 3) SW Activated Report"];
|
|
||||||
chan => bsc [label="(CHAN 4) SW Activated Report"];
|
|
||||||
chan => bsc [label="(CHAN 5) SW Activated Report"];
|
|
||||||
chan => bsc [label="(CHAN 6) SW Activated Report"];
|
|
||||||
chan => bsc [label="(CHAN 7) SW Activated Report"];
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = 2;
|
|
||||||
|
|
||||||
chan [label="Channel"], rc [label="Radio Carrier"], bts [label="BTS"], bsc [label="BSC"];
|
|
||||||
|
|
||||||
...;
|
|
||||||
rc <= bsc [label="(RC) SW Activate Req Ack"];
|
|
||||||
rc <= bsc [label="(RC) Activate SW"];
|
|
||||||
rc => bsc [label="(RC) Activate SW Ack"];
|
|
||||||
rc => bsc [label="(RC) STATE CHG REP (Disabled/Offline)"];
|
|
||||||
rc => bsc [label="(RC) SW Activated Report"];
|
|
||||||
rc <= bsc [label="(TRANSC) IPA RSL Connect"];
|
|
||||||
rc => bsc [label="(TRANSC) IPA RSL Connect Ack"];
|
|
||||||
rc <= bsc [label="(TRANSC) OPSTART"];
|
|
||||||
rc => bsc [label="(TRANSC) OPSTART Ack"];
|
|
||||||
rc <= bsc [label="(TRANSC) Change Adm State (Unlocked)"];
|
|
||||||
rc => bsc [label="(TRANSC) Change Adm State Ack (Unlocked)"];
|
|
||||||
rc => bsc [label="(TRANSC) STATE CHG REP (Disabled/Dependency/Unlocked)"];
|
|
||||||
|||;
|
|
||||||
chan <= bsc [label="(CHAN 0) Set Channel Attributes"];
|
|
||||||
chan => bsc [label="(CHAN 0) Set Channel Attributes Ack"];
|
|
||||||
chan <= bsc [label="(CHAN 0) OPSTART"];
|
|
||||||
chan => bsc [label="(CHAN 0) OPSTART Ack"];
|
|
||||||
chan <= bsc [label="(CHAN 0) Change Adm State (Unlocked)"];
|
|
||||||
chan => bsc [label="(CHAN 0) Change Adm State Ack (Unlocked)"];
|
|
||||||
chan => bsc [label="(CHAN 0) STATE CHG REP (Disabled/Dependency/Unlocked)"];
|
|
||||||
...;
|
|
||||||
chan <= bsc [label="(CHAN 7) Set Channel Attributes"];
|
|
||||||
chan => bsc [label="(CHAN 7) Set Channel Attributes Ack"];
|
|
||||||
chan <= bsc [label="(CHAN 7) OPSTART"];
|
|
||||||
chan => bsc [label="(CHAN 7) OPSTART Ack"];
|
|
||||||
chan <= bsc [label="(CHAN 7) Change Adm State (Unlocked)"];
|
|
||||||
chan => bsc [label="(CHAN 7) Change Adm State Ack (Unlocked)"];
|
|
||||||
chan => bsc [label="(CHAN 7) STATE CHG REP (Disabled/Dependency/Unlocked)"];
|
|
||||||
|||;
|
|
||||||
rc <= bsc [label="(RC) Set Radio Carrier Attributes"];
|
|
||||||
rc => bsc [label="(RC) Set Radio Carrier Attributes Ack"];
|
|
||||||
rc <= bsc [label="(RC) OPSTART"];
|
|
||||||
rc => bsc [label="(RC) OPSTART Ack"];
|
|
||||||
rc <= bsc [label="(RC) Change Adm State (Unlocked)"];
|
|
||||||
rc => bsc [label="(RC) Change Adm State Ack (Unlocked)"];
|
|
||||||
rc => bsc [label="(RC) STATE CHG REP (Disabled/OK/Unlocked)"];
|
|
||||||
rc => bsc [label="(RC) STATE CHG REP (Enabled)"];
|
|
||||||
rc => bsc [label="(TRANSC) STATE CHG REP (Disabled/Offline)"];
|
|
||||||
rc => bsc [label="(TRANSC) STATE CHG REP (Enabled/OK)"];
|
|
||||||
|||;
|
|
||||||
chan => bsc [label="(CHAN 0) STATE CHG REP (Disabled/Offline)"];
|
|
||||||
chan => bsc [label="(CHAN 0) STATE CHG REP (Enabled/OK)"];
|
|
||||||
|||;
|
|
||||||
bts => bsc [label="(BTS) STATE CHG REP (Enabled/OK)"];
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="TRX"], bsc [label="BSC"];
|
|
||||||
|
|
||||||
bts => bsc [label="TCP Connect (Port 3003, RSL)"];
|
|
||||||
bts box bsc [label="IPA CCM Identification (Port 3003)"];
|
|
||||||
|||;
|
|
||||||
|
|
||||||
bts <= bsc [label="BCCH Information (SI1)"];
|
|
||||||
bts <= bsc [label="BCCH Information (SI2)"];
|
|
||||||
...;
|
|
||||||
bts <= bsc [label="BCCH Information (SI3)"];
|
|
||||||
bts <= bsc [label="BCCH Information (SI4)"];
|
|
||||||
|||;
|
|
||||||
bts <= bsc [label="SACCH FILLING (SI5)"];
|
|
||||||
...;
|
|
||||||
bts <= bsc [label="SACCH FILLING (SI6)"];
|
|
||||||
|||;
|
|
||||||
bts => bsc [label="RF Resource Indication"];
|
|
||||||
...;
|
|
||||||
bts => bsc [label="RF Resource Indication"];
|
|
||||||
...;
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
msc {
|
|
||||||
bts [label="TRX"], bsc [label="BSC"];
|
|
||||||
|
|
||||||
bts => bsc [label="TCP Connect (Port 3003, RSL)"];
|
|
||||||
bts box bsc [label="IPA CCM Identification (Port 3003)"];
|
|
||||||
|||;
|
|
||||||
|
|
||||||
bts <= bsc [label="SACCH FILLING (SI5)"];
|
|
||||||
...;
|
|
||||||
bts <= bsc [label="SACCH FILLING (SI6)"];
|
|
||||||
|||;
|
|
||||||
bts => bsc [label="RF Resource Indication"];
|
|
||||||
...;
|
|
||||||
bts => bsc [label="RF Resource Indication"];
|
|
||||||
...;
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
msc {
|
|
||||||
hscale = 2;
|
|
||||||
|
|
||||||
ms [label="MS"], bts [label="BTS"], bsc [label="BSC"], Msc [label="MSC"], mgw [label="MGW"];
|
|
||||||
|
|
||||||
ms => bts [label="L1 RACH burst"];
|
|
||||||
bts => bsc [label="RSL CHAN RQD"];
|
|
||||||
bts <= bsc [label="RSL CHAN ACT"];
|
|
||||||
bts => bsc [label="RSL CHAN ACT ACK"];
|
|
||||||
bts <= bsc [label="RSL IMM ASS CMD (RR IMM ASS)"];
|
|
||||||
ms <= bts [label="RR IMMEDIATE ASSIGN"];
|
|
||||||
ms => bts [label="LAPDm SABM (CM SERVICE REQ)"];
|
|
||||||
ms <= bts [label="LAPDm FIXME"];
|
|
||||||
bts => bsc [label="RSL ESTABLISH IND (CM SERVICE REQ)"];
|
|
||||||
bsc => Msc [label="CR (BSSAP COMPLETE L3 (CM SERVICE REQ))"];
|
|
||||||
...;
|
|
||||||
ms box Msc [label="MM Common Procedures (INFO, ID, AUTH, CIPH)"];
|
|
||||||
...;
|
|
||||||
ms => bts [label="CC SETUP"];
|
|
||||||
bts => bsc [label="RSL DATA IND (CC SETUP)"];
|
|
||||||
bsc => Msc [label="DT1 (DTAP (CC SETUP))"];
|
|
||||||
...;
|
|
||||||
ms box Msc [label="CC Signalling"];
|
|
||||||
...;
|
|
||||||
bsc <= Msc [label="BSSAP ASSIGNMENT CMD (TCH)"];
|
|
||||||
bts <= bsc [label="RSL IPA CRCX", id="1"];
|
|
||||||
bts => bsc [label="RSL IPA CRCX ACK (IP/Port @ BTS)"];
|
|
||||||
bsc => Msc [label="FIXME"];
|
|
||||||
Msc => mgw [label="FIXME"];
|
|
||||||
bts <- mgw [label="Start RTP + RTCP UDP Flows"];
|
|
||||||
|
|
||||||
bts <= bsc [label="RSL DATA REQ (RR CHAN MOD MODIFY)"];
|
|
||||||
ms <= bts [label="RR CHAN MOD MODIFY"];
|
|
||||||
ms => bts [label="RR CHAN MOD MODIFY ACK"];
|
|
||||||
bts => bsc [label="RSL DATA IND (RR CHAN MOD MODIFY ACK)"];
|
|
||||||
|||;
|
|
||||||
bts <= bsc [label="RSL MODE MODIFY REQ"];
|
|
||||||
bts => bsc [label="RSL MODE MODIFY ACK"];
|
|
||||||
|
|
||||||
Msc <= mgw [label="FIXME"];
|
|
||||||
bsc <= Msc [label="FIXME"];
|
|
||||||
bts <= bsc [label="RSL IPA MDCX (IP/Port @ MGW)", id="2"];
|
|
||||||
bts => bsc [label="RSL IPA MDCX ACK"];
|
|
||||||
|
|
||||||
bts -> mgw [label="Start RTP + RTCP UDP Flows"];
|
|
||||||
ms box mgw [label="Active Voice Call"];
|
|
||||||
bts => bsc [label="RSL MEAS RES"];
|
|
||||||
...;
|
|
||||||
|
|
||||||
bts <= bsc [label="RSL IPA DLCX"];
|
|
||||||
bts => bsc [label="RSL IPA DLCX ACK"];
|
|
||||||
bts -x mgw [label="Stop RTP + RTCP UDP Flows"];
|
|
||||||
|
|
||||||
bts <= bsc [label="RSL RF CHAN REL"];
|
|
||||||
bts => bsc [label="RSL RF CHAN REL ACK"];
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,33 +0,0 @@
|
|||||||
== User-Plane Traffic via RTP
|
|
||||||
|
|
||||||
RTP (Realtime Transfer Protocol) is a protocol for streaming audio
|
|
||||||
and video data. It is specified by IETF RFC 1889.
|
|
||||||
|
|
||||||
OsmoBTS A-bis/IP implements RTP as transport medium for circuit-switched
|
|
||||||
user-plane traffic, contrary to the E1 sub-slot based transport
|
|
||||||
specified in 3GPP TS 08.60.
|
|
||||||
|
|
||||||
The RTP transport endpoint parameters are configured using the RSL User
|
|
||||||
Plane Transport Management procedures described in <<user_plane_txp_mgmt>>.
|
|
||||||
|
|
||||||
RTCP is implemented in addition to RTP, on a UDP port number of the RTP
|
|
||||||
port incremented by one.
|
|
||||||
|
|
||||||
=== RTP Payload Formats
|
|
||||||
|
|
||||||
The RTP payload format depends on the voice codec used on the radio
|
|
||||||
channel. The OsmoBTS is simply passing the GSM speech frames between
|
|
||||||
the Um radio interface channels and the RTP payload (and vice-versa).
|
|
||||||
|
|
||||||
No transcoding function is implemented in the BTS!
|
|
||||||
|
|
||||||
.RTP Payload formats
|
|
||||||
[options="header",width="60%",cols="15%,15%,70%"]
|
|
||||||
|===
|
|
||||||
| TCH | Codec | RTP payload format specification
|
|
||||||
| TCH/F | FR | IETF RFC 3551 Section 4.5.8
|
|
||||||
| TCH/F | EFR | IETF RFC 3551 Section 4.5.9
|
|
||||||
| TCH/F | AMR | IETF RFC 4867
|
|
||||||
| TCH/H | HR | IETF RFC 5993
|
|
||||||
| TCH/H | AMR | IETF RFC 4867
|
|
||||||
|===
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
== OsmoBTS software architecture
|
|
||||||
|
|
||||||
=== OsmoBTS PHY interface abstraction
|
|
||||||
|
|
||||||
The OsmoBTS PHY interface serves as an internal abstraction layer
|
|
||||||
between given PHY hardware (as provided by the bts_model) and the actual
|
|
||||||
logical transceivers (TRXs) of a BTS inside the OsmoBTS code base.
|
|
||||||
|
|
||||||
|
|
||||||
==== PHY link
|
|
||||||
|
|
||||||
A PHY link is a physical connection / link towards a given PHY. This
|
|
||||||
might be, for example,
|
|
||||||
|
|
||||||
* a set of file descriptors to device nodes in the /dev/ directory
|
|
||||||
(sysmobts, litecell15)
|
|
||||||
* a packet socket for sending raw Ethernet frames to an OCTPHY
|
|
||||||
* a set of UDP sockets for interacting with OsmoTRX
|
|
||||||
|
|
||||||
Each PHY interface has a set of attribute/parameters and a list of 1 to
|
|
||||||
n PHY instances.
|
|
||||||
|
|
||||||
PHY links are numbered 0..n globally inside OsmoBTS.
|
|
||||||
|
|
||||||
Each PHY link is configured via the VTY using its individual top-level
|
|
||||||
vty node. Given the different bts-model / phy specific properties, the
|
|
||||||
VTY configuration options (if any) of the PHY instance differ between
|
|
||||||
BTS models.
|
|
||||||
|
|
||||||
The PHY links and instances must be configured above the BTS/TRX nodes
|
|
||||||
in the configuration file. If the file is saved via the VTY, the code
|
|
||||||
automatically ensures this.
|
|
||||||
|
|
||||||
|
|
||||||
==== PHY instance
|
|
||||||
|
|
||||||
A PHY instance is an instance of a PHY, accessed via a PHY link.
|
|
||||||
|
|
||||||
In the case of osmo-bts-sysmo and osmo-bts-trx, there is only one
|
|
||||||
instance in every PHY link. This is due to the fact that the API inside
|
|
||||||
that PHY link does not permit for distinguishing multiple different
|
|
||||||
logical TRXs.
|
|
||||||
|
|
||||||
Other PHY implementations like the OCTPHY however do support addressing
|
|
||||||
multiple PHY instances via a single PHY link.
|
|
||||||
|
|
||||||
PHY instances are numbered 0..n inside each PHY link.
|
|
||||||
|
|
||||||
Each PHY instance is configured via the VTY as a separate node beneath each
|
|
||||||
PHY link. Given the different bts-model / phy specific properties, the
|
|
||||||
VTY configuration options (if any) of the PHY instance differ between
|
|
||||||
BTS models.
|
|
||||||
|
|
||||||
|
|
||||||
==== Mapping PHY instances to TRXs
|
|
||||||
|
|
||||||
Each TRX node in the VTY must use the 'phy N instance M' command in
|
|
||||||
order to specify which PHY instance is allocated to this specific TRX.
|
|
||||||
|
|
||||||
=== Internal control flow
|
|
||||||
|
|
||||||
==== start-up / sequencing during OsmoBTS start
|
|
||||||
|
|
||||||
.Control flow at OsmoBTS start-up procedure
|
|
||||||
[options="header",cols="10%,35%,55%"]
|
|
||||||
|===
|
|
||||||
| section | function | description
|
|
||||||
| bts-specific | main() | Entering main() from glibc
|
|
||||||
| common | bts_main() | initialization of talloc contexts
|
|
||||||
| common | bts_log_init() | initialization of logging
|
|
||||||
| common | handle_options() | common option parsing
|
|
||||||
| bts-specific | bts_model_handle_options() | model-specific option parsing
|
|
||||||
| common | gsm_bts_alloc() | allocation of BTS/TRX/TS data structures
|
|
||||||
| common | vty_init() | Initialziation of VTY core, libosmo-abis and osmo-bts VTY
|
|
||||||
| common | main() | Setting of scheduler RR priority (if configured)
|
|
||||||
| common | main() | Initialization of GSMTAP (if configured)
|
|
||||||
| common | bts_init() | configuration of defaults in bts/trx/s object
|
|
||||||
| bts-specific | bts_model_init | ?
|
|
||||||
| common | abis_init() | Initialization of libosmo-abis
|
|
||||||
| common | vty_read_config_file() | Reading of configuration file
|
|
||||||
| bts-specific | bts_model_phy_link_set_defaults() | Called for every PHY link created
|
|
||||||
| bts-specific | bts_model_phy_instance_set_defaults() | Called for every PHY Instance created
|
|
||||||
| common | bts_controlif_setup() | Initialization of Control Interface
|
|
||||||
| bts-specific | bts_model_ctrl_cmds_install() | Install model-specific control interface commands
|
|
||||||
| common | telnet_init_default() | Initialization of telnet interface
|
|
||||||
| common | pcu_sock_init() | Initialization of PCU socket
|
|
||||||
| common | main() | Installation of signal handlers
|
|
||||||
| common | abis_open() | Start of the A-bis connection to BSC
|
|
||||||
| common | phy_links_open() | Iterate over list of configured PHY links
|
|
||||||
| bts-specific | bts_model_phy_link_open() | Open each of the configured PHY links
|
|
||||||
| bts-specific | bts_model_phy_link_close() | Close each of the configured PHY links
|
|
||||||
| common | osmo_daemonize() | Fork as daemon in background (if configured)
|
|
||||||
| common | bts_main() | Run main loop until global variable quit >= 2
|
|
||||||
|===
|
|
||||||
|
|
||||||
|
|
||||||
==== At time of OML establishment
|
|
||||||
|
|
||||||
.Control flow at time of OML establishment
|
|
||||||
[options="header",cols="10%,35%,55%"]
|
|
||||||
|===
|
|
||||||
| section | function | description
|
|
||||||
| bts-specific | bts_model_oml_estab() | Called by core once OML link is established
|
|
||||||
| bts-specific | bts_model_check_oml() | called each time OML sets some attributes on a MO, checks if attributes are valid
|
|
||||||
| bts-specific | bts_model_apply_oml() | called each time OML sets some attributes on a MO, stores attribute contents in data structures
|
|
||||||
| bts-specific | bts_model_opstart() | for NM_OC_BTS, NM_OC_SITE_MANAGER, NM_OC_GPRS_NSE, NM_OC_GPRS_CELL, NMO_OC_GPRS_NSVC
|
|
||||||
| bts-specific | bts_model_opstart() | for NM_OC_RADIO_CARRIER for each trx
|
|
||||||
| bts-specific | bts_model_opstart() | for NM_OC_BASEB_TRANSC for each trx
|
|
||||||
| bts-specific | bts_model_opstart() | for NM_OC_CHANNEL for each timeslot on each trx
|
|
||||||
| bts-specific | bts_model_change_power() | change transmit power for each trx (power ramp-up/ramp-down)
|
|
||||||
|===
|
|
||||||
|
|
||||||
==== At time of RSL connection loss
|
|
||||||
|
|
||||||
.Control flow at time of RSL connection loss
|
|
||||||
[options="header",cols="10%,35%,55%"]
|
|
||||||
|===
|
|
||||||
| section | function | description
|
|
||||||
| bts-specific | bts_model_abis_close() | called when either one of the RSL links or the OML link are down
|
|
||||||
|===
|
|
||||||
@@ -1,483 +0,0 @@
|
|||||||
[[osmobts_hardware_support]]
|
|
||||||
== OsmoBTS hardware support
|
|
||||||
|
|
||||||
OsmoBTS consists of a _common_ part that applies to all BTS models as well as
|
|
||||||
_hardware-specific_ parts for each BTS model. The hardware specific parts are
|
|
||||||
generally referred to as the _bts_model_ code.
|
|
||||||
|
|
||||||
The common part includes the core BTS architecture as well as code for
|
|
||||||
implementing the external interfaces such as Abis, control, PCU socket and
|
|
||||||
GSMTAP.
|
|
||||||
|
|
||||||
The bts_model parts include support for driving one particular
|
|
||||||
implementation of a GSM physical layer (PHY). Such a physical layer
|
|
||||||
implementation can come in many forms. Sometimes it runs on a general
|
|
||||||
purpose CPU, sometimes on a dedicated ARM core, a dedicated DSP, a
|
|
||||||
combination of DSP and FPGA.
|
|
||||||
|
|
||||||
Every PHY implementation offers some kind of primitives by which the PHY
|
|
||||||
can be controlled, and by which the PHY exchanges data with the higher
|
|
||||||
layers of the protocol stack in the OsmoBTS code.
|
|
||||||
|
|
||||||
The PHY-specific primitives are encapsulated in the bts_model code, and
|
|
||||||
offered as a PHY-independent _L1SAP_ interface towards the common part of
|
|
||||||
OsmoBTS.
|
|
||||||
|
|
||||||
In addition, each bts_model implements a set of functions that the
|
|
||||||
common part calls. Those functions are pre-fixed by _bts_model__.
|
|
||||||
|
|
||||||
Each bts_model may offer
|
|
||||||
|
|
||||||
* model-specific VTY commands for both configuration and run-time interaction
|
|
||||||
* model-specific command line arguments
|
|
||||||
* model-specific control interface commands
|
|
||||||
|
|
||||||
== `osmo-bts-sysmo` for sysmocom sysmoBTS
|
|
||||||
|
|
||||||
The sysmocom sysmoBTS is a range of GSM BTSs based around an embedded
|
|
||||||
system implementing the PHY in a combination of DSP+FPGA. The PHY is
|
|
||||||
configured by a set of primitives described by header files. Those
|
|
||||||
primitives are exchanged over a set of message queues exposed on the
|
|
||||||
Linux-running ARM core via device nodes in `/dev/msgq/`. Internally,
|
|
||||||
the message queues map to shared memory between the Linux-running ARM
|
|
||||||
core and the DSP running the PHY implementation.
|
|
||||||
|
|
||||||
The OsmoBTS bts_model code for the sysmoBTS can be found in the
|
|
||||||
`src/osmo-bts-sysmo` sub-directory of the OsmoBTS code base.
|
|
||||||
|
|
||||||
`osmo-bts-sysmo` has been the primary target platform for
|
|
||||||
OsmoBTS for many years and is thus the most feature-complete and mature
|
|
||||||
platform supported by OsmoBTS at this point.
|
|
||||||
|
|
||||||
The sysmoBTS PHY supports a direct PHY interface to OsmoPCU, reducing
|
|
||||||
the latency and amount of primitives that OsmoBTS would otherwise need
|
|
||||||
to pass through from the PHY message queues to the PCU socket and
|
|
||||||
vice-versa.
|
|
||||||
|
|
||||||
|
|
||||||
=== `osmo-bts-sysmo` specific command line arguments
|
|
||||||
|
|
||||||
*--dsp-trace 'DSPMASK'*::
|
|
||||||
Set the DSP trace flags (a single hexadecimal 32bit value).
|
|
||||||
This has been deprecated by VTY based commands, see
|
|
||||||
<<osmo-bts-sysmo-dsp-trace>> for further information.
|
|
||||||
*--pcu-direct*::
|
|
||||||
Indicate that an external PCU (e.g. OsmoPCU) will directly
|
|
||||||
open the DSP message queues to the PHY / PH-SAP, and only MPH
|
|
||||||
primitives are passed via OsmoBTS.
|
|
||||||
|
|
||||||
|
|
||||||
=== `osmo-bts-sysmo` specific VTY commands
|
|
||||||
|
|
||||||
For a auto-generated complete syntax reference of the VTY commands,
|
|
||||||
please see the associated _OsmoBTS VTY reference manual_
|
|
||||||
<<vty-ref-osmobts>>. The section
|
|
||||||
below only lists the most important commands.
|
|
||||||
|
|
||||||
==== at the 'SHOW' node
|
|
||||||
|
|
||||||
===== `show trx 0 clock-source`
|
|
||||||
|
|
||||||
Display the currently active clock source configuration for the TRX
|
|
||||||
|
|
||||||
[[osmo-bts-sysmo-dsp-trace]]
|
|
||||||
===== `show trx 0 dsp-trace-flags`
|
|
||||||
|
|
||||||
Show the currently active DSP trace flags for the TRX
|
|
||||||
|
|
||||||
===== `trx 0 dsp-trace-flag`
|
|
||||||
|
|
||||||
Use this command to enable/disable/configure the DSP tracing flags that
|
|
||||||
define what debug messages will appear on `/dev/rtfifo/dsp_trace`.
|
|
||||||
|
|
||||||
==== at the 'ENABLE' node
|
|
||||||
|
|
||||||
===== `trx 0 tx-power <-110-100>`
|
|
||||||
|
|
||||||
Change the current TRX transmit power to the given value in dBm.
|
|
||||||
|
|
||||||
===== `trx 0 rf-clock-info reset`
|
|
||||||
|
|
||||||
Part of the clock calibration procedure:
|
|
||||||
Reset the clock correction value.
|
|
||||||
|
|
||||||
===== `trx 0 rf-clock-info correct`
|
|
||||||
|
|
||||||
Part of the clock calibration procedure:
|
|
||||||
Apply the current measured correction value between the reference clock
|
|
||||||
and the local clock.
|
|
||||||
|
|
||||||
==== at the 'PHY instance' node
|
|
||||||
|
|
||||||
==== `clock-calibration eeprom`
|
|
||||||
|
|
||||||
Obtain clock calibration value from EEPROM.
|
|
||||||
|
|
||||||
==== `clock-calibration default`
|
|
||||||
|
|
||||||
Use hardware default clock calibration value.
|
|
||||||
|
|
||||||
==== `clock-calibration <-4095-4095>`
|
|
||||||
|
|
||||||
Use specified clock calibration value (not EEPROM/default).
|
|
||||||
|
|
||||||
==== `clock-source (tcxo|ocxo|ext|gps)`
|
|
||||||
|
|
||||||
Specify the clock source for the PHY:
|
|
||||||
|
|
||||||
tcxo::
|
|
||||||
Use the TCXO. This is the default on sysmoBTS 2050.
|
|
||||||
ocxo::
|
|
||||||
Use the OCXO (only valid on units equipped with OCXO). This is
|
|
||||||
the default on all sysmoBTS 1002/1020/1100 and SOB-BTS.
|
|
||||||
ext::
|
|
||||||
Use the external clock input.
|
|
||||||
gps::
|
|
||||||
Use the clock derived from GPS. You shouldn't use this clock
|
|
||||||
directly, but rather use the TCXO and regularly re-calibrate
|
|
||||||
against GPS.
|
|
||||||
|
|
||||||
==== `trx-calibration-path PATH`
|
|
||||||
|
|
||||||
Use calibration files from the given 'PATH', rather tan calibration
|
|
||||||
values from the EEPROM.
|
|
||||||
|
|
||||||
=== `osmo-bts-sysmo` specific control interface commands
|
|
||||||
|
|
||||||
==== trx.0.clock-info
|
|
||||||
|
|
||||||
Obtain information on the current clock status:
|
|
||||||
|
|
||||||
----
|
|
||||||
bsc_control.py -d localhost -p 4238 -g trx.0.clock-info
|
|
||||||
Got message: GET_REPLY 1 trx.0.clock-info -100,ocxo,0,0,gps
|
|
||||||
----
|
|
||||||
|
|
||||||
which is to be interpreted as:
|
|
||||||
|
|
||||||
* current clock correction value is -100 ppb
|
|
||||||
* current clock source is OCXO
|
|
||||||
* deviation between clock source and calibration source is 0 ppb
|
|
||||||
* resolution of clock error measurement is 0 ppt (0 means no result yet)
|
|
||||||
* current calibration source is GPS
|
|
||||||
|
|
||||||
When this attribute is set, any value passed on is discarded, but the clock
|
|
||||||
calibration process is re-started.
|
|
||||||
|
|
||||||
==== trx.0.clock-correction
|
|
||||||
|
|
||||||
This attribute can get and set the current clock correction value:
|
|
||||||
|
|
||||||
----
|
|
||||||
bsc_control.py -d localhost -p 4238 -g trx.0.clock-correction
|
|
||||||
Got message: GET_REPLY 1 trx.0.clock-correction -100
|
|
||||||
----
|
|
||||||
|
|
||||||
----
|
|
||||||
bsc_control.py -d localhost -p 4238 -s trx.0.clock-correction -- -99
|
|
||||||
Got message: SET_REPLY 1 trx.0.clock-correction success
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
== `osmo-bts-trx` for OsmoTRX
|
|
||||||
|
|
||||||
OsmoTRX is a C-language implementation of the GSM radio modem,
|
|
||||||
originally developed as the 'Transceiver' part of OpenBTS. This radio
|
|
||||||
modem offers an interface based on top of UDP streams.
|
|
||||||
|
|
||||||
The OsmoBTS bts_model code for OsmoTRX is called
|
|
||||||
`osmo-bts-trx`. It implements the UDP stream interface of
|
|
||||||
OsmoTRX, so both parts can be used together to implement a complete GSM
|
|
||||||
BTS based on general-purpose computing SDR.
|
|
||||||
|
|
||||||
As OsmoTRX is general-purpose software running on top of Linux, it is thus not
|
|
||||||
tied to any specific physical hardware. At the time of this writing, OsmoTRX
|
|
||||||
supports a variety of Lime Microsystems and Ettus USRP SDRs via the UHD driver,
|
|
||||||
as well as the Fairwaves UmTRX and derived products.
|
|
||||||
|
|
||||||
OsmoTRX is not a complete GSM PHY but 'just' the radio modem. This
|
|
||||||
means that all of the Layer 1 functionality such as scheduling,
|
|
||||||
convolutional coding, etc. is actually also implemented inside OsmoBTS.
|
|
||||||
|
|
||||||
As such, the boundary between OsmoTRX and `osmo-bts-trx` is at
|
|
||||||
a much lower interface, which is an internal interface of other more
|
|
||||||
traditional GSM PHY implementations.
|
|
||||||
|
|
||||||
Besides OsmoTRX, there are also other implementations (both Free
|
|
||||||
Software and proprietary) that implement the same UDP stream based radio
|
|
||||||
modem interface.
|
|
||||||
|
|
||||||
|
|
||||||
=== `osmo-bts-trx` specific VTY commands
|
|
||||||
|
|
||||||
For a auto-generated complete syntax reference of the VTY commands,
|
|
||||||
pleas see the associated _OsmoBTS VTY reference manual_
|
|
||||||
<<vty-ref-osmobts>>. The section below only lists the most important
|
|
||||||
commands.
|
|
||||||
|
|
||||||
==== at the 'SHOW' node
|
|
||||||
|
|
||||||
===== `show transceivers`
|
|
||||||
|
|
||||||
Display information about configured/connected OsmoTRX transceivers in
|
|
||||||
human-readable format to current VTY session.
|
|
||||||
|
|
||||||
==== at the 'PHY' configuration node
|
|
||||||
|
|
||||||
===== `osmotrx ip HOST`
|
|
||||||
|
|
||||||
Set the IP address for the OsmoTRX interface for both the local (OsmoBTS) and
|
|
||||||
remote (OsmoTRX) side of the UDP flows. This option has been deprecated by the
|
|
||||||
more detailed option `osmotrx ip (local|remote) A.B.C.D`.
|
|
||||||
|
|
||||||
===== `osmotrx ip (local|remote) A.B.C.D`
|
|
||||||
|
|
||||||
Set the IP address for the OsmoTRX interface for either the local (OsmoBTS) or
|
|
||||||
remote (OsmoTRX) side of the UDP flows.
|
|
||||||
|
|
||||||
===== `osmotrx base-port (local|remote) <0-65535>`
|
|
||||||
|
|
||||||
Configure the base UDP port for the OsmoTRX interface for either the
|
|
||||||
local (OsmoBTS) or remote (OsmoTRX) side of the UDP flows.
|
|
||||||
|
|
||||||
===== `osmotrx fn-advance <0-30>`
|
|
||||||
|
|
||||||
Set the number of frames to be transmitted to transceiver in advance of
|
|
||||||
current GSM frame number.
|
|
||||||
|
|
||||||
GSM is a TDMA (time division multiple access) system on the radio
|
|
||||||
interface. OsmoTRX is the "clock master" of that in the Osmocom
|
|
||||||
implementation. It informs OsmoBTS of the current GSM frame
|
|
||||||
number. However, as there is non-zero delays (UDP packet transmission
|
|
||||||
delay, operating system scheduler delay on both OsmoTRX and OsmoBTS
|
|
||||||
side, ...), OsmoBTS must compensate for that delay by "advancing"
|
|
||||||
the clock a certain amount of time.
|
|
||||||
|
|
||||||
In other words, if OsmoTRX informs us that the current frame number is N,
|
|
||||||
we advance it by `fn-advance` and transmit burst data for
|
|
||||||
`N + fn-advance` towards OsmoTRX.
|
|
||||||
|
|
||||||
The fn-advance should be kept as low as possible to avoid additional
|
|
||||||
delays to the user voice plane as well as to improve the performance
|
|
||||||
of the control plane (LAPDm) as well as GPRS.
|
|
||||||
|
|
||||||
However, fn-advance must be kept sufficiently high to ensure no
|
|
||||||
underruns on the OsmoTRX side.
|
|
||||||
|
|
||||||
The detailed value will depend on your underlying computer systems,
|
|
||||||
operating system and related tuning parameters. Running OsmoTRX
|
|
||||||
on a remote host will inevitably require a higher fn-advance than
|
|
||||||
running it on the same machine, where the UDP packets are just passed
|
|
||||||
over the loopback device.
|
|
||||||
|
|
||||||
The default value for `fn-advance` is 2 (corresponding to 9.2 milliseconds).
|
|
||||||
|
|
||||||
===== `osmotrx rts-advance <0-30>`
|
|
||||||
|
|
||||||
Set the number of frames to be requested from L1SAP in advance of current
|
|
||||||
frame number and fn-advance.
|
|
||||||
|
|
||||||
The value specified as `rts-advance` is added to the current GSM frame
|
|
||||||
number as reported by OsmoTRX *and* the `osmotrx fn-advance` in order
|
|
||||||
to generate the PH-RTS.ind (ready to send indications) across the L1SAP
|
|
||||||
interface inside osmo-bts. This will trigger the Layer 2 (LAPDm for
|
|
||||||
the control plane, RTP for the voice plane, and OsmoPCU for GPRS) to
|
|
||||||
generate a MAC block and input it into the osmo-bts-trx TDMA scheduler.
|
|
||||||
|
|
||||||
If OsmoTRX reported N as the current frame number, the actual frame number
|
|
||||||
reported on L1SAP to higher layers will be computed as follows:
|
|
||||||
|
|
||||||
N + fn-advance + rts-advance
|
|
||||||
|
|
||||||
The default value of `rts-advance` is 3 (corresponding to 14 milliseconds).
|
|
||||||
Do not change this unless you have a good reason!
|
|
||||||
|
|
||||||
===== `osmotrx rx-gain <0-50>`
|
|
||||||
|
|
||||||
Set the receiver gain (configured in the hardware) in dB.
|
|
||||||
|
|
||||||
===== `osmotrx tx-attenuation <0-50>`
|
|
||||||
|
|
||||||
Set the transmitter attenuation (configured in the hardware) in dB.
|
|
||||||
|
|
||||||
===== `osmotrx tx-attenuation oml`
|
|
||||||
|
|
||||||
Use the Value in the A-bis OML Attribute `MAX_POWER_REDUCTION` as
|
|
||||||
transmitter attenuation.
|
|
||||||
|
|
||||||
==== at the 'PHY Instance' configuration node
|
|
||||||
|
|
||||||
===== `slotmask (1|0) (1|0) (1|0) (1|0) (1|0) (1|0) (1|0) (1|0)`
|
|
||||||
|
|
||||||
Configure which timeslots should be active on this TRX. Normally all
|
|
||||||
timeslots are enabled, unless you are running on a cpu-constrained
|
|
||||||
deeply embedded system.
|
|
||||||
|
|
||||||
===== `osmotrx maxdly <0-31>`
|
|
||||||
|
|
||||||
Set the maximum delay for received symbols (in number of GSM symbols).
|
|
||||||
|
|
||||||
|
|
||||||
== `osmo-bts-octphy` for Octasic OCTPHY-2G
|
|
||||||
|
|
||||||
The Octasic OCTPHY-2G is a GSM PHY implementation inside an Octasic
|
|
||||||
proprietary 24-core DSP called OCTDSP.
|
|
||||||
|
|
||||||
This DSP has a built-in Gigabit Ethernet interface, over which it
|
|
||||||
exchanges PHY-layer primitives in raw Ethernet frames with the upper
|
|
||||||
layers running on another CPU attached to the same Ethernet. Those
|
|
||||||
primitives are described in a set of C-language header files.
|
|
||||||
|
|
||||||
OsmoBTS implements the raw Ethernet frame based primitives as well as
|
|
||||||
the associated transport protocol (OKTPKT/OCTVC1) in the
|
|
||||||
`osmo-btso-octphy` bts_model code.
|
|
||||||
|
|
||||||
You can run the `osmo-bts-octphy` on any system connected to the same
|
|
||||||
Ethernet as the OCTDSP running the OCTPHY. This can be either an
|
|
||||||
embedded ARM or x86 SoM part of the OCTBTS hardware, or it can be any
|
|
||||||
other Linux system attached via an Ethernet switch.
|
|
||||||
|
|
||||||
Each OCTDSP running OCTSDR-2G offers a set of primitives part of a
|
|
||||||
OCTPKT session, which is mapped to an OsmoBTS PHY link. Depending on
|
|
||||||
the OCTSDR-2G software version, you may create multiple software TRX by
|
|
||||||
creating multiple OsmoBTS PHY instances inside that PHY link.
|
|
||||||
|
|
||||||
Multiple DSPs may exist in one circuit board, then each of the DSPs is
|
|
||||||
interfaced by one OsmoBTS PHY link, and each of them may have one or
|
|
||||||
more OsmoBTS PHY instances creating a Multi-TRX configuration.
|
|
||||||
|
|
||||||
|
|
||||||
== `osmo-bts-litecell15` for Nutaq/Nuran LiteCell 1.5
|
|
||||||
|
|
||||||
The Nutaq/Nuran LiteCell 1.5 implements a dual-transceiver GSM BTS based
|
|
||||||
on a mixed ARM/DSP/FPGA architecture. The PHY layer is implemented on
|
|
||||||
DSP/FPGA and similar to that of the sysmoBTS: It exchanges primitives
|
|
||||||
described in a set of C-language header files over message queues
|
|
||||||
between the ARM and the DSP.
|
|
||||||
|
|
||||||
This interface is implemented in the `osmo-bts-litecell15` bts_model of
|
|
||||||
OsmoBTS. You would run `osmo-bts-litecell15` on the ARM/Linux processor
|
|
||||||
of the Litecell 1.5.
|
|
||||||
|
|
||||||
The two transceivers of the Litecell 1.5 each have their own set of DSP
|
|
||||||
message queues. Each set of message queues is wrapped into one OsmoBTS
|
|
||||||
PHY link, offering one OsmoBTS PHY instance.
|
|
||||||
|
|
||||||
The Litecell 1.5 PHY supports a direct PHY interface to OsmoPCU,
|
|
||||||
reducing the latency and amount of primitives that OsmoBTS would
|
|
||||||
otherwise need to pass through from the PHY message queues to the PCU
|
|
||||||
socket and vice-versa.
|
|
||||||
|
|
||||||
=== `osmo-bts-trx` specific VTY commands
|
|
||||||
|
|
||||||
For a auto-generated complete syntax reference of the VTY commands,
|
|
||||||
please see the associated _OsmoBTS VTY reference manual_
|
|
||||||
<<vty-ref-osmobts>>. The section below only lists the most important
|
|
||||||
commands.
|
|
||||||
|
|
||||||
==== at the 'SHOW' node
|
|
||||||
|
|
||||||
===== `show phy <0-255> system-information`
|
|
||||||
|
|
||||||
Show information about the hardware platform, DSP and OCTPHY-2G software
|
|
||||||
version.
|
|
||||||
|
|
||||||
===== `show phy <0-255> rf-port-stats <0-1>`
|
|
||||||
|
|
||||||
Show information about the RF port interfaces.
|
|
||||||
|
|
||||||
===== `show phy <0-255> clk-sync-stats`
|
|
||||||
|
|
||||||
Show information about the clock synchronization manager.
|
|
||||||
|
|
||||||
==== at the 'PHY' configuration node
|
|
||||||
|
|
||||||
===== `octphy hw-addr HWADDR`
|
|
||||||
|
|
||||||
Specify the Ethernet hardware address (mac address) of the DSP running
|
|
||||||
the OCTPHY-2G software for this PHY link.
|
|
||||||
|
|
||||||
===== `octphy net-device NAME`
|
|
||||||
|
|
||||||
Specify the Ethernet network device (like `eth0`) through which the DSP
|
|
||||||
can be reached from OsmoBTS.
|
|
||||||
|
|
||||||
===== `octphy rf-port-index <0-255>`
|
|
||||||
|
|
||||||
Specify which RF port should be used for this PHY link.
|
|
||||||
|
|
||||||
===== `octphy rx-gain <0-73>`
|
|
||||||
|
|
||||||
Configure the receiver gain in dB.
|
|
||||||
|
|
||||||
===== `octphy tx-attenuation <0-359>`
|
|
||||||
|
|
||||||
Configure the transmitter attenuation in quarter-dB
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
== `osmo-bts-virtual` for Virtual Um Interface
|
|
||||||
|
|
||||||
This is a special BTS model used for research, simulation and testing.
|
|
||||||
Rather than communicating over a wireless RF interface, the GSM Um
|
|
||||||
messages are encapsulated over GSMTAP/UDP/IP.
|
|
||||||
|
|
||||||
The Virtual Um interface (i.e. virtual radio layer) between OsmoBTS and
|
|
||||||
OsmocomBB allows us to run a complete GSM network with 1-N BTSs and 1-M
|
|
||||||
MSs without any actual radio hardware, which is of course excellent for
|
|
||||||
all kinds of testing scenarios.
|
|
||||||
|
|
||||||
The Virtual Um layer is based on sending L2 frames (blocks) encapsulated
|
|
||||||
via GSMTAP UDP multicast packets. There are two separate multicast
|
|
||||||
groups, one for uplink and one for downlink. The multicast nature
|
|
||||||
simulates the shared medium and enables any simulated phone to receive
|
|
||||||
the signal from multiple BTSs via the downlink multicast group.
|
|
||||||
|
|
||||||
In OsmoBTS, this is implemented via the `osmo-bts-virtual` BTS model.
|
|
||||||
|
|
||||||
Setting up OsmoBTS in its `osmo-bts-virtual` flavor isn't really much
|
|
||||||
different from setting it up with real hardware. The amount of required
|
|
||||||
configuration at the BTS configuration file is (as always) very minimal,
|
|
||||||
as in the GSM network architecture provides almost all relevant
|
|
||||||
configuration to the BTS from the BSC.
|
|
||||||
|
|
||||||
An example configuration file is provided as part of the osmo-bts source
|
|
||||||
code: `doc/examples/virtual/osmobts-virtual.cfg`
|
|
||||||
|
|
||||||
For more information see
|
|
||||||
http://osmocom.org/projects/cellular-infrastructure/wiki/Virtual_Um
|
|
||||||
|
|
||||||
=== `osmo-bts-virtual` specific VTY commands
|
|
||||||
|
|
||||||
For a auto-generated complete syntax reference of the VTY commands,
|
|
||||||
please see the associated _OsmoBTS VTY reference manual_
|
|
||||||
<<vty-ref-osmobts>>. The section below only lists the most important
|
|
||||||
commands.
|
|
||||||
|
|
||||||
==== at the 'PHY' config node
|
|
||||||
|
|
||||||
===== `virtual-um net-device NETDEV`
|
|
||||||
|
|
||||||
Configure the network device used for sending/receiving the virtual Um
|
|
||||||
interface messages (e.g. `eth0`).
|
|
||||||
|
|
||||||
===== `virtual-um ms-udp-port <0-65535>`
|
|
||||||
|
|
||||||
Configure the UDP port used for sending virtual Um
|
|
||||||
downlink messages towards the MS (default: GSMTAP 4729).
|
|
||||||
|
|
||||||
===== `virtual-um ms-multicast-group GROUP`
|
|
||||||
|
|
||||||
Configure the IP multicast group used for sending virtual
|
|
||||||
Um downlink messages towards the MS (default: 239.193.23.1)
|
|
||||||
|
|
||||||
===== `virtual-um bts-udp-port <0-65535>`
|
|
||||||
|
|
||||||
Configure the UDP port used for receiving virtual Um
|
|
||||||
uplink messages from the MS (default: GSMTAP 4729).
|
|
||||||
|
|
||||||
===== `virtual-um bts-multicast-group GROUP`
|
|
||||||
|
|
||||||
Configure the IP multicast group used for receiving virtual
|
|
||||||
Um uplink messages from the MS (default: 239.193.23.2)
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
== BTS Configuration
|
|
||||||
|
|
||||||
The role of the BTS is to handle the GSM radio interface. When the BTS
|
|
||||||
application is starting, the A-bis OML connection is established towards
|
|
||||||
the BSC. Almost all BTS configuration (such as ARFCN, channel
|
|
||||||
configuration, transmit power, etc.) will be sent from the BSC to the
|
|
||||||
BTS via OML messages. After OML start-up has completed, the BSC will
|
|
||||||
instruct the BTS to establish the RSL connections.
|
|
||||||
|
|
||||||
Given that most configuration is downloaded from the BSC into the BTS at
|
|
||||||
start-up time, only some very basic settings have to be made in the
|
|
||||||
OsmoBTS software.
|
|
||||||
|
|
||||||
|
|
||||||
=== Command Line Options
|
|
||||||
|
|
||||||
The OsmoBTS executables (`osmo-bts-sysmo`, `osmo-bts-trx`,
|
|
||||||
`osmo-bts-octphy`, `osmo-bts-litecell15`, ...) share the following
|
|
||||||
generic command line options:
|
|
||||||
|
|
||||||
==== SYNOPSIS
|
|
||||||
*osmo-bts-sysmo* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE' ] [-s] [-T] [-e 'LOGLEVEL']
|
|
||||||
|
|
||||||
==== OPTIONS
|
|
||||||
*-h, --help*::
|
|
||||||
Print a short help message about the supported options
|
|
||||||
*-V, --version*::
|
|
||||||
Print the compile-time version number of the OsmoBTS program
|
|
||||||
*-d, --debug 'DBGMASK','DBGLEVELS'*::
|
|
||||||
Set the log subsystems and levels for logging to stderr. This
|
|
||||||
has mostly been superseded by VTY-based logging configuration,
|
|
||||||
see <<logging>> for further information.
|
|
||||||
*-D, --daemonize*::
|
|
||||||
Fork the process as a daemon into background.
|
|
||||||
*-c, --config-file 'CONFIGFILE'*::
|
|
||||||
Specify the file and path name of the configuration file to be
|
|
||||||
used. If none is specified, use `osmo-bts.cfg` in the current
|
|
||||||
working directory.
|
|
||||||
*-s, --disable-color*::
|
|
||||||
Disable colors for logging to stderr. This has mostly been
|
|
||||||
deprecated by VTY based logging configuration, see <<logging>>
|
|
||||||
for further information.
|
|
||||||
*-T, --timestamp*::
|
|
||||||
Enable time-stamping of log messages to stderr. This has mostly
|
|
||||||
been deprecated by VTY based logging configuration, see
|
|
||||||
<<logging>> for further information.
|
|
||||||
*-e, --log-level 'LOGLEVEL'*::
|
|
||||||
Set the global log level for logging to stderr. This has mostly
|
|
||||||
been deprecated by VTY based logging configuration, see
|
|
||||||
<<logging>> for further information.
|
|
||||||
|
|
||||||
There may be additional, hardware specific command line options by the
|
|
||||||
different bts_model implementations.
|
|
||||||
|
|
||||||
|
|
||||||
=== Configuration using the VTY
|
|
||||||
|
|
||||||
Most configuration as well as run-time monitoring and system
|
|
||||||
introspection is implemented using a command-line based interface
|
|
||||||
called _VTY_. A full reference syntax of all existing VTY command is
|
|
||||||
available as a separate document.
|
|
||||||
|
|
||||||
See <<vty>> for further information on the VTY.
|
|
||||||
|
|
||||||
|
|
||||||
==== Required BTS/TRX configuration
|
|
||||||
|
|
||||||
There are some settings that have to be configured locally in the
|
|
||||||
sysmoBTS, as they cannot be set remotely from the BSC. Those
|
|
||||||
settings are stored in the OsmoBTS configuration file, which commonly
|
|
||||||
is stored in `/etc/osmocom/osmo-bts.cfg`.
|
|
||||||
|
|
||||||
.Example Minimal configuration file
|
|
||||||
----
|
|
||||||
!
|
|
||||||
! OsmoBTS (0.0.1.100-0455) configuration saved from vty
|
|
||||||
!!
|
|
||||||
!
|
|
||||||
phy 0 <1>
|
|
||||||
instance 0 <2>
|
|
||||||
bts 0 <3>
|
|
||||||
band DCS1800
|
|
||||||
ipa unit-id 1801 0 <4>
|
|
||||||
oml remote-ip 192.168.100.11 <5>
|
|
||||||
trx 0 <6>
|
|
||||||
phy 0 instance 0 <7>
|
|
||||||
----
|
|
||||||
<1> You must configure at least one PHY link by means of the PHY node
|
|
||||||
<2> You must configure at least one PHY instance in the PHY link
|
|
||||||
<3> There is always exactly one BTS (`bts 0`) configured in OsmoBTS
|
|
||||||
<4> The `ipa unit-id` is what is used to identify this BTS to the BSC
|
|
||||||
<5> The OML Remote IP is the IP address of the BSC, to which the BTS shall connect to.
|
|
||||||
<6> There must be at least one trx (`trx 0`) in each BTS
|
|
||||||
<7> Every TRX must be mapped to a specific PHY instance this way
|
|
||||||
|
|
||||||
For a full reference of all available VTY configuration parameters,
|
|
||||||
please refer to the OsmoBTS VTY Reference document.
|
|
||||||
|
|
||||||
[[gsmtap]]
|
|
||||||
==== Configuring GSMTAP tracing
|
|
||||||
|
|
||||||
In addition to being able to obtain pcap protocol traces of the A-bis
|
|
||||||
communication and the text-based logging from the OsmoBTS
|
|
||||||
software, there is also the capability of tracing all communication on
|
|
||||||
the radio interface. To do so, OsmoBTS can encapsulate
|
|
||||||
MAC blocks (23byte messages at the L2-L1 interface) into _GSMTAP_ and send
|
|
||||||
them via UDP/IP. At that point, they can be captured with utilities like
|
|
||||||
*tcpdump* or *tshark* for further analysis by the *wireshark* protocol
|
|
||||||
analyzer.
|
|
||||||
|
|
||||||
In order to activate this feature, you first need to make sure to specify
|
|
||||||
the remote address of _GSMTAP_ host in the configuration file. In most
|
|
||||||
cases, using 127.0.0.1 for passing the messages over the loopback (`lo`)
|
|
||||||
device will be sufficient:
|
|
||||||
|
|
||||||
.Example: Enabling GSMTAP Um-frame logging to localhost
|
|
||||||
----
|
|
||||||
bts 0
|
|
||||||
gsmtap-remote-host 127.0.0.1 <1>
|
|
||||||
----
|
|
||||||
<1> Destination address for _GSMTAP_ Um-frames
|
|
||||||
|
|
||||||
NOTE: Changing this parameter at run-time will not affect the existing
|
|
||||||
_GSMTAP_ connection, full program restart is required.
|
|
||||||
|
|
||||||
NOTE: Command line parameters `-i` and `--gsmtap-ip` have been deprecated.
|
|
||||||
|
|
||||||
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
|
|
||||||
_OsmoBTS VTY reference manual_ <<vty-ref-osmobts>>.
|
|
||||||
|
|
||||||
For example, to enable GSMTAP tracing for messages on all SDCCH
|
|
||||||
channels, you can use the gsmtap-sapi sdcch command at the CONFIG TRX
|
|
||||||
node of the OsmoBTS VTY.
|
|
||||||
|
|
||||||
.Example: Enabling GSMTAP for SDCCH
|
|
||||||
----
|
|
||||||
OsmoBTS> enable
|
|
||||||
OsmoBTS# configure terminal
|
|
||||||
OsmoBTS(config)# bts 0
|
|
||||||
OsmoBTS(bts)# gsmtap-sapi sdcch
|
|
||||||
OsmoBTS(trx)# write <1>
|
|
||||||
----
|
|
||||||
<1> the `write` command will make the configuration persistent in the
|
|
||||||
configuration file. This is not required if you wish to enable GSMTAP
|
|
||||||
only in the current session of OsmoBTS.
|
|
||||||
|
|
||||||
De-activation can be performed similarly by using the `no gsmtap-sapi
|
|
||||||
sdcch` command at the `bts` node of the OsmoBTS VTY.
|
|
||||||
|
|
||||||
It may be useful to enable all SAPIs with a few exceptions, or vice versa
|
|
||||||
disable everything using one command. For this purpose, the VTY provides
|
|
||||||
`gsmtap-sapi enable-all` and `gsmtap-sapi disable-all` commands.
|
|
||||||
|
|
||||||
.Example: Enabling all SAPIs except PDTCH and PTCCH
|
|
||||||
----
|
|
||||||
bts 0
|
|
||||||
gsmtap-sapi enable-all <1>
|
|
||||||
no gsmtap-sapi pdtch <2>
|
|
||||||
no gsmtap-sapi ptcch <2>
|
|
||||||
----
|
|
||||||
<1> Enable all available SAPIs
|
|
||||||
<2> Exclude PDTCH and PTCCH SAPIs
|
|
||||||
|
|
||||||
From the moment they are enabled via VTY, GSMTAP messages will be
|
|
||||||
generated and sent in UDP encapsulation to the IANA-registered UDP port
|
|
||||||
for GSMTAP (4729) of the specified remote address.
|
|
||||||
|
|
||||||
==== Configuring power ramping
|
|
||||||
|
|
||||||
OsmoBTS can ramp up the power of its trx over time. This helps reduce
|
|
||||||
cell congestion in busy environments.
|
|
||||||
|
|
||||||
Some models of OsmoBTS (such as osmo-bts-trx) also support ramping down the
|
|
||||||
transmit power over time until finally ceasing broadcast, for instance due to a
|
|
||||||
trx becoming administratively locked or due to the whole BTS being gracefully
|
|
||||||
shut down. This allows for mobile stations camping on the cell to gradually move
|
|
||||||
to other cells in the area once the signal drop is detected.
|
|
||||||
|
|
||||||
In this example, the trx starts with 5dBm output power which increases by 1dB
|
|
||||||
every two seconds until it reaches nominal power.
|
|
||||||
Power ramping can use the power-ramp commands at the CONFIG TRX node of the
|
|
||||||
OsmoBTS VTY.
|
|
||||||
|
|
||||||
.Example: Configure power ramping on trx 0
|
|
||||||
----
|
|
||||||
OsmoBTS> enable
|
|
||||||
OsmoBTS# configure terminal
|
|
||||||
OsmoBTS(config)# bts 0
|
|
||||||
OsmoBTS(bts)# trx 0
|
|
||||||
OsmoBTS(trx)# power-ramp max-initial 5 dBm
|
|
||||||
OsmoBTS(trx)# power-ramp step-size 1 dB
|
|
||||||
OsmoBTS(trx)# power-ramp step-interval 2
|
|
||||||
OsmoBTS(trx)# write <1>
|
|
||||||
----
|
|
||||||
<1> the `write` command will make the configuration persistent in the
|
|
||||||
configuration file.
|
|
||||||
|
|
||||||
De-activating power-ramping can be performed by setting the max-initial value
|
|
||||||
to the nominal power. The default max-initial value is 23 dBm.
|
|
||||||
|
|
||||||
|
|
||||||
==== Running multiple instances
|
|
||||||
|
|
||||||
It is possible to run multiple instances of `osmo-bts` on one and the same
|
|
||||||
machine, if the phy-interface is flexible enough to distinguish between
|
|
||||||
different phy hardware interfaces.
|
|
||||||
|
|
||||||
Since usually a BTS instance runs in conjunction with a dedicated PCU instance,
|
|
||||||
the socket path between PCU and BTS has to be distinguished between the running
|
|
||||||
instances. It is possible to change the default socket path via VTY config:
|
|
||||||
|
|
||||||
.Example: Personalize PCU socket path
|
|
||||||
----
|
|
||||||
bts 0
|
|
||||||
pcu-socket /tmp/pcu_bts_2
|
|
||||||
----
|
|
||||||
|
|
||||||
It is also necessary to separate the VTY anc CTRL interfaces of the different
|
|
||||||
instances. The VTY, as well as the CTRL interface can be bound to a free IP
|
|
||||||
address from the loopback range:
|
|
||||||
|
|
||||||
.Example: Binding VTY and CTRL interface to a specific IP address
|
|
||||||
----
|
|
||||||
line vty
|
|
||||||
bind 127.0.0.2
|
|
||||||
ctrl
|
|
||||||
bind 127.0.0.2
|
|
||||||
----
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
[[control]]
|
|
||||||
== Control interface
|
|
||||||
|
|
||||||
The actual protocol is described in <<common-control-if>>, the variables
|
|
||||||
common to all programs using it are described in <<ctrl_common_vars>>. Here we
|
|
||||||
describe variables specific to OsmoBTS. The commands starting with prefix
|
|
||||||
"net.btsN." are specific to a certain BTS so N have to be replaced with BTS
|
|
||||||
number when issuing command. Similarly the
|
|
||||||
TRX-specific commands are additionally prefixed with TRX number e. g.
|
|
||||||
"net.bts1.trx2.thermal-attenuation".
|
|
||||||
|
|
||||||
|
|
||||||
.Variables available over control interface
|
|
||||||
[options="header",width="100%",cols="20%,5%,5%,50%,20%"]
|
|
||||||
|===
|
|
||||||
|Name|Access|Trap|Value|Comment
|
|
||||||
|net.btsN.trxM.thermal-attenuation|RW|No|integer|See <<ther>> for details.
|
|
||||||
|===
|
|
||||||
|
|
||||||
[[ther]]
|
|
||||||
=== thermal-attenuation
|
|
||||||
|
|
||||||
Allowed SET value for thermal attenuation is between 0 to 40 dB. Note: the value
|
|
||||||
is SET in dB units but GET will return value in mdB units used internally.
|
|
||||||
@@ -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
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user