Commit Graph

363 Commits

Author SHA1 Message Date
Dimitri Stolnikov e0d1fb0377 file: expose seek function in public API 2014-03-10 17:16:05 +01:00
Dimitri Stolnikov 6610909913 rtl: implement methods allowing runtime to control sampling process 2014-03-10 16:25:23 +01:00
Jon Szymaniak 542a3dbb2b bladerf: Fixed bug in cached device cleanup
A couple issues were present in bladerf_common::close, which caused
entries in the _devs list (our "device cache") to not be removed. This
would result in a stale device handle being used upon attempting to
reopen the device.

Two issues were associated with this bug:
 - The weak_ptr expired() conditional was incorrect; the logic was
   inverted.
 - The list item removal and iterator increment was done incorrectly
   and would result in a crash after the first item was fixed.
2014-03-10 15:36:59 +01:00
Brian Padalino 4e0a2c28e3 bladerf: Updated source/sink to use libbladeRF's sync interface 2014-03-10 15:34:19 +01:00
Dimitri Stolnikov 1adf936c94 source/sink: don't return void in void functions 2014-03-10 15:20:57 +01:00
Hoernchen cc083037fe hackrf: signed samples, following commit fd77cfe8a6 2014-02-20 19:47:20 +01:00
Jon Szymaniak 7a1f12cfcf bladeRF: RXVGA2 range is [0, 30]
While the RXVGA2 gain can technically go up to 60 dB, the LMS6002D
datasheet recommends it be clamped to 30dB. libbladeRF clamps to a max
of 30dB, so there's no use in setting max to 60 dB here.
2014-02-16 09:00:05 +01:00
Jon Szymaniak 751ad0f582 bladerf: Added 'verbosity' and 'loopback' device parameters
The 'verbosity' parameter may be used to increase or suppress output from
libbladeRF. The available log levels are, in order of decreasing
verbosity are:
    verbose, debug, info, warning, critical, silent

The 'loopback' parameter may be used to put the bladeRF into one of the
supported loopback modes.  The valid modes are listed below. Their
descriptions may be found in the libbladeRF documentation:

      bb_txlpf_rxvga2, bb_txlpf_rxlpf bb_txvga1_rxvga2, bb_txvga1_rxlpf
      rf_lna1, rf_lna2, rf_lna3
2014-02-16 08:59:58 +01:00
Dimitri Stolnikov eb76e35689 osmosdr/rtl/miri/hackrf: use 15 buffers by default
folowing rtl-sdr commit 89f73b183f2dac9c0dd75beca4cf2f77f20c4a36

So far we had 32 * 256KB which was a bit overkill, 15 are more than
enough.

15 was chosen instead of 16 because at least on Linux there seems to be
a system-wide limit of 63 transfers (when they are 256KB large), so 4
dongles can be used on a single machine without lowering the default
transfer number.
2014-02-11 20:52:56 +01:00
Dimitri Stolnikov 154c4ddd5f airspy: add support for AirSpy wideband receiver
Requires https://github.com/airspy/host

Usage example:

osmocom_fft -a airspy

The following named gain stages are available:

LNA: 0 to 15, step 1
MIX: 0 to 15, step 1
IF: 0 to 15, step 1

At the moment the gains are not in dB but gain indices internal to R820t
tuner.
2014-02-09 20:18:10 +01:00
Dimitri Stolnikov 24f6f88a37 rfspace: properly cover the absense of a serial number 2014-01-26 19:53:44 +01:00
Brian Padalino d960d1119c bladeRF: Modifying correction calls.
Modifying correction function calls to match libbladeRF API.
2014-01-18 20:20:19 +01:00
Jon Szymaniak 03c387bcda bladerf: Removed sign extension and masking of samples
This is no longer required as of FPGA v0.0.1, and has been removed to
remove some unnecessary computation on samples.
2014-01-13 18:43:14 +01:00
Jon Szymaniak 4a0d74f059 bladerf: Updates for libbladeRF v0.11.0 API changes 2014-01-13 17:31:07 +01:00
Jon Szymaniak 748ac00b25 bladerf: Use rational sample rate functions
libbladeRF provides accessors for rational sample rates, which the
integer sample rate functions use under the hood. Therefore, there's no
need to check if the requested rate contains a fractional portion and
switch between the two sets of functions.
2014-01-13 17:30:32 +01:00
Jon Szymaniak 8bbd2b5bb5 bladerf: Added start()/stop() implementations 2014-01-13 17:19:44 +01:00
Dimitri Stolnikov 5d0bade320 bladerf: shorten the serial number that is being shown to the user 2014-01-11 09:03:28 +01:00
Dimitri Stolnikov e68f8505df bladerf: implement DC offset and IQ imbalance correction
This patch has been provided by Brent J.
2014-01-11 08:57:49 +01:00
Dimitri Stolnikov df443ff5bd bladerf: prepare functions to control DC offset / IQ balance (WIP) 2013-12-28 01:02:35 +01:00
Dimitri Stolnikov 18e11438a0 rfspace: add missing header for basename() 2013-12-27 22:45:32 +01:00
Dimitri Stolnikov 9c6ac9e3e3 rfspace: add support for RFSPACE SDR-IQ and SDR-IP
Usage example:

