Age | Commit message (Collapse) | Author | Files | Lines |
|
This replaces custom cell identifier parsing in the paging code with
calls to the new cell identifier parser implementation in libosmocore
(which was derived from the code that is now being replaced here).
The bssap tests will fail unless this other change is merged to
libosmocore as well: https://gerrit.osmocom.org/#/c/7288/
Related: OS#2847
Change-Id: I9e2002fbbe135287e9ce09caa3f0a85a84529463
Depends: I7f3e8ace26176e9cbfe2542961d2a95662aa4d97
|
|
Check exact number of parameters to avoid explicit void params ("") to
be used as BTS IP by an incorrect caller.
Exit successfully if firmware analysis is requested and there's no BTS
IP provided (meaning no BTS set up is required).
Save BTS IP into bts_ip variable as using optind is tricky.
Use new bts_ip variable to print the IP of the BTS we are trying to
connect to.
Change-Id: I8071aaf2be217207261ad698f87344f7ca15ccc4
|
|
Change-Id: Id903e3e20e12a143cedab72dc14669c07f4d11ac
|
|
log_parse_category_mask is preventing errors from being printed, which
makes debugging issues with the application harder.
Change-Id: I69ee2de921979f8bfaa8b501c6b05db1717b0c36
|
|
Provide a sane means of adding the -Werror compiler flag.
Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"',
but that actually *overwrites* all the other CFLAGS we might want to have set.
Maintain these exceptions from -Werror:
a) deprecation (allow upstream to mark deprecation without breaking builds);
b) "#warning" pragmas (allow to remind ourselves of errors without breaking
builds)
As a last configure step before generating the output files, print the complete
CFLAGS and CPPFLAGS by means of AC_MSG_RESULT.
Change-Id: I8cf0f135131c348d0b43f25b1d444af5827f148d
|
|
This format outputs json format which can be more easily parsed if
launched by scripting launguage with json support like python.
Change-Id: Ib2d461c79fbc242141dc342578467c3e9c6ed5fc
|
|
If list-view is not enabled, then a line with the new BTS is printed to
stdout buffer. That's fine if stdout goes to the terminal, since it's
line buffered, but if abisip-find write to a pite or to a file, then the
buffer won't be flushed until a full page is full, which may take a
while, and produce delays in scripts using abisip-find.
Change-Id: I19f8c7f747fa7a130a436e5e07a8648932404bf0
|
|
When the BTS answers, it uses the src addr used by abisip-find to send
the boardcast packets. This way a different IP than the one
automatically specified by default routing can be used.
An extra benefit: more than one abisip-find process can now be run in
parallel on the same interface.
Change-Id: I6b805f22d261003239d7002d9e568ea4797a2b0b
|
|
The command show bts displays all kind of BTS related info, but it
does not display the bts features yet.
- display bts specific features in vty-command show bts
Change-Id: I650133563436349d4ce55f292ea683dbb2ae68d7
|
|
In order to avoid code duplication the feature list (bit masks) and
the desciptive value strings as well as the function to set and get
the feature bits have been moved to libosmocore.
- use feature list functionality provided by libosmocore
Depends: libosmocore Change-Id Id0c35aef11aa49aa40abe7deef1f9dbd12210776
Change-Id: I3e80517539cc5d0e5d8189d434a5e3cc0fdea1a0
|
|
Fixes a regression in the code generating SI5* and SI6 on SACCH,
where the L@ pseudo-length is not part of the 'struct' definition
we have in gsm_04_08.h and hence has to be encoded manually into
the first byte of the SI buffer.
We were doing this correctly until April 2017, when the following
patch was merged:
> commit 6f0e50c8337355eb59033903ede9ab6528890835
> Author: Max <msuraev@sysmocom.de>
> Date: Wed Apr 12 15:30:54 2017 +0200
>
> Prepare for extended SI2quater support
This patch cacidentially overwrote the l2_plen that was just enoded,
as the 'struct' was no longer pointing to 'output' (si_buf+1), but
now directly to the start of the si_buf.
NOTE: The Wireshark RSL dissector (and more recently also LAPDm)
contain a similar bug, so the SACCH will not be decoded correctly
after applying this patch. Nevertheless, it's correct.
Change-Id: Ie8c907b1317566670aeb68f933ceefd552c17565
Closes: #3059
Related: #2963
|
|
Add the mnc_3_digits member to the info_ind.
Instead of changing to e.g. osmo_plmn_id, add the flag separately, and instead
of bool use a uint8_t, to not raise any struct packing issues and clarify the
flag's size beyond any doubt.
Bump the PCU interface version to 9.
This is one part of the three identical pcuif_proto.h patches:
- I49cd762c3c9d7ee6a82451bdf3ffa2a060767947 (osmo-bts)
- I787fed84a7b613158a5618dd5cffafe4e4927234 (osmo-pcu)
- I78f30aef7aa224b2e9db54c3a844d8f520b3aee0 (osmo-bsc)
Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore)
Change-Id: I78f30aef7aa224b2e9db54c3a844d8f520b3aee0
|
|
In some scenarios osmo-bsc is not required, only abisip-find to do the
initial set-up of the BTS, so no need to install osmo-bsc with it.
Change-Id: If3d476a1bd67abcb9cff241ab5989db923873986
|
|
Until now, handover_test simply defines an abis_rsl_sendmsg() function to
override the one from libosmo-babis. To me this amounts to implicit linker
magic (aka luck).
The common pattern we're using for this scenario is to explicitly wrap an
existing function by instructing the linker. Also do this for
abis_rsl_sendmsg() in handover_test.c to clarify.
Change-Id: I05ce33a4e42bc82b9ce5060e2f811033f5a1f8d8
|
|
Change-Id: I8a92a03feb7dbef2bb008016310ec243226a7c7a
|
|
Rationale: explicitly indicate the case of zero neighbors.
Change-Id: I09ddfd5b09883ec0124fe485346d9ed26de454e8
|
|
Set mr->num_cell to 0 if the bits reflect 0x7, which means that no neighbor
cell measurements are enclosed in the report.
The code in gsm48_parse_meas_rep() acknowledges that, but nevertheless left
num_cell == 7, and evaluating code commonly runs into the mistake of assuming
that actually seven neighbors are being reported on, like:
MEASUREMENT REPORT
0: arfcn=0 bsic=0 neigh_idx=0 rxlev=0 flags=0
1: arfcn=0 bsic=0 neigh_idx=0 rxlev=0 flags=0
2: arfcn=0 bsic=0 neigh_idx=0 rxlev=0 flags=0
3: arfcn=0 bsic=0 neigh_idx=0 rxlev=0 flags=0
4: arfcn=0 bsic=0 neigh_idx=0 rxlev=0 flags=0
5: arfcn=0 bsic=0 neigh_idx=0 rxlev=0 flags=0
6: arfcn=0 bsic=0 neigh_idx=0 rxlev=0 flags=0
There are only up to 6 slots for neighbors, the above listing actually printed
7, because num_cell == 7, which is a potential segfault. (sometimes it printed
uninitialized values instead of 0)
We could fix all meas rep consumers to know what num_cell == 7 means, but
instead setting it to 0 trivially fixes all of them.
Change-Id: Ie12210660a04f2d664ddc92e7ad7fc39ee474180
|
|
Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout
the code base to be able to handle an MNC < 100 that has three digits (leading
zeros).
The changes to abis_test and gsm0408_test show that this code now handles
3-digit MNC correctly, by not dropping the leading zero as 0xf in the encoded
PLMN.
Re-implement CTRL commands 'mcc', 'mnc' and 'mcc-mnc-apply' to preserve the
presence of the third digit of the MNC. Always reply with all leading zeros.
Adjust the expected results in ctrl_test_runner.py, to show that it works.
In VTY and CTRL, the parsing of MCC and MNC is inherently made stricter by use
of osmo_{mcc,mnc}_from_str() -- they will no longer allow surplus characters
and detect errno returned by strtol() (in contrast to atoi()).
Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore),
Ib7176b1d65a03b76f41f94bc9d3293a8a07d24c6 (libosmocore),
I020a4f11791c61742a3d795f782805f7b7e8733e (libosmocore)
Change-Id: I8e722103344186fde118b26d8353db95a4581daa
|
|
If an out of range 'Last Valid Block' value for 'smscb-command'
is passed, a 'last_block' of the 'rsl_ie_cb_cmd_type' struct
could be uninitialized. Let's prevent this.
Found using Clang Static Analyzer.
Change-Id: I57635f2f482ff476ab697b1b9e872ce90aafb999
|
|
All callers pass mcc=1, mnc=1, so just have it as default.
(Prepare for net->country_code etc to be replaced by net->plmn)
Change-Id: Ic16bc0bab3f2d4721e86a1a04f9d9f988d777df2
|
|
Move from using deprecated gsm48_construct_ra(), which uses a buf, to
gsm48_encode_ra(), which uses a gsm48_ra_id argument. Pass struct gsm48_ra_id
around instead of a buf.
struct gsm48_ra_id is the "encoded" representation of the bytes in a typical
MCC-MNC-LAC-RAC (04.08 Routing Area Id IE, 3GPP TS 24.008 ยง 10.5.5.15). Using
the struct spares using magic numbers for byte offsets.
In the process, fix a sanitizer warning for unaligned access by using memcpy()
instead of pointer assignment:
osmo-bsc/src/libbsc/abis_nm.c:2857:27: runtime error: store to misaligned address 0x7ffe8e0d6695 for type 'uint16_t', which requires 2 byte alignment
Note that (besides removing a now unnecessary cast) the gsm0408_test and
abis_test tests of RAI / CGI encoding remain stable, which indicates that the
new code is still correct.
Change-Id: I0d3908fb8ca1e2e669d257b5d59b40675fa85d06
|
|
Expand MCC-MNC test cases: show that the CTRL interface currently does not
preserve the third digit of the MNC if it is zero. These will be fixed by
I8e722103344186fde118b26d8353db95a4581daa
Change-Id: I5b097dbb6329f284e3b4914a744d5c3ad628f715
|
|
Change-Id: I90fefd5073ee07fc975a810859a32142b8b27904
|
|
Change-Id: I7bd55126848ed2c246d64cf672e1e6772da64be7
|
|
Change-Id: I5b3a9a9f0e88b42eed1591632dee1fa00e79f3a3
|
|
Change-Id: I3fcbcd319813e3b220daf8170cadd4ebb2aefa0f
|
|
This reverts commit faf0982ae20001519cf20c5d6345dad490a135f2, as it
introduces a severe regression: No more BCCH FILL / SACCH INFO are sent
upon RSL establishment to the BTS. See OS#2719 for more details
Change-Id: I8a4f3be9928bc3a0b61f23dc3e41200105204651
Related: OS#2719
|
|
The FSM lacks a proper definition of the FSM event names. This
causes problems when inspecting the FSM using the VTY.
- Add proper FSM Event names
Change-Id: Ief1eff45a896d6191bdc64c232be69e85bfc63dc
Related: OS#2924
|
|
After recent libosmocore commit "implement support for 3-digit MNC with leading
zeros" c4fce1425e19d604c199c895e227dc2519110456
Id2240f7f518494c9df6c8bda52c0d5092f90f221, struct gprs_ra_id has a new member,
namely mnc_3_digits. In gprs_ra_id_by_bts(), this new member is now not
initialized and may end up having an arbitrary value, which then may amount to
mnc_3_digits == true. Hence the resulting BCD representation of the MCC-MNC may
inadvertently and randomly indicate a leading zero on the MNC.
Use a struct assignment so that all members are guaranteed to be set, and so
that mnc_3_digits will be zero in all cases.
Since above libosmocore commit, nanobts_omlattr_test fails "randomly", fixed by
this patch.
Change-Id: I872ae3b2b0a0cd8f932f3a5fbc77c0dbfcb28bbf
|
|
The S_L_INP_TEI_UP signal was generated when the first message from a BTS
arrives on the OML/RSL link, rather than when the OML/RSL link comes up.
Instead, generate this signal when the link is brought up, so we
intitialize state regardless of how a particular BTS behaves.
Tested with osmo-bts-virtual and virtphy/mobile programs,
and with a sysmobts.
Change-Id: I3b76ae6b00043e706dddc78209311e00ace85bb7
Related: OS#2719
|
|
We already have other commands that operate on a given bts/trx/ts/ss,
let's make sure they have a shared/common syntax for consistency.
This also fixes the issue that the handover/assignment commands were
active already in VIEW_NODE, while they should only have been in
ENABLE_NODE.
Change-Id: I1f31e9adf9c75348809ebf9f40f6c69fab248e43
|
|
The txt indication has been introduced with version 7, but
forgotten to sync back to this repo.
Change-Id: Iafef7dae8b84f659a1aca1677b30a38a2e5558dc
|
|
Change-Id: Ic676bb046a8ee254b9ee8d0d126ce79e6057cfb3
|
|
Access Control Class (ACC) ramping is used to slowly make the cell
available to an increasing number of MS. This avoids overload at
startup time in cases where a lot of MS would discover the new
cell and try to connect to it all at once.
Ramping behaviour can be configured with new VTY commands:
[no] access-control-class-ramping
access-control-class-ramping-step-interval (<30-600>|dynamic)
access-control-class-ramping-step-size (<1-10>)
(The minimum and maximum values for these parameters are hard-coded,
but could be changed if they are found to be inadequate.)
The VTY command 'show bts' has been extended to display the
current ACC ramping configuration.
By default, ACC ramping is disabled.
When enabled, the default behaviour is to enable one ACC per
ramping step with a 'dynamic' step interval. This means the
ramping interval (time between steps) is scaled to the channel
load average of the BTS, i.e. the number of used vs. available
channels measured over a certain amount of time.
Below is an example of debug log output with ACC ramping enabled,
while many 'mobile' programs are concurrently trying to connect
to the network via an osmo-bts-virtual BTS. Initially, all ACCs
are barred, and then only one class is allowed. Then the current
BTS channel load average is consulted for scheduling the next
ramping step. While the channel load average is low, ramping
proceeds faster, and while it is is high, ramping proceeds slower:
(bts=0) ACC RAMP: barring Access Control Class 0
(bts=0) ACC RAMP: barring Access Control Class 1
(bts=0) ACC RAMP: barring Access Control Class 2
(bts=0) ACC RAMP: barring Access Control Class 3
(bts=0) ACC RAMP: barring Access Control Class 4
(bts=0) ACC RAMP: barring Access Control Class 5
(bts=0) ACC RAMP: barring Access Control Class 6
(bts=0) ACC RAMP: barring Access Control Class 7
(bts=0) ACC RAMP: barring Access Control Class 8
(bts=0) ACC RAMP: barring Access Control Class 9
(bts=0) ACC RAMP: allowing Access Control Class 0
(bts=0) ACC RAMP: step interval set to 30 seconds based on 0% channel load average
(bts=0) ACC RAMP: allowing Access Control Class 1
(bts=0) ACC RAMP: step interval set to 354 seconds based on 59% channel load average
(bts=0) ACC RAMP: allowing Access Control Class 2
(bts=0) ACC RAMP: step interval set to 30 seconds based on 0% channel load average
(bts=0) ACC RAMP: allowing Access Control Class 3
(bts=0) ACC RAMP: step interval set to 30 seconds based on 0% channel load average
Change-Id: I0a5ac3a08f992f326435944f17e0a9171911afb0
Related: OS#2591
|
|
In the past we used to set this to "-10 dBm" which means that basically
no RACH ever passed that treshold and in the associated CCCH LOAD IND
the number of busy slots was always zero.
Let's set the default to -90dBm. The user can of course always
configure a different value in the VTY.
This means that now any RACH slot signal level >= 90 dBm counts as
"busy" in those CCCH LOAD IND (RACH).
Change-Id: Ib9cbb786d19acc74f0951930b0dc9284854c6000
Closes: OS#3004
Related: OS#3003
|
|
The rate counter BSC_CTR_PAGING_ATTEMPTED does not increment when
a paging request is sent to the BSC. The reson for this is that the
function call to rate_ctr_inc() is located in a dead code section.
- Move the function call to rate_ctr_inc() to osmo_bsc_bssmap.c.
incremanet on any paging attempt (valid or not) that is recived
on the A-Interface.
- Remove dead code from paging.c
Change-Id: Iec3eb6724bc655806c3ce3c28448069590d99f91
|
|
When the cell identifier list of the BSSMAP paging contains an
"No cell is associated with the transaction." entry then the
paging is dropped and no paging is started at all. This is not
correct. When no cell is associated, the BSS should page the
whole BSS instead.
- Replace respective error case with a paging request to all
bts.
Change-Id: Id85e3a7540bdc13cd0e780e7870f16c35c6a6a50
|
|
Fix string format error introduced by recent commit:
"bsc_api: drop unknown RR messages."
I0a4d311f6939a4fcee59129daa18da4a2ab510ae
e4b0ebb25b68d667b9281573638c49358f71007f
Change-Id: Iab11ec6c44eb235d327b3776d5f1d82267ddadaa
|
|
Radio Resource (RR) handling is entirely done inside the BSC. However,
the current implementation forwards unknown RR messages to the MSC.
This is not compliant to the specification.
- Remove the forwarding and drop any unknown RR message.
Change-Id: I0a4d311f6939a4fcee59129daa18da4a2ab510ae
|
|
handover_decision_2:
- lchan->conn should never be NULL, but if it is, don't crash in LOGPHO*
macros.
- make certain to avoid modulo-zero. It's cosmetic since that config item is
not allowed to be zero.
handover_test:
- check return value of gsm_generate_si().
- safer evaluation of main()'s argv.
Fixes: CID#182929, CID#182928, CID#182927, CID#182926
Change-Id: I68e8ed3a1e8659edb47ac3e8a10508f17a3f5670
|
|
The file meas_proc.c seems to be an earlier stage of development of the meas
rep handling now in handover_decision.c, and to have been inadvertently added
to the git tree in:
commit 9af6ddfcec25f43c5b50a6c5a6b80e341ab9a8a7
Date: Sat Jan 1 15:25:50 2011 +0100
License change: We are now AGPLv3+ instead of GPLv2+
The file has never been part of Makefile.am.
Change-Id: If30724e3c638b191d20d00b897731762fb4896d5
|
|
Fix undefined references during link stage when building handover_test.
The archive libbsc.a needs to be listed before the various .so files.
Change-Id: Ie7e1d4815d72b8e0bbc6ccd68078a78de19d73b0
|
|
The ALIAS_DEPRECATED causes the legacy commands to no longer show up in the
command listing, hence making it more clear which commands are general and
which are for hodec1 only:
== BEFORE: ==
OsmoBSC(config-net)# list
...
handover (0|1|default)
handover algorithm (1|2|default)
handover1 window rxlev averaging (<1-10>|default)
...
handover2 window rxlev averaging (<1-10>|default)
...
handover2 retries (<0-9>|default)
handover window rxlev averaging (<1-10>|default) <-- legacy
handover window rxqual averaging (<1-10>|default)
handover window rxlev neighbor averaging (<1-10>|default)
handover power budget interval (<1-99>|default)
handover power budget hysteresis (<0-999>|default)
handover maximum distance (<0-9999>|default)
handover2 congestion-check (disabled|<1-999>|now)
OsmoBSC(config-net)# handover ?
0 Disable in-call handover
1 Enable in-call handover
default Enable/disable handover: Use default (0), remove explicit setting on this node
algorithm Choose algorithm for handover decision
window Measurement averaging settings <-- legacy
power Neighbor cell power triggering
maximum Maximum Timing-Advance value (i.e. MS distance) before triggering HO
OsmoBSC(config-net)# handover?
handover Handover general config <-- unchanged
== AFTER: ==
OsmoBSC(config-net)# list
...
handover (0|1|default)
handover algorithm (1|2|default)
handover1 window rxlev averaging (<1-10>|default)
...
handover2 window rxlev averaging (<1-10>|default)
...
handover2 retries (<0-9>|default)
handover2 congestion-check (disabled|<1-999>|now) <-- no more legacy
OsmoBSC(config-net)# handover ?
0 Disable in-call handover
1 Enable in-call handover
default Enable/disable handover: Use default (0), remove explicit setting on this node
algorithm Choose algorithm for handover decision
<-- no more legacy
OsmoBSC(config-net)# handover?
handover Handover general config <-- unchanged
The "Legacy" doc string actually never shows on the VTY console, but it will
show in the reference manual.
(Even with ALIAS(), a 'handover?' would only show the "Handover general config"
doc string, so no loss there from using ALIAS_DEPRECATED().)
Change-Id: I86be674d82242f9ca73a4d0040015c1c79f2422d
|
|
They are based on work by jolly, so it can't hurt to mark his copyright.
Change-Id: Id3856cf34d85d6354510a94960fe5ce810c10bc7
|
|
Handover decision 2 arguments are now configured by 'handover2 foo'. To match
that scheme, rename the previously 'handover foo' args for handover decision 1
to 'handover1 foo'.
For backwards compatibility, still provide aliases of the original VTY
commands. Writing back the config will result in 'handover1' though.
Change-Id: I7305ae7c04cc70082cd80d42b2ba32ffa399f51a
|
|
Change-Id: Ie597eae82722baf32546331e443dd9d94f1f25e6
|
|
Change-Id: I66c4f45afda614f874c9cdf0c22552f492315b71
|
|
Instead of reacting on S_LCHAN* signals in the handover decision code,
introduce callbacks for the handover decision to be invoked by handover_logic.c
at the appropriate time.
The rationale is explained in a comment to struct handover_decision_callbacks,
quoting:
"
All events that are interesting for handover decision are actually communicated
by S_LCHAN_* signals, so theoretically, each handover algorithm could evaluate
those. However, handover_logic.c cleans up handover operation state upon
receiving some of these signals. To allow a handover decision algorithm to take
advantage of e.g. the struct bsc_handover before it is discarded, the handover
decision event handler needs to be invoked before handover_logic.c discards the
state. For example, if the handover decision wants to place a penalty timer
upon a handover failure, it still needs to know which target cell the handover
failed for; handover_logic.c erases that knowledge on handover failure, since
it needs to clean up the lchan's handover state.
The most explicit and safest way to ensure the correct order of event handling
is to invoke the handover decision algorithm's actions from handover_logic.c
itself, before cleaning up. This struct provides the callback functions for
this purpose.
For consistency, also handle signals in this way that aren't actually in danger
of interference from handover_logic.c (which also saves repeated lookup of
handover state for lchans). Thus, handover decision algorithms should not
register any signal handler at all.
"
Also:
- Publish struct bsc_handover to use it as argument to above callbacks.
- Add enum hodec_id to struct bsc_handover, to be able to signal the
appropriate hodec algorithm per event.
- Add hodec_id argument to bsc_handover_start*() to be placed in the
bsc_handover struct.
- Publish the LOGPHO logging macros in handover.h along with struct
bsc_handover, convenient for logging in callback implementations.
Replace handover_decision.c's signal handler with a registered
handover_decision_callbacks instance.
(Upcoming handover_decision_2 will use all of the callbacks introduced here.)
Change-Id: Id5b64504007fe03e0406a4b395cd0359232b77d2
|
|
The function's return value is ignored. An upcoming patch will use this as
callback function and requires a void return.
Change-Id: Id455a8becbb43884e8205d87b0371b216d0119fc
|
|
The conn's penalty timers will be used only for handover decision 2, make it
clear by a sub-struct.
hodec2 will also initialize the penalty timer list on demand only, so no need
to always initialize.
Change-Id: Ie6c2bc2b10dc424dfd94a9e11a9a62f51c48aa10
|