Commit Graph

467 Commits

Author SHA1 Message Date
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 <steve@steve-m.de>
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 <steve@steve-m.de>
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
Jon Szymaniak 03c42ef320 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-10-30 18:59:48 +01:00
Daniel Gröber 46a241624a bladerf: Added device caching, this enables full-duplex operation. 2013-10-29 23:20:21 +01:00
Sylvain Munaut c21b09ae4a 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:17:36 +02:00
Sylvain Munaut a2fcadaef3 osmocom_fft: Use the new WX version of fosphor sink
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-10-26 21:17:36 +02:00
Dimitri Stolnikov 8facbbcca1 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:41 +02:00
Dimitri Stolnikov b7e2dd013b apps/osmocom_fft: use reasonable defaults for gain & center frequency 2013-10-26 15:04:36 +02:00
Dimitri Stolnikov 71d8d02793 use numchan instead of nchan to prevent ambiguity...
..when specifying total number of channels offered by the block
2013-10-25 23:39:17 +02:00
Dimitri Stolnikov a71fbeeaa5 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:36:32 +02:00
Dimitri Stolnikov 55d005e28d uhd: improve device discovery 2013-10-25 23:32:58 +02:00
Dimitri Stolnikov c744a7b35a remove unused variables 2013-10-25 23:32:13 +02:00
Dimitri Stolnikov 60120746aa 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:39:17 +02:00
Sylvain Munaut c904d26eb4 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-19 16:41:09 +02:00
Dimitri Stolnikov 4fe58149c1 cmake: fix flag passing to Clang compiler 2013-10-19 16:40:02 +02:00
Dimitri Stolnikov 0851071ba2 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:48:15 +02:00
Dimitri Stolnikov 6f4e16ff28 bladerf: use newstyle version getters 2013-10-04 18:32:34 +02:00
Dimitri Stolnikov 2feacf957b bladerf: make source less picky wrt rf gain 2013-10-03 14:43:18 +02:00
Dimitri Stolnikov e303948ffb source/sink: initialize sample rate cache variable
Thanks to Jiří Pinkava for bringing this up.
2013-10-03 14:43:13 +02:00
Dimitri Stolnikov d335280b2e source/sink: fix automatic bandwidth selection 2013-10-03 14:43:04 +02:00
Dimitri Stolnikov a01a0b3cf5 rtl: don't try to parse empty device index values 2013-09-28 13:49:34 +02:00
Dimitri Stolnikov 40a5194276 apps: filter bandwidth follows sample rate in osmocom_fft 2013-09-28 13:49:25 +02:00
Dimitri Stolnikov f99995db69 updated header documentation for bandwidth setter 2013-09-28 13:49:18 +02:00
Dimitri Stolnikov f057decd1c bladerf: implement automatic bandwidth selection 2013-09-28 13:49:13 +02:00
Dimitri Stolnikov c1fb07bca7 hackrf: enable AMP gain stage by default 2013-09-28 13:49:09 +02:00
Dimitri Stolnikov b3bbe0935e 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:49:00 +02:00
Jon Szymaniak 9b41c6aa20 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:07:55 +02:00
Dimitri Stolnikov ba7188727c bladerf: migration to async api (WIP)
receive works, transmit locks up in work() after few seconds
2013-09-28 00:07:49 +02:00
Sylvain Munaut 04b4c8b66a 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:51:30 +02:00
Frederik M.J. Vestre 68ed1854e7 Support setting external sampling to bladerf 2013-08-29 23:38:11 +02:00
Dimitri Stolnikov 265de87c45 bladerf: follow recent API changes
tested against aea04c5f119288370166ece05166a8a4157da6fa
2013-08-27 22:41:54 +02:00
Dimitri Stolnikov e97339c137 cmake: use *_INCLUDE_DIRS in modules 2013-08-13 20:17:17 +02:00
Dimitri Stolnikov 9dfe3a6354 bladerf: update common sample rate values 2013-07-28 16:35:48 +02:00
Dimitri Stolnikov 93ad959d8d bladerf: migrate to new api to enable/disable TX/RX modules
TX support has been verified with osmocom_siggen and fpga image from git
f6c6a3abcb22d2794946e5adbc556805a73788a3
2013-07-26 21:46:47 +02:00
Dimitri Stolnikov b196ee12c0 cmake: require Python v2 for build configuration
based on a gnuradio patch by Jiri Pinkava
http://gnuradio.org/cgit/gnuradio.git/commit/?id=8144572532b8bfa37af01e1264a334d2a898ea8d
2013-07-22 20:05:24 +02:00
Dimitri Stolnikov e5f7b28093 bladerf: add support for nuand LLC bladeRF (WIP)
This is based on the original work (https://github.com/Nuand/gr-osmosdr)
done by folks at nuand LLC for the gr3.6 branch of gr-osmosdr.

The following modifications have been done in this commit:

* port to gr-osmosdr master codebase (gr3.7)
* moved shared properties to bladerf_common
* added & verified IF filter bandwidth setters
* set LMS6002D registers with values taken from FAQ 5.27
* print device information (serial/versions) on startup
* added fpga= and fw= device arguments to program MCU/FPGA
* added bladerf=# dev. arg. to select a specific bladeRF
* grc gain field controls RF path VGA for RX/TX
* grc BB gain field controls BB path VGA for RX/TX

Usage example:

osmocom_fft -a "bladerf,fpga=/tmp/hostedx115.rbf"

The following RX named gain stages are available:

LNA: 0 to 6 dB, in 3dB steps
VGA1: 5 to 30 dB, in 1dB steps; nonlinear mapping done inside the lib
VGA2: 0 to 60 dB, in 3dB steps; not recommended to be used above 30dB

The following TX named gain stages are available:

VGA1: -35 to -4 dB, in 1dB steps, BB side
VGA2: 0 to 25 dB, in 1dB steps, RF side

Thanks a lot to the team of nuand LLC for this major contribution.
2013-07-21 11:59:22 +02:00
Dimitri Stolnikov 0edfcfcba0 rtl: remove residue DC component introduced by RTL chip
received from Juha Vierinen:

A student here noticed that there is dc bias even with the rafael tuner.
We looked into this issue and found that using 127.4f instead of 127.5f
removes this bias. I assume this is associated with a bug in the digital
downconversion of the RTL chip. This change fixes the problem.
2013-07-16 23:31:29 +02:00
Dimitri Stolnikov 3ce7c33981 fcd: add support for FUNcube Dongle Pro+
The gnuradio block https://github.com/dl1ksv/gr-fcdproplus must be
installed before building gr-osmosdr.

Available named gains:

Dongle Classic:

LNA: -5 to 30 dB, in 2.5 dB steps
MIX: 4 or 12 dB

Dongle Pro+:

LNA: 0 or 1, meaning off/on only. no information about real values.
MIX: 0 or 1, meaning off/on only. no information about real values.
BB: 0 to 59 dB, in 1 dB steps

This patch also introduces optional "device" and "type" arguments which
allow to override the values automatically picked by gr-osmosdr:

osmocom_fft -a "fcd,device=hw:2,type=2"

The "device" argument overrides the audio device used by the underlying
driver to access the dongle's IQ sample stream.

The "type" argument selects the dongle type, 1 for Classic, 2 for Pro+.

Thanks to Alexey Bazhin for the initial patch and Volker Schroer for
testing.
2013-07-14 12:09:55 +02:00
Dimitri Stolnikov f80cd288dc update version to 0.1.1git 2013-07-03 20:55:53 +02:00
Dimitri Stolnikov fd401eecc3 update version to 0.1.0 2013-07-03 20:48:15 +02:00
Dimitri Stolnikov 6b0f84f4ed uhd: implement frequency correction 2013-06-10 21:15:58 +02:00
Dimitri Stolnikov d23039463d apps: allow float frequency correction values 2013-06-09 23:37:47 +02:00
Dimitri Stolnikov 02f38ca908 uhd: implement dc correction 2013-06-09 20:19:17 +02:00
Dimitri Stolnikov 656a9a014f hackrf: select narrower filters in auto bw mode to prevent aliasing 2013-06-09 13:10:16 +02:00