Add ho_dtap_cache to gsm_subscriber_connection, a stock msgb queue to be used
with msgb_enqueue() and msgb_dequeue().
Keep a counter of queue length, to enforce a sane maximum counter for cached
messages. So far a hardcoded maximum of 23 messages will be cached.
Have balanced ho_dtap_cache_add() and ho_dtap_cache_flush() functions.
The original patch was by jolly, but I have basically completely replaced it
with the simpler msgb queue pattern.
Change-Id: I6e4d93628befb3d97e5cee0343cd9f8ba0b8620c
The name sounds like it is looking up neighbors, instead it simply traverses
the global list of BTSes. Rename to reflect what it does.
Move FIXME comment to its logical place: at the invocation of
bts_by_arfcn_bsic().
Change-Id: I063870d09f782a4f18e85d87c7cd17fe660cb3fd
This is needed for handover algorithm to balance free slots and to prevent
congestion of one cell, while other cells still have free capacities.
Change-Id: Ic8bee8a515ee8aa9a99af71756fe60b8dd8f868b
If we want to average over up to 10 measurement reports (as configurable
at VTY), we need a history of at least 10 measurements.
Change-Id: Ia7cfac073bdc464092ca3e51dec319ac30401dd1
The given value is 10 * ms, so 13 is used instead of 128.
If T3105 is set at config to something greater 0, it is used instead of
the default value.
Adjusst nanobts_omlattr_test.c accordingly.
Change-Id: I3d9687619ba4de35f5d2eff3026d903534b2bbd4
This makes sense, if silent call is used. Assignment allows to change from
SDCCH (or whatever was available) to given TCH rate.
Change-Id: I2efe9d7ab429e902581ebb9e0e006f2aec6d8972
This can happen, if a TCH/H was requested, but because it is not available,
a TCH/F is allocated. If the old channel was TCH/F already, it makes no
sense to assign it.
Change-Id: I284125483fc14b8f82e32ee61aa3866746238eae
The up-to-date rqd_ta is required for assignment command. If the phone
moves, the timing advance might change. The rqd_ta will be updated by
each measurement report.
Change-Id: If1a592e590cfed55ff3dca5be89e2946e8017a22
Always start with a counter of 0 for a new measurement report. If the
neigh_meas_avg is caluclated over the given window, the window is
reduced, if there are less measurement reports received so far.
Change-Id: I1c74f27f9663a3083610c985a080fca331c19bd3
get_meas_rep_avg will return -EINVAL, if the required number of
measurements are not reached. There will be no handover possible until the
given number of measurements are available.
Change-Id: Ibc4410b4e162cdb6c070128d2c63946bb79d6d65
In case of current channel equals TCH/F and we request half rate, we
must return 0, so the calling function will trigger assignment.
Change-Id: Ibb4cb9aef1a1146f984d7c969bfba53c647cae07
This is needed, so channel can be negotiated before the actual channel
type is assigned.
In case there is no SDCCH available, try to assign what ever the MS requested.
If this is not possible try to assign TCH/F. If this is still not possible,
reject channel request.
Change-Id: I10fc9f60c58c6b7ed424a86ce23bf6b9802c9eb1
The static ho_ref seems to be implicitly initialized to zero, but let's make it
explicit for code readability.
Change-Id: I00493bcb7ef3e38fb8e0077c60c5bac7199f1073
In order to keep processing power at BTS at a defined level, the handover
decision might want to limit maximum number of slots that require RACH
detection.
Change-Id: I8908e37fe0d8d2eda906cc6301ba0969b25a5575
This is needed, if the channel mode should change when doing handover.
A change in channel mode makes sense, if available resources at the new
BTS are different.
Change-Id: Ib6b17a9be252f1655006ab6773483868017d7926
It is desirable to allow configuring handover for each individual network cell.
At the same time, it is desirable to set global defaults.
Treat the 'network' node handover parameters as global defaults, add another
set of parameters for each individual BTS.
This raises questions on how the 'network' node should affect the individual
BTS. The simplistic solution would have been: on creating a BTS in the config,
just copy the current defaults; with serious drawbacks:
- tweaking any parameter in the telnet VTY on network node will never affect
any running BTS.
- network node defaults *must* be issued before the bts sections in the config
file.
- when writing a config back to file, we would copy all net node defaults to
each BTS node, making the network node configs pointless.
Instead, add a handover_cfg API that tracks whether a given node has a value
set or not. A bts node ho_cfg gets a pointer to the network node config and
returns those values if locally unset. If no value is set on any node, use the
"factory" defaults, which are hardcoded in the API. Only write back exactly
those config items that were actually issued in a config file / on the telnet
VTY. (ho_cfg API wise, we could trivially add another ho_cfg level per TRX if
we so desire in the future.)
Implement ho parameters as an opaque config struct with getters and setters to
ensure the tracking is always heeded. Opaqueness dictates allocating instead of
direct embedding in gsm_network and gsm_bts structs, ctx is gsm_net / bts.
This is 100% backwards compatible to
old configs.
- No VTY command syntax changes (only the online help).
- If a 'bts' sets nothing, it will use the 'network' defaults.
- The 'show network' output only changes in presence of individual BTS configs.
On 'show network', say "Handover: On|Off" as before, iff all BTS reflect
identical behavior. Otherwise, output BTS counts of handover being enabled or
not.
Use the same set of VTY commands (same VTY cmd syntax as before) on network and
BTS nodes, i.e. don't duplicate VTY code. From the current vty->node, figure
out which ho_cfg to modify.
For linking, add handover_cfg.c (the value API) in libcommon, while the
handover_vty.c is in libbsc. This is mainly because some utility programs use
gsm_network and hence suck in the ho stuff, but don't need the VTY commands.
Review the VTY online help strings.
Add VTY transcript test for handover options, testing config propagation from
network to bts nodes, 'show network' output and VTY online help strings.
(Needs recent addition of '... !' wildcard to osmo_interact_common.py.)
I considered leaving parts of this more readable, but in the end decided for
heavy use of macros to define and declare the API, because more values will be
added in upcoming patches and I want to prevent myself from messing them up.
Inspired-by: jolly/new_handover branch, which moves the config to 'bts' level
Depends: I7c1ebb2e7f059047903a53de26a0ec1ce7fa9b98 (osmo-python-tests)
Change-Id: I79d35f6d3c0fbee67904378ad7f216df34fde79a
Do not instruct the MGW to move the RTP to the new lchan before we have
received a HANDOVER DETECT.
Before:
Chan Activ
Chan Activ Ack
IPACC-CRCX
-ACK
IPACC-MDCX
-ACK
MGCP MDCX --> MGW
...
HANDOVER DETECT
Call continues on new lchan
In above sequence, if the HANDOVER DETECT times out, the MGW has moved to the
new lchan which never becomes used and is released. Furthermore, from the IPACC
MDCX until the HANDOVER DETECT, the RTP stream would break off momentarily.
After:
Chan Activ
Chan Activ Ack
IPACC-CRCX
-ACK
IPACC-MDCX
-ACK
...
HANDOVER DETECT
MGCP MDCX --> MGW
Call continues on new lchan
If the HANDOVER DETECT times out, the call happily continues on the old lchan.
This change is inspired by Ivan Kluchnikov's HO work, who implemented a similar
fix in the openbsc.git codebase (branch fairwaves/master-rebase): his patch
moves ipacc_mdcx() to connect RTP to the new lchan from switch_for_handover()
(which triggered on S_ABISIP_CRCX_ACK, i.e. creation of the new lchan) to later
on in ho_detect() a.k.a. the S_LCHAN_HANDOVER_DETECT signal handler:
http://git.osmocom.org/openbsc/commit/?h=fairwaves/master-rebase&id=9507a7a1ea627e07370c9d264816bb190b3b91b8
This patch does essentially the same: remove the mgcp_handover() call from the
MDCX-ACK handling (creation of the new lchan), and add a signal handler for
S_LCHAN_HANDOVER_DETECT to osmo_bsc_mgcp.c to effect the MGW switchover.
Note, it would have been possible to call mgcp_handover() directly from rx of
the HANDOVER DETECT message, but that produces linking fallout in some utils/
projects, which then need to link the mgcp code as well. That is because those
aren't properly separated from the more complex parts of libbsc. Using the
signal is a bit bloaty, but saves the linking hell for now. I've faced a
similar problem twice recently, it would pay off to separate out the simpler
utils/ and ipaccess/ tools so that they don't need to link all of libbsc and
osmo-bsc, at some point (TM).
Change-Id: Iec58c5fcc5697f1775da7ec0111135108ed1fc8f
A subsequent patch will add registration of a signal; cosmetically prepare by
creating a common mgcp_init() function. It makes sense for the FSM registration
to move to it.
Change-Id: I510e1081171706eb3d9fb2db50a9aa4f768929b5
Even thought the lchan number range depends on the pchan, using LCHAN_NR allows
passing arbitrary arguments. Limit it to 0-7.
Change-Id: I2c078b420b6183862acb5c18d1230cf8f6c9f0ce
A lower-case argument is a keyword, not a variable placeholder. Hence the user
would not be able to pass a number, just the "lchan_nr" string itself, hence
this would never work.
Depending on pchan, lchans can range 0..7, so use that instead.
Change-Id: Ib9a0b43b68c4682cd6de24d01c0de421c9ce957a
This is mostly no-op code refactoring which makes it easier to maintain the
code for each paging case and reduces the scope of several local variables.
Also, ensure that paging failures where no matching BTS was found are logged
consistently in all cases. The log level changes from ERROR to NOTICE since
this is not necessarily a fatal condition.
Change-Id: If8fdf425145791f4904a70e295bdc3c7d0f4d5f6
Handover attempt for power budget case should be performed every N SACCH frames,
where N = Power Budget Interval.
First measurement report with mr->nr = 0 was used for the first handover attempt
in this case, which is not correct, because first usable report should have
mr->nr = net->handover.pwr_interval-1.
Moreover using the first measurement report with mr->nr = 0 for handover attempt
could lead to unnecessary handover, because usually av_rxlev for first measurement report
from MS is worse than for following reports.
Change-Id: If7f54a4cb179eaa9e5eb147b9477633ac618e69e
This is a simple combination of the LAC and CI cases which have
already been implemented.
The BSC_Tests.TC_paging_imsi_nochan_lac_ci ttcn3 test passes.
The switch statement in bssmap_handle_paging() is getting a bit large,
and scoping of local variables could be improved. I will focus on
cleaning this up later once paging functionality is complete.
Change-Id: If7f596663a97a1db1a00f115a366f4a5a271c127
Depends: Id83f8b3b1ce80a39417176d99fd09f3b394fd19c
Related: OS#2752
This is essentially a case which combines paging by LAI and CI.
Depends: Ic1c72c7f83e53988eb9fedf314b1dc459836833d
Change-Id: Id83f8b3b1ce80a39417176d99fd09f3b394fd19c
Related: OS#2751
We can now either page an invidual BTS directly or page several BTS in a
given location area. This decision is taken based on the contents of the
cell identifier list in the paging request. Select a set of BTS for paging
while processing the cell identifier list, rather than requiring the
paging layer to loop over all BTS in the MSC.
This change requires some adjustment in bssap_test. In particular,
this test must now add a BTS to its network in order to pass.
The purpose of this change is to make the layering a bit cleaner.
There is one functional change: We no longer abort paging if paging fails
for a particular BTS. Instead, we keep trying to page on other BTS.
Change-Id: Ic1c72c7f83e53988eb9fedf314b1dc459836833d
Suggested-by: Harald Welte
Depends: Ic7772e75c3d7fb0df6e17e118bb33b3248352d4d
Related: OS#2753
The stow-enabled jenkins builds are currently failing like below:
make[3]: Entering directory '/build/src/libcommon'
CC bsc_version.o
CC common_vty.o
CC debug.o
CC gsm_data.o
In file included from debug.c:34:0:
../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory
#include <osmocom/sigtran/sccp_sap.h>
^
compilation terminated.
In file included from common_vty.c:27:0:
../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory
#include <osmocom/sigtran/sccp_sap.h>
^
compilation terminated.
In file included from gsm_data.c:37:0:
../../include/osmocom/bsc/gsm_data.h:15:38: fatal error: osmocom/sigtran/sccp_sap.h: No such file or directory
#include <osmocom/sigtran/sccp_sap.h>
^
compilation terminated.
Let's make sure the common gsm_data.h have all required CFLAGS to compile.
Change-Id: I30b75db6ffba227b05b5413b84b15f69e0c213f2
This builds upon https://gerrit.osmocom.org/#/c/5698/ which implements
support for paging by LAI.
The ttcn3 test TC_paging_imsi_nochan_ci passes with this code when
run in isolation. It does not pass if another paging test (such as
TC_paging_imsi_nochan_lai) is executed beforehand. This problem
looks similar to the scenario tested in TC_paging_imsi_a_reset.
Change-Id: Ic7772e75c3d7fb0df6e17e118bb33b3248352d4d
Depends: Ic3c62ff0fccea586794ea4b3c275a0685cc9326e
Related: OS#2753
This change removes a few USSD specific declarations, which are
not actually used now, and probably accidentally migrated from
legacy OpenBSC.
Change-Id: I060223349971a7fce169a018bf16eb91f0e20342
do not print an additional log lines when the mgcp FSM gets
halted. This is already done by osmo-fsm
Change-Id: I5aebbcacb68eab3c6afb19991dbf63a02524e4d7
When the FSM runs into an error condition handle_error() is called with
a cause code. The information about the error is then printed by handle_error(),
by this we do not get the sourcecode line of the location where the error
actually happend.
Convey the source code line number of the actual error in handle_error()
Change-Id: Ifa7f2a655474826630988572616cd26e1e2f3464
Add a new control command 'msc.N.connection_status' which can be used
to query the connection status of a particular MSC with number N.
Keep the old control command 'msc_connection_status', which always
queries MSC 0, for backwards compatibility.
Change-Id: Ibd41474a1be80e782b19ec337c856b5efc593fa8
Related: OS#2729