Commit Graph

571 Commits

Author SHA1 Message Date
Harald Welte a5054b398b LMSDevice: Typo fix: s/Internal/External
Change-Id: Icacfe6da90a89c7f00d62c580948fb913998eaa7
2018-06-13 21:45:32 +00:00
Harald Welte a438114173 LMSDevice: Print sample rate range + actual sample rate after setting it
Change-Id: I19c1a5b2d2431b8d39e277244e313f6e559e4d25
2018-06-13 21:45:32 +00:00
Harald Welte 9cb4f27112 LMSDevice: Call LMS_Init() before setting sample rate
LMS_Init() will override basically all device settings with their
default value, including the sample rate.  We hence have to make sure
to call it before any other API function that changes the device config
such as sample rate, frequency, filter bandwidth, ...

Change-Id: I4cdbae8406b5e1e93da491e90f8bad41d4be748b
2018-06-13 21:45:32 +00:00
Harald Welte c38e45e9dc update .gitignore to include osmo-trx-lms
Change-Id: I52efd2f71eb61baa80427ab9f7b518f17d514792
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 c7a0bf1ffc lms: Several improvements and compilation/runtime fixes
Continuation of initial work done on LimeSuite support from Harald.

Change-Id: Ib2fca81b76d027b08e2891056fa076d071597783
2018-06-13 21:45:32 +00:00
Harald Welte 940738e86a Initial work towards direct LimeSuite support in OsmoTRX
This is work in progress towards a direct LimeSuite driver in OsmoTRX,
bypassing the currently rather complex stack of wrappers by going
through UHD, SoapyUHD, SoapySDR and LimeSuite.

Change-Id: Iaef29c4c2585ef8c2f94866c9591919f538c1a2d
2018-06-13 21:45:32 +00:00
Pau Espin 8c1e2bddff examples: Set rt-prio 18 and print file basename
Change-Id: I16fbdd46f2d9b6f3e79a4bb357f6a7fbed14244a
2018-06-12 18:23:40 +02:00
Vadim Yanitskiy 01eea0aa42 trx_vty.c: fix: use CONFIG_NODE as parent by default
There are some configuration nodes, which are handled by extenral
libraries, such as libosmoctrl. So, when switching back to the
parent node, this should be kept in mind.

Instead of aborting, let's got to the CONFIG_NODE by default.

Fixes: OS#3250
Change-Id: Ia0600a46d19825806e5aed9257b6c57c3907808b
2018-05-09 15:19:56 +07:00
Pau Espin 55df1e43e3 UHDDevice: Fix setup failure with LimeSuite > 18.04.1
Fixes: https://github.com/myriadrf/LimeSuite/issues/184

Change-Id: I48ead8b8996981263297b66c0c7d3d0972261316
2018-05-08 20:49:04 +02:00
Pau Espin e9424e241f doc: examples: Add umtrx sample config
Change-Id: Id38de0bbbe75e5e6bbb0de2eecb7d1984786d528
2018-05-04 14:01:50 +00:00
Pau Espin d0ac926b56 Bump version: 0.3.0-dirty → 0.4.0
Change-Id: Ifc469bce89d52012e1f876c847b4535360a602ad
2018-05-03 16:23:30 +02:00
Pau Espin 00d5114717 git-version-gen: Take into account tags not in master
Latest tag 0.3.0 was created in a release branch instead of master. As a
result, git describe doesn't show them. Let's instead reuse git command used in
osmo-ci to get latest tag from tag list when OBS latest repository is
built.

Change-Id: I3e461d4270b5e6d4c42126df4deef5651dca1e27
2018-05-02 21:29:05 +00:00
Philipp Maier 3a496f3b8a doc: add example config for usrp B200 series
Change-Id: I1a80ddd9ca9b143e9c89618616f30fe3f3547d7b
2018-05-02 18:41:34 +02:00
Harald Welte fad2e09840 osmo-trx: s/GSM Core Address/GSM BTS Address/
The TRX connects to the BTS, not to the "Core".  The Core network
is miles away...

