Commit Graph

14 Commits

Author SHA1 Message Date
Oliver Smith 258856b329 Cosmetic: virtual: l1sap.c: fix typos
Change-Id: Id24e75812bda17e99f17a37b367462533a5607f9
2019-08-23 11:58:19 +02:00
Harald Welte acefd0586e L1SAP: Increase resolution of reported burst timing
Before this patch we had:
* osmo-bts-trx internally using 1/256th bit/symbol period
* osmo-bts-sysmo internally using 1/4 bit/smbol period
* PCU interface using 1/4
* L1SAP interface using 1/4
* measurement processing code on top of L1SAP using 1/256

So for sysmo/lc15/octphy we are not loosing resolution, but for
osmo-bts-trx we're arbitrarily reducing the resolution via L1SAP
only then to compute with higher resolution again.

Let's change L1SAP to use 1/256 bits and hence not loose any resolution.
This requires a corresponding change in libosmocore for l1sap.h, which
is found in Change-Id Ibb58113c2819fe2d6d23ecbcfb8b3fce4055025d

Change-Id: If9b0f617845ba6c4aa47969f521734388197c9a7
2018-02-27 20:00:16 +01:00
Harald Welte 232f53adf0 osmo-bts-virtual: Make sure PRIM_INFO_MEAS have non-zero frame number
Measurement reports fed into L1SAP so far had their frame number always
set to zero, resulting in higher-layer common code above L1SAP to never
detect the end of the measurement period, which in turn caused no RSL
MEAS REP to be sent.

Related: OS#2978
Change-Id: I67837d19515ea335614928570c12dd5027104c6b
2018-02-23 14:05:51 +00:00
Harald Welte 6eb3752511 Introduce + use LOG/DEBUGP with frame number prefixing/printing
Let's make sure whenever we do have a frame number, we print it as
context in the related log line

Change-Id: I751d5ddb3322fce489bc241459738cbcc55c890b
2018-02-22 12:31:48 +01:00
Harald Welte 22c07d1f1f osmo-bts-virtual: Generate PRIM_INFO_MEAS (with bogus values)
The problem is that measurement processing above L1SAP requires/expects
those PRIM_INFO_MEAS indications from the bts specific parts.  Otherwise
it will never generate even uplink-only measurement reports to the BSC,
which is a violation of Abis protocol specs.

Change-Id: I48f73293cb4f0ab4c657dfd00e7ddd032a3c030f
2018-02-22 12:11:28 +01:00
Harald Welte 04719d19b9 osmo-bts-virtual: Shut down gracefully on socket creation failure
Don't simply crash if creation of the multicast socket fails

Change-Id: Ie87b6684b3aa7f21742e4cf21533e980485c1230
2018-02-22 12:11:28 +01:00
Pau Espin f9d19ee85c virtual: l1_if.c: Remove unneeded warning message
Commit 5eb17e28ac added this warning when
implementing the full function. However, other backends seem to be also
passing the primitive from the stack to l1sap_up without any visible issues.
Furthermore, according to the documentation of l1sap_up, it takes ownership of the
msgb, but doesn't take ownserhip of the prim itself.

Change-Id: I45fe40e3377eac999d1dac5356678195381d94ca
2018-02-05 12:36:41 +01:00
Harald Welte d1f8001cdf VIRT-BTS: Support for GPRS
Change-Id: Id851578c53255866537a16a0be6c3e9268e6ccbc
2017-08-09 10:02:33 +00:00
Harald Welte d6da809d2f TRX / VIRT-PHY: Make check for BCCH/CCCH more specific
In bts_model_l1sap_down() we want to identify BCCH/CCCH channel numbers,
but our check is a bit non-specific.  Let's make the check more specific
to only cover the BCCH, Uplink CCCH and Downlink CCCH C-bits as defined
n 3GPP TS 08.58 Section 9.3.1

Change-Id: Ia20ab09b96c87c0dfbfaf98e5b2a8d36423fac67
2017-07-30 17:38:37 +02:00
Harald Welte d7546ed090 VIRT-PHY: Report virtual RACH bursts with plausible burst type
Change-Id: I35b103c512993fc52d4e608f07115a4bb4b21022
2017-07-19 16:02:25 +02:00
Harald Welte f66d2fc1e6 virt: Don't print NOTICE log message if ARFCN doesn't match
In a larger simulated network with multiple BTSs it is normal that one
BTS will see GSMTAP frames for an ARFCN that is not an ARFCN used by the
local BTS.  This is just normal operation.

Change-Id: Ic68cace9648ccb17500c94b6ede8814674aa9c29
2017-07-19 16:02:25 +02:00
Harald Welte 576408b651 VIRT-PHY: cause BTS to terminate in case of recv()/send() on udp socket returns 0
It is important that we reliably terminate the BTS in case any of the
VirtPHY multicast sockets dies for whatever reason.

Change-Id: I5ae3fdd7cc35fdf235550a3b8362020fdd287c13
2017-07-13 21:35:33 +02:00
Harald Welte 3cda4ff532 VIRT-PHY: Fix handling of default values for vty configuration
The defaults must be set during bts_model_phy_link_set_defaults()
and can then later be overridden by the vty (from the config file).

They should only be written back to the file if they differ from
the default settings.

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

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

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

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

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

Change-Id: I1bf7670975b1e367c1c62983020865a043542622
2017-07-13 19:34:17 +00:00