Commit Graph

58 Commits

Author SHA1 Message Date
Eric Wild 3d8598d460 ms: disabe uhd ms build
This won't build, and has been in a untested non working state for a
year, but might still be useful after fixing it up in the future in case
someone needs it.

Change-Id: I9db1740b5c399a02a41b1d07792c645cf7d1bd1b
2024-03-21 09:55:16 +01:00
Eric Wild 989fe75038 ms: get rid of std::thread
2fc2b594da6e329577b195cb2543a8dd9e1b9ed0 changed std::thread to pthread
for proper affinity to circumvent startup issues, so just stick to
pthread instead of mixing std::thread and pthread, which made tracking
thread creation difficult due to different functions.

Change-Id: I0ba2fd958530394b9d99ed82111064d428c5870f
2024-02-21 19:38:30 +01:00
Eric Wild cca5d93f66 transceiver: add experimental viterbi equalizer support
The VA is already being used by the ms side and is part of the original
gsm design. It only works for gmsk, 4sps, and needs a bit of rx burst
scaling and burst shifting.

Change-Id: I9d7a4ff72e323832a94d885d5714fcde01ceeb3d
2023-08-25 13:18:04 +00:00
Eric Wild 1499f0343a ms: update osmocom-bb
..and sync the log levels.

Change-Id: I6f9fca7a4d6a02e82bf406fd136c5bde96bb93af
2023-08-25 13:17:56 +00:00
Eric Wild ea7bd5fb91 ms: remove syncthing tool
Only used for testing during the first stages of development.

Change-Id: Ie97069a109324b6e96c66a4b24d03f9745b6a52e
2023-07-07 19:12:39 +02:00
Eric Wild 135d64b1a9 ms: rearrange internal trxcon<->phy if
Change-Id: I20aef3844f7699e164fe089358aa7e2325608c85
2023-07-07 19:12:39 +02:00
Eric Wild 3e7f4b0da9 ms: use single thread pool
...so we don't spawn threads all the time.
Used for gain avg/setting.

Change-Id: Id675550f55e8ccbbbe6b0d91fbffd01b6ede15f7
2023-07-07 19:12:39 +02:00
Eric Wild b7253c6fdc ms-trx support
This is basically a trxcon that includes a transceiver, and can just
be used with existing and future apps supporting the trxcon interface,
i.e. mobile or ccch_scan.

Supports bladerf and uhd.
Currently using hardcoded sched/prios aimed at a setup with working,
reliable usb and reserved cores, for example a raspi 4 (ONLY 4, not 3,
not 2, not any other version)

Additionally builds test tools used for development: osmo-trx-syncthing*

see https://osmocom.org/projects/baseband/wiki/MS-side_GPRS for the
project description and details

Change-Id: I36c65a8c725c4da76dc70006cd96b0a2b6878e84
2022-12-23 13:41:13 +00:00
Eric Wild 7d897cb5b0 bladerf xa4 support
This is not really finished, there are multiple reasons to not use this:
1) main clock is not a gsm multiple, so it will continously drift
2) small buffer sizes lead to tx gaps that are hard to detect and break
everything.

Change-Id: I455c34bb9520d5f09eeb1ac76fceb4bdea94d1ac
2022-12-06 09:45:06 +01:00
Eric Wild 1e17c4fb0a osmo-trx-ipc
This adds a IPC backend that uses shared memory interface
to communicate with (proprietary) devices.

Requires config file option
dev-args ipc_msock=/path/to/socket
to specify the master socket the ipc backend should connect to.

If UHD is avaialble the ipc-driver-test tool can be used to test the
backend with a uhd device, this was so far only tested with a b2xx.

Change-Id: Ice63d3499026293ade8aad675ff7a883bcdd5756
2020-08-25 01:00:03 +02:00
Pau Espin cbc02086d5 Move std_inband.rbf under device/usrp1/ dir
This file is only used by USRP1, so let's move it there and avoid
processing it in Makefiles if build for USRP1 is not requested at
configure time.

Change-Id: Ibb40ba487581e76d2ae3e8a420d631670f876cf0
2019-08-01 13:46:00 +02:00
Pau Espin 06d3ba0445 Move Transceiver52/README to UserManual
Change-Id: Ib5a56cfe0c27d027bc0c60abda89e646a80849de
2019-08-01 13:46:00 +02:00
Pau Espin 15fa64bce4 Transceiver: Move out TRXD socket send code to prepare for TRXDv1
Only old v0 is supported so far. TRXD protocol related data/logic is
moved to its own file out of Transceiver class. Code is refactored so it
can be re-used later by TRXDv1.

