Commit Graph

287 Commits

Author SHA1 Message Date
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
Dimitri Stolnikov 56281a6a30 source/sink: fix automatic bandwidth selection 2013-10-03 14:20:31 +02:00
Dimitri Stolnikov 882cac8465 rtl: don't try to parse empty device index values 2013-09-28 13:46:36 +02:00
Dimitri Stolnikov 217872a785 apps: filter bandwidth follows sample rate in osmocom_fft 2013-09-28 13:40:03 +02:00
Dimitri Stolnikov b97cac30c6 updated header documentation for bandwidth setter 2013-09-28 13:35:26 +02:00
Dimitri Stolnikov d8534d8721 bladerf: implement automatic bandwidth selection 2013-09-28 13:33:30 +02:00
Dimitri Stolnikov 851e94b82f hackrf: enable AMP gain stage by default 2013-09-28 13:29:03 +02:00
Dimitri Stolnikov a279fb1455 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:27:58 +02:00
Jon Szymaniak cbf791469c 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:05:32 +02:00
Dimitri Stolnikov 0690c077d2 bladerf: migration to async api (WIP)
receive works, transmit locks up in work() after few seconds
2013-09-28 00:05:25 +02:00
Dimitri Stolnikov 154100a11f cmake: drop gnuradio-pmt dependency in .pc file 2013-09-20 21:37:58 +02:00
Sylvain Munaut 970658c071 apps: Improve the GSM burst generation
Not sure the power window is really aligned to the samples yet though.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-09-12 23:50:05 +02:00
Frederik M.J. Vestre cdeb105495 Support setting external sampling to bladerf 2013-08-29 23:37:20 +02:00
Dimitri Stolnikov 6fe392546a bladerf: follow recent API changes
tested against aea04c5f119288370166ece05166a8a4157da6fa
2013-08-27 22:40:52 +02:00