Commit Graph

799 Commits

Author SHA1 Message Date
Harald Welte 7d6860b114 print a NOTICE message if lchan not activ in get_active_lchan_by_chan_nr() 2016-01-16 16:25:52 +01:00
Alexander Huemer 056c267b89 fix some format specifiers 2016-01-15 15:33:46 +01:00
Holger Hans Peter Freyther 2b7728cd9d sysmobts-calib: Warn about firmware and header mismatch
sysmobts-calib might be easily patched by a user that does not know
that firmware and firmware headers form a contract that should be
matched. Compare the version numbers and print a warning if it does
not look correct. This should be enough for a user to see that something
is not right. Continue anyway as the firmware might still be compatible
(because the ABI has not changed).

Fixes: SYS#1172
2016-01-11 20:47:36 +01:00
Holger Hans Peter Freyther 65b4a7ba2b sysmobts-v2/eepromreader: Add userspace program to read EEPROM
If using a too old kernel on newer devices the eeprom reading will
fail and maybe it is not possible to update the kernel after the
unit has been deployed.

Add a utility to read the EEPROM of revD+ from userspace to be used
to fix up the thing.
2016-01-11 17:29:24 +01:00
Harald Welte 74269054a6 sysmobts: add missing break statement in l1if_handle_ind()
this was introduced in 21b020b336 and
luckily spotted by coverity (CID 1347446)
2016-01-08 14:19:23 +01:00
Alexander Chemeris a62e3221b6 l1sap: Whitespace fixes. 2016-01-08 13:07:14 +01:00
Harald Welte 085569df55 fix large amount of compiler warnings in common and sysmobts code 2016-01-04 20:29:24 +01:00
Harald Welte 21b020b336 sysmobts: Clarify msgb ownership / fix memory leaks 2016-01-04 20:17:32 +01:00
Holger Hans Peter Freyther e28a20a2d9 sysmobts: Catch up with the API changes and specify the version
API revision 5.1 allows us to pass a version number for the rx/tx
calibration and the DSP/FPGA will inform us about clock errors.
2015-12-07 11:23:36 +01:00
Minh-Quang Nguyen 2da932c7a0 sysmobts: support eeprom map version 2
[hfreyther: Accept the mixing of whitespace to ease future
merges]
2015-12-07 11:10:57 +01:00
Harald Welte 2ecbf87130 use talloc pool for msgb and ortp library
by using a talloc pool, we avoid having to go back to the libc
malloc pool all the time.  The msgb allocations and libortp allocations
happen quite frequently during processing and show up as one of the
high priority items in osmo-bts profiles on sysmoBTS with 14 concurrent
TCH/H calls (highest load scenario).

talloc still consumes significant CPU, this is mostly due to the
zero-initialization of all the associated buffers.  Strictly speaking
we shouldn't need this, but any change there would require lots of
testing, as there might be hidden assumptions in the code?

In some percentage of cases, talloc still seems to fall back on malloc
for msgb allocations, which is currently a bit of a mystery.  The pools
certainly are large enough, talloc_reprt() rarely reports more than a
few tens of kilobytes used by the msgb pool.
2015-12-06 21:31:39 +01:00
Harald Welte 62d7502b82 osmo-bts-sysmo: Disable DSP trace flags by default 2015-12-05 15:57:09 +01:00
Harald Welte 2d5481da27 l1sap: Ensure we only pass PHY primitives of active lchans
In some situations, a PHY might send us a primitive for a logical
channel that is not (or no longer) active.  Passing such primitives
higher up the stack is asking for trouble.  Specifically, LAPDm
instances cannot accept messages once their instance has been released.

We introduce two new helper functions: get_lchan_by_chan_nr() as well as
get_active_lchan_by_chan_nr().  The former just centralizes the look-up
of the lchan by timeslot number and sub-slot number.  The latter also
checks to ensure the lchan is active, which is used for PH-DATA / PH-RTS
primitives.  To the contrary, MPH primitives generally don't require the
cahnnel to be active for processing.
2015-12-05 11:54:08 +01:00
Harald Welte 44bc9408b1 common/rsl.c: The presence of a valied measurement result is DEBUG
we shouldn't consider the presence of a valid measurement result
as something NOTICEable
2015-12-03 19:54:38 +01:00
Harald Welte 02337e1d1d sysmobts: Dont recycle PHY primitive for L1SAP in PH-DATA.ind 2015-11-20 21:35:07 +01:00
Harald Welte 437deb5f3a sysmobts: fix ph_data_req() msgb handling + alignment
The way we recycle the msgb with a l1sap header when transforming a
PH-DATA.req L1SAP primitive into a PHY/L1 primitive was flawed in
several ways:

1) the way the L1SAP header was stored in the buffer didn't provide
   sufficient tailroom for the L1 primitive
2) the alignment of the data in L1SAP is at a 32bit bounadry, but not
   in the L1 primitive, causing unaligned accesses.