Change-Id: I6de2f708fc7a7df7dea16314b7dfa4ab82f15b2c
2018-04-28 21:43:40 +02:00
Harald Welte e09e80f5ee update .gitignore for new executable names
Change-Id: Id698024485176e5201ca92c72b1bd1d5914aff32
2018-04-28 21:43:36 +02:00
Harald Welte 2e276e7edd debian/control: Add build dependency to libusrp-dev
Change-Id: I9593c9e45d304b7ffc94474e94450da418838513
2018-04-28 14:38:16 +02:00
Harald Welte dffc21725c debian: Ensure USRP1 firmware is part of osmo-trx-usrp1
The std_inband.rbf files are required to operate USRP1 with timestamps

Change-Id: I9b3e937ea1941953dcdcaf57cfec9575cd5a8a9c
2018-04-28 14:22:57 +02:00
Harald Welte 96f0f2cf7e debian/rules: Make sure we always require libusrp
Change-Id: Id9c9188a24617f83efa0e1fcf54f9e0dd223e365
2018-04-28 14:21:14 +02:00
Harald Welte 225b16d48e debian/control: Remove "Maintainer" from binary package section
This resolves the following warning:
dpkg-source: warning: unknown information field 'Maintainer' in input data in package's section of control info file

Change-Id: I7a8d8c54eabccc5cedf7ad0a2bccf91f32f1bfdf
2018-04-28 14:21:14 +02:00
Harald Welte 0ebbb2ed2e Revert "debian: Remove osmo-trx-usrp1 until we can build libusrp1.deb"
This reverts commit 295b938d51, as we now
have libusrp built in OBS

Change-Id: Ia1311f1e236e6aea4acc08d3f234d53e46789cf9
2018-04-28 14:21:14 +02:00
Pau Espin 2fea950644 build: Fix OBS build for ARM
Change-Id: Ic6b408d684e2bb58af71ec04ced7e73e0d38ffcd
2018-04-28 01:44:39 +02:00
Pau Espin d0a97a5f73 debian: Fix OBS build
osmo-trx is a metapackage, no need for .install file.
Debug files are always put into osmo-trx-dbg, no osmo-trx-*-dbg.

Change-Id: I160dd83b265dcda52762a9f9c7eac9337928da35
2018-04-28 01:38:30 +02:00
Pau Espin 295b938d51 debian: Remove osmo-trx-usrp1 until we can build libusrp1.deb
Change-Id: I43163755a29014fe1f098e994f8df79d853c90f8
2018-04-28 01:38:30 +02:00
Pau Espin e8605202ab jenkins.sh: Enable build of osmo-trx-usrp1
Change-Id: I44a978fdd7fac683520be3586d84783e5e13de5f
2018-04-28 01:38:30 +02: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 f37b0ad652 Transceiver: log timing info of stale bursts
Change-Id: I043fd8199253bdf3912c7aec2ccf98f8cbe54251
2018-04-25 20:14:55 +02:00
Pau Espin 3b78cbfdc1 Logger: Print correct source file and line number
Before this commit, always Logger.cpp:53 was being printed.

Change-Id: Ie5c64b4961c7c41d23484784a93eda5e08331f08
2018-04-25 16:45:34 +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 e564f0fd84 Transceiver: Move device specific code to radioDevice class
Change-Id: Ibcf258d8bf8595e286682e0bc59391b239ea7642
2018-04-24 18:46:48 +02:00
Pau Espin 0fc20d14b3 Move device specific code out of radioInterface
This way code of radioInterface is independent of the device and doesn't
need to be rebuild for each device.

Change-Id: Id104e1edef02f863b6465ced5b4241050dc188f9
2018-04-24 18:46:48 +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 53bdb7f82a configure.ac: Add --enable-sanitize option
Change-Id: I1b5154a47bb2f66103ac254a0f422e8a80b2d3e0
2018-04-16 15:17:48 +00:00
Pau Espin 6462dd3963 tests: Makefile.am: Fix typo in include path
Change-Id: I036f1f587f2a5eaf93ec8fb619bf76b571c1633a
2018-04-16 15:35:57 +02:00
Pau Espin e1977fcd22 use osmo_init_logging2()
Change-Id: I2c28e6e6e3eb9f587680b34330e03408e32c2b94
2018-04-16 14:50:55 +02:00
Alexander Couzens f97296e0ce jenkins.sh: change qemu-img default location to $HOME/qemu-img instead of /opt/qemu-img
Change-Id: I56f314d78c0ca968b1fef9a91ecd540a7cc8fa86
2018-04-12 09:23:28 +00:00
Martin Hauke 20259cb307 configure.ac: Fix typo
Unbreak git-version-gen when used with .tarball-version