osmocom_fft -a sdr-iq=/dev/ttyUSB0
osmocom_fft -a sdr-ip=host[:port]
osmocom_fft -a netsdr=host[:port][,nchan=2]

The following named gain stages are available:

SDR-IQ: ATT: -20 to +10 dB, in 10dB steps
SDR-IP: ATT: -30 to 0 dB, in 10dB steps

The ftdi_sio driver is being used for SDR-IQ. It creates a character
device of the form:

crw-rw---- 1 root dialout 188, 0 Dec 19 22:14 /dev/ttyUSB0

To be able to open the device without root permissions add yourself to
the "dialout" group or do a "chmod 666 /dev/ttyUSB0" after pluggin in.
2013-12-22 16:28:27 +01:00
Dimitri Stolnikov 5410ee53b2 device: implement "nofake" hint to exclude dummy devices from discovery
usage example:

osmosdr::device_t hint( "nofake" );
osmosdr::devices_t devs = osmosdr::device::find( hint );
2013-12-10 16:59:01 +01:00
Dimitri Stolnikov 05d51b5340 file: add missing include for boost::format 2013-12-05 00:12:34 +01:00
Steve Markgraf 8cbde92c94 rtl/rtl_tcp: add 2.56e6 as 'good' sample rate
Several tests have shown that this is the
highest sample rate where no samples
are being dropped on rtl devices.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-12-05 00:12:27 +01:00
Dimitri Stolnikov 7d2a577571 sink/source: fix error message when unable to connect blocks internally 2013-11-06 20:55:46 +01:00
Dimitri Stolnikov 8b3f711f12 netsdr: implement sample rate change in run mode 2013-11-05 20:33:43 +01:00
Steve Markgraf 1aa67f08bc rtl: add R828D tuner
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-11-04 21:00:08 +01:00
Dimitri Stolnikov e1b699fda0 netsdr: replace boost asio sockets with native bsd sockets
until we find out what's exactly interfering with fosphor when using
python based flowgraphs (osmocom_fft). c++ flowgraphs are not affected.
2013-11-01 15:56:13 +01:00
Jon Szymaniak b844149628 bladerf: Don't reload the FPGA unless the force-reload param is set 2013-10-30 18:59:59 +01:00
Jon Szymaniak 44bd325a86 bladerf: Moved initializations to bladerf_common.c, misc. cleanup
Common parameter handling has been moved into bladerf_common::init().

The buflen parameter is now in units of samples, not bytes. This
deviates from the other gr-osmosdr items. However, with the requirement
that buffers be in multiples of 1024 samples, this makes specifying this
parameter a bit easier. The user shouldn't need to know we're operating
on SC16Q12 values under the hood, and have to calculate accordingly.

To avoid confusion when both a bladeRF source and sink are in a flow
graph a [bladeRF source/sink] prefix has been added to output. Error
number have been replaced with bladeRF string representations of these
error values.

Firmware flashing has been removed. The bladeRF-cli or bladeRF-flash
tools are the preferred route for firmware upgrades.
2013-10-30 18:59:54 +01:00
Jon Szymaniak 03c42ef320 bladerf: Moved no longer "common" items out of bladerf_common
The gr_complex FIFO is no longer used on the TX side, so it doesn't
really make sense to have it in bladerf_common. The associated items
have been moved into bladerf_source, and some renaming has been done in
bladerf_sink to tidy up.

Pending further performance tests of the bladerf_source, the _fifo
member (boost::circular_buffer) may need to be replaced.
2013-10-30 18:59:48 +01:00
Daniel Gröber 46a241624a bladerf: Added device caching, this enables full-duplex operation. 2013-10-29 23:20:21 +01:00
Dimitri Stolnikov 8facbbcca1 netsdr: add support for RFSPACE NetSDR receiver
- implements broadcast UDP based device discovery
- prints device information (serial/versions) on startup
- reads available frequency range(s) from the device
- integrity checks of IQ stream using sequence numbers
- automatic bandpass or a wideband lowpass selectable

The following named gain stages are available:

ATT: -30 to 0 dB, in 10dB steps

Known limitations:

- setting the sample rate is possible only before the
  flowgraph has been started
