The function rsl_tx_mode_modif_nack() uses abis_bts_rsl_sendmsg().
This function relys on msg->trx to be set (see abis.c). However,
rsl_tx_mode_modif_nack() creates the message buffer, but does
not set msg->trx.
- Make sure that msg->trx is set properly
Change-Id: Ib5990db11df1b25dc5d321193731426b11f8005a
When the RSL_IE_CHAN_MODE is is missing, then the message buffer
is freed and the channel mode modify is nacked using
return rsl_tx_mode_modif_nack()
The function rsl_tx_mode_modif_nack uses abis_bts_rsl_sendmsg()
which returns 0 on success. This eventually leads into a double-
free in rsl_rx_dchan() which frees the message buffer on all
return codes except 1.
- Remove the excess msgb_free() in the error handling path.
Change-Id: I946a927ba35aa115520b1248eefccd91832f69f6
The independent copy of pcuif_proto.h file is used by OsmoBTS so we
don't have to checkout OsmoPCU to obtain it.
Change-Id: If8d7330adf3edc44c3b49b1f6e854cce0eca2d8e
The sysmoBTS-specific headers were never looked for in the current
directory. None of the CI tests use it as well. None of the other BTS
models use such defaults. Let's just drop this to restore expected
header location semantics.
Change-Id: I0b2906e284e1e22a960c4f0f1f38724de009eda5
Previouslywe could end-up passing empty '-I' to compilerif corresponding
_INCDIR variable was not defined during the ./configure step. This is
apparently tolerated by gcc but still seems like a wrong thingto
do. Let's fix this by moving -I inside of *_INCDIR.
Change-Id: I80915e5756d1bf64d789cfd5341fdd417ca8eed9
When testing for sbts2050_header.h during ./configure stage, use proper
include path defined earlier.
Change-Id: I55e50f612ab2a082b34096d71359dd08da150cf1
When testing for the presence of particular BTS model-specific header
during ./configure step, we don't need to add LIBOSMOCORE_CFLAGS because
none of those headers use it for compilation. Moreover, adding it might
hide the problem if the headers under check are available in the same
location where libosmocore headers were checked out.
Change-Id: I64bf1acb9db999567e8a2a6690cfc96d6e4b7ee1
It was detected that under some conditions, osmo-trx (with limesdr)
may take a long time to answer to CMDs, which means trx_ctrl_timer will
trigger re-transmitting the last sent but yet unacked CMD. Due to the
high latency in osmo-trx, the original AND the rentrasnmited CMD are
handled after a while and RSP messages are sent for both. When
osmo-bts-trx receives the first RSP, it was marking the CMD as acked and
carried on with next one. Then, when the RSP from the retransmited CMD
arrives, it already lost state and doesn't know where does that come
from. As a result, osmo-bts-trx shutdowns.
The issue can be seen in the following truncated log from osmo-bts-trx
with TRX category enabled:
20180117135228175 Enqueuing TRX control command 'CMD RXTUNE 1782000'
20180117135228175 Enqueuing TRX control command 'CMD TXTUNE 1877000'
20180117135228175 Enqueuing TRX control command 'CMD SETTSC 7'
20180117135228175 Enqueuing TRX control command 'CMD POWERON'
20180117135228175 Enqueuing TRX control command 'CMD SETRXGAIN 1'
20180117135228175 Enqueuing TRX control command 'CMD SETPOWER 20'
20180117135228175 Enqueuing TRX control command 'CMD SETSLOT 0 5'
...
20180117135249829 Response message: 'RSP POWEROFF 0'
20180117135249855 Response message: 'RSP RXTUNE 0 1782000'
20180117135249876 Response message: 'RSP TXTUNE 0 1877000'
20180117135249876 Response message: 'RSP SETTSC 0 7'
20180117135250648 Response message: 'RSP POWERON 0'
20180117135251150 Response message: 'RSP SETRXGAIN 0 0'
20180117135253151 No response from transceiver for phy0.0 (CMD SETPOWER 20)
20180117135253777 Response message: 'RSP SETPOWER 0 20'
20180117135254535 Clock indication: fn=2018878
20180117135255777 No response from transceiver for phy0.0 (CMD SETSLOT 0 5)
...
20180117135256858 Response message: 'RSP SETPOWER 0 20'
20180117135256858 Discarding duplicated RSP from old CMD 'RSP SETPOWER 0 20'
20180117135256858 Response message: 'RSP SETSLOT 0 0 5'
20180117135256858 Response message: 'RSP SETSLOT 0 0 5'
20180117135256858 Discarding duplicated RSP from old CMD 'RSP SETSLOT 0 0 5'
Change-Id: I3633cba212edde878f83ed36aef922aaca6f503a
First the cached CMD sent (struct trx_ctrl_msg) is reworked to have the
cmdname and the params in different buffers for easier comparison with
RSP later.
For the receive path (trx_ctrl_read_cb), new function helpers are added
to parse the buffer into cmdname+params+code (parse_rsp) and to compare
if a given RSP matches the current CMD we sent (cmd_matches_rsp).
The reasoning behind this patch is that a way to check for parameters
when receiving a RSP will be needed in future work, as before this patch
checking of parameters is ignored. This commit is a preparation for commit
to check for duplicated responses.
Change-Id: I2474cbc3e4457cf04f78e1c168768295e1132034
The move includes a small logic change: If there's a mismatch between
the rsp and the cmd, now we bts_shutdown instead of blindly skipping
expected RSP and continuing with sending the next CMD in the queue. The
change is specially not a problem since next patches are improving the
logic furthermore to account for duplicates, different parameters, etc.
Change-Id: I7018ded23fe51f364f248ade111aaa80ef46187e
The default (for both manual and .deb builds) is to use shared build (as
before) - the static build is entirely optional.
Change-Id: Iabdebefef5c07dd1cd4b94b29ca40c6be0f8adda
Add missing LIBOSMOABIS_CFLAGS and LIBOSMOTRAU_CFLAGS.
Pair the _LIBS below the _CFLAGS in LDADD above (cosmetic).
Fixes the stow-enabled jenkins builds are currently failing like below:
In file included from ../../include/osmo-bts/gsm_data.h:136:0,
from ../../include/osmo-bts/bts.h:4,
from misc_test.c:23:
../../include/osmo-bts/gsm_data_shared.h:21:35: fatal error: osmocom/abis/e1_input.h: No such file or directory
#include <osmocom/abis/e1_input.h>
Change-Id: I94ea8bad8b410550f72ee6a0408f42f6bd8b6cac
Add configure option --with-sysmobts=$INCDIR (like for LC1.5).
Use to fix the jenkins build to fix the build after migration to stow, where we
can no longer use a commin -I to include the sysmobts headers as well.
Tweaked-by: neels
Change-Id: I0416a9f4c428189cd9c3909c8bd016ca2908128a
Passing configure flags in DISTCHECK_CONFIGURE_FLAGS requires enclosing all
flags in quotes. Currently we seem to have no callers with more than one
configure flag, so we were lucky not to break there.
Change-Id: I37bc517a30d00c744eddc8565a0a8181cb3b2cdb
It's prerequisite for jenkins tests fix after migration to stow. The
sysmobts-calib uses hand-coded Makefile instead of automake which makes
it hard to properly propagate build flags. Also, make it optional to
enable excluding it from certain jenkins tests.
Change-Id: I3b54bfa5ef1d89092f6cf13dc27de10874b31b18
The unittest module meas_test.c contains a lot of unused header
files as the result of a cut and paste error made earlier. Also
the reference to stdio.h is missing.
remove all header file references that are not needed.
add missing header reference to stdio.h
Change-Id: I167be096ed25a86b1114de1ada955822a0b42856
In oml_ipa_mo_set_attr_cell, as well as we do in other set functions in
the same file, we want to store a parsed value from a TLV received on
the network into a host local structure. We hence need to use ntohs
instead of htons.
Change-Id: Icbf65f8a4b871b0fa2e84ad6cd2188d4e34f704b
The function trx_by_l1h() is used to fetch the pointer to a an
osmo_bts_trx from a list. The ID that is used to reference the
transceiver comes from the incoming message. If the firmware
sends odd identifiers (firmware bugs, damaged packets) the
transceiver can not be found in the list and a nullpointer is
returned, which then leads into a nullpointer derefernece
problem.
Check the returncode, and depending on the situation either
return with -EINVAL or exit osmo-bts immediately.
Change-Id: I04ef3b4896e1322c2a6d29ea86a88994c7748bf7
Wireshark was showing a Malformed packet alert, and further
ivnestigation showed that "Resource Information" TLV was missing in the
packet. See GSM 08.58 sections 8.6.1 and 9.3.21 for more information.
Indicating interference level is not yet implemented, but at least now
we avoid sending a malformed packet.
Patch has been validated against a running setup with wireshark in my local PC.
Related: OS#2735
Change-Id: Ie97170811aaf8a089febfa20380ab48ea174056a
While debugging other protocol/timing issues between osmobts-trx and osmo-trx,
I found that sometimes two consecutives "POWER OFF" commands are
enqueued and sent to osmo-trx.
There's no point in doing so, as the write queue already maintains state
and retries the command until a RSP is received, then goes for the next
one.
With this change we hence improve timing response as we don't need to
wait for the second command to be processed, and on top we get cleaner
logs and simplified states which are easier to debug.
Change-Id: Ib6a5e7bfac8bc5e1b372da6a1f801c07a3d5ebb7
Problem:
lchan->tch.dtx.dl_amr_fsm struct failed to allocate in l1sap_chan_act routine
in l1sap.c due to illegal characters contained in lchan->name which are passed to
osmo_fsm_inst_alloc routine. As a result, lchan->tch.dtx.dl_amr_fsm is NULL
causing BTS crashed (SEG FAULT) when trying to access this struct.
Below is snapshot of crash log obtained by GDB:
...
Fri Nov 24 18:13:55 2017 <0000> rsl.c:1653 payload type: 98
Fri Nov 24 18:13:55 2017 <0000> rsl.c:1463 (bts=0,trx=0,ts=2,ss=0)
RSL Tx IPAC_MDCX_ACK (local 127.0.0.1:11538, remote 127.0.0.1:30012)
Program received signal SIGSEGV, Segmentation fault.
0x00031930 in dtx_dl_amr_fsm_step (lchan=lchan@entry=0xb69592a8,
rtp_pl=rtp_pl@entry=0x87ae8 " \024\351Y\363_\337\345\351f\177\373\300\210\201\200\210",
rtp_pl_len=17, fn=1728481, l1_payload=0x10dd25 "", marker=marker@entry=true,
len=len@entry=0x10ddc4 "\024", ft_out=0xbefff7d7 "\002",
ft_out@entry=0xbefff7cf "\276\341_\032") at msg_utils.c:233
233 msg_utils.c: No such file or directory.
...
Fix:
* Use different formatting for lchan name passed to osmo_fsm_inst_alloc routine
* Refuse channel activation if FSM could not be generated (as opposed to crash)
Related: OS#2606
Reported-by: Minh-Quang Nguyen <minh-quang.nguyen@nutaq.com>
Change-Id: I929ce3703dc57acf8db569ae0e346265644d0b3c
The upper layers (L1SAP, the common part of L1) *always* require frame
numbers in the uplink direction to be reported as the frame number of
the *first* burst, not the last burst of a given block.
This is particularly important in the case of passing up measurement
information, as we use this frame number to detect if the measurement
interval for that specific timeslot has just ended (and hence we must
process the measurements and send an uplink measurement report to the
BSC.
Before this patch, the measurement results were reported with the *last*
frame number, which caused the common/measurement.c code never detect
the end of a measurement window.
On TS2, tons of the following log messages were observed:
<0004> measurement.c:199 (bts=0,trx=0,ts=2,ss=0) no space for uplink measurement, num_ul_meas=104
With this patch, it behves as expected: the measurements of 25 blocks
(= 100 bursts) are aggregated, after which point the report is computed
and sent. Subsequently, num_ul_meas is reset to 0 and the cycle
restarts.
Related: OS#2329
Change-Id: I1065ae9c400bb5240a63ab8213aee59aeb9ceeff
The RTCP Sender Description is supposed to contain useful information
to identify the source of the RTP stream. So far, it only contained
compile-time default data of libortp. Let's put the BTS UnitID, the
lchan number and the OsmoBTS version in there.
This change requires libosmo-abis Change-Id Ice794f9e0c6caeea1c67520c12efbfa375d1fb82
Change-Id: Id6ce7188354d3a0517661c9648854ec829ef1cac
Related: OS#2701
The respective errors/events occur as a result of calling osmo_rtp_*
API, and are clearly more fitting into the DRTP category than the DRSL,
even though the respective actions are triggered by RSL.
Change-Id: I52e6f9865492a2f757a37860eb92a3dc49e174ef
Contrary to osmo-bts-sysmo, the OCTPHY-2G does not have different L1
SAPI for AGCH and PCH. It uses cOCTVC1_GSM_SAPI_ENUM_PCH_AGCH for both,
and we convert that to the cbits=0x12 (Downlink CCCH) on the L1SAP.
The code above L1SAP can hence freely decide if it wants to respond with
an AGCH or PCH message, based on its knowledge of BS_AG_BLKS_RES,
without the OCTPHY specific code having to do anything about it.
Hence, there's nothing to do, and the warning can be removed
Change-Id: Ic1038b8dc57bdaf05493cd8479355b960275ea41
Related: OS#1575
There's no point in either having full verbosity in DEBUG level
and not logging any measurement related information in INFO. Let's
at least print the results at the end of each measurement period in INFO
level.
Change-Id: I2c870531478c05ce31cc1015597a068a4a76cf99
Almost all log statements in scheduler_trx.c were using the wrong
logging subsystem. Let's fix this. Also, make it more obvious from
the log subsystem help text
Change-Id: I4312f8ab0414eb38db0d62f05c95ab961f500c14