Commit Graph

254 Commits

Author SHA1 Message Date
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
Dimitri Stolnikov ef37d1caae hackrf: use new sample rate function introduced in libhackrf b892bc34ad 2013-06-09 09:01:00 +02:00
Dimitri Stolnikov 7b18254262 uhd: implement bandwidth controls 2013-06-08 22:14:40 +02:00
Dimitri Stolnikov 8b2897d767 cmake: update url to documentation page 2013-06-08 17:39:09 +02:00
Dimitri Stolnikov e90ae9daa3 make OSMOCOM lowercase 2013-06-08 17:38:18 +02:00
Dimitri Stolnikov 40028422c0 return cached values in setters immediately if same as requested 2013-06-08 17:13:40 +02:00
Dimitri Stolnikov a0b4f3b2c5 apps: enable bandwidth controls for osmocom_fft and osmocom_siggen 2013-06-08 16:39:47 +02:00
Dimitri Stolnikov 40fb250e8f hackrf: add fractional sample rate support introduced in libhackrf
d9c46cbdac
2013-06-07 22:32:21 +02:00
Dimitri Stolnikov 40483d09c8 hackrf: add human readable error prints for all libhackrf funcs 2013-06-07 21:43:52 +02:00
Dimitri Stolnikov 407be2c329 cmake: add gnuradio-pmt dependency for OSX linkage 2013-06-07 19:30:02 +02:00
Dimitri Stolnikov 86b906a019 apps: check for sample rate availability 2013-06-05 19:52:41 +02:00
Dimitri Stolnikov 7a129238b7 hackrf: set the default sample rate to 10M
this prevents a regression with early firmware who did not have 8M rate
but 5M instead. they both had 10M, so we use this as default.
2013-06-05 19:20:08 +02:00
Dimitri Stolnikov bbf06c7272 update README 2013-06-05 00:15:28 +02:00
Dimitri Stolnikov 5924f082b8 apps: remove outdated grc templates
osmocom_* tools shall be used to verify basic block functionality from
now on
2013-06-05 00:15:07 +02:00