2013-10-26 15:04:41 +02:00
Dimitri Stolnikov 71d8d02793 use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
2013-10-25 23:39:17 +02:00
Dimitri Stolnikov a71fbeeaa5 hackrf: implement device discovery
Unfortunately libhackrf still doesn't offer a way to enumerate devices
*or* to open a specific device by index or it's serial number. Thus we
have implemented a rather hack-ish way to detect the presence of a
device by trying to open it and closing right after that.
2013-10-25 23:36:32 +02:00
Dimitri Stolnikov 55d005e28d uhd: improve device discovery 2013-10-25 23:32:58 +02:00
Dimitri Stolnikov c744a7b35a remove unused variables 2013-10-25 23:32:13 +02:00
Dimitri Stolnikov 60120746aa file: allow changing the sample rate when throttle=true
this is dangerous from signal processing perspective and should be used
with caution.
2013-10-20 18:39:17 +02:00
Dimitri Stolnikov 6f4e16ff28 bladerf: use newstyle version getters 2013-10-04 18:32:34 +02:00
Dimitri Stolnikov 2feacf957b bladerf: make source less picky wrt rf gain 2013-10-03 14:43:18 +02:00
Dimitri Stolnikov e303948ffb source/sink: initialize sample rate cache variable
Thanks to Jiří Pinkava for bringing this up.
2013-10-03 14:43:13 +02:00
Dimitri Stolnikov d335280b2e source/sink: fix automatic bandwidth selection 2013-10-03 14:43:04 +02:00
Dimitri Stolnikov a01a0b3cf5 rtl: don't try to parse empty device index values 2013-09-28 13:49:34 +02:00
Dimitri Stolnikov f99995db69 updated header documentation for bandwidth setter 2013-09-28 13:49:18 +02:00
Dimitri Stolnikov f057decd1c bladerf: implement automatic bandwidth selection 2013-09-28 13:49:13 +02:00
Dimitri Stolnikov c1fb07bca7 hackrf: enable AMP gain stage by default 2013-09-28 13:49:09 +02:00
Dimitri Stolnikov b3bbe0935e hackrf: don't set automatic bandwidth on samplerate change
automatic bandwidth selection may be triggered by calling
set_bandwidth(0) after changing the sample rate
2013-09-28 13:49:00 +02:00
Jon Szymaniak 9b41c6aa20 bladeRF: Refactored buffering scheme in sink
Removed the use of an intermediate sample FIFO in the sink
implementation. Note the the FIFO has not been moved out of
bladerf_common --> bladerf_source_c in this commit.

work() now handles converting samples from complex to SC16_Q12, and filling
"transmit-ready" buffers. The callbacks are now only responsible for
marking the provided buffer free, and returning the next buffer.

It appears that a small deadlock issues remains in this changest, which
can be induced by:
 1: Using a small sample rate (160Khz)
 2: Switching back and forth between sinusoid <-> GSM burst

 In this case, it appears that work() is blocked waiting for a buffer to
 become free. More investigation here is required...