Related: OS#4006
Change-Id: I5786dd44b076202c6f1a6e82405670e8605797ed
2019-07-19 11:44:13 +00:00
Pau Espin 778b30a530 Introduce structs to encode TRXD packets
This will ease adding new protocol versions in the future.

Related: OS#4006
Change-Id: I67ffede171eddde436f9057191ed76015a8ea6eb
2019-07-01 16:13:10 +02:00
Pau Espin b5def414b8 smpl_buf: Move it to device/common and create libdevice_common.la
Since in next commit osmo-trx-lms starts using smpl_buf.cpp, it seems
some automake step doesn't like including a cpp file twice from a
different directory, since race conditions can occur building it.
Instead we define the dependency by first building a static lib and then
using it on each libdevice.la (one per device type).

We already do the similar under arch/ subdir, where we have a common/
subdir and then one subdir and lib per architecture.

Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35
2019-05-06 11:23:18 +02:00
Pau Espin f7905ac548 lms: Makefile.am: Reorder params to fix link issue
It seems the order in which static code and -lfoo is passed to the
linker matters.

This commit is a lms specific follow-up of commit
2a8183bdf0.

Change-Id: I59c20d268ecac4c22689124165c47295bd9176d4
2018-06-13 21:45:32 +00:00
Pau Espin 1f50fedb5f build: Add support for LimeSuite device backend
Change-Id: I239e1b37263a62b374d84974c9347e3654072e87
2018-06-13 21:45:32 +00:00
Pau Espin 2a8183bdf0 build: More OBS build failure fixes
It seems the order in which static code and -lfoo is passed to the
linker matters.

Change-Id: I3b25be0154053ae8eb5f0a24c39fb9a229130fcf
2018-04-28 01:38:30 +02:00
Pau Espin 478f82f47e build: Fix make distcheck
Change-Id: I1fa5e34b44331cd56408ea7ad4483dcf6443b259
2018-04-27 11:34:11 +02:00
Pau Espin f3d7f443a0 Build one osmo-trx binary for each device support enabled
Same way as we do in osmo-bts. After this commit, osmo-trx no longer
exists. Instead, osmo-trx-uhd and osmo-trx-usrp1 are generated based on
configure flags enabled.

A new flag --with(out)-uhd has been added to enable/disable build of
osmo-trx with UHD backend. It is left enabled by default to keep
compatibility with older build scripts. Binary with USRP1 backend must
still be manually enabled with --with-usrp1 flag.

Change-Id: Iea8c0d7434762713a53440d29bf3ebd84accb262
2018-04-24 19:17:22 +02:00
Pau Espin a4316ee4c5 Change configure define USRP1 to DEVICE_USRP1
Similar as we do for ARCH_*, it's easier to find those are related to
device support features.

Change-Id: Iba238bff689b8f944af76120402c0fa2e29a70de
2018-04-24 18:46:48 +02:00
Pau Espin 2128a308eb Move device specific files to device subdir
Change-Id: Ib42fef14bf4c7b779f44d99711a35c18b32a4c21
2018-04-24 18:46:48 +02:00
Pau Espin 43fedb656b Move arch specific fiels to arch subdir
Take the chance to update some includes using files available in that
subdir to have them ina more uniform way.

Change-Id: Ibda3c54fd4dc3f6b845cc373f1a1e6b758c1ea82
2018-04-24 15:22:59 +02:00
Pau Espin 8fbbd656c7 Build Transceiver52M/common as an .la lib
Stop picking files from that directory on different places as it causes
dependency issues during make distclean/maintainer-clean.

Fixes: OS#3029

Change-Id: I81bb4251d18fce978d27849b621b20f541caab0b
2018-03-08 14:53:13 +01:00
Pau Espin b35cba613a Makefile.am: Avoid using subdir if arch is not required
There's no need in going a level deeper if we already know nothing's
going to be done. This way we also get cleaner make outputs.

Reference: https://www.gnu.org/software/automake/manual/html_node/Conditional-Subdirectories.html#Conditional-Subdirectories

Related: OS#3029

Change-Id: I3ff57ab14edc575904e8137929a0ef02c95e03af
2018-03-07 19:46:42 +01:00
Pau Espin 5ea1817dc2 Add initial support for logging, vty, ctrl
Up to this point, the logging system, vty and ctrl are initialized and
can be used fine, though they don't have a lot of use yet.

