Commit Graph

1038 Commits (master)

Author SHA1 Message Date
Harald Welte 6ee9dccddb osmo-trx-uhd: Make sure HOME environment variable is set
It turns out that uhd versions >= 4.0.0.0 *require* that either the
HOME or the XDG_CONFIG_HOME variables are set, and otherwise will
terminate the program.

Change-Id: I1816013c507da28719590f063da0a397da656a10
Closes: OS#6269
2023-11-24 10:38:34 +01:00
Eric Wild 242ceb25d1 devices: fix wrong gain to power mapping
The dev type was set too early, but the actual dev is only being
discovered during open, so update it. This broke the gain to power
mapping by defaulting to a wrong device.

Change-Id: I1dda6023ca6f15bc063c3dfbc704db2410ff7c98
2023-11-09 09:51:07 +00:00
Eric Wild b52650f157 ms: init blade with fpga control
Blade 1 defaults to fpga tuning, but the blade 2 code defaults to host,
which does 8000 register reads and writes. The only way to speed this up
is to set the env var, which reduces opening the blade device from 10 to
1 seconds.

Change-Id: I32fe31f1e11f4ceb3c864ec8739d177e780d0a7e
2023-11-03 20:37:51 +01:00
Eric Wild 992a49e586 ms: reduce rx burst queue size
This should be fine, because we can at most receive 1.5 bursts of data
at once and produce 2 bursts with previous data, so if this is insufficent the usb buffers are late or the upper layer is stuck and we're in trouble anyway.

Change-Id: Ifb8bf2894c87e4234e3d3f65d66c1e98c8f63c53
2023-10-04 12:53:18 +00:00
Vadim Yanitskiy ad9b8b4211 osmo-trx-ms: bump osmocom-bb submodule commit
The new revision contains an important fix [1] for GPRS scheduling.

Change-Id: Ibb57b29bb0424a40836819c15d25d1133f554d32
Related: [1] osmocom-bb.git I439615639b8e840b9fd4f3af6934d9f298f32216
Related: OS#5500
2023-10-03 23:57:24 +07:00
Eric Wild 0f4381d480 ms: adjust ts advance
..and fix the delay warning.

I'd rather have a proper fn advance of 1, but that breaks gprs, but just
slightly increasing the ts number is sufficient to fix issues with late
tx bursts that then get silently dropped by the sdr.

The mobile app does not care, and will happily work even with fn+3.

Change-Id: I46b3ea6b0094026bd50709739df464438f9e54c4
2023-09-20 15:19:13 +02:00
Pau Espin 2ada887367 Bump version: 1.5.0.50-5042-dirty → 1.6.0
Change-Id: I718c6223d0b1a2ffb68887c159546b78e141dffa
2023-09-12 15:56:58 +02:00
Pau Espin 5042156437 ms: update osmocom-bb submodule
Change-Id: I5e1a5f385e7d5e041142e665181d68ad5bb22230
2023-09-06 13:45:28 +02:00
Vadim Yanitskiy 70ed3d586e ms: logging: print category, level, and extended timestamp
Change-Id: I14da3c9e77681268e4f575a6ca7220eedbf2a7a5
Related: osmocom-bb.git Ie3d259f3255d8af80e6780f850b808fa243f97b4
2023-09-06 02:28:41 +07:00
Eric Wild 3dfbb6d9f6 ms: bump osmocom-bb submodule to current head
Change-Id: I9a16de0dce2e89fb522271ba63d908e33a1d7cde
2023-08-31 17:23:12 +02:00
Eric Wild 58294fde4b ms: fix a few coverity complaints related to initialization
Change-Id: I203f4da7a4418fc5053d26901bec649d04fad096
2023-08-30 13:54:22 +02:00
Eric Wild d372eb2f0b ms: fix thread prio startup issue
This fixes the 20 second startup delay caused by tx/control threads
getting temporarily stuck while trying to set their own priority.

Apparently the only sane way for core affinity+priority is to set both
as attributes during thread creation using pthreads.

This switches the cmd queue to the timeout version, too, to ensure the
thread doesn't get stuck waiting for messages, and allows cleaner exits.

Change-Id: I7e2f83a9b9df024acaf9076c58189cb6b7bcc34b
2023-08-30 13:54:18 +02:00
Eric Wild 287ae681b7 ms/va: make ancient gcc < 8 happy
Change-Id: Ib94b9b073a0d2af84ce5791b5f40c63cd7ef9329
2023-08-30 11:54:26 +02: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 a5a2275a08 ms: restructure the va code to add rach support
This commit adds support for rach bursts to the viterbi equalizer, which
is currently only being used by the ms side, so the equalizer can be used
by the osmo-trx network side, too. The difference is that rach bursts are
shorter than any other burst type (due to unknown TA) and start with
diffrent tail bits.

This drops the multiversioning which was only working for x86 anyway because
it can't be combined with no_ubsan.

