Commit Graph

527 Commits (master)

Author SHA1 Message Date
Ruslan Migirov 48422c87a9 Fix pointer-to-integer casting precision loss in gr-osmosdr
Changed the casting of pointers to `long int` to `reinterpret_cast<std::intptr_t>`
in `` and ``. This resolves the issue of precision
loss when compiling on 64-bit systems, where the size of pointers is 64 bits
and `long int` is typically 32 bits. Using `std::intptr_t` ensures safe
and portable casting across different platforms.
Additionally this fixes build in MSYS2 MinGW64 environment.
2023-11-23 21:35:14 +01:00
Harald Welte 2fedabec38 convert README to markdow; expand/update it slightly 2023-11-07 21:21:24 +01:00
Harald Welte cebcf5773f The old git:// protocol is long deprecated, use https:// instead 2023-11-07 17:14:03 +01:00
Harald Welte 1c09d1467d Add debian packaging information
This allows (among others) to build rtl-sdr nightly packages
for a variety of distributions as part of the network:osmocom:nightly
2023-11-07 17:12:57 +01:00
Carl Laufer 9c09c90d92 rtlsdr: detect RTL-SDR Blog V4, set lower tuning limit to 0Mhz
Signed-off-by: Eric Wild <>
2023-10-29 17:19:44 +01:00
Eric Wild b581c621fe fix gain mode caching
As pointed out in and previously
discussed in the current
cache fails to set 0, because the first map lookup of the key that does
not exist (and is created by accessing it using operator[]) returns 0.
2023-10-29 16:50:05 +01:00
Eric Wild 8b33260d66 hackf: remove deprecated register keyword, make c++17 happy
This fixes
2023-10-29 16:24:23 +01:00
Eric Wild 674863d9cb Merge pull request 'Avoid namespace conflicts' (#4) from argilo/gr-osmosdr:freesrp-namespaces into master
Reviewed-on: #4
2023-10-29 15:15:59 +00:00
Clayton Smith 0d15519fd5 Avoid namespace conflicts
This fixes building with C++17, where std::sample conflicts with
2023-10-01 18:58:12 -04:00
Mike McCarrick 82d6b6db78 Add support for RFSpace CloudSDR to gr-osmosdr
Signed-off-by: Eric Wild <>
2022-12-28 20:00:26 +01:00
Eric Wild d75ccf8248 Re-add mirisdr support
This was originally removed in fe03d83703

There are apparently a bunch of different compatible libmirisdr
libraries which are actually being used that have nothing in common with
the old, unmaintained hack we built this support for.
2022-12-28 20:00:26 +01:00
Eric Wild de6de7bc90 Merge pull request 'bladeRF: allow setting reference frequency' (#2) from jan.hrach/gr-osmosdr:master into master
Reviewed-on: #2
2022-11-01 11:30:35 +00:00
Jan Hrach 3e531451f9 bladeRF: allow setting reference frequency 2022-07-07 21:20:00 +02:00
Robert Ghilduta 821fdb3822 bladeRF: convert to using std instead of boost for shared_ptr 2022-06-10 16:30:49 +02:00
Robert Ghilduta 038a26501c bladeRF: minor fixups to keep clang happy 2022-06-10 16:30:49 +02:00
Robert Ghilduta 95b1025b01 bladeRF: calculate number of samples based on stream count 2022-06-10 16:30:49 +02:00
Robert Ghilduta bfdc4d917c bladeRF: enable and disable each channel 2022-06-10 16:30:49 +02:00
Robert Ghilduta 34daf86ec3 bladeRF: set default gain mode to manual 2022-06-10 16:30:49 +02:00
Ryan Tucker a343cc208b source/sink_impl: query hardware for gains on init
Instead of guessing, query the device to populate _gain_mode and _gain.
2022-06-10 16:30:49 +02:00
Robert Ghilduta f6a8992856 bladeRF: check libbladeRF version before compiling 2022-06-10 16:30:49 +02:00
Eric Wild 6a22db7568 switch to gr-funcube
due to deprecation, see
2022-06-10 16:30:49 +02:00
Eric Wild 6b11b02947 fix missing sink/source iface destructor 2022-06-10 16:30:49 +02:00
Eric Wild a309841752 osmocom_fft: make it work with gr >= 3.9 qwidget/pyqwidget
This should fix it for both versions
2022-06-10 16:30:49 +02:00
Eric Wild 09e72004fe default to c++11
GR needs it anyway..
2022-06-10 16:28:52 +02:00
Eric Wild e13c2e4e1c add a reasonable .gitignore 2022-06-10 16:28:52 +02:00
Vadim Yanitskiy 9c58e8a991 apps/osmocom_siggen: fix missing parentheses in call to print 2022-05-14 14:50:48 +03:00
Ron Economos a100eb024c Remove Doxygen warnings.
Signed-off-by: Ron Economos <>
Signed-off-by: Eric Wild <>
2021-01-28 22:15:52 +01:00
Ron Economos ba755e113e Remove CMake warnings.
Signed-off-by: Ron Economos <>
Signed-off-by: Eric Wild <>
2021-01-28 22:15:47 +01:00
Eric Wild 7e955ad284 apps: fix up guiles siggen for 3.9 2021-01-27 02:43:25 +01:00
Eric Wild 64781cc652 disable spectrum sense for now
feval was removed in gr commit 0249f7ce0cf5173b946b936c5cd66380afc8bf92
2021-01-27 02:43:25 +01:00
Clayton Smith c7012949e1 Use the new namespace for FFT windows
Signed-off-by: Eric Wild <>
2021-01-18 21:16:22 +01:00
Clayton Smith 1f724162e1 Add Python bindings
Signed-off-by: Eric Wild <>
2021-01-18 21:16:17 +01:00
Matt Mills f88dc7df2f Fix docstrings in python bindings for gr namespace
Signed-off-by: Eric Wild <>
2021-01-18 21:16:11 +01:00
Matt Mills 0d727b3ef8 Replace swig with pybind11 for gr3.9 master compat
Signed-off-by: Eric Wild <>
2021-01-18 21:16:05 +01:00
Clayton Smith 159885f9e6 Replace boost::shared_ptr with std::shared_ptr
Signed-off-by: Eric Wild <>
2021-01-18 21:15:57 +01:00
Gwenhael Goavec-Merou cffef690f2 lib/xtrx: add missing libraries
Linking to the libxtrx libs got lost while merging
the xtrx support, which led to runtime issues when trying to use it.

Signed-off-by: Gwenhael Goavec-Merou <>
Signed-off-by: Eric Wild <>
2021-01-17 23:08:55 +01:00
Clayton Smith c3187ab875 xtrx: remove BOOST_FOREACH and obsolete API call
All instances of BOOST_FOREACH were removed in an earlier commit, but it
was reintroduced when xtrx support was merged. I removed BOOST_FOREACH
again here.

Also, xtrx support fails to build because it relies on the
xtrx_open_list function, which was removed from the xtrx API in 2019. It
was replaced with xtrx_open_string.

I don't have xtrx hardware, so I've only tested that gr-osmosdr compiles
with these changes.

Signed-off-by: Eric Wild <>
2021-01-10 19:31:59 +01:00
Clayton Smith bc629b03fe hackrf: fix bandwidth setting
The T/R switching code added in ae2253c516
fails to set custom filter bandwidths because it sets bandwidth and
sample rate in the wrong order. As noted in the documentation for
hackrf_set_sample_rate: "If you want to override the baseband filter
selection, you must do so after setting the sample rate."

To solve this problem I moved the set_bandwidth call after
set_sample_rate. It was also necessary to skip the call if a custom
bandwidth was not requested.

Signed-off-by: Eric Wild <>
2021-01-04 22:27:53 +01:00
Adrian Chadd 9b386707d8 Fix hackrf receive hangs by checking before each lock wait
Fix receive path hangs if another thread closes down the hackrf
receive whilst this buffer receive function is waiting to be
woken up.


* Sleep for up to 100ms each time waiting for the cond to be kicked;
* Check whether streaming is still enabled each time rather than
  only when the function is entered.

This fixes hangs where consumers like gqrx via gnuradio
will do a stop_rx/start_rx very quickly to change something, and
the buffer receive path is waiting for a buffer.

Signed-off-by: Eric Wild <>
2020-12-18 13:22:24 +01:00
Csaba Sipos dc82ffd1f8 add xtrx support
Signed-off-by: Eric Wild <>
2020-11-19 01:41:05 +01:00
Clayton Smith fe03d83703 Remove disabled OsmoSDR and MiriSDR code
OsmoSDR and MiriSDR support was disabled in v0.2.1 because the hardware
is rare and obsolete. I think it would be useful to completely remove
the associated code, since this will reduce the future maintenance
burden for gr-osmosdr.

Signed-off-by: Eric Wild <>
2020-11-01 00:12:56 +01:00
Clayton Smith 2d504bde50 rfspace: Remove broken asio code
Asio sockets were replaced with native BSD sockets in
e1b699fda0, and the old code was placed
behind #ifdef USE_ASIO. Subsequent commits soon broke the asio code.
Since it's been broken for a long time, I doubt anyone is using it, so
it makes sense to remove it.

Signed-off-by: Eric Wild <>
2020-11-01 00:06:28 +01:00
Clayton Smith e5bee0820f Replace BOOST_FOREACH with range-based for loops
Range-based for loops are available since C++11. Using them reduces
gr-osmosdr's dependence on Boost. Here I've done the replacement using a
global search-and-replace.

Signed-off-by: Eric Wild <>
2020-11-01 00:04:27 +01:00
Eric Wild 90c3d5b555 fix windows build 2020-10-31 23:56:26 +01:00
Mike Walters bd668e97b6 HackRF: fix hackrf_source signedness
The LUT changes in 2e7d343fed inadvertently started interpreting samples
as unsigned. This change puts it back to signed (and fixes an outdated

Signed-off-by: Eric Wild <>
2020-08-09 14:48:49 +02:00
Eric Wild 911082ff85 disable OsmoSDR as well as MiriSDR device support
The actual osmosdr had only a very limited production run many years
ago and is therefore of little interest to most gr-osmosdr users.
Mirisdr was experimental at best, because the dongles were never
widely avaialble outside of Japan and had multiple unconnected antenna
2020-08-03 02:34:31 +02:00
Eric Wild dadabeceaf cmake: actually make linking work
Appending to lists from subdirs does not work as expected, so work
around that to allow collecting the necessary libs.
2020-08-03 02:20:16 +02:00
Mike Walters 5cf6f4df96 grc: Fix YML block generation
This fixes the template syntax that removes a set of variables from sink
blocks. Previously, this was causing NameErrors when trying to generate
a flowgraph containing a sink block.

Signed-off-by: Eric Wild <>
2020-08-03 01:20:52 +02:00
Wim Lewis ad72126289 Remove unused imports of endian.hpp.
Signed-off-by: Eric Wild <>
2020-08-03 01:20:52 +02:00
Wim Lewis 2e7d343fed HackRF: convert _lut to float[] to reduce size by a factor of 256
Similar to commit 33a8d1c for RTL-SDR, this uses two lookups in a
256-element LUT instead of one lookup in a 65536-element LUT, which
saves a bit of CPU cache. It also eliminates a dependency on the
host's byte ordering.

Signed-off-by: Eric Wild <>
2020-08-03 01:20:52 +02:00