Depends on libosmocore Change-Id Ib79cdb62d45d8c78445c7b064e58eb7e9faeccf9

Related: OS#2184

Change-Id: I08982c37b4f873966304b3cfb38a10ee86eb3dad
2018-02-27 07:10:50 +00:00
Pau Espin 8b843e5bed Depend on libosmocore
Change-Id: If345c89293fcd7d1ad4f17214eea339951f25a5d
2018-02-22 20:04:47 +01:00
Pau Espin 89be118a3b Remove unneeded libdl dependency
Closes: OS#1929

Change-Id: I0caea2a2a8e6bd07432fd73bae72b42b1ce022cd
2018-01-23 18:15:24 +00:00
Alexander Huemer 6fafd33b13 Unbreak `./configure --with-usrp1` build
Change-Id: I49b385594271ae64a48d4d39ee9fe26d7c95bd30
2018-01-20 23:24:20 +01:00
Pau Espin 611212676b Move ARCH_LA to Makefile.common
It will later be used by other directories too (tests/Transceiver52M).

Change-Id: I0ca9b7fc5e1377db971cb7da0b3496ba8d61c716
2018-01-10 12:32:33 +01:00
Pau Espin caf2abc58f Remove Configuration module and libsqlite dependency
Change-Id: I823aea91367d586507bbf352f1b6f25bdd635baa
2018-01-09 15:26:50 +01:00
Pau Espin 82f83ced73 cosmetic: Remove trailing whitespace
Change-Id: I64c8dbad3fc42bcb8dd4ac9b16bbd9c59a0cf5d5
2018-01-09 15:26:49 +01:00
Tom Tsou d6ae8648ff radioInterface: Remove UmTRX 'diversity' option
The 'diversity' option was an experimental 2 antenna receiver
implementation for UmTRX. The implementation has not been
maintained and current working status is unknown.

In addition to code rot, Coverity is triggering errors in the
associated code sections.

Removal of code cleans up many cases of special handling that
were necessary to accommodate the implementation.

Change-Id: I46752ccf5dbcffbec806081dec03e69a0fbdcdb7
2017-05-19 17:25:44 +00:00
Max 2dee3e996e Fix building against sqlite3
* Explicitly check for sqlite3 at configure stage, remove old include
  dir, fix header inclusion.
* Use configure results for linking instead of hardcoded linker option
  for sqlite.
* Add dependency on -dev package for .deb

Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e
Fixes: OS#1928
2017-01-26 17:06:06 +01:00
Tom Tsou 7676427816 mcbts: Add multi-ARFCN radio support
Add new radio interface "radioInterfaceMulti" for multi-carrier
support.

Only USRP B200/B210 devices are supported because of sample
rate requirements (3.2 Msps).

Only 4 SPS operation Tx/RX is supported.

8-PSK is supported.

Other options may be added at a later time

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:14:15 -07:00
Tom Tsou 35222296fe mcbts: Add multi-ARFCN channelizing filters
Introduce polyphase channelizer (Rx) and synthesis (Tx) filterbanks,
which serve as the signal processing backend for multi-carrier GSM.

Fast Fourier Transform (FFT) is used internally. FFTW is added as
a new build dependency.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:07:27 -07:00
Tom Tsou 28670fb5da iface: Add inner ring-buffer implementation
Two buffers, inner and outer, are used in the transceiver
implementation. The outer buffer interfaces with the device receive
interface to guarantee timestamp aligned and contiguously allocated
sample buffers. The inner buffer absorbs vector size differences between
GSM bursts (156 or 157 samples) and the resampler interface (typically
fixed multiples of 65).

Reimplement the inner buffer with a ring buffer that allows fixed size
segments on the outer (resampler) portion and variable lengths (GSM
side) on the inner side. Compared to the previous stack-like version,
this implementation removes unnecessary copying of buffer contents.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-07-01 03:03:11 -07:00
Alexander Chemeris e476231deb makefile: Fix build from an external path.
When you build from an external path, compiler can't find convert.h
include, because it was specified relative to the current directory.
Change this to specify the include dit relative to the Makefile
location.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
2016-06-22 14:27:00 -07:00
Thomas Tsou 85b179d125 Transceiver52M: Create new osmo-trx executable
Create new main executable with full command line option parsing
of relevant parameters. Database configuration table still exists
(and must exist because of the global gConfig object), but can
be bypassed with command line options.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-16 01:44:07 -05:00
Thomas Tsou 3f32ab5afa Transceiver52M: Enable all warnings and resolve
Mainly basic signed vs unsigned comparisons and intializer ordering.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou e90a42becc Transceiver52M: Add dual channel diversity receiver option
This patch add support for dual channel diversity on the receive
path. This allows two antennas two shared antennas to be used for
each ARFCN handling channel in the receiver. This configuration
may improvde performance in multi-path fading environments,
however, noise andpotential interference levels are increased due
to the higher bandwidth used.

