Commit Graph

289 Commits

Author SHA1 Message Date
Dimitri Stolnikov c7cb045fcb file: follow-up for commit 24d54c36 2014-05-03 18:41:43 +02:00
Jon Szymaniak b986e31e63 bladeRF: Fixed typo in handling 'stream_timeout_ms' device argument 2014-05-03 18:37:34 +02:00
Dimitri Stolnikov 24d54c369f file: expose seek function in public API 2014-05-03 18:37:05 +02:00
Dimitri Stolnikov 74b9211cdc rtl: implement methods allowing runtime to control sampling process 2014-05-03 18:30:15 +02:00
Jon Szymaniak 2ae3fdbc22 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-05-03 18:27:47 +02:00
Brian Padalino 79ad6f6a76 bladerf: Updated source/sink to use libbladeRF's sync interface 2014-05-03 18:27:02 +02:00
Dimitri Stolnikov 1f7e798184 source/sink: don't return void in void functions 2014-05-03 18:22:21 +02:00
Hoernchen f097a38f20 hackrf: signed samples, following commit fd77cfe8a6 2014-05-03 18:21:49 +02:00
Dimitri Stolnikov 0b76b7a21b uhd: pass through only the requested number of channels
B210 USRP appears as a 2-channel device by default. We prevent weird
application behavior by restricting the number of connected channels to
the value given via nchan= argument (1 by default).
2014-05-03 18:21:18 +02:00
Dimitri Stolnikov 79231f6173 uhd: print to stderr instead of stdout (library convention) 2014-05-03 18:17:28 +02:00
Dimitri Stolnikov e6701ca621 uhd: catch exceptions from dc offset & iq imbalance setters
since dc offset / iq imbalance is not implemented for recent USRPs this
might cause undesired behavior in GRC. As a workaround we do not pass
them to the caller but print them to the stderr.
2014-05-03 18:15:22 +02:00
Dimitri Stolnikov 376884f6a0 uhd: use universal_time() for "sync=unknown" 2014-05-03 18:04:50 +02:00
Jon Szymaniak 40f93c2ae1 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:30:49 +01:00
Jon Szymaniak 1633dbaa74 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 09:30:46 +01:00
Dimitri Stolnikov 115d4ddde0 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-16 09:30:42 +01:00
Dimitri Stolnikov 333e9bbbb2 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-16 09:30:04 +01:00
Dimitri Stolnikov 084d193a29 rfspace: properly cover the absense of a serial number 2014-01-26 19:55:26 +01:00
Marcus D. Leech 3764dcb8af uhd: add options for wire-format, time-synchronization, and refclock/PPS
This patch-set adds substantial new support for UHD features relating to
wire-format, time-synchronization, and refclock/PPS.

It is intended for both sources and sinks. The get-precision-time
function I simply made static and copied into both source and sink
files. It really belongs in osmosdr utiltiies, it uses Boost to hide the
Windows-vs-Unix-like precision time "goop".
2014-01-26 17:32:33 +01:00
Brian Padalino 36a6b8fe1f bladeRF: Modifying correction calls.
Modifying correction function calls to match libbladeRF API.
2014-01-26 17:19:06 +01:00
Jon Szymaniak cd38413803 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-26 17:18:45 +01:00
Jon Szymaniak 43af3a851e bladerf: Updates for libbladeRF v0.11.0 API changes 2014-01-26 17:17:19 +01:00
Jon Szymaniak 734ba42989 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-26 17:17:14 +01:00
Jon Szymaniak 1e742bc186 bladerf: Added start()/stop() implementations 2014-01-26 17:16:53 +01:00
Dimitri Stolnikov b359cb71ab osmocom_fft: print the exception thrown in DC/IQ correction setters 2014-01-26 17:08:58 +01:00
Dimitri Stolnikov a832a09fd9 osmocom_siggen: add controls for DC offset and IQ imbalance correction 2014-01-26 17:08:54 +01:00
Dimitri Stolnikov aaedaa2c97 bladerf: shorten the serial number that is being shown to the user 2014-01-26 17:08:47 +01:00
Dimitri Stolnikov 58648a3124 bladerf: implement DC offset and IQ imbalance correction
This patch has been provided by Brent J.
2014-01-26 17:08:31 +01:00
Dimitri Stolnikov becc68131c bladerf: FX3 firmware loading not supported from within gr-osmosdr 2014-01-26 17:08:27 +01:00
Dimitri Stolnikov 5da9aafa2c bladerf: prepare functions to control DC offset / IQ balance (WIP) 2014-01-26 17:08:22 +01:00
Dimitri Stolnikov f42fe3d065 apps/osmocom_fft: gui to set DC offset / IQ imbalance correction mode 2014-01-26 17:08:15 +01:00
Dimitri Stolnikov 3f281d9705 rfspace: add missing header for basename() 2014-01-26 17:07:59 +01:00
Dimitri Stolnikov 7b1c5dc8a0 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.
2014-01-26 17:07:35 +01:00
Dimitri Stolnikov 03f9532945 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 );
2014-01-26 16:29:48 +01:00
Dimitri Stolnikov 0e6a369df7 add UmTRX to the list of supported devices
requires Fairwaves' port of the Ettus UHD library:

https://github.com/fairwaves/UHD-Fairwaves
2014-01-26 16:29:37 +01:00
Steve Markgraf 86ecf305be 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:09:16 +01:00
Dimitri Stolnikov 62127aada0 file: add missing include for boost::format 2013-12-05 00:02:37 +01:00
Dimitri Stolnikov 9e6f68b2e6 apps/osmocom_fft: recover when .step property is not given for a range 2013-12-05 00:02:30 +01:00
Dimitri Stolnikov 05e17c6417 sink/source: fix error message when unable to connect blocks internally 2013-12-05 00:02:22 +01:00
Dimitri Stolnikov 70cd91f505 netsdr: implement sample rate change in run mode 2013-12-05 00:02:16 +01:00
Steve Markgraf fa75a253c7 rtl: add R828D tuner
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-11-04 22:25:46 +01:00
Dimitri Stolnikov b2049ba5ef 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-04 22:25:30 +01:00
Jon Szymaniak 743dc07b43 bladerf: Don't reload the FPGA unless the force-reload param is set 2013-11-04 22:11:23 +01:00
Jon Szymaniak b7fff27300 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-11-04 22:10:59 +01:00
Jon Szymaniak 892433836f 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-11-04 22:09:27 +01:00
Daniel Gröber 54f2e08dd7 bladerf: Added device caching, this enables full-duplex operation. 2013-11-04 22:09:23 +01:00
Dimitri Stolnikov 7394251bd0 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:03 +02:00
Dimitri Stolnikov ee6e3d0bfa apps/osmocom_fft: use reasonable defaults for gain & center frequency 2013-10-26 14:51:48 +02:00
Dimitri Stolnikov 18ed13ef05 use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
2013-10-25 23:50:49 +02:00
Dimitri Stolnikov 6252b4144a 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:49:24 +02:00
Dimitri Stolnikov e394dd3922 uhd: improve device discovery 2013-10-25 23:46:39 +02:00