Change-Id: Id836c6822daf1f6835a8c869624b4b40dde47f3a
2018-04-08 19:53:37 +02:00
Alexander Couzens ffa4e5938c jenkins.sh: cleanup always the workspace
It was broken before becaues of checking emptyness against literal string
will never be zero.
However it should be cleaned always because the script is executed
recursive which would also end up, never being executed.

Change-Id: Ib228ff247a72b21b12e8dd4cbe3afe3e858c89d3
2018-03-27 13:37:39 +02:00
Vadim Yanitskiy c0c6d70fe9 Transceiver.cpp: prevent out-of-range array access
There was no a simple range check for both (NO)HANDOVER commands,
so an out-of-range access was possible. For example, a command:

  CMD HANDOVER 0 -3

might enable EDGE at run-time, because:

  a[i] == *(a + i)

Let's fix this.

Change-Id: I24a5f70e8e8097f218d7cbdef8cb10df2c35416f
2018-03-14 21:12:32 +00:00
Vadim Yanitskiy 8c6c5d2bcd Transceiver.cpp: fix incorrect format string for SETTSC
Change-Id: If69a478121a31aa7df945548cc17271c476d6a6b
2018-03-14 21:12:32 +00:00
Vadim Yanitskiy a62fcf786a Transceiver.cpp: use pointer arithmetics for CMD parsing
It looks like the author of control command parsing code was not
familar with simple pointer arithmetics, so excessive amount of
memory and useless memcopying was used to parse a single command.

Let's introduce two pointers, one of which will point to the
beginning of a command, another to the beginning of its arguments.
Also, let's simplify the command matching by using a separate
function called 'MATCH_CMD'.

Change-Id: I226ca0771e63228cf5e04ef9766057d4107fdd11
2018-03-14 21:12:31 +00:00
Vadim Yanitskiy 4d9b59c3ef Transceiver.cpp: properly zero-terminate received commands
Previously it was assumed that a sender should zero-terminate
each command being sent. Otherwise, this could cause to printing
garbage. Let's do this manually, using the length of received
data as a position for '\0'.

Change-Id: I69f413f33156c38a853efc5a8cdc66fbfb0ca6af
2018-03-14 21:12:30 +00:00
Vadim Yanitskiy bd0efb0bea Transceiver.cpp: use a define for the MAX_PACKET_LENGTH
No need to keep this value on stack.

Change-Id: If9ffb03b9e7b642f45732ba5938977bca271f1c7
2018-03-14 21:12:30 +00: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 8dffadb8da osmo-trx: Re-introduce -l cmd line parameter
Parameter -l to set the terminal logging levle was removed in
3da1f8352e, but afterwards it was decided
to keep the cmd line options for a bit more to easy migration to VTY
cfg.

The command line no longer accepts keywords ("DEBUG", "INFO", etc.) but
log level numbers, due to libosmocore APIs log_parse_level and
log_level_str being marked as deprecated and for internal use only.

Keep in mind the log level is overridden by VTY cfg if any line sets log
levels for log stderr in there.

Explicit cast to unsigned int for loglvel is issued to avoid iostream
printing it as a char.

Change-Id: I91c35ecded177b7976045d9b693855adb9e18f8a
2018-03-06 18:41:29 +01:00
Pau Espin 408f25081e osmo-trx: Use VTY cfg structures while still allowing cmd line options
Existing cmd line options are kept for a while to give people some time
to move to use VTY cfg. All new cfg options should be set only through
VTY. VTY options take preference (override) over cmd line options.
Deprecated options are removed from help message to dissuade users from
keep using them.

Steps to drop cmd line options in the future:
- Drop comma_delimited_to_vector, print_deprecated
- Drop all options in handle_options marked with print_deprecated.
- Set "-c" param to do the same as "-C", to keep compatibility with old
param and still use same naming as all other osmocom projects.
- Remove the hack in main() to set 1 channel implicitly by default.

Change-Id: Ib8de1a5da4b3c0b6a49e00033f616e1d66656adf
2018-03-05 20:12:40 +01:00