Currently the channel combination II is used for TCH/H, which
allows only one lchan to be allocated. The reason is that it
saves a bit of CPU by disabling UL burst detection on lchan 1.
There is also the channel combination III, which allows to
increase channel capacity, providing two lchans on a single
TCH/H timeslot.
Ideally we should implement some dynamic II <-> III switching
depending on the network load level. But for now this change
replaces the channel combination of TCH/H by III, until dynamic
switching is implemented.
Fixes issue: https://osmocom.org/issues/1795
Change-Id: I8fd4abb42c153fcd26bcfe22a2554b5c2d02d810
* DTXu: don't set marker for broken frames
* do not attempt to send 0-length bursts to avoid flood of errors after
bts startup
Change-Id: Icb536f951386b9abe34c0dacbb203f3db1e41bb3
This issue occurs in case of osmo-trx restart which leads to losing clock from osmo-trx.
Function bts_shutdown from common/bts.c should be used in this case for proper bts shutdown.
Change-Id: Ie65cf2e8f98cb8bf3314a00048aa53c1f8cd4c25
This issue occurs in case of osmo-nitb restart which leads to abis connection closure.
Function bts_shutdown from common/bts.c should be used in this case for proper bts shutdown.
Change-Id: Id025e703dd5c91896d450d200e88e46552f178f0
According to Table 4 in 3GPP TS 45.003 j=11, b=3 case corresponds to
k=91 and not j=12 as was previously used.
Change-Id: Iad3cf545b2f7e16276466cc37dd7a1e7858467e5
pinst->u.osmotrx.hdl should be allocated before reading phy_instance parameters from config file and applying them.
So allocation of pinst->u.osmotrx.hdl should be moved from l1if_open function to bts_model_phy_instance_set_defaults function,
which is proper place for this allocation according to start-up procedure of osmo-bts.
Change-Id: I6e23f92644400acb268818c9373a8fb10c003da1
Move rxgain and tx-attenuation (power) parameters from phy_link layer to phy_inst layer.
Rxgain and tx-attenuation parameters should be set for each phy_inst and send for each osmo-trx channel accordingly via control commands.
Change-Id: I4861a59d10d1ef91954e0c6ea265e66dec08844f
Use chan_nr for deactivating lchan instead of lchan->nr: chan_nr is the
RSL Channel Number IE value, a bitfield aggregation of lchan type
bits (cbits) and lchan number (lowest three bits). The error was
introduced in 36153239bf.
Change-Id: I6dd7060422ab9d18743c1ff2ab419e3e7299d74d
Previously if multiply phy instances were configured but not used
osmo-bts-trx would segfault. Terminate with clear error message instead
so user can correct configuration. Example configuration which caused
problem:
...
phy 0
instance 0
instance 1
...
trx 0
phy 0 instance 0
Note the 2nd instance of phy 0 which is not used in trx later on.
Change-Id: Id979506731ea92401458f1060e87aeb690901539
Remove lchan deactivation related code duplication to facilitate future
use for dynamic CCCH re-activation.
Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9
Originally `maxdly` command in osmo-trx was contrlling max TA for Normal Bursts.
This was not a proper behaviour, because it was used to "control maximum
distance a handset can attach from" which is controlled by Access Bursts max TA.
Osmo-trx was corrected to apply `maxdly` to Access Bursts and a new command was
introduced to contrl max TA for Normal Bursts - `maxdlynb`. This patch adds
support for this configuration command into osmo-bts-trx.
If you wonder why would you need that - some test equipment (namely R&S CMD57)
has really bad timing sync and can generate signal a few symbols off. That
prevents osmo-trx from properly receiving otherwise perfectly good bursts
generated by CMD57. This configuration is a solution for this.
Change-Id: Ib5d255299668ac1ef9f0ce95e016f55ba3c82277
The parameters related to support 11bit RACH are initialized in
osmo-trx. These parameter determaine the type of the RACH received
in osmo-pcu.
Change-Id: I164d449303373d0757719d5204f4716975fb517a
SDCCH occupy lchan 0..3 in combined configuration so for CCCH we've
always used lchan[4] - replace it with CCCH_LCHAN define and add
comment.
Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0
Apply similar fixes as for TCH/F_PDCH also for TCH/F_TCH/H_PDCH:
Detect dyn TS in PDCH mode in ts_is_pdch().
In trx_set_ts(), enhance the "if (TCH_F_PDCH)" to a switch statement including
both dynamic channel types. Adjust the comment to include both kinds.
Change-Id: I6669739cd08780cd9ffb9451cdae9f6b9704c4fe
It is not an exceptional situation if the air-interface is experiencing
non-recoverable decoding errors. At bad signal conditions and/or
interference, this is perfectly normal. Let's use DEBUG instead of
NOTICE log level.
Change-Id: Ifd39c53ec22f57cdb5299e5d76ff6ff1482d3beb
As the ARFCN numbers in DCS (1800) and PCS (1900) are not unique,
we need to specify the band in the upper bits of the ARFCN value before
calling gsm_arfcn2freq10().
Change-Id: I637b76bc1fc749eed8e364412d76606589991c02
Fill in values for BER, BTO, Link quality in L1SAP and send them to
PCU. Note: this increases the version of BTS <-> PCU protocol. It also
requires corresponding changes in libosmocore.
All BTS models provide measurements data unless direct DSP access for
PCU is enabled. For BTS-specific notes see below.
Octphy: conversion from sSNRDb to Link Quality uses formulae which works
in practice instead of what's documented for sSNRDb value. Subject to
change in future revisions.
TRX: C / I link quality estimator is not computed.
Change-Id: Ic9693a044756fb1c7bd2ff3cfa0db042c3c4e01c
Related: OS#1616
Allow output of encoded bit count or error count on BER calculation
without requiring both pointers to exist.
Change-Id: I2c78fa6a92a3b3da4aad8f70353e5a43451b0aa5
Fixes: Coverity CID 137963
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
bts_model_ts_disconnect() has nothing to do.
bts_model_ts_connect() merely sets the new pchan on the ts.
Change-Id: Ieb66935d6efc26854e95d238e810c4f8b16cfa88
To be able to set a specific pchan type for dynamic channels, have the
trx_set_ts_as_pchan() function with an explicit pchan argument instead of
using ts->pchan.
Keep trx_set_ts() as a thin wrapper to use ts->pchan directly.
Change-Id: I9eeef05d2a6763f86a5b89ee7c3b4211f6736e4d
Existing interfaces are coded with the implicit expectation of using
a burst sequence length of 148, which is constant with GSM and GPRS.
That changes with EGPRS, where the burst length may be 444 due to
the use of 8-PSK instead of GMSK modulation.
Setup the interface to accept and return a length value with the
burst sequence. This allows 444 length bit vectors to/from the
EGPRS decoder/encoder. Length is explicitly used as a identifier for
8-PSK vs. GMSK modulated sequences.
Change-Id: I90b46b46b11b6ce280e7f8232d5a2fccec2d4f18
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Handles uplink decoding and downlink encoding procedures for MCS 1-9.
Includes Type 1, 2, and 3 headers and tables from 3GPP TS 44.060 in
order to independently recover coding and puncturing scheme (CPS)
parameters for each coded message.
Change-Id: I0f059ae34c6f36179553cbc972f8becf8179eb55
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Includes EGPRS specific convolutional codes, interleaving tables
and functions, burst mappings, training sequences, and parity
checks from 3GPP TS 44.060 needed to handle MCS codings 1-9.
Change-Id: Ie270398dd7a72f282ba53e646853d8de1eabee93
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
When receiving an OPSTART for the BTS object, also set the availability state
to OK.
Before, the availability would remain at NM_AVSTATE_DEPENDENCY, which caused an
unfortunate chain reaction resulting in osmo-bts-trx going through the
initialization sequence twice:
BTS BSC
|<-----| SITE_MANAGER OPSTART
n |----->| BTS state change: OPSTATE_DISABLED, AVSTATE_DEPENDENCY
o | | This signals to nm_statechg_event() in bts_ipaccess_nanobts.c
r | | to (a) Set BTS Attributes and (b) send BTS OPSTART
m |<-----| Set BTS Attributes (a)
a | | When osmo-bts-trx receives a Set BTS Attributes, it sends
l |----->| CHANNEL state change: OPSTATE_DISABLED x8
| | This signals the BSC to Set CHANNEL Attributes and OPSTART
i |<-----| Set CHANNEL Attributes x8
n |<-----| CHANNEL OPSTART x8
i |----->| CHANNEL state change: OPSTATE_ENABLED, AVSTATE_OK x8
t | |
|<-----| BTS OPSTART (b)
| | osmo-bts-trx immediately replies with:
|----->| BTS state change: OPSTATE_ENABLED, AVSTATE_DEPENDENCY
| | Unfortunately, availability is left at DEPENDENCY,
| | and the NM_OC_BTS case in nm_statechg_event() only
| | checks for availability, not for the opstate.
| | Hence nm_statechg_event() again feels inclined to
| | to (a) Set BTS Attributes and (b) send BTS OPSTART,
| |
--+------+----- This is where the second round starts
| |
s |<-----| Set BTS Attributes (a)
e | | When osmo-bts-trx receives a Set BTS Attributes, it sends
c |----->| CHANNEL state change: OPSTATE_DISABLED x8
o | | All channels are disabled again, and then re-launched:
n |<-----| Set CHANNEL Attributes x8
d |<-----| CHANNEL OPSTART x8
|----->| CHANNEL state change: OPSTATE_ENABLED, AVSTATE_OK x8
| |
i |<-----| BTS OPSTART (b)
n | | osmo-bts-trx again sets the OPSTATE_ENABLED, but since
i | | this time it was already enabled, no further state change
t | | is sent back to the BSC.
This nightmare pivots on two hinges:
1. osmo-bts-trx fails to set BTS availability to AVSTATE_OK.
2. nm_statechg_event() fails to heed the OPSTATE_ENABLED of the BTS state
change.
Note, the configured channels from the first round were not actually taken
down, only the OML OPSTATE_DISABLED were sent.
In this commit, fix the osmo-bts-trx side: send AVSTATE_OK for the BTS object
upon sending OPSTATE_ENABLED, so that only the part marked "normal init" above
is run.
This change applies the same fix to other OML objects, which should make sense
in the same manner, within the current hackish OML implementation:
* NM_OC_BTS
* NM_OC_SITE_MANAGER
* NM_OC_BASEB_TRANSC
* NM_OC_GPRS_NSE
* NM_OC_GPRS_CELL
* NM_OC_GPRS_NSVC
This means that the NM_OC_CHANNEL case just above is identical, and thus
collapse NM_OC_CHANNEL onto the other cases. Drop the comments from
NM_OC_CHANNEL since they merely rephrase the commands themselves.
See OS#1770 for BTS and NITB logs.
Fixes: OS#1770
Change-Id: I08aa861f6100568c79750f4fbc9a32e1557b9304
Many erratic PDTCH blocks are expected. To not bloat the log,
notifications for this should be on debug level.
See http://lists.osmocom.org/pipermail/openbsc/2016-June/009457.html
(Thu, 30 Jun 2016 01:49:33 +0300 / Alexander Chemeris
<alexander.chemeris@gmail.com> / Re: GPRS on osmo-trx not working)
Change-Id: Ie318248aa2b8de455174e72a63c602c7aeae312c
Many erratic bursts are expected. To not bloat the log, notifications for this
should be on debug level.
See http://lists.osmocom.org/pipermail/openbsc/2016-July/009482.html
(Tue, 5 Jul 2016 15:38:27 -0700 / Tom Tsou <tom@tsou.cc>
/ Re: osmo-bts-trx error logs -- was: GPRS on osmo-trx not working)
Change-Id: If591c087ba8fd48564139e32930050ee8ab07001
* detect SID and set RTP Marker accordingly (emulate ONSET events)
* set proper FN in TCH_IND
* detect speech pause and do not send dummy 'bad' frames during that
time
Change-Id: Id518e5c667df7773c281effb9e75b66bf898f6fc
Related: OS#1750
Switch to using libosmocodec functions as a preparation step for DTX
support as they expose necessary bits.
Change-Id: Ie7423032fd06779d78876182ee63538d98906328
Related: OS#1750
Enhance bts_model_ API in preparation of dyn PDCH switching. These will be used
to re-connect a TCH/F_PDCH TS in a different mode: either as TCH/F or as PDCH.
All implementations so far return -ENOTSUP, and thus will cause a IPAC PDCH ACT
or DEACT *NACK* to be sent to the BSC as soon as these messages are handled.
Also add stubs in tests.
Change-Id: I21e60c028a1333431c3ed000f788b654d1170b0d
Add vty command (under "phy X instance Y" hierarchy) to manually send
POWERON or POWEROFF command. It's useful for debugging issues related to
BTS/TRX initialization.
Change-Id: I6dfebaf118cdf5ad144516b2b839b17350a73ce4
Related: OS#1648
Previously software activation could have been reported multiple times
which broke proper BTS init. Introduce guard variable to ensure
reporting happens only once.
Note: this is just minimal workaround - ideally proper OML state machine
should be implemented.
Change-Id: Ifffbdb756bc5d2864f985c01a3299b839c4de7af
Related: OS#1648
Previously osmo-bts-octphy have not provided in-band presence
information which cause off-by-one errors and misinterpretation of
ph_data_ind by PCU. This fixed now by adding support for explicitly
passing PH-DATA presence info. Corresponding check and in-band passing
of presence information are removed.
Note: this requires libosmocore version with osmo_ph_pres_info_type
support integrated.
[hfreyther/max: Remove + 1 from the decoded length]
the backend is performing the actual encoding and decoding functions,
while the generic part constsits of the TDMA structures and generating
the RTS.ind
The L1 scheduler is a generally useful component that is unfortunately
tied quite a bit into the OsmoTRX support. Let's try to separate it out
by having separate per-trx/per-ts/per-chan data structures pre-fixed
with l1sched_
Using this patch it should be one step easier to use the scheduler for
other BTS models, such as the intended upcoming virtual BTS.
OpenBSC introduced a naming change in
615ed46a6ab25f71a7ab0d8201d33b4dbf8fc5b0 but osmo-bts fixes were only
about osmo-bts-sysmo, not osmo-bts-trx. This updates osmo-bts-trx
accordingly.
A known issue with this code is that BER is not updated for lost TCH frames,
because osmo-trx doesn't send any indication for them and we don't have
a callback to handle this.
Otherwise the code seem to work fine.
3GPP TS 05.03 "Channel coding" specifies the puncturing matrix (1,0,1)
for class 1 information bits and tail bits valued u(0) to u(103) for a
maximum puncturing index of 311. The puncturing index 313 exceeds the
maximum index and causes osmo_conv_get_output_length() to output the
improper length of 210 instead of 211.
Signed-off-by: Thomas Tsou <tom@tsou.cc>
If frame number is out of range (>= 2715648), the scheduler's process
would end up in an infinite loop. This is because the loop would schedule
bursts until the indicated frame number is reached, which would not be
possible.
The openbts, calypso-bts and osmo-trx might send out out of range clock
indications every 3.5 hour.
RTS (ready-to-send) must be issued in advance, so BTS core and especially
osmo-pcu can provide downlink data frames early enough. In some cases PCU
might provide frames too late, so they must be dropped. If PCU provides
frames too late, due to high system load, this "RTS advance" setting must
be increased.
Instead of limiting the number of TRX at VTY to the actual number of
supported TRX, VTY allows to configure any possible number of TRX. If a
TRX is configured, which is not supported by BTS model, an error message is
returned, which states that the given TRX is not supported.
Handover and assignment may activate channels with ciphering already set,
so we need to tell scheduler to enable/disable ciphering and set the
correct cipher state.
Only if transceiver becomes available, control commands are sent. If
tranceiver is gone, reset scheduler.
The current availability state is sent to BSC via OML state change
commands.