Commit Graph

309 Commits

Author SHA1 Message Date
Jon Szymaniak 00b579532c bladerf: Apply 'verbosity' parameter before performing other operations
Setting the libbladeRF verbosity level needs to be performed prior to
other operations. Otherwise, the desired diagnostic output will not
appear for startup operations (e.g., device opening, enabling loopback).
2014-05-06 22:39:01 +02:00
Dimitri Stolnikov 16c32a9fe0 osmosdr: use a fixed output signature of 1x gr_complex 2014-05-04 15:17:17 +02:00
Dimitri Stolnikov b9489aecdf uhd: implement stream arguments for sample format
cpu_format: sc8, sc16, fc32, fc64
otw_format: sc8, sc16
fullscale: specifies the full-scale amplitude when using floats.
peak: specifies a fractional sample level to calculate scaling with the
sc8 wire format.


osmocom_fft -a uhd,otw_format=sc8,fpga=usrp1_fpga_4rx.rbf -s 16M
2014-05-04 15:16:35 +02:00
Dimitri Stolnikov 8ee05d3196 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 23:40:57 +02:00
Dimitri Stolnikov ac95af24fa 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-04-16 22:55:40 +02:00
Dimitri Stolnikov bfbc97db8f grc: fix template for gain mode setter
Problem observed & reported by Michael Dickens with swig 3.0.0, local
swig 2.0.11 seems not to be affected.
2014-04-16 20:27:25 +02:00
Jon Szymaniak 23ea2fcfb4 bladeRF: Fixed typo in handling 'stream_timeout_ms' device argument 2014-04-14 00:30:17 +02:00
Dimitri Stolnikov 37b09bc559 update version to 0.1.2git 2014-03-31 23:55:36 +02:00
Dimitri Stolnikov f26fc5048c update version to 0.1.1 2014-03-31 23:46:14 +02:00
Dimitri Stolnikov 1e8b45d09e apps/fft: make recording controls visible, but don't record by default
To start recording, verify the filename and press REC button...
2014-03-14 10:51:15 +01:00
Dimitri Stolnikov 567fcbdffa apps/fft: implement file recording capability
Available wildcards:
	%S: sample rate
	%F: center frequency
	%T: timestamp (%Y%m%d%H%M%S)

Example: osmocom_fft -r /tmp/name-f%F-s%S-t%T.cfile
2014-03-11 12:14:14 +01:00
Dimitri Stolnikov d29896d854 apps/siggen: add parameter to specify named gains 2014-03-11 10:44:06 +01:00
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
 - 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

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

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
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 7ae3e985e2 osmocom_fft: print the exception thrown in DC/IQ correction setters 2014-01-11 09:06:20 +01:00
Dimitri Stolnikov 49765922da osmocom_siggen: add controls for DC offset and IQ imbalance correction 2014-01-11 09:05:26 +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 80c4af4f31 bladerf: FX3 firmware loading not supported from within gr-osmosdr 2013-12-28 13:05:45 +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 15d3699d72 apps/osmocom_fft: gui to set DC offset / IQ imbalance correction mode 2013-12-28 00:56:11 +01:00
Dimitri Stolnikov 18e11438a0 rfspace: add missing header for basename() 2013-12-27 22:45:32 +01:00
Sylvain Munaut 2287f08bad osmocom_fft: Properly set initial sample rate for fosphor output
Signed-off-by: Sylvain Munaut <>
2013-12-22 17:05:08 +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 750a0b4549 cmake: pull updates from gnuradio master 2013-12-10 16:57:11 +01:00
Dimitri Stolnikov a98e682693 add UmTRX to the list of supported devices
requires Fairwaves' port of the Ettus UHD library:
2013-12-10 16:56:14 +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 <>
2013-12-05 00:12:27 +01:00
Dimitri Stolnikov 0d10f5e9bc apps/osmocom_fft: recover when .step property is not given for a range 2013-11-06 21:27:04 +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 <>
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