Commit Graph

300 Commits

Author SHA1 Message Date
Jon Szymaniak fe99478a0c 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:10:08 +01:00
Jon Szymaniak b7360fc879 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:10:04 +01:00
Dimitri Stolnikov 99c9e5ead9 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:10:01 +01:00
Dimitri Stolnikov 9d85dcf6d1 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:09:55 +01:00
Dimitri Stolnikov 0e99eb95f7 rfspace: properly cover the absense of a serial number 2014-01-26 19:55:36 +01:00
Brian Padalino 98a6e7604f bladeRF: Modifying correction calls.
Modifying correction function calls to match libbladeRF API.
2014-01-26 17:36:56 +01:00
Jon Szymaniak 9964a5e6a9 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:36:53 +01:00
Jon Szymaniak 9a8710757f bladerf: Updates for libbladeRF v0.11.0 API changes 2014-01-26 17:36:50 +01:00
Jon Szymaniak 0ee06038ae 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:36:47 +01:00
Jon Szymaniak 1905cdc64c bladerf: Added start()/stop() implementations 2014-01-26 17:36:43 +01:00
Dimitri Stolnikov a734c1ae85 osmocom_fft: print the exception thrown in DC/IQ correction setters 2014-01-26 17:36:38 +01:00
Dimitri Stolnikov d7557d9432 osmocom_siggen: add controls for DC offset and IQ imbalance correction 2014-01-26 17:36:35 +01:00
Dimitri Stolnikov 9701906aaf bladerf: shorten the serial number that is being shown to the user 2014-01-26 17:36:32 +01:00
Dimitri Stolnikov 27a5e07ba3 bladerf: implement DC offset and IQ imbalance correction
This patch has been provided by Brent J.
2014-01-26 17:36:29 +01:00
Dimitri Stolnikov 22705c89cf bladerf: FX3 firmware loading not supported from within gr-osmosdr 2014-01-26 17:36:25 +01:00
Dimitri Stolnikov f78d79398f bladerf: prepare functions to control DC offset / IQ balance (WIP) 2014-01-26 17:36:22 +01:00
Dimitri Stolnikov 6b61662b37 apps/osmocom_fft: gui to set DC offset / IQ imbalance correction mode 2014-01-26 17:36:16 +01:00
Dimitri Stolnikov 2a54ac2aed rfspace: add missing header for basename() 2014-01-26 17:36:12 +01:00
Sylvain Munaut 81c53bf547 osmocom_fft: Properly set initial sample rate for fosphor output
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-01-26 17:36:07 +01:00
Dimitri Stolnikov 9b76d230e9 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:35:59 +01:00
Dimitri Stolnikov c7a77e88d9 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 17:35:55 +01:00
Dimitri Stolnikov 411a2b683b cmake: pull updates from gnuradio master 2014-01-26 17:35:51 +01:00
Dimitri Stolnikov 8984357be5 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 17:35:38 +01:00
Dimitri Stolnikov e48f8cf2c9 file: add missing include for boost::format 2014-01-26 17:35:33 +01:00
Steve Markgraf 19556d00da 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>
2014-01-26 17:35:28 +01:00
Dimitri Stolnikov 505c19f82e apps/osmocom_fft: recover when .step property is not given for a range 2014-01-26 17:35:20 +01:00
Dimitri Stolnikov 8522c4edf2 sink/source: fix error message when unable to connect blocks internally 2014-01-26 17:35:16 +01:00
Dimitri Stolnikov 2bd29cbe99 netsdr: implement sample rate change in run mode 2014-01-26 17:34:55 +01:00
Steve Markgraf eb3865010d rtl: add R828D tuner
Signed-off-by: Steve Markgraf <steve@steve-m.de>
2013-11-04 21:22:11 +01:00
Dimitri Stolnikov 8c5e74c213 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 21:22:07 +01:00
Jon Szymaniak dd35921292 bladerf: Don't reload the FPGA unless the force-reload param is set 2013-11-04 21:22:00 +01:00
Jon Szymaniak e735418224 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 21:21:54 +01:00
Jon Szymaniak 3ef7394f61 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 21:21:48 +01:00
Daniel Gröber 0d75ab353d bladerf: Added device caching, this enables full-duplex operation. 2013-11-04 21:21:44 +01:00
Sylvain Munaut 49a3772491 osmocom_fft: Make the scope area fill all available space
The control area is now fixed / packed

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:27:47 +02:00
Sylvain Munaut 2cbc1e14e0 osmocom_fft: Use the new WX version of fosphor sink
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:27:43 +02:00
Dimitri Stolnikov 0ee591f163 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:09:43 +02:00
Dimitri Stolnikov 8f86bd2dca apps/osmocom_fft: use reasonable defaults for gain & center frequency 2013-10-26 15:05:47 +02:00
Dimitri Stolnikov f7640dc11c bladerf: remove unused variable 2013-10-25 23:45:48 +02:00
Dimitri Stolnikov 26acce3d35 use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
2013-10-25 23:45:30 +02:00
Dimitri Stolnikov dd7d584137 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:45:24 +02:00
Dimitri Stolnikov 68481ac40d uhd: improve device discovery 2013-10-25 23:45:20 +02:00
Dimitri Stolnikov 860962e501 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:51:44 +02:00
Dimitri Stolnikov 8300354c05 cmake: fix flag passing to Clang compiler 2013-10-19 16:36:39 +02:00
Dimitri Stolnikov 2934d8512b apps: catch corner cases for file= mode in osmocom_fft
verified for gqrx and sdrangerlove as well:

file=/tmp/lte.cfile,rate=40e6,freq=1815e6,repeat=true,throttle=true
2013-10-18 19:47:21 +02:00
Sylvain Munaut 5534662c0c apps/osmocom_fft: Add option to use fosphor for the main display
Currently the GLFW variant as it's all that's available currently

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-17 21:27:41 +02:00
Dimitri Stolnikov f61734e58b cmake: make uhd component optional in standalone mode 2013-10-05 12:08:27 +02:00
Dimitri Stolnikov d81936d907 bladerf: use newstyle version getters 2013-10-04 18:31:39 +02:00
Dimitri Stolnikov 7b199a8b95 bladerf: make source less picky wrt rf gain 2013-10-03 14:37:02 +02:00
Dimitri Stolnikov 1f44c44054 source/sink: initialize sample rate cache variable
Thanks to Jiří Pinkava for bringing this up.
2013-10-03 14:25:28 +02:00