2013-09-28 00:07:55 +02:00
Dimitri Stolnikov ba7188727c bladerf: migration to async api (WIP)
receive works, transmit locks up in work() after few seconds
2013-09-28 00:07:49 +02:00
Frederik M.J. Vestre 68ed1854e7 Support setting external sampling to bladerf 2013-08-29 23:38:11 +02:00
Dimitri Stolnikov 265de87c45 bladerf: follow recent API changes
tested against aea04c5f119288370166ece05166a8a4157da6fa
2013-08-27 22:41:54 +02:00
Dimitri Stolnikov e97339c137 cmake: use *_INCLUDE_DIRS in modules 2013-08-13 20:17:17 +02:00
Dimitri Stolnikov 9dfe3a6354 bladerf: update common sample rate values 2013-07-28 16:35:48 +02:00
Dimitri Stolnikov 93ad959d8d bladerf: migrate to new api to enable/disable TX/RX modules
TX support has been verified with osmocom_siggen and fpga image from git
f6c6a3abcb22d2794946e5adbc556805a73788a3
2013-07-26 21:46:47 +02:00
Dimitri Stolnikov e5f7b28093 bladerf: add support for nuand LLC bladeRF (WIP)
This is based on the original work (https://github.com/Nuand/gr-osmosdr)
done by folks at nuand LLC for the gr3.6 branch of gr-osmosdr.

The following modifications have been done in this commit:

* port to gr-osmosdr master codebase (gr3.7)
* moved shared properties to bladerf_common
* added & verified IF filter bandwidth setters
* set LMS6002D registers with values taken from FAQ 5.27
* print device information (serial/versions) on startup
* added fpga= and fw= device arguments to program MCU/FPGA
* added bladerf=# dev. arg. to select a specific bladeRF
* grc gain field controls RF path VGA for RX/TX
* grc BB gain field controls BB path VGA for RX/TX

Usage example:

osmocom_fft -a "bladerf,fpga=/tmp/hostedx115.rbf"

The following RX named gain stages are available:

LNA: 0 to 6 dB, in 3dB steps
VGA1: 5 to 30 dB, in 1dB steps; nonlinear mapping done inside the lib
VGA2: 0 to 60 dB, in 3dB steps; not recommended to be used above 30dB

The following TX named gain stages are available:

VGA1: -35 to -4 dB, in 1dB steps, BB side
VGA2: 0 to 25 dB, in 1dB steps, RF side

Thanks a lot to the team of nuand LLC for this major contribution.
2013-07-21 11:59:22 +02:00
Dimitri Stolnikov 0edfcfcba0 rtl: remove residue DC component introduced by RTL chip
received from Juha Vierinen:

A student here noticed that there is dc bias even with the rafael tuner.
We looked into this issue and found that using 127.4f instead of 127.5f
removes this bias. I assume this is associated with a bug in the digital
downconversion of the RTL chip. This change fixes the problem.
2013-07-16 23:31:29 +02:00
Dimitri Stolnikov 3ce7c33981 fcd: add support for FUNcube Dongle Pro+
The gnuradio block https://github.com/dl1ksv/gr-fcdproplus must be
installed before building gr-osmosdr.

Available named gains:

Dongle Classic:

LNA: -5 to 30 dB, in 2.5 dB steps
MIX: 4 or 12 dB

Dongle Pro+:

LNA: 0 or 1, meaning off/on only. no information about real values.
MIX: 0 or 1, meaning off/on only. no information about real values.
BB: 0 to 59 dB, in 1 dB steps

This patch also introduces optional "device" and "type" arguments which
allow to override the values automatically picked by gr-osmosdr:

osmocom_fft -a "fcd,device=hw:2,type=2"

The "device" argument overrides the audio device used by the underlying
driver to access the dongle's IQ sample stream.

The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.

Thanks to Alexey Bazhin for the initial patch and Volker Schroer for
testing.
2013-07-14 12:09:55 +02:00
Dimitri Stolnikov 6b0f84f4ed uhd: implement frequency correction 2013-06-10 21:15:58 +02:00
Dimitri Stolnikov 02f38ca908 uhd: implement dc correction 2013-06-09 20:19:17 +02:00
Dimitri Stolnikov 656a9a014f hackrf: select narrower filters in auto bw mode to prevent aliasing 2013-06-09 13:10:16 +02:00
Dimitri Stolnikov ef37d1caae hackrf: use new sample rate function introduced in libhackrf b892bc34ad 2013-06-09 09:01:00 +02:00
Dimitri Stolnikov 7b18254262 uhd: implement bandwidth controls 2013-06-08 22:14:40 +02:00
Dimitri Stolnikov 40028422c0 return cached values in setters immediately if same as requested 2013-06-08 17:13:40 +02:00
Dimitri Stolnikov 40fb250e8f hackrf: add fractional sample rate support introduced in libhackrf
d9c46cbdac
2013-06-07 22:32:21 +02:00
Dimitri Stolnikov 40483d09c8 hackrf: add human readable error prints for all libhackrf funcs 2013-06-07 21:43:52 +02:00
Dimitri Stolnikov 407be2c329 cmake: add gnuradio-pmt dependency for OSX linkage 2013-06-07 19:30:02 +02:00
Dimitri Stolnikov 7a129238b7 hackrf: set the default sample rate to 10M
this prevents a regression with early firmware who did not have 8M rate
but 5M instead. they both had 10M, so we use this as default.
2013-06-05 19:20:08 +02:00
Dimitri Stolnikov e17ee6d96e hackrf: change out-of-spec rate 5e6 to 8e6 default 2013-06-03 22:01:20 +02:00
Dimitri Stolnikov 40ca42013b hackrf: disable start/stop as it has caused lock-ups 2013-06-02 15:53:45 +02:00
Dimitri Stolnikov cf06b3caef hackrf: migrate to gain API introduced in libhackrf b5f275abc5 2013-06-02 15:29:19 +02:00
Sylvain Munaut 0c9af4b426 Move to support gr-iqbalance new namespace / include path
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-06-01 15:00:46 +02:00
Dimitri Stolnikov 7e55cb9224 introduce osmosdr namespace, remove _c suffix
- the namespace conversion adopts the common gnuradio coding guidelines
- suffix removal is a preparation to support 8/16 bit complex data types
2013-05-30 16:14:22 +02:00
Dimitri Stolnikov 3e6a24e5d9 convert to gnuradio 3.7 interface 2013-05-29 22:34:40 +02:00
Dimitri Stolnikov ceb14f0f13 hackrf: enable buffers argument for the source block 2013-05-26 13:04:06 +02:00
Dimitri Stolnikov 193fd0ad88 osmosdr: remove deprecated device arguments 2013-05-26 13:02:14 +02:00
Dimitri Stolnikov 7c22e6975c hackrf: update to libhackrf 6f0ae9bc99 API 2013-05-08 21:37:30 +02:00
Hoernchen 905dd03ac6 hackrf: silence warning 2013-05-08 20:41:52 +02:00
Hoernchen eab1b61253 hackrf: default to sse2 on x86/64 2013-05-08 20:25:23 +02:00
Dimitri Stolnikov af819dfa4a uhd: add TX support 2013-05-07 22:46:07 +02:00
Dimitri Stolnikov 52e1272ba5 uhd: update includes 2013-05-07 22:44:08 +02:00
Hoernchen 80b4ad2921 offer avx and sse to speed up float->uint8 for tx 2013-05-06 21:52:19 +02:00
Dimitri Stolnikov 2d9e29ee46 hackrf: replace non-portable usleep with boost sleep 2013-05-02 23:08:32 +02:00
Dimitri Stolnikov 1ae6a839bb file: update returned gain and frequency ranges 2013-04-30 21:46:01 +02:00
Dimitri Stolnikov a0c50c2df1 source/sink: rename antennas to express their function 2013-04-30 21:44:31 +02:00
Dimitri Stolnikov 13477f279f source/sink: return freq_range_t in get_bandwidth_range()
it was meta_range_t (which is binary compatible) before.
2013-04-30 21:00:57 +02:00
Dimitri Stolnikov 7ed94c6242 osmosdr: remove unimplemented sink template
transmit feature won't be available in final hardware
2013-04-30 20:29:47 +02:00
Dimitri Stolnikov a5bdb27240 hackrf: add TX support (wip)
features:

- gain control for AMP & VGA
- frequency error correction
- automatic baseband filter
- up to 20M sampling rate

limitations:

- no DC offset correction implemented (yet)
- high sampling rates may not work on slow machines

the following TX named gain stages are available:

RF: MGA-81563, switchable 0 or 14dB
IF: MAX2837 VGA, 0 to 47dB in 1dB steps
2013-04-28 12:36:31 +02:00
Dimitri Stolnikov 882b6da6ac hackrf: updated source comments 2013-04-28 12:28:04 +02:00
Dimitri Stolnikov 37f6383c7c hackf: implement start & stop methods
This allows a block to enable an associated driver to begin
transfering data just before we start to execute the scheduler.
The end result is that this reduces latency in the pipeline
when dealing with audio devices, usrps, etc.
2013-04-26 21:50:50 +02:00
Dimitri Stolnikov 9bd7cbf4e1 source: update header documentation 2013-04-26 21:21:56 +02:00
Dimitri Stolnikov e157449a9e hackrf: don't skip first samples when streaming 2013-04-26 21:04:30 +02:00
Dimitri Stolnikov 98a805481e hackrf: make failures more verbose 2013-04-26 20:43:06 +02:00
Dimitri Stolnikov ae2de75272 cmake: add windows dll resource file 2013-04-16 21:53:09 +02:00
Dimitri Stolnikov afd56f4b5a hackrf: implement BB lowpass filter control
To use the default (automatic) bandwidth filter selection, this should
be set to 0.
2013-04-15 23:36:55 +02:00
Dimitri Stolnikov 44ff525904 iqbal: fix c&p mistake in lib/CMakeLists.txt 2013-04-14 11:27:14 +02:00
Dimitri Stolnikov 448206b2d2 hackrf: implement full control for RF/IF/BB gain stages
the following named gain stages are available:

RF: MGA-81563, switchable 0 or 14dB
IF: MAX2837 LNA, 0 to 40dB in 8dB steps
BB: MAX2837 VGA, 0 to 62dB in 2dB steps
2013-04-13 23:12:22 +02:00
Dimitri Stolnikov 7b66bb860a devices: software-only sources should be appended at the very end
hopefully this will result in hardware sources to be shown first
if any sort of a graphical interface is being used to show a list...
2013-04-10 21:17:31 +02:00
Dimitri Stolnikov 368c0ff130 cmake: handle iqbal like any other component 2013-04-10 21:09:02 +02:00
Dimitri Stolnikov f5670788fc hackrf: add support for HackRF devices through libhackrf
features:

- gain control for LNA & VGA
- frequency error correction
- automatic baseband filter
- up to 20M sampling rate

limitations:

- no DC offset correction implemented (yet)
- no RX preamplifier control (disabled by default)
- high sampling rates may not work on slow machines
2013-04-10 21:05:14 +02:00
Dimitri Stolnikov fd56ae7640 adopt gnuradio component header structure
this makes it neccessary to include headers with the osmosdr/ prefix

thanks to Alexandru Csete for pointing this out.
2013-04-09 00:28:10 +02:00
Dimitri Stolnikov e77017f652 use GR_LIBRARY_FOO() to comply with gnuradio library naming scheme 2013-03-17 10:36:25 +01:00
Dimitri Stolnikov fb79836158 print gnuradio version information in startup message 2013-03-17 10:31:51 +01:00
Dimitri Stolnikov 901dca8135 remove APPEND from include_directories 2013-03-12 20:17:24 +01:00
Hoernchen 69e0003407 This reverts commit 3fb4f96bb7.
This reverts commit 1772222cb3.
reorder include dirs
2013-03-12 19:39:30 +01:00
Hoernchen 3fb4f96bb7 fix the other config.h includes as well 2013-03-12 14:51:01 +01:00
Dimitri Stolnikov 1772222cb3 workaround for build system related bug caused by gnuradio master
They really should not name the header config.h:

http://gnuradio.org/cgit/gnuradio.git/commit/?id=9297c84dfdae3002677f759ef2b38a877d2edc2c
2013-03-11 21:13:38 +01:00
Dimitri Stolnikov e415d843c7 add support for software IQ imbalance correction
this functionality depend on the gr-iqbal blocks developed by Sylvain
Munaut and is a compile time dependency:

http://cgit.osmocom.org/cgit/gr-iqbal
2013-03-11 21:06:13 +01:00
Dimitri Stolnikov ede9c80455 rtl_tcp: add direct_samp and offset_tune args like used in rtl= target 2013-02-18 20:43:35 +01:00
Dimitri Stolnikov faa5123186 rtl_tcp: update rtl agc mode as well when switching tuner agc on/off 2013-02-18 20:11:54 +01:00
Dimitri Stolnikov 2ca2d8cd4d rtl_tcp: add named gain stage "IF" 2013-02-17 17:59:49 +01:00
Dimitri Stolnikov b74aeb108e print version information in startup message 2013-02-17 00:11:22 +01:00
Dimitri Stolnikov ed253ffc1e osmosdr: add named gain stage "IF" 2013-02-16 15:01:46 +01:00
Dimitri Stolnikov 864712bad0 rtl: add named gain stage "IF" 2013-02-16 15:01:29 +01:00
Dimitri Stolnikov d4de9d18c1 remove unused self() 2013-02-16 12:44:38 +01:00
Dimitri Stolnikov 0f371eeca1 remove gain_mode getter/setter where not used 2013-02-16 12:36:06 +01:00
Dimitri Stolnikov 878c80d8ca add meta_range_t::values() which returns all values of the range 2013-02-16 12:19:47 +01:00
Dimitri Stolnikov 18c860281d file: set repeat and throttle device args to true by default 2013-01-20 15:45:22 +01:00
Dimitri Stolnikov 9e60a61f73 osmosdr: notify work function on exit of async read 2013-01-20 15:39:15 +01:00
Dimitri Stolnikov 51787ff8e1 miri: notify work function on exit of async read 2013-01-20 15:38:56 +01:00
Dimitri Stolnikov 10573261c2 rtl: notify work function on exit of async read
this is required to handle the interruption of a flowgraph in a clean
way by returning WORK_DONE in work() function.
2013-01-16 20:30:37 +01:00
Dimitri Stolnikov 241fc1922b return a sample rate of (0) instead of (0, 1) when a fatal error occurs 2013-01-10 20:35:00 +01:00
Dimitri Stolnikov d243abe2d7 return default devices for file and rtl_tcp in device::find() 2013-01-10 20:33:45 +01:00
Dimitri Stolnikov f81bf7cf12 uhd: return default subdev in get_devices 2013-01-10 20:30:38 +01:00
Dimitri Stolnikov aed2a94769 rtl: return new style label (with SN) in get_devices 2013-01-10 20:29:19 +01:00
Dimitri Stolnikov 61674dd638 file: add get_devices member which returns a default device 2013-01-10 20:28:16 +01:00
Dimitri Stolnikov 887dbb1457 rtl_tcp: add get_devices member which returns a default device 2013-01-10 20:27:56 +01:00
Dimitri Stolnikov 9bfce2694f rtl: return an appropriate tuning range when in direct sampling mode 2013-01-02 23:13:10 +01:00
Dimitri Stolnikov 6ad2043130 rtl_tcp: use gnuradio convention for indent 2013-01-02 00:29:07 +01:00
Dimitri Stolnikov 6ae9c1b4dc update tuning ranges 2013-01-01 23:03:31 +01:00
Dimitri Stolnikov 43a6afdf28 rtl_tcp: add support for tuner caps discovery 2012-12-29 17:01:33 +01:00
Dimitri Stolnikov ad2e5523cb fill up missing radio channel(s) with gaussian noise
This is being done to prevent the application from crashing
due to a gnuradio bug. The GR maintainers have been informed.
2012-12-25 16:51:56 +01:00
Dimitri Stolnikov ccff99ea4f uhd: add lo_offset argument
This might be used to tune away from the noisy center region caused by
direct conversion receiver principle. The offset shall be choosen within
receiver (daughterboard) bandwidth.

Thanks to Marcus Leech & G0HWW for the original idea.
2012-11-29 22:38:52 +01:00
Dimitri Stolnikov 2193c32ae0 rtl, rtl_tcp: enable 250k rate as it has been verified for gmr and tetra 2012-11-28 22:40:28 +01:00
Dimitri Stolnikov cd638cef3e miri: don't parse buffers argument as double 2012-11-28 21:07:34 +01:00
Dimitri Stolnikov a314b43162 osmosdr: introduce buflen argument
this might be helful for rates <1MSPS
value must be multiple of 512 bytes
2012-11-28 21:06:43 +01:00
Dimitri Stolnikov 8041472ff7 rtl: introduce buflen argument
this might be helful for rates <1MSPS
value must be multiple of 512 bytes
2012-11-28 20:52:41 +01:00
Dimitri Stolnikov cf807398c8 rtl: print a user friendly message if unable to parse the argument 2012-11-04 15:08:16 +01:00
Dimitri Stolnikov 933c0e21b1 rtl: open device by given serial, fall back to index value if not found
the serial number of a rtl device can be changed using the "rtl_eeprom -
2012-11-04 14:25:00 +01:00
Steve Markgraf a13bc485ed miri: fix crackle due to garbage samples
The amount of input samples in the callback can vary
due to the nature of the isochronous transfers.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-16 18:27:56 +02:00
Steve Markgraf bd0628e1dc miri: we don't have get_sample_rates in libmirisdr
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-14 19:00:26 +02:00
Steve Markgraf 8c3786336f rtl: add offset tuning as device parameter
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-10-10 21:03:48 +02:00
Dimitri Stolnikov dee9d3e696 update available samplerates for rtl devices
250k didn't work for TETRA and GMR, 2M has.
2012-09-30 20:58:21 +02:00
Dimitri Stolnikov 2878501284 add support for MSi2500 based DVB-T dongles through libmirisdr
this has been tested with analog modes only and still has to be
verified with the usual digital modes for proper implementation.
2012-09-30 20:12:48 +02:00
Dimitri Stolnikov c51b04ee74 don't throw exceptions inside a gr_hier_block2 ctor
This avoids throws in ctor of gr_hier_block2, as gnuradio is unable to
deal with this behavior in a clean way. The GR maintainer Rondeau has
been informed.
2012-09-30 16:54:34 +02:00
Steve Markgraf 0f25daec61 rtl: add direct_samp as device parameter
This can be used to enable the direct sampling mode
of an rtlsdr stick, e.g.:

For input 1 (In-phase ADC):
rtl=0,direct_samp=1

For input 2 (Quadrature ADC):
rtl=0,direct_samp=2

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-09-16 17:01:32 +02:00
Dimitri Stolnikov e3c60c4a70 rtl: print overflow marker to stderr 2012-08-08 20:45:03 +02:00
Dimitri Stolnikov bb2833250c osmosdr: print overflow marker to stderr 2012-08-08 20:42:45 +02:00
Dimitri Stolnikov a43fef00a7 rtl: wait for worker thread to complete without a timeout 2012-08-08 20:31:51 +02:00
Dimitri Stolnikov fe8984dfa5 osmosdr: wait for worker thread to complete without a timeout 2012-08-08 20:31:38 +02:00
Dimitri Stolnikov e3bea99310 rtl: check for NULL buffers 2012-08-08 20:27:27 +02:00
Dimitri Stolnikov f0b3de4d54 osmosdr: check for NULL buffers 2012-08-08 20:26:48 +02:00
Dimitri Stolnikov ff6615e08f rtl: explicitly set agc mode (off by default) 2012-08-01 22:57:11 +02:00
Dimitri Stolnikov 86ec5d3b73 add if gain setter API for rtl-sdr
and OsmoSDR devices

Observations lead to an useful gain
range from 15 to 30dB, a value of
24dB is used by default.
2012-07-18 21:24:57 +02:00
Dimitri Stolnikov 0b5f48eb07 osmosdr: automatically increase if gain when required 2012-07-08 23:56:18 +02:00
Dimitri Stolnikov f9acc7edf6 rtl: automatically increase if gain when required 2012-07-08 23:56:05 +02:00
Dimitri Stolnikov 10f0d89348 update gain names 2012-07-01 12:43:22 +02:00
Dimitri Stolnikov 604a9d79b0 use clip method provided by range class to pick gain values 2012-07-01 11:38:46 +02:00
Dimitri Stolnikov 1ea5a90b19 rtl: add sample rate 250k 2012-07-01 11:20:40 +02:00
Dimitri Stolnikov 8fc150c64d fix frequency range definition for e4k based devices 2012-07-01 11:18:29 +02:00
Dimitri Stolnikov c92822469c use endianness provided by boost 2012-06-29 21:27:22 +02:00
Dimitri Stolnikov fd83f5f33f osmosdr: include serial in label property 2012-06-09 20:03:57 +02:00
Dimitri Stolnikov 38811fb853 uhd: remove the equal character from uhd argument 2012-06-09 16:26:49 +02:00
Dimitri Stolnikov 3c3bdc15cf uhd: include type, name (if available) and serial in label property 2012-06-09 16:00:24 +02:00
Dimitri Stolnikov 8099f783c0 osmosdr: use sample rate API 2012-06-06 00:46:49 +02:00
Dimitri Stolnikov 842e48d101 osmosdr: implement setting of sample rate 2012-06-02 23:57:17 +02:00
Dimitri Stolnikov c6fa979160 osmosdr: disable IQ swapping feature 2012-06-02 23:03:55 +02:00
Dimitri Stolnikov 05700e6092 rtl, osmosdr: reorder buffer allocation to prevent memory leak
the leak would occur if the requested device could not be opened
2012-06-02 22:50:48 +02:00
Dimitri Stolnikov 237385a0c3 respect the signedness
thanks to Hoernchen <la@tfc-server.de>
2012-06-02 22:22:28 +02:00
Dimitri Stolnikov 9ec656dc05 make it play nice with windows
thanks to Hoernchen <la@tfc-server.de>
2012-06-02 21:56:17 +02:00
Dimitri Stolnikov a8625f0290 fix copy & paste errors 2012-06-02 17:02:31 +02:00
Dimitri Stolnikov 869ed6df15 print information about supported components 2012-06-02 01:19:15 +02:00
Dimitri Stolnikov 27dff71304 rtl: read out gain values via library api 2012-06-02 01:18:07 +02:00
Dimitri Stolnikov cd1db62699 osmosdr: read out gain values via library api 2012-06-02 01:16:26 +02:00
Dimitri Stolnikov 7ef9ebc7bb cleanup: make _samp_avail signed integer 2012-05-27 14:32:50 +02:00
Dimitri Stolnikov 6194958d71 rtl: clean up work function 2012-05-27 14:27:05 +02:00
Dimitri Stolnikov 674e084bdf rtl_tcp: remove unused variables 2012-05-27 14:02:50 +02:00
Dimitri Stolnikov 4b6018b68c remove OSMOSDR_API usage where appropriate 2012-05-27 13:50:58 +02:00
Dimitri Stolnikov 9a5e93cf0d osmosdr: change implementation to use libosmosdr 2012-05-26 22:24:47 +02:00
Dimitri Stolnikov e26074615b osmosdr_device: make it compile with boost 1.46.1 2012-05-20 15:30:01 +02:00
Dimitri Stolnikov 3ea0b38810 introduce device discovery api
This API allows to acquire a list of devices connected to the host and
creates an argument string ready to be passed to a source object for
cunstruction.

Each device_t entry contains a "label" entry, which holds the generic
device name which may be shown to the user for device selection.

For certain radio hardware extended entries ("name", "serial", "type")
may be available to make bijective device addressing possible.

The argument string for target types "rtl_tcp" and "file" might be
constructed using the osmosdr::device_t class facilities.

Example:

 #include <osmosdr_device.h>
 #include <osmosdr_source_c.h>

osmosdr::devices_t devs = osmosdr::device::find();

BOOST_FOREACH(osmosdr::device_t &dev, devs) // try to create each dev
  osmosdr_source_c_sptr src = osmosdr_make_source_c(dev.to_string());
2012-05-20 12:55:52 +02:00
Dimitri Stolnikov e256bf332e reapply previous gain value when switched to manual gain mode 2012-05-19 22:47:28 +02:00
Dimitri Stolnikov 6bef750ac9 change gain mode argument to 'automatic' for clarity 2012-05-17 10:35:58 +02:00
Steve Markgraf 7f796fe1b2 rtl_tcp_source: convert commands from host to network byteorder
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-13 23:06:09 +02:00
Dimitri Stolnikov 0e3d1995a0 rtl: skip one buffer full of garbage at the beginning 2012-05-13 20:01:50 +02:00
Dimitri Stolnikov 8e82b44bff rtl_tcp: change device argument syntax to host[:port]
without any arguments the code will try to connect to localhost:1234
2012-05-13 19:49:07 +02:00
Steve Markgraf 20d4ef7e4a rtl_source_c: fix several off-by-one errors
Those summed up and caused sample loss.
Thanks to Hoernchen for helping me tracking those down.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
2012-05-13 04:17:02 +02:00
Dimitri Stolnikov 52b5a8a4d3 uhd: added UHD as dependency for the gr-uhd based module
this may be required for compilation since the gnuradio trunk doesn't
provide UHD's include path via pkg-config.
2012-05-12 23:04:03 +02:00
Dimitri Stolnikov d384cf52e2 append dependency include dirs when building components 2012-05-12 12:41:55 +02:00
Dimitri Stolnikov 9b9c5bfcf4 rtl_tcp: implement frequency correction control 2012-05-07 23:02:36 +02:00
Dimitri Stolnikov e38dc2f427 rtl_tcp: implement sample rate and gain control 2012-05-06 19:42:27 +02:00
Dimitri Stolnikov f94d8da48e rtl_tcp: add initial component files
For use with the rtl_tcp utility acting as a spectrum server.

The "empty" rtl_tcp= device hint might be used to connect to rtl_tcp
running on local machine.
2012-05-05 23:47:00 +02:00
Dimitri Stolnikov 3a066ff258 implement virtually arbitrary gain values
internally, this will pick a certain gain value out of the valid gains
using the "smallest error" strategy.
2012-05-05 21:37:13 +02:00
Dimitri Stolnikov ba0b52868a changed logic value for automatic gain mode
sorry boys & girls!
2012-05-05 21:06:54 +02:00
Dimitri Stolnikov cf1c3ab117 pick first device if no device arguments were specified 2012-05-05 20:43:34 +02:00
Dimitri Stolnikov 0a4b9264a3 rtl_source_c: add buffers argument 2012-05-05 17:50:21 +02:00
Dimitri Stolnikov 3b6c74807c implement internal cache for setter functions
this is prevents GRC calling them multiple times with the same value
2012-05-05 17:35:38 +02:00
Dimitri Stolnikov 3a47e3661c add api for manual gain mode control 2012-05-05 00:43:32 +02:00
Dimitri Stolnikov f0ac70fa41 file: initial file source support
Example:
  file=/path/to/file.ext,freq=428e6,rate=1e6,repeat=true,throttle=true
2012-04-29 19:55:28 +02:00
Dimitri Stolnikov 34baaf3f93 rtl: add xtal arguments for rtl and tuner chips 2012-04-29 19:53:17 +02:00
Dimitri Stolnikov c1c0c2f212 first working multichannel source 2012-04-28 20:18:14 +02:00