2015-11-20 18:05:51 +01:00
Harald Welte 48e99fd05a cope with 'struct gsm_bts' without a tsc member
This was introduced in openbsc.git a2bbc5ec0e6481bb5b65da7bdbde03a424437af4
2015-11-20 10:54:09 +01:00
Harald Welte 3c161bb7df tests/Makefile.am: Don't use sysmobts SUBDIRS twice
probably a git merge artefact of some sort...
2015-11-05 23:05:20 +01:00
Harald Welte bbcf703be8 TRX: catch up with trhe amr_mode naming changes
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.
2015-11-05 23:02:55 +01:00
Harald Welte 94da045be5 Don't blindly link against '-lortp' but use pkg-config for that
This also ensures that a missing ortp library dependency is discovered
at configure time already
2015-11-05 22:52:50 +01:00
Harald Welte 33f234f278 Revert "configure.ac: Add subdir-objects to suppress warnings"
This reverts commit 94a05abb98.

The tests don't work well with subdir-objects, so we have to live with
the warnings meanwhile until somebody finds time to find the magic spell
to solve the autotools quest.
2015-11-05 22:48:24 +01:00
Harald Welte 55d89d17b2 configure.ac: Better description for --enable-sysmocom-bts and --enable-trx 2015-10-12 12:15:49 +02:00
Harald Welte 94a05abb98 configure.ac: Add subdir-objects to suppress warnings
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
2015-10-12 12:13:13 +02:00
Harald Welte 45e597cc16 configure.ac: Depend on libosmotrau 0.3.2 (ortp statistics) 2015-10-12 12:12:29 +02:00
Harald Welte 9a9ddc1203 configure.ac: Only require libgps if building for sysmoBTS 2015-10-12 12:12:22 +02:00
Holger Hans Peter Freyther 13947b3408 amr: Catch-up for the non-RTP mode after amr rename 2015-10-03 22:45:52 +02:00
Holger Hans Peter Freyther 1009a87f3c amr: Catch up with the amr_mode changes
Use the bts_modes for all the types. As there are two instances
know. One for the ms and one for the bts.

Manual compile fix and not tested on HW
2015-10-03 22:34:37 +02:00
Harald Welte f1fb0fa3af Merge branch '201509-trx-rebase' 2015-09-22 16:41:54 +02:00
Harald Welte caa648d92e TRX: Add missing call to abis_init()
This somehow got lost during the latest rebase.
2015-09-22 16:41:32 +02:00
Harald Welte 88a31e2a99 make osmo-bts-trx provide bts_model_adjst_ms_pwr() 2015-09-22 16:41:32 +02:00
Harald Welte 307bfc81c1 fixup tests after bts_model_adjst_ms_pwr 2015-09-22 16:41:32 +02:00
Alexander Chemeris 5becc4613a tests: Update busrsts_test build.
We've added logging calls to the bursts processing. Add logging facility
initializatoin to the test code.
2015-09-22 16:41:31 +02:00
Alexander Chemeris b812839dfa trx: fix potential use of uninitialized toa variable.
Not really a bug, as we're smart about it down the stream, but it's better to
be strict here as well.
2015-09-22 16:41:31 +02:00
Alexander Chemeris ae525a8761 trx: Send POWERON/OFF commands to osmo-bts only for the first channel.
osmo-trx never supported separate power control for trx's, but now it started
to be more strict about it.
2015-09-22 16:41:31 +02:00
Alexander Chemeris 29ea40f538 trx: Assume 100% BER if total decoded bits is 0 in l1if_process_meas_res() 2015-09-22 16:41:31 +02:00
Alexander Chemeris e9abc5a4f3 trx: Cleanup unused parts of loops.c 2015-09-22 16:41:31 +02:00
Alexander Chemeris 17be7fa73b trx: Remove unused variables. 2015-09-22 16:41:31 +02:00
Alexander Chemeris 68e8b2b1d5 trx: Fix typo in a log message. 2015-09-22 16:41:31 +02:00
Alexander Chemeris 391ff14977 trx: More logging for voice frame decoding functions. 2015-09-22 16:41:31 +02:00
Alexander Chemeris cf18dcd5fd tests: Update bursts_test to accommodate BER calculations. 2015-09-22 16:41:31 +02:00
Alexander Chemeris 6fceaca584 trx: Implement BER calculations.
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.
2015-09-22 16:41:31 +02:00
Thomas Tsou ddc0bf14d5 TRX: Remove extra TCH/HS puncturing value
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>
2015-09-22 16:41:31 +02:00
Andreas Eversberg deb01a2652 TRX: Check if Transceiver indicates an out of range clock
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.
2015-09-22 16:41:30 +02:00
Andreas Eversberg 3cfc9d5fa3 TRX: Show which TRX does not respond or rejects a command 2015-09-22 16:41:30 +02:00
Andreas Eversberg a7d0c5ef5a trx: Set lchan inactive, only if the dedicated channel is deactivated 2015-09-22 16:41:30 +02:00
Andreas Eversberg f39c739bd6 TRX: Activate LCHAN of CCCH when CCCH is configured on time slot 2015-09-22 16:41:30 +02:00
Andreas Eversberg f66f5b3ddc TRX: Free bust buffer memory to when changing lchan type 2015-09-22 16:41:30 +02:00
Andreas Eversberg c241afa87c TRX: Add VTY option to allow setting RTS advance in frames
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.
2015-09-22 16:41:30 +02:00
Martin Hauke 178d618d5a TRX: fix some typos in comments 2015-09-22 16:41:30 +02:00
Martin Hauke c9ddb2ba22 build: Use AM_CPPFLAGS in Makefile.am
Since automake 1.13 INCLUDES is depricated and causes a warning
Inspired from similar patches by Alexander Huemer for other osmocom
projects.
2015-09-22 16:41:30 +02:00