The receive path is oversampled by a factor of four for a rate
of 1.083333 Msps. If the receive paths are tuned within a
maximum channel spacing (currently set at 600 kHz), then both
ARFCN frequencies are processed by each channel of the receiver.
Otherwise, the frequency shifted diversity path is disabled and
standard non-diversity operation takes place.

Diversity processing is handled by selecting the path with the
higheset energy level and discarding the burst on the second
path. Selection occurs on a burst-by-burst basis.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 20eb6d64fd Transceiver52M: Separate signalVector into it's own file
Break out the signalVector object and clean up the interface in the
process.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:35:07 -05:00
Thomas Tsou 0a3dc4c210 Transceiver52M: Add NEON complex-complex multiply
Complex-complex block multiples are used for phase rotation of
bursts. Optimization targeted from perf profiling.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:34:59 -05:00
Thomas Tsou 7e4e536b1b Transceiver52M: Add ARM NEON support
Similar to the existing Intel SSE cases, add support for NEON vector
floating point SIMD processing. In this case, use ARM assembly
directly as the NEON intrinsics do not generate preferential code
output.

Currently support NEON vectorized convolution and floating point
integer conversions.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-15 23:32:35 -05:00
Thomas Tsou 66e2dd2543 Transceiver52M: Remove unused files and utilities
USRPping and sigProcLibTest are in an unmaintained state,
while the intended functionality remains unknown. Stored
filter taps are also unused and should also be removed.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-08 11:33:31 -05:00
Thomas Tsou fffd987f22 build: Set UHD driver as default configuration
Currently the default configuration is to not build the full
transceiver, which is pointless. Set the UHD driver, which
includes either Ettus or Fairwaves variants, as the default.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-04 10:23:24 -08:00
Thomas Tsou 17bbb9b755 Transceiver52M: Separate architecture specific files
Move x86 specific files into their own directory as this
area is about to get crowded with the addition of ARM
support.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-11-04 09:15:55 -08:00
Thomas Tsou 9471d7635a Transceiver52M: Add SSE floating point / integer conversion
Convertions are performed in multiples of 4 or 8. All loads are
considered unaligned.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:17 -04:00
Thomas Tsou 03e6ecf977 Transceiver52M: Replace resampler with SSE enabled implementation
Replace the polyphase filter and resampler with a separate
implementation using SSE enabled convolution. The USRP2 (including
derived devices N200, N210) are the only supported devices that
require sample rate conversion, so set the default resampling
parameters for the 100 MHz FPGA clock. This changes the previous
resampling ratios.

  270.833 kHz -> 400 kHz      (65 / 96)
  270.833 kHz -> 390.625 kHz  (52 / 75)

The new resampling factor uses a USRP resampling factor of 256
instead of 250. On the device, this allows two halfband filters to
be used rather than one. The end result is reduced distortial and
aliasing effecits from CIC filter rolloff.

B100 and USRP1 will no be supported at 400 ksps with these changes.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:17 -04:00
Thomas Tsou 3eaae80c90 Transceiver52M: Replace convolve and related calls with SSE implementation
This large patch replaced the convolve() call with an SSE vector
enabled version. The lower C and SSE intrinsic based code operates
on fixed and aligned vectors for the filter taps. The storage format
of interleaved I/Q for both complex and real vectors is maintained.

SSE filter tap values must:

  1. Start 16-byte aligned
  2. Number with a multiple of 4 between 4 and 20 for real taps
  3. Number with a multiple of 4 for complex taps

Non-compliant values will fall back to non-SSE usage. Fixed length
iterators mean that head and tail cases may require reallocation of
the input vector, which is automatically handled by the upper C++
interface.

Other calls are affected by these changes and adjusted or rewritten
accordingly. The underlying algorithms, however, are unchanged.

  generateGSMPulse()
  analyzeTrafficBurst()
  detectRACHBurst()

Intel SSE configuration is automatically detected and configured at
build time with Autoconf macros.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
2013-10-18 13:10:17 -04:00