Change-Id: I4a5cedc8c9a3289c75ce7b914eac286e601ebed0
2023-08-25 13:17:56 +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 8c1d59086e trx: fix dev-args issue
osmo_talloc_replace_string used by the vty needs a talloc string.

Change-Id: Ifed8fd42dc7464899de69985f3b5f5b47c88a7d1
2023-08-24 11:43:47 +02:00
Eric Wild f57a86131e ms: drop the tx burst padding
useless.

Change-Id: Ied5c3ab5dde975e11b0ef6d9cbc86be19173c4e8
2023-07-28 12:19:41 +00:00
Eric Wild 7d5c16590c ms: fix blocking logging
Change-Id: I0f5dcb13d1bd9e626e1eeab6ca767ca1b5ae43b8
2023-07-25 18:25:49 +02:00
Eric Wild f8c7a52521 devices: add freq/gain override for uhd
This allows using arbitrary gain and frequencies.

Change-Id: I3c1b9a067cafc6d696b9aa2da8ee0480ec1e094f
2023-07-25 18:25:49 +02:00
Eric Wild c0f78a37ed devices: unify band handling
This is basically common, but optional code.

Change-Id: I64f5a462451e967d4750d8e4f1d5832cbab41cff
2023-07-25 18:25:49 +02:00
Eric Wild 19e134a626 transceiver: pass cfg struct instead of args
Passing 7 args is a bit much, just pass the config struct instead.

Change-Id: I48386900d15ff4d770c70a4efc246d32f921904b
2023-07-25 18:25:49 +02:00
Oliver Smith a98521ac05 USRPDevice:updateAlignment: remove byteswap code
After upgrading our CI environment to use Debian 12 with GCC 12, the
byteswap code fails the build with the following. I've talked to Eric
about this and he recommended to just remove the code as practically
nobody will use osmo-trx with a big endian system.

USRPDevice.cpp:591:30: error: 'data' is used uninitialized [-Werror=uninitialized]
  591 |   *wordPtr = host_to_usrp_u32(*wordPtr);
      |              ~~~~~~~~~~~~~~~~^~~~~~~~~~

Related: OS#6057
Change-Id: I806d8c1432cb20efca1830a2752a4cbc70384b54
2023-07-13 14:34:59 +02:00
Eric Wild df4520df77 ms: make init call less confusing
Change-Id: I122b0c8cf97e5efcbc60cd95e8bd06a50d57eb57
2023-07-07 19:16:40 +02:00
Eric Wild 2f40abd8f5 ms: sch: drop intermediate softvector
Change-Id: Iadc8f224f9e43282339197b11f388fc574656299
2023-07-07 19:16:40 +02:00
Eric Wild 6a3e4b32f0 ms: flexible template for value_type buffer sum
Manual attempts to get the number of complex and single samples right
turned out to be a bit error prone at times...

Change-Id: I3c9953073555e3a7f70b78b0946dfdf949175a82
2023-07-07 19:16:40 +02:00
Eric Wild c3e515a28b ms: rearrange code to allow clean exits
This allows gracefully terminating the application by introducing queue
timeouts.

Change-Id: I0b8deebc63cf4d936666fd68e1666d1917e89a5d
2023-07-07 19:12:39 +02:00
Eric Wild bcaafcaa9d ms: prune common sch acq code
Change-Id: Ife639a78a4463f992247c19e0177f683db2ae0b7
2023-07-07 19:12:39 +02: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 e44cf44af4 ms: pretty tx buf class
Change-Id: I96c5dd79426a52e7fff2df27bdaa3fae0c69491a
2023-07-07 19:12:39 +02:00
Eric Wild c0f0a6105a ms: cache frequency
Don't waste time setting the same frequency again.

Change-Id: Ide9f45130955e1cc66610a50d6fc1cd79f30aca9
2023-07-07 19:12:39 +02:00
Eric Wild da5ffd6e01 ms : rename var
Change-Id: Ia90a9f73fdb1f96fa5bd7f27b3c191ce0ba6c65d
2023-07-07 19:12:39 +02:00
Eric Wild 40978041ad ms : rename var
Change-Id: I44e5d1770b248f107abce5683d5f7641655da764
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 4080cd05ba ms: block burst q to upper layer
The timekeeper should never wait for lazy readers, because that causes
timekeeping and later usb transfers to fail.

Change-Id: Id0aad606a296b2885617013ce6637204357b13d7
2023-07-07 19:10:55 +02:00
Eric Wild b3157b91bb ms: fix startup & shutdown of blade
One of the mystery bugs was that the blade ms needed two starts
after powercycling the bladerf due to transfer timeouts.
This is now fixed.

