* move class definition to .h file, like we do for other devices.
* move smpl_buf class to a different file inside uhd/.
* Preparation work to have smpl_buf being used in a generic way for
devices other than UHD (LMS).
Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae
ALERT log level is not Osmocom standard level, it's just a define in
osmo-trx to keep compatibility with old code.
Same goes for one reference to "ERR" intead of "ERROR".
Change-Id: I0e171a8ac8a8bfa804ac97fba3d73efcfa6424b4
No need to use the heap here since buffer is only used as a temporary
trash. Using the stack is quicker.
Change-Id: Iede8dc0903ee3865a52c8e2fd811bcde444fee33
add device dependant max gain setup - limesdr mini and limenet micro need slightly reduced maximum gains to get a PASS on phase error measurements
rework clock reference setup - external clock needs to be selected before calling LMS_Init(), internal can only be set after.
remove now unused compat_LMS_VCTCXO* functions - we do not set the VCTXCO directly anymore
Change-Id: I3cf905b0a84bc1ec200891762a6646141ee37181
move enable: it is important that channels are actually enabled before applying any configuration (besides external clock)
move disable: move to close, so channels are not disabled and not enabled again while osmotrx is active.
Change-Id: I82878913254ce15a85db8d006e13d5eb639793e9
We haven't even released any tagged version of libosmocore yet which
includes support for the renamed OSMO_FD_READ constant. Let's avoid
any breakage and use the new constants only with considerable delay,
at the very least only when released libosmocore versions provide it.
Change-Id: Idb57077b2a4b2a71dd5d75a24ded8bb5887da188
Maximum number of carriers is fixed to 3 channels on a single
physical RF channel in multi-ARFCN mode. For some reason, it
was limited to 5.
Let's fix this, and also follow this limitation in the
following VTY command handlers:
- cfg_multi_arfcn_cmd,
- cfg_chan_cmd.
Change-Id: I66a1462f368458afd313ee6f0bc0abc496dde817
This should avoid prolematic scenarios where different signal handlers
are running on different thread in parallel. Furthermore, we make sure
those signals are always run by main loop thread.
Change-Id: I9b9d9793be9af11dbe433e0ce09b7ac57a3bdfb5
Recently a blocked osmo-trx process was found after ending SIGTERM to
it.
Apparently one thread was handling SIGTERM and calling fprintf()
(grabbing libc lock) while another thread was handling another signal
and also grabbing similar lock. Both thread looked deadlocked there.
Probably this change doesn't fix the block on its own, but at least
simplifies scenarios inside signal ctx which can go wrong.
Change-Id: If91621913b8b03d8a0f4c863be0b0d479f97e8a1
Since I838c21db29c54f1924dd478c2b34b46b70aab2cd we have both TS1
and TS2 synch. sequences, in addition to "default" TS0. Let's
finally introduce the VTY configuration parameter, that can
be used to toggle optional detection of both TS1 and TS2.
Note: we keep this optional because of potentially bad impact on
performance. There's no point in paying the performance penalty
unless upper levels (BTS, PCU) actually make use of it.
Change-Id: I1aee998d83b06692d76a83f79748f9129a2547e8
Related: OS#3054
- Those are not used any where
- Those are not supported by the sse/neon accelerated versions
- And I see very little use cases for those.
Change-Id: Ic850269a0ed5d98c0ea68980afd31016ed555b48
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
There appears to have been some logic to operate a USRP1 in
transmit-only GSM mode. This is achieved using the skipRx member
of the transceiver object. However, there's nobody that ever
initializes it properly, and hence the feature is not possible to
use anyway.
I don't think this has any valid use case, so let's remove it.
Change-Id: I616193f1e9aaefbf4ceb26761657811093f28b6f
Allow selecting a specific LimeSDR device by setting dev-args in the
config file. Split up the given dev-args address by comma and select
the device where all substrings can be found.
I could not test this with real hardware, but I have added a test case
to make sure this works as expected.
Related: OS#3654
Change-Id: Ib9aaa066a01bf9de3f78234d7ada884d6f28c852
Make the "opt" argument const. This function will also be used by
LMSDevice.cpp in a follow-up commit.
Related: OS#3654
Change-Id: If3f0f682ca453c2b0a06175ec9626567932cfce6
Under failure, it could still be that stream status is updated, so let's
father that in all cases.
Change-Id: I4e2b8be06d2993db1bab233948a8ee774b8ac4ee
This log category is applied to messages related to TRX CTRL socket
interface, and it's printed in yellow, same color used in osmo-bts-trx
for TRX category (so same messages are printed with same color in both
sides).
Change-Id: I98ec5e416272783ad3fbadf70478a4e48ae64983
Original issue: In order to use SSE instructions, 16-byte aligned memory
chunks are needed, and C++ version < C++11 doesn't provide for a native
new/delete store. For that reason, memalign() must be used in the
implementation of convolve_h_alloc() for some buffers.
On the other side, The C++ code relies on C++ "new T[]" operator to
allocate a chunk of memory containing an array of class instances. As
classes are complex types, they cannot be allocated through C structures
(calling malloc). Experimentally can be seen too that it's unreliable
and the process will crash during startup if malloc() is used and then a
Complex<> deferred from it.
Previous implementation allowed for use of convolve_h_alloc or new[]
based on how the (signal)Vector is called, because then the buffer is
not going to be managed internally. But that's unreliable since resize()
calling resize() on it could use "delete" operator on a malloc'ed
buffer, and end up having a new new[] allocated buffer. It was also
found that some of the callers were actually leaking memory through ASan (because the
buffer is not managed by the Vector instance).
IMHO best option would be to rewrite all this code using C structures
and malloc/free exclusively, since it would make all this cod eeasier to
maintain.
But for now, let's extend the Vector class to allow specifying an
external alloc/free function and let the Vector instance take care of
the ownership of the buffer in all scenarios.
Change-Id: Ie484a4762a7f77fe1b105188ea03a6f025730b82
This change fixes lots of memory leaks inside libLimeSuite as
announced by ASan after exiting the osmo-trx process (throgh
CTRL+C for instance).
This way also we make sure libLimeSuite can communicate with the HW and
close whatever subsystems were enabled during LMS_Open time.
Change-Id: I56ffb87079e34aa2d0322fd2ca6429742f9f7640
They are recreated during start(). Actually, if they are not stopped
here, during start() after stop(), LMS_SetupStream() will fail because
it will detect the streams are already opened.
Change-Id: I70d47c287aabdabc5dc1304a942d130aeb10bdc5
So far, the Rx gain was set to 34 dB, wile the comment stated it
would be set to half-point, which is 73/2=36dB. Let's adjust the
code to match the comment.
Change-Id: Idc646def53b83faf4e6c011fb595fa436e223b32
Due to (I believe) a copy+paste mistake from the USRP1 code,
we were using only a scale range of up to 9830 when transmitting
samples, rather than the full 16 bit signed integer range up to
32767.
As a result, we were loosing almost two bits (MSBs) of resolution
as well as a lot of transmit power.
This changes the scale factor to 0.707 (1/sqrt(2)).
Please note that the much higher DAC output level means that the analog
gain should be reduced. The theoretic range of up to 73dB should not
be used, but Lime Microsystems suggest a value of 61..67 dB. This can
be achieved by using a "osmotrx tx-attenuation" value of 6..12 inside
the osmo-bts-trx configuration file.
Related: OS#3341
Related: OS#3342
Change-Id: I71702feaa11f53e7614a6938a984dd748405474a
When using multi-arfcn feature, several logical channels (arfcn) are multiplxed
into one physical transceiver, as can be seen in
uhd_device::set_channels.
As a result, when multi-arfcn is enabled some properties are actually
shared for those logical channels, and internally mapped to the first
(only existing) channel, and per-channel internal array variables are allocated
accordingly (size() == 1).
When setting RxGain, we need to set the correct existing physical
channel. Same check is done in getRxGain, and then we apply the RxGain correctly and
we avoid outputing an error "Requested non-existent channel" immediatelly after.
Change-Id: I5b02bb1ef6450dc48be7b8058d96a5691847d3cc
Fixes following Adress Sanitizer warning:
=================================================================
==27120==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x60c00003d900
#0 0x7f2f216de421 in operator delete(void*, unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:151
#1 0x561641ce18b7 in ChannelizerBase::~ChannelizerBase() (/build/new/out/bin/osmo-trx-uhd+0x4a8b7)
#2 0x561641ce1cad in Channelizer::~Channelizer() (/build/new/out/bin/osmo-trx-uhd+0x4acad)
#3 0x561641cd5160 in RadioInterfaceMulti::close() (/build/new/out/bin/osmo-trx-uhd+0x3e160)
#4 0x561641cd5047 in RadioInterfaceMulti::~RadioInterfaceMulti() (/build/new/out/bin/osmo-trx-uhd+0x3e047)
#5 0x561641cd5093 in RadioInterfaceMulti::~RadioInterfaceMulti() (/build/new/out/bin/osmo-trx-uhd+0x3e093)
#6 0x561641ca3fdd in trx_stop() (/build/new/out/bin/osmo-trx-uhd+0xcfdd)
#7 0x561641ca4b32 in main (/build/new/out/bin/osmo-trx-uhd+0xdb32)
#8 0x7f2f1f555222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
#9 0x561641ca195d in _start (/build/new/out/bin/osmo-trx-uhd+0xa95d)
0x60c00003d900 is located 0 bytes inside of 128-byte region [0x60c00003d900,0x60c00003d980)
allocated by thread T0 here:
#0 0x7f2f216dcf19 in operator new[](unsigned long) /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:93
#1 0x561641ce142d in ChannelizerBase::init() (/build/new/out/bin/osmo-trx-uhd+0x4a42d)
#2 0x561641cd5865 in RadioInterfaceMulti::init(int) (/build/new/out/bin/osmo-trx-uhd+0x3e865)
#3 0x561641ca1cb7 in makeRadioInterface(trx_ctx*, RadioDevice*, int) (/build/new/out/bin/osmo-trx-uhd+0xacb7)
#4 0x561641ca44c6 in trx_start(trx_ctx*) (/build/new/out/bin/osmo-trx-uhd+0xd4c6)
#5 0x561641ca4b05 in main (/build/new/out/bin/osmo-trx-uhd+0xdb05)
#6 0x7f2f1f555222 in __libc_start_main (/usr/lib/libc.so.6+0x24222)
SUMMARY: AddressSanitizer: alloc-dealloc-mismatch /build/gcc/src/gcc/libsanitizer/asan/asan_new_delete.cc:151 in operator delete(void*, unsigned long)
==27120==HINT: if you don't care about these errors you may set ASAN_OPTIONS=alloc_dealloc_mismatch=0
==27120==ABORTING
Change-Id: Ib7c98ae478f319573dd86a0d2cb264f676bb3859
This is a preparatory change that enables a possibility to choose
the amount of synch. sequences to be used for Access Burst (RACH)
detection. The VTY flag will be introduced in further changes.
There are two correlation types now:
- RACH (default) - TS0 only;
- EXT_RACH - all TS0, TS1, and TS2 together.
Change-Id: Ia4f20524350bb8c380d7e10360758eddae8b03e9
Related: OS#3054
According to 3GPP TS 05.02, section 5.2.7, there are three
synch. sequences for Access Bursts:
- TS0: GSM, GMSK (default),
- TS1: EGPRS, 8-PSK,
- TS2: EGPRS, GMSK.
Let's prepare everythyng to be able to detect all TS0-3 synch.
sequences, but keep detection of both TS1 and TS2 disabled
until the corresponding VTY option is introduced.
Change-Id: I838c21db29c54f1924dd478c2b34b46b70aab2cd
Related: OS#3054
Makes osmo-trx-* more consistent with other Osmocom programs, and
allows an unified test for not having "UNKNOWN" in --version.
Related: OS#3578
Change-Id: I90cf01d972aa10b48c59b67a1e7f82a4255ef526
osmo-trx can start a considerable amount of threads that can make
debugging it challenging at least. By using phtread_setname_np, the
system sets a meaningful name to the thread which can be seen while
debugging with gdb or by printing /proc/$pid/task/$tid/comm.
Now we also log system TID when setting the name so we can identify
different tasks in /proc even if pthread_setname_np fails.
Change-Id: I84711739c3e224cb383fd12b6db933785b28209e
The following warning was observed with GCC 4.8.5:
make[4]: Entering directory `.../osmo-trx/Transceiver52M/device/lms'
CXX LMSDevice.lo
LMSDevice.cpp: In member function 'LMSDevice::writeSamples()':
LMSDevice.cpp:582:22: warning: 'rc' may be used uninitialized
in this function [-Wmaybe-uninitialized]
samplesWritten += rc;
Let's fix this by zero-initializing 'rc'.
Change-Id: I4b4a061fc12e5fd1db8d1087d8e0c46ff1e23412
Avoids this type of compilation warnings:
‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class Complex<float>’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
Change-Id: I9724454dfb7b87f74f39074e4004580ac3b5fe5c
Fixes this type of compilation warning:
‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class Complex<float>’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
Change-Id: Ibb2380a0a335ce798fe87221519fbbebade53054
This change allows to remove some wrong use of code as per compilation
warning:
osmo-trx/Transceiver52M/sigProcLib.cpp:1266:40: error:
‘void* memcpy(void*, const void*, size_t)’ writing to an object of non-trivially copyable type ‘class Complex<float>’; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
midMidamble->size() * sizeof(complex));
Change-Id: Id446711349bec70fa4e7c8efe0f7f9faf7e4f277
Fixes compilation warning:
In file included from osmo-trx/Transceiver52M/device/uhd/UHDDevice.cpp:31:
/usr/include/uhd/utils/thread_priority.hpp:10:17: note: #pragma message: This header is deprecated - please use <uhd/utils/thread.hpp> instead.
Header was moved in uhd.git c33928d2bbdd27688c3475e77fc461e7d16eba5a.
Change-Id: I6299df48a5e14c54eaa07288d166c705eb9ebdbe
Transceiver::stop() can only be called from either CTRL iface thread or
from main thread (running osmocom loop). That's because stop attempts to
cancel and then join all the other threads, which would then lock if
attempting to stop from some of them.
As a result, the best option is to indicate to the user of the
transceiver option (osmo-trx.cpp) to stop it in a correct fashion by
destroying the object from the main thread.
Change-Id: Iac1d2dbe2328e735db2d4b933cb67b1af1babca1
If LImeSDR device is unplugged or its fw crashes during operation,
reading from the device will fail and will first receive short reads and
finally 0 byte reads. Let's quickly notify these events to upper layers
instead of trying to process the buffer and checking timestamps for
something we know it's already not useful.
Related: OS#3340
Change-Id: Ib1af8cdd6cdadf581b039882add4049eea45a0f7
The DMAIN category got too overloaded. Let's have the code in
Transceive52M/device/* use the new DDEV category.
Also, in some cases the log levels have been adjusted to ensure
that enabling INFO level should not result in a complete overflow
of messages during normal operation.
Change-Id: I844fe4a75bf277cd3cc5bd8fa06e06ad97b2ea95
Until now, setRxGain in LMSDevice did not take into account the setter
parameter and was always using hardcoded 34dB, which was experimentally
found to be a good default value.
Let's force that value during initialization, but still allow the upper
layers (controlled by BTS) to set different values. osmo-bts only sends
a SETRXGAIN command (which calls setRxGain in osmo-trx) if a value is
explicitly set in its VTY config, so we are on the safe side if the user
doesn't explicitly configure a desired dB.
Change-Id: I5684e675281a3f581855dbb56d199a6fe238a712
There might be some configuration that's not supported by osmo-bts-usrp1,
and we should reject that properly.
Change-Id: Ic7308ce0c57439fe97668bd31801c4bf76b797ad
Closes: OS#3348
There might be some configuration that's not supported by osmo-bts-lms,
and we should reject that properly.
Change-Id: I6f82edce589030a4407f6150fb7e8abe6417c1f2
Closes: OS#3347
In Change-Id Ib2fca81b76d027b08e2891056fa076d071597783 we introduced
some coding style violations. Let's make newly-added code follows
standard Osmocom coding style.
Change-Id: Ib7ddd275014f03a2eed3cddc02b1356e2b00c0bc
It's not good style to have the derived classes initialize members
inherited from the base class using "this->foo = bar". Rather, let's
make the base class have a constructor, and call that constructor to
initialize the members of the base class.
While doing this
* rename 'offset' to 'lo_offset' to avoid confusion with timestamp offset
* move 'InterfaceType' into the base class
* move 'chans' into the base class
* move 'rx_sps' into the base class
* mark base class members as 'protected'
Change-Id: Ib885675a7612a392aa7f75fca81269ddcff2f6ab
Before this patch, any configuration in osmo-trx.cfg regarding the rx
and tx "antenna" (path) would have been completely ignored, as the
radioDevice::make() function would simply drop those arguments to the
floor.
Change-Id: Ie50f854abbc9dcf351cddc052d10206382e1d5d3
Initially, Rx gain was hardcoded to be 47. This was too high for our
setup and we were constantly getting "clipping detected" messages.
Reducing Rx gain to 34 solved the issue. However, it looks like gains
should be controlled through configuration files.
Change-Id: I30580f18c4ad630c09f725b1d24c125fc3119809
LMS_StartStream() (in LMSDevice::start()) was moved to separate loop. It
is because LMS_SetupStream() would fail for second channel if streaming
has already been started (LMS_StartStream()) for single channel
configuration.
Change-Id: I6704bb92864aa81417507c4ae24a22f41dc529c1
Log level of "send buffer of len ..." messages was changed as it was
causing problems on some machines.
Change-Id: I605d50e81966c7bd169b27788d62af6fb54c84e1
The tx timestamp offset was not set. We set it to the same value as it
was in UHD interface for LimeSDR
Change-Id: I78bc40cd575097f71a5f82b63467fa81c3f8d837
As of LimeSuite 618fbb9c3188b36d75ad5785a97b8887dcc468f6, it seems 5e6
is within the returned range, but LMS_SetLPFBW fails anyway.
See for more information: https://github.com/myriadrf/LimeSuite/issues/184
Change-Id: I967e7da7c0e3e8138b76733ee4a0e6311d20b62e
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
I'm not quite sure what the ts_offset is for, but by using "0"
we are now receiving exactly the timestamp that we're expecting:
LMSDevice.cpp:486 [tid=140576250332928] chan 0 recv buffer of len 2500 expect 305ed0 got 305ed0 (305ed0) diff=0
Change-Id: I270c94945b1af9662cfc468cfda1ae3af3ac0a27
ts_initial must not point to the timestamp of the first sample
in the last "flush" sample buffer, but to the first timestamp we
expect in the next buffer.
Change-Id: I23af62870544d4c6cf5f6e2d6578936603bceb91
Rx 1.4 MHz, Tx 5MHz. Both massively too wide for GSM, but there's
no smaller band-width available.
Change-Id: I9723c9a2ea77f65bfa9d796d7c44adc2417e89cf
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
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
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
This way code of radioInterface is independent of the device and doesn't
need to be rebuild for each device.
Change-Id: Id104e1edef02f863b6465ced5b4241050dc188f9
Take the chance to update some includes using files available in that
subdir to have them ina more uniform way.
Change-Id: Ibda3c54fd4dc3f6b845cc373f1a1e6b758c1ea82
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
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
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
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
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
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
At this stage, osmo-trx still uses the cmdline parameters top run the
device, but it is already able to parse all the same parameters from a
cfg file through the VTY and filling a trx_ctx structure which will be
later used to drive the device. Device config can be printed in the VTY
with "show trx".
Change-Id: Ie084c1b30b63f91c6e7640832ec1797d9e813832
We still need an intermediate class Logger due to osmo-trx being
multi-threaded and requiring to have a lock to use libosmocore, which is
not thread safe.
Change-Id: I30baac89f53e927f8699d0586b43cccf88ecd493
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
This feature is currently not being used, so let's drop it to make it
easier to integrate into libosmocore logging system in the future.
Change-Id: I8282745ef0282d41599eaf94fe460a1d29b18e2a
Fixes coverity CID 182757.
It's actually a false warning because "async_event_thrd" member is
protected by other member "started", so in practice it's never going to
be used before being initialized in start().
Change-Id: I5d5739bc9d08fe533e4d44c3992005a14e568a4f
Some devices have different Rx or Tx ports with different RF characteristics.
For instance LimeSDR has H (High), L (Low) and W (Wide) band Rx ports,
each of one being more suitable to a specific range of frequencies.
In case one wants to support several GSM bands, the best option is to
use the WideBand port and connect the antenna physically to that port in
the board. Then the firmware must be instructed ro read from that port.
Support for Rx/Tx port configuration is already in there for all the
layers (Limesuite, SoapySDR, SoapyUHD, UHD), but we are missing the
required bits in osmo-trx to make use of the available UHD API. This
commit addresses it.
Before this patch, the Rx/Tx paths configured could be changed by means
of the LimeSuiteGUI app, but after running osmo-trx, the values were
changed to the default ones.
One can now start using osmo-trx with 1 channel and specific Rx/Tx ports
by using for instance: osmo-trx -c 1 -y BAND1 -z LNAW
Default behaviour if no specific path or an empry path is passed ("") is
to do the same as preiously, ie. nothing by not calling the
set{T,R}xAntenna APIs.
One can also configure only specific channels, for instance to configure
only the first Tx channel and the second Rx channel:
osmo-trx -c 2 -y BAND1, -z ,LNAW
Change-Id: I1735e6ab05a05b0312d6d679b16ebd4a2260fa23
osmo-trx.cpp calls convert_init, which in case of building using
--with-neon is not implemented and the compiler stops with an error.
Error was introduced in 7e07cf2346.
Related: OS#2720
Change-Id: I9840d374d13b525b97f978ea0c5ed9e8421072a0
The B205mini is similar to the B200mini and runs OsmoTRX just
fine, so let's make OsmoTRX recogonize and support it too.
Change-Id: Iee575121248ea541f7abc49055e49ec2d30904c0
SCHED_RR allows us to operate osmo-trx reliable even under exceptionally
high system load, as the realtime scheduler priority will have higher
priority than the other "regular" tasks on the system.
Change-Id: Ia2452b9763960b2be37fbeee9d832554da68a53f
Closes: OS#2344
It seems that TX_WINDOW_USRP1 is for devices that do not support tx
sync to timestamp. LimeSDR supports it. Changing to TX_WINDOW_FIXED
greatly reduces number of "dumping stale buffer" messages
Modified to match current master by Harald Welte.
Change-Id: I8de5b165ccd72a62b0f16655618e24ca740d9637
Stop calling writeClockInterface() when receiving commands in Transceiver::driveControl,
otherwise it fools osmo-bts-trx clock skew check because it is always sending a clock
indication with the same fn when it issues any commands during the time in between
CMD POWEROFF and RSP POWERON, because fn is not increased during that period.
Also use mForceClockInterface flag to delay delivery of first IND CLOCK until we start
serving frames, otherwise the first one is sent and only after a long period of time
the next clock indications are sent, when the radio starts to process bursts. That makes
osmo-bts-trx unhappy because it expects to receive an IND CLOCK aprox at least every
400 frames. This way also we send the first IND CLOCK after the RSP POWERON 0 response.
Change-Id: I91b81a4d7627cec39c1814a39ed4be306681b874
Fix MCBTS device setup where the map access was failing on the wrong
assumption that all devices support 1-SPS TX-RX operation. Some devices
and/or configurations such as LIMESDR and MCBTS only support running
at 4-SPS.
Even though certain settings (e.g. number of physical channels or the
FPGA clocking rate) are not dependent on the SPS value, we still need to
specify because we use SPS as a parameter for device classification.
Fixes: OS#2341
Change-Id: I56e939285d585cc38efa6c329e30e3acebb734eb
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
In commit a3dce85f
"sigProcLib: Use explicit NaN check in sinc table generation"
Use of std::isnan(double) was added without namespace specifier,
which may cause build issues depending on whether the C version
isnan() call is available. Add standard namespace to force C++
call usage and potential build issues.
Change-Id: I49328c43fdd690a4e6a2b2e949411aaf5674ead1
Instead use object allocated STL vectors. This simplifies code,
removes the need to explicitly release buffers, and fixes a
memory leak in destructor deallocation. Also, remove simplified
init and release sub-calls.
Maintain partition filter allocation using memalign() for SIMD
alignment requirements.
Change-Id: Ie836982794c10fb1b6334e40592d44b200454846
Using "x < 0.01" is a crude check for detecting NaN condition, which
occurs in a sinc call when x = 0 due to divide-by-zero. Use stdlib
isnan() call for this purpose. Also, as the table is created only
once during initialization, use double floats for table value
generation.
Change-Id: I3a838fe3139fa977dfe906246020a14451185714
Trigonometric sin/cos tables are unused after initialization.
There is no benefit to implementing lookup tables for run-once
operations. Also perform initial calculations in double width
because there is no penalty for doing so.
Change-Id: I45bba5daf8610cbba6af95b92c2142f2256491ff
The osmo-trx internals rely heavily on dynamic alloction of
I/Q signal vectors. In a number of cases there is no reason
to to use dynamic rather than stack based allocation. Convert
these cases accordingly.
Change-Id: If53da1bf77b5944b6117765fa98ce12e1ccdeede
The modulator vector to be shaped by Laurent C1 pulse is complex,
but was set as real. The error does not affect behaviour because
we only support complex-complex and complex-real calculations;
real-real convolution is not supported. So in this case the data
vector was already assumed to be complex despite the improper
flag setting.
Change-Id: I03afc6a93a01fde7a9a02e4eb9d201d3ee37d21a
Upon issuing POWEROFF command to a running transceiver, UHD
interfacing thread state may become undefined if the device
is stopped with I/O threads still active. Bad behavior is
device dependent with only network based USRP devices
affected. USB based device thread behavior stops and shutdowns
as expected. Tested with N200, X300, and B210.
Tested solutions include the following:
1. Set pthread_setcanceltype() with PTHREAD_CANCEL_ASYNCHRONOUS
2. Add sleep delay to allow I/O threads to timeout before
stopping the device
3. Wait for I/O threads to join after cancellation before stopping
the device
This patch resolves the issue by with the third approach. Number 1
is not guaranteed to always work with UHD internals as driver code
may explicitly set thread parameters. Using sleep calls to fix
order-of-operation issues is almost never a good idea.
Change-Id: Ib72ab98a27a02084b040319046c92d1c4157ae4c
Commit 1fb0ce67 "uhd: Use map container for for device parameter access"
inadvertently removed the string identifier for the USRP2 and derived
devices (N200/N210).
Add the missing USRP2 string identifier. Also search for partial string
matches in the UHD provided device and mboard stings. This is necessary
to guarantee that strings such as "N200r3" instead of just "N200" are
sucessfully found.
Tested with N200, X310, B200mini and B210 devices.
Change-Id: Ide4e22418e2cc469418cba018970cb0eb9906697
Also remove entirely completely unused calls. Most of these
calls have been around since OpenBTS conception. Nearly a
decade is long enough time for deprecation.
Change-Id: Ifc122aaff23414c363b4b00f99061eed8a6902d0
OsmoTRX is written in C++ so we might as well use built-in
container types when applicable. Map access allows removal
of significant amounts of special device handling code.
Aggregate device rates and timing offsets into a single
table with access keyed by device/tx-sps/rx-sps tuples.
Change-Id: I8660f75a2b2a13488b913c07637bdd0f5f0f4cf9
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Some compilers don't support the __builtin_cpu_supports built-in,
so let's make them able to compile the project anyway.
Change-Id: I0c90402d8e4c9f196c54b066ff30891c8de3ad2b
This bug only affects generation of normal bursts filled with random bits which
are used in test mode. It doesn't affect operation of osmo-trx during normal
operation. That's why it has stayed unnoticed for so long.
Each Normal Burst has 3 tail bits, not 4.
Also it's better to set stealing bits to 0 for maximum compatibility. We may want to
introduce a selector for each bit whether to set it to 0, to 1 or to a random number.
Change-Id: I0377029556c8b681b3ba3b635bf19572b34546ea
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
The osmo-trx binary outputs no info about its SSE support status.
This commits adds some putput that informs about the SSE of the
binary and also tells which of the SSE levels the CPU supports.
Change-Id: Iacc83fd668c31644e0efb3e18962cf2870ed1daf
Currently we find SSE3 and SSE4.1 code mixed togehter along with
generic code in one file. This introduces the risk that the
compiler exidantly mixes SSE4.1 instructions into an SSE3, or
even worse into a generic code path.
This commit splits the SSE3 and SSE4.1 code into separate files
and compiles them with the matching target options.
Change-Id: I846e190e92f1258cd412d1b2d79b539e204e04b3
The ARM and the X86 implementation of the conversion functions share
the same, non cpu specific implementation in separate files.
This commit removes the code duplication by putting the generic
implementation into a convert_base.c, similar to to convolve_base.c
Change-Id: Ic8d8534a343e27cde79ddc85be4998ebd0cb6e5c
The current implementation can select the SSE support level during
compiletime only.
This commit adds functionality to automatically detect and switch
the SSE support level and automatically switch the Implementation
if the CPU does not support the required SSE level.
Change-Id: Iba74f8a6e4e921ff31e4bd9f0c7c881fe547423a
The non-sse implementation and the sse implementation of the convert
and convolve functions have different parameter lists. This makes it
difficult to use function pointers in order to select the right
function depending on the SSE-Level and CPU.
This commit uniformizes the parameter lists in preparation for
planned runtime cpu detection support
Change-Id: Ice063b89791537c4b591751f12f5ef5c413a2d27
The compiler option -march=native instructs the compiler to auto-optimize
the code for the current build architecture. This is fine for building
and using locally, but contraproductive when generating binary packages.
This commit replaces -march=native with $(SIMD_FLAGS), which contains a
collection of supported SIMD options, so we won't loose the SSE support.
Change-Id: I3df4b8db9692016115edbe2247beeec090715687
OpenBTS relies on reading in configuration values from the OpenBTS.config
sqlite3 database. This configuration method is not maintained and not
recommended for Osmocom or OpenBTS use. Command line setup is the
recommended approach.
Note that when the osmo-trx logging mechanism is replaced, the sqlite
dependency will be removed.
Change-Id: I95d7b771fde976818bee76f89163e72c3a44ecdd
Convert negative value check on unsigned value to zero check
to avoid potential divide-by-zero error condition.
Change-Id: Ib0d7d1bceb5fe66e69345db93a74e3e0773a2257
Fixes: Coverity CID 165059
Improper length values will cause the polyphase resampler
rotation to fail. Check return and return NULL on error.
Change-Id: I3ad22f9fd7a20754f589c04258dcca3770474a9b
Fixes: Coverity CID 165235
demodCommon() used to scale input vector in place which changed original data.
That's a bad practice and is not really necessary, so I've changed the code to
scale burst after it's copied to a new vector during a delay operation.
Change-Id: Ic45f71b634e48808356d68925bb9f5783e0bf0d3
The file seem to be using "2 spaces" indent, bt some lines are using
tabs which breaks formatting.
Change-Id: I7718cca45c245c9e91250ab2877f5436d4029698
vectorSlicer() converts soft-bits from -1..+1 to 0..1 while we want
to keep SoftVector in -1..+1 mode until the last minute, because at some
point we'll want to transmit -1..+1 to osmo-bts instead of converting it
from 0..1 back to -1..+1 on the osmo-bts side.
Plus it removes code duplication - we call it once instead of twice.
Change-Id: Idd6ddd7ac219afb0df055a692632678b66373764
This makes it similar to 8-PSK demod and also saves a bit of lines ofcode and
should give us a tiny improvement in performance.
Ideally we need to remove vector slicing at all, because in osmo-bts-trx
we convert back to +-1.0 again (actually to +-127, but it doesn't mater).
So we should rather transmit +-1.0 values to avoid double conversion.
Change-Id: If9ed6f0f80fbe88c994b2f9c3cae91d0d57f4442
Documentation in sigProcLib.h was noticeably out of sync with the actual
implementation - e.g. not all arguments were documented and arguments
which are already removed are still in the documentation. Also argument
names were different between declaration in .h and implementation in .cpp
which was confusing.
I've fixed this for detect*Burst() functions.
Change-Id: I4dfd07125d9a1e9a42a78b79faff539f003deb16
Addresses following issues where UHD 3.9 and likely other UHD versions
would report a master clock (FPGA) rate error. Update MC-BTS FPGA clock
for B200 and B210 to 51.2 MHz, which is supported by all UHD versions.
Only B200/B210 is supported for MC-BTS operation.
https://osmocom.org/issues/1963https://osmocom.org/issues/1648
ALERT UHDDevice.cpp:548:set_master_clk: Failed to set master clock rate
ALERT UHDDevice.cpp:549:set_master_clk: Requested clock rate 3.2e+06
ALERT UHDDevice.cpp:550:set_master_clk: Actual clock rate 5e+06
Change-Id: I78fb2c0959abd0e666628ba39f433162aafb067e
* 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
This reverts commit 93ca09ea61.
Ettus Research recommends the use of 3.9 series of UHD releases,
but requiring this version has lead to issues with broken OBS and
packaged binaries by Debian, Ubuntu, and other distributions.
Change-Id: Ie6b175ac6d46d091937380c79fdd0125b16ec75f
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
The behaviour of a mismatched pair of allocation and deallocation is undefined
Also fixes a memory leak if malloc fails (which stops the application anyway)
Change-Id: I9c8bbade8531e8c9c02dcd43bac38cb954b3c89f
Versions of UHD prior to 3.9.0 are no longer supported.
Rather then backport and ifdef UHD version specific API and
behavioral changes, set minimum support to the current LTS
release, which is 3.9.0.
Change-Id: Id7d15b52cd4e45f1d856a6ef3a84832a28f2dd04
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Place conditional brackets on handover table reset. Reset table
only on successful start or restart.
Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26
Invert the initial and trailing diffential bits in the 4 sps
GMSK modulator to fix power-time mask irregularity at start
and end of burst. GSM tail bits are always zero, so we can
safely use fixed bit values.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Requires changing the radioInterface API to pass in Rx side SPS
value. Update the (deprecated) diversity configuration to match
as well.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Agilent E4406A measurement of TSC synchronized RF envelope measurement.
showed failing power levels at the tail end of EDGE bursts. Regression
traced back to following commit.
Commit d2b070369d
"uhd: Correct timing alignment in 8-PSK and GMSK downlink bursts"
In the patch, the EDGE burst was delayed one symbol, but erroneously
truncated at the tail end causing the failing RF envelope measurement.
The missing tail symbol did not appear to affect end-to-end EGPRS tests.
This patch corrects the truncation.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
The time-of-arrival (TOA) value out of sigProc is specified
in symbols or, equivalently, 1 sample per symbol and does
not need to be normalized.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Input burst construction was declared static causing the first
downlink burst from upstream to determine subsequent burst size
and modulation. Consequently, fixed sequence EGPRS tests would
pass, however, switching between 8-PSK and GMSK bursts would
fail with only one modulation type being transmitted.
Internally generated test sequences '-r' option were not affected
because the bursts are not received through the socket interface.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Unlike earlier versions of UHD, the current release (3.9.2)
does not automatically select on-board GPSDO as the reference
source. Modify the command line settings to allow explicit
selection of GPS in addition to the external setting.
Simultaneous GPS and external reference settingis disallowed.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Only EDGE mode is currently supported. Traditional 1 SPS Rx / 4 SPS Tx
mode requires different sampling rates which is not currently working.
RF performance is also sub-optimal and requires more tuning.
Discrete RF multi-channel was using hard coded buffer index
on the channel iteration for transmit sample conversion. End
result was segmentation fault on dual RF channel devices with
both channels active (Ettus B210 and UmTRX).
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Previous checks on multi-channel TSC and ARFCN settings would fail
if channels were initialized out of order. Namely, if channel 0
was not configured first, osmo-trx would error on the control
interface leading osmo-bts to fail.
Allow global TSC setting on all channels with added logging notice.
Notify if channel frequency is unexpected - which may happen if
channels are setup out of order - but do no report as error.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
These warnings simply echo the socket command arguments with no
indication of any unexpected or improper operation.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
The command line EDGE option will enable 8-PSK burst
detection on any slot where a normal burst is expected.
The burst search order is 8-PSK first followed by GMSK.
EDGE will force 4 SPS sampling on Tx and Rx. Along with
twice the search correlation from 8-PSK and GMSK, EDGE
will increase CPU utilization. Whether the increase is
notable or not is dependent on the particular machine.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Allow EGPRS 8-PSK length bit vectors of length 444 (148 * 3)
to pass in through the Tx socket interface. Length is the sole
factor in determining whether to modulate a bit vector using
GMSK or 8-PSK.
Tested with 8-PSK training sequences with random payload
originating from osmo-bts. Output verified with Agilent E4406A.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Reduce the burst detection threshold to pass more bursts to upper
layers, but force stricter requirements on the computation itself.
For the latter, we now require at least 5 samples (rather than 2)
to compute a peak-to-average value.
End result is increased burst detection at low SNR conditions with
a small increase in false positive bursts when no signal is present.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
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>
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>
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>
Rather than a simple bool type, convert the diversity switch
to the device interface specifer:
enum InterfaceType {
NORMAL,
RESAMP_64M,
RESAMP_100M,
DIVERSITY,
};
The more general specifier allows passing in special cases
other then selection diversity such as multi-ARFCN support.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Previous approach was to enable 4 SPS on the receive path only
for EDGE use, which is not a requirement for 4 SPS operation.
Make the 4 SPS configuration setting directly settable.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
OsmoTRX does not support the use of multiple TSC settings per
internal TRX instance. There should not be an error to modifiy
the TSC value after POWERON. Setting TSC value on TRX channels
other then 0 is a NOP operation that should only error if the
requested TSC differs from that of TRX channel 0.
Reported-by: Max <msuraev@sysmocom.de>
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Right now if you forget to send "POWER" control command, osmo-trx
will transmitt zeros. This is counter-intuitive and I've spent several
hours debugging this "issue". The issue may happen easily, because
osmo-bts doesn't send "POWER" command if there is no "power" setting
in the configuration file. Given that "POWER" command actually sets
attenuation, it's percieved as optional and in absence of it should
default to "POWER 0" (no attenuation), which translates to power
scale being 1.0.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
So we had the following define:
#define GSMRATE 1625e3/6
Now, I wanted to use it in the following expression:
3.0/GSMRATE
which turns into:
3.0/1625e3/6
while what I really wanted is:
3.0/(1625e3/6) = 3.0/1625e3*6
To avoid this, all macros with calculations must be enclosed in parentheses.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
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>
Slightly widen the search range to accommodate timing jitter
on certain classes of devices. The expanded range minimizes
the possibility of missing bursts that arrive too early or
too late due to timing error.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Create runtime version check for minimum supported UHD driver
when using USRP E3XX devices. The minimum version, 3.9.0, matches
supported version on current E3XX release images.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
The majority of GSM host platforms are capable of operating with
the 4x oversampled modulator, which justifies the new default
setting. The small number exceptions (e.g. Raspberry Pi) can still
use the lower complexity 1 sps modulator with the '-s 1' command
line option if required.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Tune timing values after testing on UHD 003.009.002 for E3XX.
Table value for 1 sps was off by 10 samples causing improper
operation. Table value for 4 sps was shifted by 1 sample for
more accurate timing.
Also update E3XX description string detection.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Current UDP receive reads up to MAX_UDP_LENGTH bytes into the
passed in buffer, which may lead to buffer overflow if the
write buffer is of insufficient size.
Add mandatory length argument to UDP socket receive calls.
Reported-by: Simone Margaritelli <simone@zimperium.com>
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
EDGE 8-PSK soft slicer was receiving input from the output of the
downsampler. Equalization and derotation were missing causing the
soft symbol output to be invalid.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Delay the EDGE downlink bursts by one symbol in order to match GMSK
pulse shaping group delay. The difference in group delay arises from
the dual pulse filter combination of the GMSK Laurent represenation
whereas 8-PSK uses a single pulse linear filter.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Previously MAXDLY value was applied to Normal Bursts, which was nice
when working with sloppy test equipment like CMD57, but useless for
real world usage. At the same time documentation and de facto usage
of MAXDLY in OsmoBTS and OpenBTS assumed that it actually applies to
Access Bursts (RACH). So this patch changes osmo-rx behavior to apply
MAXDLY to RACH bursts and introduces a new command MAXDLYNB for the
old behavior.
Commit 871b8782 "EDGE: Add support for UmTRX" disabled B210 support
using EDGE. Add B210 explicitly to the timing offset table to avoid
this issue.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Timing recovery and single tap channel compensation are identical
in both GMSK and EDGE receivers. This is the section ahead of and
including the optional 4-1 downsampler. GMSK and EDGE specific
sections operate at 1 SPS.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
When EDGE is enabled with the '-e' option, the random burst generator
switches from GMSK normal bursts to 8-PSK EDGE bursts.
$ ./osmo-trx -e -r 7
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Setup generators for empty, random, and dummy bursts. This moves error
prone burst length handling out of the Transceiver and into the signal
processing core.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
At 4 samples per symbol, we don't need to maintain the 156/157 sample
slot structure to account for the GSM 156.25 sample burst length.
Set the 4 SPS Laurent modulator to ignore the guard interval setting
and always output 625 sample sized bursts. The EDGE 8-PSK modulator
already has this behavior.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Create EDGE slot type in the Transceiver. When EDGE mode is enabled
for a particular slot, blind detection will be performed by
correlating against EDGE followed by normal bursts if no EDGE burst
is found.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Setup correlator and detection process similar to the GMSK
receiver chain. Require 4 SPS sampling on both Rx and Tx paths
as 1 SPS sampling adds too much distoration for 8-PSK recovery.
Core receiver operations still run at 1 SPS with the exception
of fractional delay filtering, which runs at the higher rate.
Perform linear equalization to handle the Gaussian pulse
induced ISI. The fixed impulse response used for equalizer tap
calculation consists of combined EDGE pulse shape filter and
effects of the downsampling filter. Note that the non-adaptive
equalizer corrects for modulation induced band limiting and
does not account for or compensate for fading channel effects.
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>