Commit Graph

329 Commits

Author SHA1 Message Date
Dimitri Stolnikov a45968f338 update version to 0.1.4 2014-11-05 00:07:07 +01:00
Jon Szymaniak 6e75abf198 bladeRF: Don't fail out until 3 consecutive errors have occurred
This change is intended to make the bladeRF source/sink implementations
slightly more resilient to any transient issues in a flow graph.

For poor choices of buffers/transfers or under high CPU load, an RX or
TX operation might time out. Instead of immediately reporting WORK_DONE
and bailing out, an error message is now printed and the device will
attempt to continue transmitting/receiving samples.

After 3 consecutive errors have occurred on an RX/TX operation, the
device will report WORK_DONE; in this situation, something is likely
very wrong.
2014-11-03 23:24:04 +01:00
Jon Szymaniak 7f82d289a6 bladeRF: Default num_transfers to min(32, num_buffers/2)
This avoids inadvertently attempting to use a larger number of transfers
than the underlying USB library/interface allows by specifying a large
value for num_buffers.

Users can specify up to (num_buffers - 1) transfers. However, it is
generally recommended to use half as many transfers as buffers.
2014-11-03 23:23:59 +01:00
Jon Szymaniak 23b1b9cdb1 bladeRF: Removed unused bladerf_metadata parameter from rx/tx calls
It is safe (and preferred) to pass NULL for the metadata paremeter when
using a format that does utilize the metadata structure.
2014-11-03 23:23:54 +01:00
Dimitri Stolnikov 42c66fdd70 hackrf: update copyright for SSE/AVX routines 2014-10-21 22:14:52 +02:00
Dimitri Stolnikov 39230788d7 hackrf: disable AMP gain stage by default to protect it from damage
patch proivided by Paul Connolly
2014-10-21 22:13:08 +02:00
Dimitri Stolnikov 7a8224bcb8 source/sink: don't discover devices if already specified via args 2014-10-21 21:44:29 +02:00
Dimitri Stolnikov 4bb2fa4e2f update version to 0.1.4git 2014-08-28 21:33:05 +02:00
Dimitri Stolnikov 7a013ca84a update version to 0.1.3 2014-08-28 21:32:27 +02:00
Dimitri Stolnikov 8604d76df3 uhd: disable dynamic signature change due to gnuradio bug #719
details: http://gnuradio.org/redmine/issues/719
2014-08-27 21:37:39 +02:00
Dimitri Stolnikov a3ee4db0e7 update version to 0.1.3git 2014-08-26 21:55:51 +02:00
Dimitri Stolnikov 808292c688 update version to 0.1.2 2014-08-26 21:55:31 +02:00
Dimitri Stolnikov 16cd02de84 cmake: update from gnuradio master
- Update the GrXXX modules from the GNURadio master
- Force 3.7.3 since previous FindGnuradio was broken
2014-08-26 00:09:15 +02:00
Dimitri Stolnikov ab582493dd hackrf: extend frequency range down to BW/2 2014-08-25 23:02:39 +02:00
Dimitri Stolnikov 7703aabf35 python: Remove an old workaround for a swig bug
following gnuradio commit 39f14138ac9158eb0610e89a2ae1f8290f184c44

This has been removed of Gnuradio iteself in 2012 and this seems to
be causing issues for some OOT on some platforms...
2014-08-25 22:33:12 +02:00
Jeremy Visser 58d95b5164 Allows connecting to IPv6 hosts if an AAAA record is present
and /etc/gai.conf is not configured to prefer IPv4 hosts.

The current logic handling the output of getaddrinfo() is
flawed in that it only ever attempts to connect() to the
first address returned.

This is a problem for both round-robin and dual-stack hosts.

Furthermore, rtl_tcp_source_c::rtl_tcp_source_c() assumes a colon
in the device string is a port number.  This prevents the use
of raw IPv6 addresses.  The function will need to be taught how
to handle IPv6 addresses contained within square brackets, e.g.
"rtl_tcp=[2001:db8::1]:1234".

Therefore further work is required to improve the handling of
multiple addresses, and also device strings containing raw IPv6
addresses.

Signed-off-by: Jeremy Visser <jeremy@visser.name>
2014-08-14 23:44:46 +02:00
Jiří Pinkava 225faa2e6a rtl: fix large output buffers handling
When size of output buffer was larger than size of input buffer,
uderflow occured because no check on number of avalilable data was done.

This also improves buffer filling for large output buffers, fill output
until anny input is available.
2014-08-14 23:35:23 +02:00
Dimitri Stolnikov 3afecd6adf hackrf: extend frequency range down to 10MHz 2014-08-14 23:16:31 +02:00
Robert Ghilduta 9cb023b00a bladeRF: Add XB-200 support
This commit adds support for the bladeRF XB-200 transverter expansion
board. To enable the expansion board and to allow the osmocom source or
sink to tune down to 0Hz, parameter xb200 has to be set. XB-200 comes
with 4 filter banks which can be selected by passing their name as
a value of the xb200 parameter. Automatic filter selection will be
enabled if no value is given to the xb200 parameter.

Example:

osmocom_fft -a bladerf,xb200
osmocom_fft -a bladerf,xb200=50M

The following values are valid:
   "custom"  : custom band
   "50M"     :  50MHz band
   "144M"    : 144MHz band
   "222M"    : 222MHz band
   "auto3db" : Select fiterbank based on -3dB filter points
   "auto"    : Select filerbank based on -1dB filter points (default)
2014-07-11 16:53:23 +02:00
Jon Szymaniak c65d205d3b bladerf: Accept 'loopback' parameter only on a source
To alleviate some confusion (described below), the 'loopback' parameter
may now only be applied to a bladeRF source. A warning will be printed
if it is applied to a sink.

This is intended to help users avoid the case where two different
loopback options are applied to the same device. In this case, the
loopback setting on whichever initializes last will be applied. This,
coupled with the fact that not specifying a loopback defaults to
loopback=none, yields rather unintuitive behavior.
2014-05-06 22:39:06 +02:00
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.

example:

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
   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 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