Change-Id: I1cd8790191790f4861a70bc55c8f4c9993fa10c8
2023-07-06 18:17:06 +02:00
Eric Wild 805e0d9c6b ms: prettify scheduling + add odroid
Change-Id: Icaf42fd5f76dc2d53dc526558aa8ceaa9c190f7b
2023-07-06 18:17:06 +02:00
Eric Wild 4b2b98b067 ms: fix the gain init for blade
Change-Id: Ic5a25d6f5606fba599b8144fbec7285047dca3c9
2023-07-06 18:17:06 +02:00
Eric Wild 2e6c362b9c ms : fix the template formatting
Those lines predate the .clang-format changes.

Change-Id: I891bdf95004accebbbe54916e4472bd381fac545
2023-07-06 16:06:05 +00:00
Oliver Smith 7e47a521ef systemd: depend on networking-online.target
Related: SYS#6400
Change-Id: Idadcbbf55e976ae035cfac4b85ccd870e0f27b82
2023-05-26 14:10:49 +02:00
Oliver Smith f35515c015 debian: set compat level to 10
Related: OS#5958
Change-Id: Ib3d33f323b0c3004911ec026612934c12c1162aa
2023-04-25 16:48:33 +02:00
Vadim Yanitskiy 874542ca7c CommonLibs: clean up and fix Makefile.am
* Do not hard-code '-O3' and '-g', let the user decide on them.
* Move '-lpthread' to LIBADD, it shall not be in CFLAGS.
* Also add '-Wall' to AM_CFLAGS.

Change-Id: Ia971fc4124b405514792e5309d42936aaebdc8c1
2023-03-14 13:16:09 +00:00
Vadim Yanitskiy f476a6755b CommonLibs: remove unused *trx in cfg[_no]_ctr_error_threshold_cmd
Compilation fails when building with -Wall and -Werror:

trx_vty.c: In function ‘cfg_ctr_error_threshold’:
trx_vty.c:469:18: error: unused variable ‘trx’ [-Werror=unused-variable]
  struct trx_ctx *trx = trx_from_vty(vty);
                  ^~~
trx_vty.c: In function ‘cfg_no_ctr_error_threshold’:
trx_vty.c:501:18: error: unused variable ‘trx’ [-Werror=unused-variable]
  struct trx_ctx *trx = trx_from_vty(vty);
                  ^~~

Change-Id: I3d74c3f38aa03608a32b9dee472e49236543c87f
2023-03-14 13:16:09 +00:00
Vadim Yanitskiy 1ddd727bb4 ipc-driver-test: clean up variables in Makefile.am
* AM_CPPFLAGS is for preprocessor flags like '-I' or '-D',
* AM_CFLAGS/AM_CXXFLAGS is for C/C++ compiler flags like '-Wall',
* AM_LDFLAGS is for linker flags like '-no-undefined', not libraries!
* Link ipc-driver-test against libdevice.la,
* Do not put $(UHD_CFLAGS) everywhere.

Change-Id: Iafd68974c9c613fb4e65a01d076b2c687b716c83
2023-03-14 13:16:09 +00:00
Pau Espin 8a4362459d Call osmo_fd_unregister() before closing and changing bfd->fd
Change-Id: Iffc7d89166be1cf3cd1f8c3effe90f04d5c5a9c1
2023-03-14 12:54:20 +00:00
Vadim Yanitskiy 5ba130c381 tests: LMSDeviceTest: fix CPPFLAGS vs CXXFLAGS
* AM_CPPFLAGS is for preprocessor flags like '-I' or '-D',
* AM_CXXFLAGS is for C++ compiler flags like '-Wall'.

Change-Id: I82fc1eb6796f5289f0feff7bee5264bfacd6e733
2023-03-11 05:33:37 +07:00
Vadim Yanitskiy fed58d97b8 tests: use -no-install libtool flag to avoid ./lt-* scripts
This option should be used for any executables which are used only
for testing, or for generating other files and are consequently never
installed.  By specifying this option, we are telling Libtool that
the executable it links will only ever be executed from where it is
built in the build tree.  Libtool is usually able to considerably
speed up the link process for such executables.

Change-Id: Ieb4ddc5799819c24ed357218c7b0197bcb6b5c91
2023-03-11 05:33:36 +07:00
Vadim Yanitskiy 0e13bfd18c tests: there shall be no libraries in LDFLAGS
Change-Id: I95b07b5a7735fb2753281555a4544f1ba967579e
2023-03-11 05:33:10 +07:00
Vadim Yanitskiy cf1ca2e92e tests: Makefile.am: move -I flags from AM_CFLAGS to AM_CPPFLAGS
* AM_CPPFLAGS is for preprocessor flags like '-I' or '-D',
* AM_CFLAGS is for C (not C++!) compiler flags like '-Wall'.
* AM_CXXFLAGS is for C++ specific compiler flags like '-Wall'.

By having the preprocessor flags in the proper variable we make
sure that they apply to both *.c and *.cpp files.

Change-Id: I7b3504a01e3350834b35c42d8d76d5d88d84a4b9
2023-03-11 05:31:57 +07:00