Compare commits

...

96 Commits

Author SHA1 Message Date
Dimitri Stolnikov c7cb045fcb file: follow-up for commit 24d54c36 9 years ago
Jon Szymaniak b986e31e63 bladeRF: Fixed typo in handling 'stream_timeout_ms' device argument 9 years ago
Dimitri Stolnikov 24d54c369f file: expose seek function in public API 9 years ago
Dimitri Stolnikov 74b9211cdc rtl: implement methods allowing runtime to control sampling process 9 years ago
Jon Szymaniak 2ae3fdbc22 bladerf: Fixed bug in cached device cleanup 9 years ago
Brian Padalino 79ad6f6a76 bladerf: Updated source/sink to use libbladeRF's sync interface 9 years ago
Dimitri Stolnikov 1f7e798184 source/sink: don't return void in void functions 9 years ago
Hoernchen f097a38f20 hackrf: signed samples, following commit fd77cfe8a6 9 years ago
Dimitri Stolnikov 0b76b7a21b uhd: pass through only the requested number of channels 9 years ago
Dimitri Stolnikov 79231f6173 uhd: print to stderr instead of stdout (library convention) 9 years ago
Dimitri Stolnikov e6701ca621 uhd: catch exceptions from dc offset & iq imbalance setters 9 years ago
Dimitri Stolnikov 376884f6a0 uhd: use universal_time() for "sync=unknown" 9 years ago
Jon Szymaniak 40f93c2ae1 bladeRF: RXVGA2 range is [0, 30] 9 years ago
Jon Szymaniak 1633dbaa74 bladerf: Added 'verbosity' and 'loopback' device parameters 9 years ago
Dimitri Stolnikov 115d4ddde0 osmosdr/rtl/miri/hackrf: use 15 buffers by default 9 years ago
Dimitri Stolnikov 333e9bbbb2 airspy: add support for AirSpy wideband receiver 9 years ago
Dimitri Stolnikov 084d193a29 rfspace: properly cover the absense of a serial number 9 years ago
Marcus D. Leech 3764dcb8af uhd: add options for wire-format, time-synchronization, and refclock/PPS 9 years ago
Brian Padalino 36a6b8fe1f bladeRF: Modifying correction calls. 9 years ago
Jon Szymaniak cd38413803 bladerf: Removed sign extension and masking of samples 9 years ago
Jon Szymaniak 43af3a851e bladerf: Updates for libbladeRF v0.11.0 API changes 9 years ago
Jon Szymaniak 734ba42989 bladerf: Use rational sample rate functions 9 years ago
Jon Szymaniak 1e742bc186 bladerf: Added start()/stop() implementations 9 years ago
Dimitri Stolnikov b359cb71ab osmocom_fft: print the exception thrown in DC/IQ correction setters 9 years ago
Dimitri Stolnikov a832a09fd9 osmocom_siggen: add controls for DC offset and IQ imbalance correction 9 years ago
Dimitri Stolnikov aaedaa2c97 bladerf: shorten the serial number that is being shown to the user 9 years ago
Dimitri Stolnikov 58648a3124 bladerf: implement DC offset and IQ imbalance correction 9 years ago
Dimitri Stolnikov becc68131c bladerf: FX3 firmware loading not supported from within gr-osmosdr 9 years ago
Dimitri Stolnikov 5da9aafa2c bladerf: prepare functions to control DC offset / IQ balance (WIP) 9 years ago
Dimitri Stolnikov f42fe3d065 apps/osmocom_fft: gui to set DC offset / IQ imbalance correction mode 9 years ago
Dimitri Stolnikov 3f281d9705 rfspace: add missing header for basename() 9 years ago
Dimitri Stolnikov 7b1c5dc8a0 rfspace: add support for RFSPACE SDR-IQ and SDR-IP 9 years ago
Dimitri Stolnikov 03f9532945 device: implement "nofake" hint to exclude dummy devices from discovery 9 years ago
Dimitri Stolnikov 0e6a369df7 add UmTRX to the list of supported devices 9 years ago
Steve Markgraf 86ecf305be rtl/rtl_tcp: add 2.56e6 as 'good' sample rate 9 years ago
Dimitri Stolnikov 62127aada0 file: add missing include for boost::format 9 years ago
Dimitri Stolnikov 9e6f68b2e6 apps/osmocom_fft: recover when .step property is not given for a range 9 years ago
Dimitri Stolnikov 05e17c6417 sink/source: fix error message when unable to connect blocks internally 9 years ago
Dimitri Stolnikov 70cd91f505 netsdr: implement sample rate change in run mode 9 years ago
Steve Markgraf fa75a253c7 rtl: add R828D tuner 9 years ago
Dimitri Stolnikov b2049ba5ef netsdr: replace boost asio sockets with native bsd sockets 9 years ago
Jon Szymaniak 743dc07b43 bladerf: Don't reload the FPGA unless the force-reload param is set 9 years ago
Jon Szymaniak b7fff27300 bladerf: Moved initializations to bladerf_common.c, misc. cleanup 9 years ago
Jon Szymaniak 892433836f bladerf: Moved no longer "common" items out of bladerf_common 9 years ago
Daniel Gröber 54f2e08dd7 bladerf: Added device caching, this enables full-duplex operation. 9 years ago
Dimitri Stolnikov 7394251bd0 netsdr: add support for RFSPACE NetSDR receiver 9 years ago
Dimitri Stolnikov ee6e3d0bfa apps/osmocom_fft: use reasonable defaults for gain & center frequency 9 years ago
Dimitri Stolnikov 18ed13ef05 use numchan instead of nchan to prevent ambiguity... 9 years ago
Dimitri Stolnikov 6252b4144a hackrf: implement device discovery 9 years ago
Dimitri Stolnikov e394dd3922 uhd: improve device discovery 9 years ago
Dimitri Stolnikov 0923bcb687 remove unused variables 9 years ago
Dimitri Stolnikov 96b5e4388f file: allow changing the sample rate when throttle=true 9 years ago
Dimitri Stolnikov 596790e8c1 cmake: fix flag passing to Clang compiler 9 years ago
Dimitri Stolnikov 6fa0815be0 apps: catch corner cases for file= mode in osmocom_fft 9 years ago
Dimitri Stolnikov c7dcddc3cd bladerf: use newstyle version getters 9 years ago
Dimitri Stolnikov a81016d230 bladerf: make source less picky wrt rf gain 9 years ago
Dimitri Stolnikov 884ee47605 source/sink: initialize sample rate cache variable 9 years ago
Dimitri Stolnikov 6187f182d5 source/sink: fix automatic bandwidth selection 9 years ago
Dimitri Stolnikov 2d644d2eae rtl: don't try to parse empty device index values 9 years ago
Dimitri Stolnikov 2dfc73351f apps: filter bandwidth follows sample rate in osmocom_fft 9 years ago
Dimitri Stolnikov 89db739999 updated header documentation for bandwidth setter 9 years ago
Dimitri Stolnikov 681e3b7d4a bladerf: implement automatic bandwidth selection 9 years ago
Dimitri Stolnikov 5d5dc04371 hackrf: enable AMP gain stage by default 9 years ago
Dimitri Stolnikov 911f916b3b hackrf: don't set automatic bandwidth on samplerate change 9 years ago
Jon Szymaniak a0b534d118 bladeRF: Refactored buffering scheme in sink 9 years ago
Dimitri Stolnikov 1c9a793a70 bladerf: migration to async api (WIP) 9 years ago
Frederik M.J. Vestre 2e9828f120 Support setting external sampling to bladerf 9 years ago
Dimitri Stolnikov c16a562ddc bladerf: follow recent API changes 9 years ago
Dimitri Stolnikov d0a043ace3 cmake: use *_INCLUDE_DIRS in modules 9 years ago
Dimitri Stolnikov 11841ccb29 bladerf: update common sample rate values 9 years ago
Dimitri Stolnikov 41bb9a0ef9 bladerf: migrate to new api to enable/disable TX/RX modules 9 years ago
Dimitri Stolnikov 65e34f6863 bladerf: add support for nuand LLC bladeRF (WIP) 9 years ago
Dimitri Stolnikov 7058fd6610 fcd: add support for FUNcube Dongle Pro+ 9 years ago
Dimitri Stolnikov 6e2a2023d5 cmake: require Python v2 for build configuration 9 years ago
Dimitri Stolnikov 2d02ae9b83 rtl: remove residue DC component introduced by RTL chip 9 years ago
Dimitri Stolnikov ffd2bbf424 update version to 0.0.3git 9 years ago
Dimitri Stolnikov 7b11f872c4 update version to 0.0.2 9 years ago
Dimitri Stolnikov e42752826c uhd: implement frequency correction 9 years ago
Dimitri Stolnikov d25666b594 apps: allow float frequency correction values 9 years ago
Dimitri Stolnikov 6f04a9b03a uhd: implement dc correction 9 years ago
Dimitri Stolnikov e1f4c24232 hackrf: select narrower filters in auto bw mode to prevent aliasing 9 years ago
Dimitri Stolnikov ed627cea9c hackrf: use new sample rate function introduced in libhackrf b892bc34ad 9 years ago
Dimitri Stolnikov f70550fe40 uhd: implement bandwidth controls 9 years ago
Dimitri Stolnikov 5a4033869f cmake: update url to documentation page 9 years ago
Dimitri Stolnikov faa1f44550 return cached values in setters immediately if same as requested 9 years ago
Dimitri Stolnikov 1822e88148 apps: enable bandwidth control for osmocom_fft and osmocom_siggen 9 years ago
Dimitri Stolnikov 2cd4126288 hackrf: add fractional sample rate support introduced in libhackrf 9 years ago
Dimitri Stolnikov b59b0080f5 hackrf: add human readable error prints to all libhackrf funcs 9 years ago
Dimitri Stolnikov eaec4c5acc apps: check for sample rate availability 9 years ago
Dimitri Stolnikov ba5c6c8da6 hackrf: set the default sample rate to 10M 9 years ago
Dimitri Stolnikov 17c2bda9f8 hackrf: disable start/stop as it has caused lock-ups 9 years ago
Dimitri Stolnikov 9714f9cd74 change OSMOCOM to lowercase like in master 9 years ago
Dimitri Stolnikov 0e6b6f9ec9 update revision to 0.0.2git 9 years ago
Dimitri Stolnikov 9cbe22f23d hackrf: change out-of-spec rate 5e6 to 8e6 default 9 years ago
Dimitri Stolnikov 6a70539872 hackrf: update to libhackrf gain API introduced in b5f275abc5 9 years ago
Dimitri Stolnikov fed7cfd368 update revision to 0.0.1 9 years ago
  1. 1
      AUTHORS
  2. 17
      CMakeLists.txt
  3. 17
      README
  4. 421
      apps/osmocom_fft
  5. 135
      apps/osmocom_siggen
  6. 52
      apps/osmocom_siggen_base.py
  7. 6
      apps/osmocom_spectrum_sense
  8. 34
      cmake/Modules/FindGnuradioFCDPP.cmake
  9. 24
      cmake/Modules/FindLibAIRSPY.cmake
  10. 12
      cmake/Modules/FindLibMiriSDR.cmake
  11. 12
      cmake/Modules/FindLibOsmoSDR.cmake
  12. 12
      cmake/Modules/FindLibRTLSDR.cmake
  13. 27
      cmake/Modules/FindLibbladeRF.cmake
  14. 4
      cmake/Modules/GrPython.cmake
  15. 2
      cmake/Modules/GrSwig.cmake
  16. 2
      gnuradio-osmosdr.pc.in
  17. 92
      grc/gen_osmosdr_blocks.py
  18. 3
      include/osmosdr/osmosdr_device.h
  19. 22
      include/osmosdr/osmosdr_sink_c.h
  20. 46
      include/osmosdr/osmosdr_source_c.h
  21. 35
      lib/CMakeLists.txt
  22. 37
      lib/airspy/CMakeLists.txt
  23. 609
      lib/airspy/airspy_source_c.cc
  24. 146
      lib/airspy/airspy_source_c.h
  25. 39
      lib/bladerf/CMakeLists.txt
  26. 510
      lib/bladerf/bladerf_common.cc
  27. 102
      lib/bladerf/bladerf_common.h
  28. 414
      lib/bladerf/bladerf_sink_c.cc
  29. 115
      lib/bladerf/bladerf_sink_c.h
  30. 509
      lib/bladerf/bladerf_source_c.cc
  31. 121
      lib/bladerf/bladerf_source_c.h
  32. 3
      lib/config.h.in
  33. 19
      lib/fcd/CMakeLists.txt
  34. 250
      lib/fcd/fcd_source.cc
  35. 26
      lib/fcd/fcd_source.h
  36. 53
      lib/file/file_source_c.cc
  37. 10
      lib/file/file_source_c.h
  38. 236
      lib/hackrf/hackrf_sink_c.cc
  39. 2
      lib/hackrf/hackrf_sink_c.h
  40. 220
      lib/hackrf/hackrf_source_c.cc
  41. 2
      lib/miri/CMakeLists.txt
  42. 4
      lib/miri/miri_source_c.cc
  43. 2
      lib/osmosdr/CMakeLists.txt
  44. 4
      lib/osmosdr/osmosdr_src_c.cc
  45. 4
      lib/osmosdr_arg_helpers.h
  46. 36
      lib/osmosdr_device.cc
  47. 88
      lib/osmosdr_sink_c_impl.cc
  48. 6
      lib/osmosdr_sink_c_impl.h
  49. 13
      lib/osmosdr_snk_iface.h
  50. 168
      lib/osmosdr_source_c_impl.cc
  51. 8
      lib/osmosdr_source_c_impl.h
  52. 39
      lib/osmosdr_src_iface.h
  53. 37
      lib/rfspace/CMakeLists.txt
  54. 1673
      lib/rfspace/rfspace_source_c.cc
  55. 176
      lib/rfspace/rfspace_source_c.h
  56. 2
      lib/rtl/CMakeLists.txt
  57. 63
      lib/rtl/rtl_source_c.cc
  58. 4
      lib/rtl/rtl_source_c.h
  59. 16
      lib/rtl_tcp/rtl_tcp_source_c.cc
  60. 2
      lib/rtl_tcp/rtl_tcp_source_c.h
  61. 5
      lib/rtl_tcp/rtl_tcp_source_f.cc
  62. 3
      lib/rtl_tcp/rtl_tcp_source_f.h
  63. 221
      lib/uhd/uhd_sink_c.cc
  64. 10
      lib/uhd/uhd_sink_c.h
  65. 263
      lib/uhd/uhd_source_c.cc
  66. 12
      lib/uhd/uhd_source_c.h
  67. 2
      swig/CMakeLists.txt

@ -1,3 +1,4 @@
Dimitri Stolnikov <horiz0n@gmx.net>
Steve Markgraf <steve@steve-m.de>
Hoernchen <la@tfc-server.de>
Nuand LLC folks

@ -36,7 +36,7 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "")
# Set the version information here
set(VERSION_INFO_MAJOR_VERSION 0)
set(VERSION_INFO_API_COMPAT 0)
set(VERSION_INFO_MINOR_VERSION 1)
set(VERSION_INFO_MINOR_VERSION 3)
set(VERSION_INFO_MAINT_VERSION git)
include(GrVersion) #setup version info
@ -56,10 +56,14 @@ ENDIF()
message(FATAL_ERROR "Option ${USE_SIMD} not supported, valid entries are ${USE_SIMD_VALUES}")
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_CXX_COMPILER MATCHES ".*clang")
SET(CMAKE_COMPILER_IS_CLANGXX 1)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
ADD_DEFINITIONS(-Wall)
ADD_DEFINITIONS(-Wextra)
ADD_DEFINITIONS(-Wno-unused)
ADD_DEFINITIONS(-Wno-unused-parameter)
ADD_DEFINITIONS(-Wsign-compare)
#ADD_DEFINITIONS(-Wconversion)
#ADD_DEFINITIONS(-pedantic)
@ -86,7 +90,7 @@ ELSEIF(MSVC)
ADD_DEFINITIONS(/arch:AVX)
ADD_DEFINITIONS(-DUSE_AVX)
ENDIF()
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
ENDIF()
########################################################################
# Setup boost
@ -149,10 +153,13 @@ find_package(GnuradioIQBalance)
find_package(UHD)
find_package(GnuradioUHD)
find_package(GnuradioFCD)
find_package(GnuradioFCDPP)
find_package(LibOsmoSDR)
find_package(LibRTLSDR)
find_package(LibMiriSDR)
find_package(LibHackRF)
find_package(LibAIRSPY)
find_package(LibbladeRF)
find_package(Doxygen)
if(NOT GRUEL_FOUND)
@ -199,7 +206,7 @@ add_custom_target(uninstall
########################################################################
# Enable python component
########################################################################
find_package(PythonLibs)
find_package(PythonLibs 2)
find_package(SWIG)
if(SWIG_FOUND)

@ -1,13 +1,18 @@
While primarily being developed for the OsmoSDR hardware, this block as well supports:
* FunCube Dongle through libgnuradio-fcd
* OSMOCOM OsmoSDR Devices through libosmosdr
* Great Scott Gadgets HackRF through libhackrf
* Ettus USRP Devices through Ettus UHD library
* FUNcube Dongle through libgnuradio-fcd
* FUNcube Dongle Pro+ through gr-fcdproplus
* sysmocom OsmoSDR Devices through libosmosdr
* RTL2832U based DVB-T dongles through librtlsdr
* RTL-TCP spectrum server (see librtlsdr project)
* MSi2500 based DVB-T dongles through libmirisdr
* gnuradio .cfile input through libgnuradio-core
* gnuradio .cfile input through libgnuradio-blocks
* RFSPACE SDR-IQ, SDR-IP, NetSDR (incl. X2 option)
* AirSpy Wideband Receiver through libairspy
* Great Scott Gadgets HackRF through libhackrf
* Nuand LLC bladeRF through libbladeRF library
* Ettus USRP Devices through Ettus UHD library
* Fairwaves UmTRX through Fairwaves' fork of UHD
By using the OsmoSDR block you can take advantage of a common software api in your application(s) independent of the underlying radio hardware.
@ -32,4 +37,4 @@ make
sudo make install
sudo ldconfig
NOTE: The OSMOCOM source block will appear under 'Sources' category in GRC menu.
NOTE: The osmocom source block will appear under 'Sources' category in GRC menu.

@ -66,17 +66,21 @@ class app_top_block(stdgui2.std_top_block, pubsub):
help="Set sample rate (bandwidth), minimum by default")
parser.add_option("-f", "--center-freq", type="eng_float", default=None,
help="Set frequency to FREQ", metavar="FREQ")
parser.add_option("-c", "--freq-corr", type="eng_float", default=0,
parser.add_option("-c", "--freq-corr", type="eng_float", default=None,
help="Set frequency correction (ppm)")
parser.add_option("-g", "--gain", type="eng_float", default=None,
help="Set gain in dB (default is midpoint)")
parser.add_option("", "--dc-offset-mode", type="int", default=None,
help="Set the RX frontend DC offset correction mode")
parser.add_option("", "--iq-balance-mode", type="int", default=None,
help="Set the RX frontend IQ imbalance correction mode")
parser.add_option("-W", "--waterfall", action="store_true", default=False,
help="Enable waterfall display")
parser.add_option("-S", "--oscilloscope", action="store_true", default=False,
help="Enable oscilloscope display")
parser.add_option("", "--avg-alpha", type="eng_float", default=1e-1,
help="Set fftsink averaging factor, default=[%default]")
parser.add_option ("", "--averaging", action="store_true", default=False,
parser.add_option("", "--averaging", action="store_true", default=False,
help="Enable fftsink averaging, default=[%default]")
parser.add_option("", "--ref-scale", type="eng_float", default=1.0,
help="Set dBFS=0dB input value, default=[%default]")
@ -97,6 +101,12 @@ class app_top_block(stdgui2.std_top_block, pubsub):
self.src = osmosdr.source_c(options.args)
try:
self.src.get_sample_rates().start()
except RuntimeError:
print "Source has no sample rates (wrong device arguments?)."
sys.exit(1)
# Set the antenna
if(options.antenna):
self.src.set_antenna(options.antenna)
@ -105,21 +115,32 @@ class app_top_block(stdgui2.std_top_block, pubsub):
options.samp_rate = self.src.get_sample_rates().start()
if options.gain is None:
# if no gain was specified, use the mid-point in dB
r = self.src.get_gain_range()
options.gain = float(r.start()+r.stop())/2
gain = self.src.get_gain()
if gain is None:
# if no gain was specified, use the mid-point in dB
r = self.src.get_gain_range()
try: # empty gain range returned in file= mode
options.gain = float(r.start()+r.stop())/2
except RuntimeError:
options.gain = 0
pass
else:
options.gain = gain
if options.center_freq is None:
# if no freq was specified, use the mid-point in Hz
r = self.src.get_freq_range()
options.center_freq = float(r.start()+r.stop())/2
freq = self.src.get_center_freq()
if freq != 0:
options.center_freq = freq
else:
# if no freq was specified, use the mid-point in Hz
r = self.src.get_freq_range()
options.center_freq = float(r.start()+r.stop())/2
input_rate = self.src.set_sample_rate(options.samp_rate)
self.src.set_bandwidth(input_rate)
self.src.set_gain(options.gain)
#print self.src.get_sample_rates().to_pp_string()
self.publish(SAMP_RANGE_KEY, self.src.get_sample_rates)
self.publish(FREQ_RANGE_KEY, self.src.get_freq_range)
@ -139,6 +160,15 @@ class app_top_block(stdgui2.std_top_block, pubsub):
self[CENTER_FREQ_KEY] = options.center_freq
self[FREQ_CORR_KEY] = options.freq_corr
self.dc_offset_mode = options.dc_offset_mode
self.iq_balance_mode = options.iq_balance_mode
# initialize reasonable defaults for DC / IQ correction
self['dc_offset_real'] = 0
self['dc_offset_imag'] = 0
self['iq_balance_mag'] = 0
self['iq_balance_pha'] = 0
#subscribe set methods
self.subscribe(SAMP_RATE_KEY, self.set_sample_rate)
@ -149,18 +179,28 @@ class app_top_block(stdgui2.std_top_block, pubsub):
self.subscribe(CENTER_FREQ_KEY, self.set_freq)
self.subscribe(FREQ_CORR_KEY, self.set_freq_corr)
self.subscribe('dc_offset_real', self.set_dc_offset)
self.subscribe('dc_offset_imag', self.set_dc_offset)
self.subscribe('iq_balance_mag', self.set_iq_balance)
self.subscribe('iq_balance_pha', self.set_iq_balance)
#force update on pubsub keys
for key in (SAMP_RATE_KEY, BWIDTH_KEY, CENTER_FREQ_KEY, FREQ_CORR_KEY):
print key, "=", self[key]
#for key in (SAMP_RATE_KEY, BWIDTH_KEY, CENTER_FREQ_KEY, FREQ_CORR_KEY):
#print key, "=", self[key]
#self[key] = self[key]
if options.waterfall:
self.scope = \
waterfallsink2.waterfallsrc_c (panel, fft_size=options.fft_size,
sample_rate=input_rate)
self.scope = waterfallsink2.waterfall_sink_c (panel,
fft_size=options.fft_size,
sample_rate=input_rate,
ref_scale=options.ref_scale,
ref_level=20.0,
y_divs = 12)
self.scope.set_callback(self.wxsink_callback)
self.frame.SetMinSize((800, 420))
elif options.oscilloscope:
self.scope = scopesink2.scopesrc_c(panel, sample_rate=input_rate)
self.scope = scopesink2.scope_sink_c(panel, sample_rate=input_rate)
self.frame.SetMinSize((800, 600))
else:
self.scope = fftsink2.fft_sink_c (panel,
@ -172,21 +212,27 @@ class app_top_block(stdgui2.std_top_block, pubsub):
average=options.averaging,
avg_alpha=options.avg_alpha,
fft_rate=options.fft_rate)
def fftsink_callback(x, y):
self.set_freq(x)
self.scope.set_callback(fftsink_callback)
self.scope.set_callback(self.wxsink_callback)
self.frame.SetMinSize((800, 420))
self.connect(self.src, self.scope)
self._build_gui(vbox)
self._setup_events()
if self.dc_offset_mode != None:
self.set_dc_offset_mode(self.dc_offset_mode)
if self.iq_balance_mode != None:
self.set_iq_balance_mode(self.iq_balance_mode)
# set initial values
if not(self.set_freq(options.center_freq)):
self._set_status_msg("Failed to set initial frequency")
def wxsink_callback(self, x, y):
self.set_freq_from_callback(x)
def _set_status_msg(self, msg):
self.frame.GetStatusBar().SetStatusText(msg, 0)
@ -231,39 +277,46 @@ class app_top_block(stdgui2.std_top_block, pubsub):
)
freq_hbox.AddSpacer(5)
forms.slider(
parent=self.panel, sizer=freq_hbox,
proportion=3,
ps=self,
key=CENTER_FREQ_KEY,
minimum=self[FREQ_RANGE_KEY].start(),
maximum=self[FREQ_RANGE_KEY].stop(),
num_steps=101,
)
freq_hbox.AddSpacer(3)
try: # range.start() == range.stop() in file= mode
corr_hbox.AddSpacer(3)
forms.text_box(
parent=self.panel, sizer=corr_hbox,
label='Freq. Correction (ppm)',
proportion=1,
converter=forms.int_converter(),
ps=self,
key=FREQ_CORR_KEY,
)
corr_hbox.AddSpacer(5)
forms.slider(
parent=self.panel, sizer=freq_hbox,
proportion=3,
ps=self,
key=CENTER_FREQ_KEY,
minimum=self[FREQ_RANGE_KEY].start(),
maximum=self[FREQ_RANGE_KEY].stop(),
num_steps=1000,
)
freq_hbox.AddSpacer(3)
forms.slider(
parent=self.panel, sizer=corr_hbox,
proportion=3,
ps=self,
key=FREQ_CORR_KEY,
minimum=-100,
maximum=+100,
num_steps=201,
step_size=1,
)
corr_hbox.AddSpacer(3)
except AssertionError:
pass
if self[FREQ_CORR_KEY] != None: # show frequency correction scrollbar
corr_hbox.AddSpacer(3)
forms.text_box(
parent=self.panel, sizer=corr_hbox,
label='Freq. Correction (ppm)',
proportion=1,
converter=forms.float_converter(),
ps=self,
key=FREQ_CORR_KEY,
)
corr_hbox.AddSpacer(5)
forms.slider(
parent=self.panel, sizer=corr_hbox,
proportion=3,
ps=self,
key=FREQ_CORR_KEY,
minimum=-100,
maximum=+100,
num_steps=2010,
step_size=0.1,
)
corr_hbox.AddSpacer(3)
##################################################
# Gain controls
@ -306,7 +359,7 @@ class app_top_block(stdgui2.std_top_block, pubsub):
key=GAIN_KEY(gain_name),
minimum=range.start(),
maximum=range.stop(),
step_size=range.step(),
step_size=range.step() or (range.stop() - range.start())/10,
)
gain_hbox.AddSpacer(3)
@ -317,8 +370,7 @@ class app_top_block(stdgui2.std_top_block, pubsub):
bw_range = self[BWIDTH_RANGE_KEY]
#print bw_range.to_pp_string()
#if bw_range.start() < bw_range.stop():
if 0:
if bw_range.start() < bw_range.stop():
bwidth_vbox = forms.static_box_sizer(parent=self.panel,
label="Bandwidth",
orient=wx.VERTICAL,
@ -349,7 +401,7 @@ class app_top_block(stdgui2.std_top_block, pubsub):
key=BWIDTH_KEY,
minimum=bw_range.start(),
maximum=bw_range.stop(),
step_size=bw_range.step(),
step_size=bw_range.step() or (bw_range.stop() - bw_range.start())/100,
)
bwidth_hbox.AddSpacer(3)
@ -397,11 +449,227 @@ class app_top_block(stdgui2.std_top_block, pubsub):
#)
#sr_hbox.AddSpacer(3)
##################################################
# DC Offset controls
##################################################
if self.dc_offset_mode != None:
dc_offset_vbox = forms.static_box_sizer(parent=self.panel,
label="DC Offset Correction",
orient=wx.VERTICAL,
bold=True)
dc_offset_vbox.AddSpacer(3)
# First row of sample rate controls
dc_offset_hbox = wx.BoxSizer(wx.HORIZONTAL)
dc_offset_vbox.Add(dc_offset_hbox, 0, wx.EXPAND)
dc_offset_vbox.AddSpacer(3)
# Add frequency controls to top window sizer
vbox.Add(dc_offset_vbox, 0, wx.EXPAND)
vbox.AddSpacer(3)
self.dc_offset_mode_chooser = forms.radio_buttons(
parent=self.panel,
value=self.dc_offset_mode,
callback=self.set_dc_offset_mode,
label='',
choices=[0, 1, 2],
labels=["Off", "Manual", "Auto"],
style=wx.RA_HORIZONTAL,
)
dc_offset_hbox.Add(self.dc_offset_mode_chooser)
dc_offset_hbox.AddSpacer(3)
dc_offset_hbox.AddSpacer(3)
self.dc_offset_real_text = forms.text_box(
parent=self.panel, sizer=dc_offset_hbox,
label='Real',
proportion=1,
converter=forms.float_converter(),
ps=self,
key='dc_offset_real',
)
dc_offset_hbox.AddSpacer(3)
self.dc_offset_real_slider = forms.slider(
parent=self.panel, sizer=dc_offset_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self,
key='dc_offset_real',
)
dc_offset_hbox.AddSpacer(3)
dc_offset_hbox.AddSpacer(3)
self.dc_offset_imag_text = forms.text_box(
parent=self.panel, sizer=dc_offset_hbox,
label='Imag',
proportion=1,
converter=forms.float_converter(),
ps=self,
key='dc_offset_imag',
)
dc_offset_hbox.AddSpacer(3)
self.dc_offset_imag_slider = forms.slider(
parent=self.panel, sizer=dc_offset_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self,
key='dc_offset_imag',
)
dc_offset_hbox.AddSpacer(3)
##################################################
# IQ Imbalance controls
##################################################
if self.iq_balance_mode != None:
iq_balance_vbox = forms.static_box_sizer(parent=self.panel,
label="IQ Imbalance Correction",
orient=wx.VERTICAL,
bold=True)
iq_balance_vbox.AddSpacer(3)
# First row of sample rate controls
iq_balance_hbox = wx.BoxSizer(wx.HORIZONTAL)
iq_balance_vbox.Add(iq_balance_hbox, 0, wx.EXPAND)
iq_balance_vbox.AddSpacer(3)
# Add frequency controls to top window sizer
vbox.Add(iq_balance_vbox, 0, wx.EXPAND)
vbox.AddSpacer(3)
self.iq_balance_mode_chooser = forms.radio_buttons(
parent=self.panel,
value=self.iq_balance_mode,
callback=self.set_iq_balance_mode,
label='',
choices=[0, 1, 2],
labels=["Off", "Manual", "Auto"],
style=wx.RA_HORIZONTAL,
)
iq_balance_hbox.Add(self.iq_balance_mode_chooser)
iq_balance_hbox.AddSpacer(3)
iq_balance_hbox.AddSpacer(3)
self.iq_balance_mag_text = forms.text_box(
parent=self.panel, sizer=iq_balance_hbox,
label='Mag',
proportion=1,
converter=forms.float_converter(),
ps=self,
key='iq_balance_mag',
)
iq_balance_hbox.AddSpacer(3)
self.iq_balance_mag_slider = forms.slider(
parent=self.panel, sizer=iq_balance_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self,
key='iq_balance_mag',
)
iq_balance_hbox.AddSpacer(3)
iq_balance_hbox.AddSpacer(3)
self.iq_balance_pha_text = forms.text_box(
parent=self.panel, sizer=iq_balance_hbox,
label='Phase',
proportion=1,
converter=forms.float_converter(),
ps=self,
key='iq_balance_pha',
)
iq_balance_hbox.AddSpacer(3)
self.iq_balance_pha_slider = forms.slider(
parent=self.panel, sizer=iq_balance_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self,
key='iq_balance_pha',
)
iq_balance_hbox.AddSpacer(3)
def set_dc_offset_mode(self, dc_offset_mode):
if dc_offset_mode == 1:
self.dc_offset_real_text.Enable()
self.dc_offset_real_slider.Enable()
self.dc_offset_imag_text.Enable()
self.dc_offset_imag_slider.Enable()
self.set_dc_offset(0)
else:
self.dc_offset_real_text.Disable()
self.dc_offset_real_slider.Disable()
self.dc_offset_imag_text.Disable()
self.dc_offset_imag_slider.Disable()
self.dc_offset_mode = dc_offset_mode
self.src.set_dc_offset_mode(dc_offset_mode)
self.dc_offset_mode_chooser.set_value(self.dc_offset_mode)
def set_dc_offset(self, value):
correction = complex( self['dc_offset_real'], self['dc_offset_imag'] )
try:
self.src.set_dc_offset( correction )
if self._verbose:
print "Set DC offset to", correction
except RuntimeError as ex:
print ex
def set_iq_balance_mode(self, iq_balance_mode):
if iq_balance_mode == 1:
self.iq_balance_mag_text.Enable()
self.iq_balance_mag_slider.Enable()
self.iq_balance_pha_text.Enable()
self.iq_balance_pha_slider.Enable()
self.set_iq_balance(0)
else:
self.iq_balance_mag_text.Disable()
self.iq_balance_mag_slider.Disable()
self.iq_balance_pha_text.Disable()
self.iq_balance_pha_slider.Disable()
self.iq_balance_mode = iq_balance_mode
self.src.set_iq_balance_mode(iq_balance_mode)
self.iq_balance_mode_chooser.set_value(self.iq_balance_mode)
def set_iq_balance(self, value):
correction = complex( self['iq_balance_mag'], self['iq_balance_pha'] )
try:
self.src.set_iq_balance( correction )
if self._verbose:
print "Set IQ balance to", correction
except RuntimeError as ex:
print ex
def set_sample_rate(self, samp_rate):
samp_rate = self.src.set_sample_rate(samp_rate)
self.scope.set_sample_rate(samp_rate)
if self._verbose:
print "Set sample rate to:", samp_rate
try:
self[BWIDTH_KEY] = self.set_bandwidth(samp_rate)
except RuntimeError:
pass
return samp_rate
def get_gain_names(self):
@ -421,9 +689,18 @@ class app_top_block(stdgui2.std_top_block, pubsub):
print "Set " + name + " gain to:", gain
def set_bandwidth(self, bw):
bw = self.src.set_bandwidth(bw)
if self._verbose:
print "Set bandwidth to:", bw
clipped_bw = self[BWIDTH_RANGE_KEY].clip(bw)
if self.src.get_bandwidth() != clipped_bw:
bw = self.src.set_bandwidth(clipped_bw)
if self._verbose:
print "Set bandwidth to:", bw
return bw
def set_freq_from_callback(self, freq):
freq = self.src.set_center_freq(freq)
self[CENTER_FREQ_KEY] = freq;
def set_freq(self, freq):
if freq is None:
@ -458,34 +735,8 @@ class app_top_block(stdgui2.std_top_block, pubsub):
if self._verbose:
print "Set frequency correction to:", ppm
def _setup_events(self):
if not self.options.waterfall and not self.options.oscilloscope:
self.scope.win.Bind(wx.EVT_LEFT_DCLICK, self.evt_left_dclick)
def evt_left_dclick(self, event):
(ux, uy) = self.scope.win.GetXY(event)
if event.CmdDown():
# Re-center on maximum power
points = self.scope.win._points
if self.scope.win.peak_hold:
if self.scope.win.peak_vals is not None:
ind = numpy.argmax(self.scope.win.peak_vals)
else:
ind = int(points.shape()[0]/2)
else:
ind = numpy.argmax(points[:,1])
(freq, pwr) = points[ind]
target_freq = freq/self.scope.win._scale_factor
print ind, freq, pwr
self.set_freq(target_freq)
else:
# Re-center on clicked frequency
target_freq = ux/self.scope.win._scale_factor
self.set_freq(target_freq)
def main ():
app = stdgui2.stdapp(app_top_block, "OSMOCOM Spectrum Browser", nstatus=1)
app = stdgui2.stdapp(app_top_block, "osmocom Spectrum Browser", nstatus=1)
app.MainLoop()
if __name__ == '__main__':

@ -179,7 +179,7 @@ class app_gui(pubsub):
parent=self.panel, sizer=corr_hbox,
label='Freq. Correction (ppm)',
proportion=1,
converter=forms.int_converter(),
converter=forms.float_converter(),
ps=self.tb,
key=osmocom_siggen.FREQ_CORR_KEY,
)
@ -192,8 +192,8 @@ class app_gui(pubsub):
key=osmocom_siggen.FREQ_CORR_KEY,
minimum=-100,
maximum=+100,
num_steps=201,
step_size=1,
num_steps=2010,
step_size=0.1,
)
corr_hbox.AddSpacer(3)
@ -275,8 +275,7 @@ class app_gui(pubsub):
bw_range = self.tb[osmocom_siggen.BWIDTH_RANGE_KEY]
#print bw_range.to_pp_string()
#if bw_range.start() < bw_range.stop():
if 0:
if bw_range.start() < bw_range.stop():
bwidth_vbox = forms.static_box_sizer(parent=self.panel,
label="Bandwidth",
orient=wx.VERTICAL,
@ -314,6 +313,130 @@ class app_gui(pubsub):
except RuntimeError:
pass
##################################################
# DC Offset controls
##################################################
dc_offset_vbox = forms.static_box_sizer(parent=self.panel,
label="DC Offset Correction",
orient=wx.VERTICAL,
bold=True)
dc_offset_vbox.AddSpacer(3)
# First row of sample rate controls
dc_offset_hbox = wx.BoxSizer(wx.HORIZONTAL)
dc_offset_vbox.Add(dc_offset_hbox, 0, wx.EXPAND)
dc_offset_vbox.AddSpacer(3)
# Add frequency controls to top window sizer
self.vbox.Add(dc_offset_vbox, 0, wx.EXPAND)
self.vbox.AddSpacer(3)
dc_offset_hbox.AddSpacer(3)
forms.text_box(
parent=self.panel, sizer=dc_offset_hbox,
label='Real',
proportion=1,
converter=forms.float_converter(),
ps=self.tb,
key=osmocom_siggen.DC_OFFSET_REAL
)
dc_offset_hbox.AddSpacer(3)
forms.slider(
parent=self.panel, sizer=dc_offset_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self.tb,
key=osmocom_siggen.DC_OFFSET_REAL
)
dc_offset_hbox.AddSpacer(3)
dc_offset_hbox.AddSpacer(3)
forms.text_box(
parent=self.panel, sizer=dc_offset_hbox,
label='Imag',
proportion=1,
converter=forms.float_converter(),
ps=self.tb,
key=osmocom_siggen.DC_OFFSET_IMAG
)
dc_offset_hbox.AddSpacer(3)
forms.slider(
parent=self.panel, sizer=dc_offset_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self.tb,
key=osmocom_siggen.DC_OFFSET_IMAG
)
dc_offset_hbox.AddSpacer(3)
##################################################
# IQ Imbalance controls
##################################################
iq_balance_vbox = forms.static_box_sizer(parent=self.panel,
label="IQ Imbalance Correction",
orient=wx.VERTICAL,
bold=True)
iq_balance_vbox.AddSpacer(3)
# First row of sample rate controls
iq_balance_hbox = wx.BoxSizer(wx.HORIZONTAL)
iq_balance_vbox.Add(iq_balance_hbox, 0, wx.EXPAND)
iq_balance_vbox.AddSpacer(3)
# Add frequency controls to top window sizer
self.vbox.Add(iq_balance_vbox, 0, wx.EXPAND)
self.vbox.AddSpacer(3)
iq_balance_hbox.AddSpacer(3)
forms.text_box(
parent=self.panel, sizer=iq_balance_hbox,
label='Mag',
proportion=1,
converter=forms.float_converter(),
ps=self.tb,
key=osmocom_siggen.IQ_BALANCE_MAG
)
iq_balance_hbox.AddSpacer(3)
forms.slider(
parent=self.panel, sizer=iq_balance_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self.tb,
key=osmocom_siggen.IQ_BALANCE_MAG
)
iq_balance_hbox.AddSpacer(3)
iq_balance_hbox.AddSpacer(3)
forms.text_box(
parent=self.panel, sizer=iq_balance_hbox,
label='Phase',
proportion=1,
converter=forms.float_converter(),
ps=self.tb,
key=osmocom_siggen.IQ_BALANCE_PHA
)
iq_balance_hbox.AddSpacer(3)
forms.slider(
parent=self.panel, sizer=iq_balance_hbox,
proportion=3,
minimum=-1,
maximum=+1,
step_size=0.001,
ps=self.tb,
key=osmocom_siggen.IQ_BALANCE_PHA
)
iq_balance_hbox.AddSpacer(3)
##################################################
# Sample Rate controls
##################################################
@ -347,7 +470,7 @@ def main():
gui=app_gui, # User interface class
options=options, # Command line options
args=args, # Command line args
title="OSMOCOM Signal Generator", # Top window title
title="osmocom Signal Generator", # Top window title
nstatus=1, # Number of status lines
start=True, # Whether to start flowgraph
realtime=True) # Whether to set realtime priority

@ -33,6 +33,10 @@ WAVEFORM2_FREQ_KEY = 'waveform2_freq'
FREQ_RANGE_KEY = 'freq_range'
GAIN_RANGE_KEY = lambda x: 'gain_range:'+x
BWIDTH_RANGE_KEY = 'bwidth_range'
DC_OFFSET_REAL = 'dc_offset_real'
DC_OFFSET_IMAG = 'dc_offset_imag'
IQ_BALANCE_MAG = 'iq_balance_mag'
IQ_BALANCE_PHA = 'iq_balance_pha'
TYPE_KEY = 'type'
def setter(ps, key, val): ps[key] = val
@ -134,6 +138,12 @@ class top_block(gr.top_block, pubsub):
self[WAVEFORM_OFFSET_KEY] = options.offset
self[WAVEFORM2_FREQ_KEY] = options.waveform2_freq
# initialize reasonable defaults for DC / IQ correction
self[DC_OFFSET_REAL] = 0
self[DC_OFFSET_IMAG] = 0
self[IQ_BALANCE_MAG] = 0
self[IQ_BALANCE_PHA] = 0
#subscribe set methods
self.subscribe(SAMP_RATE_KEY, self.set_samp_rate)
@ -148,6 +158,11 @@ class top_block(gr.top_block, pubsub):
self.subscribe(WAVEFORM2_FREQ_KEY, self.set_waveform2_freq)
self.subscribe(TYPE_KEY, self.set_waveform)
self.subscribe(DC_OFFSET_REAL, self.set_dc_offset)
self.subscribe(DC_OFFSET_IMAG, self.set_dc_offset)
self.subscribe(IQ_BALANCE_MAG, self.set_iq_balance)
self.subscribe(IQ_BALANCE_PHA, self.set_iq_balance)
#force update on pubsub keys
for key in (SAMP_RATE_KEY, GAIN_KEY, BWIDTH_KEY,
TX_FREQ_KEY, FREQ_CORR_KEY, AMPLITUDE_KEY,
@ -159,6 +174,12 @@ class top_block(gr.top_block, pubsub):
def _setup_osmosdr(self, options):
self._sink = osmosdr.sink_c(options.args)
try:
self._sink.get_sample_rates().start()
except RuntimeError:
print "Sink has no sample rates (wrong device arguments?)."
sys.exit(1)
if options.samp_rate is None:
options.samp_rate = self._sink.get_sample_rates().start()
@ -226,9 +247,34 @@ class top_block(gr.top_block, pubsub):
print "Set " + name + " gain to:", gain
def set_bandwidth(self, bw):
bw = self._sink.set_bandwidth(bw)
if self._verbose:
print "Set bandwidth to:", bw
clipped_bw = self[BWIDTH_RANGE_KEY].clip(bw)
if self._sink.get_bandwidth() != clipped_bw:
bw = self._sink.set_bandwidth(clipped_bw)
if self._verbose:
print "Set bandwidth to:", bw
def set_dc_offset(self, value):
correction = complex( self[DC_OFFSET_REAL], self[DC_OFFSET_IMAG] )
try:
self._sink.set_dc_offset( correction )
if self._verbose:
print "Set DC offset to", correction
except RuntimeError as ex:
print ex
def set_iq_balance(self, value):
correction = complex( self[IQ_BALANCE_MAG], self[IQ_BALANCE_PHA] )
try:
self._sink.set_iq_balance( correction )
if self._verbose:
print "Set IQ balance to", correction
except RuntimeError as ex:
print ex
def set_freq(self, freq):
if freq is None:

@ -149,6 +149,12 @@ class my_top_block(gr.top_block):
# build graph
self.u = osmosdr.source_c(options.args)
try:
self.u.get_sample_rates().start()
except RuntimeError:
print "Source has no sample rates (wrong device arguments?)."
sys.exit(1)
# Set the antenna
if(options.antenna):
self.u.set_antenna(options.antenna, 0)

@ -0,0 +1,34 @@
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_GNURADIO_FCDPP gnuradio-fcdproplus)
FIND_PATH(
GNURADIO_FCDPP_INCLUDE_DIRS
NAMES fcdproplus/api.h
HINTS $ENV{GNURADIO_FCDPP_DIR}/include
${PC_GNURADIO_FCDPP_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
)
FIND_LIBRARY(
GNURADIO_FCDPP_LIBRARIES
NAMES gnuradio-fcdproplus
HINTS $ENV{GNURADIO_FCDPP_DIR}/lib
${PC_GNURADIO_FCDPP_LIBDIR}
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
if(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES)
set(GNURADIO_FCDPP_FOUND TRUE CACHE INTERNAL "gnuradio-fcdproplus found")
message(STATUS "Found gnuradio-fcdproplus: ${GNURADIO_FCDPP_INCLUDE_DIRS}, ${GNURADIO_FCDPP_LIBRARIES}")
else(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES)
set(GNURADIO_FCDPP_FOUND FALSE CACHE INTERNAL "gnuradio-fcdproplus found")
message(STATUS "gnuradio-fcdproplus not found.")
endif(GNURADIO_FCDPP_INCLUDE_DIRS AND GNURADIO_FCDPP_LIBRARIES)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNURADIO_FCDPP DEFAULT_MSG GNURADIO_FCDPP_LIBRARIES GNURADIO_FCDPP_INCLUDE_DIRS)
MARK_AS_ADVANCED(GNURADIO_FCDPP_LIBRARIES GNURADIO_FCDPP_INCLUDE_DIRS)

@ -0,0 +1,24 @@
INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_LIBAIRSPY libairspy)
FIND_PATH(
LIBAIRSPY_INCLUDE_DIRS
NAMES libairspy/airspy.h
HINTS $ENV{LIBAIRSPY_DIR}/include
${PC_LIBAIRSPY_INCLUDEDIR}
PATHS /usr/local/include
/usr/include
)
FIND_LIBRARY(
LIBAIRSPY_LIBRARIES
NAMES airspy
HINTS $ENV{LIBAIRSPY_DIR}/lib
${PC_LIBAIRSPY_LIBDIR}
PATHS /usr/local/lib
/usr/lib
)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBAIRSPY DEFAULT_MSG LIBAIRSPY_LIBRARIES LIBAIRSPY_INCLUDE_DIRS)
MARK_AS_ADVANCED(LIBAIRSPY_LIBRARIES LIBAIRSPY_INCLUDE_DIRS)

@ -1,6 +1,6 @@
if(NOT LIBMIRISDR_FOUND)
pkg_check_modules (LIBMIRISDR_PKG libmirisdr)
find_path(LIBMIRISDR_INCLUDE_DIR NAMES mirisdr.h
find_path(LIBMIRISDR_INCLUDE_DIRS NAMES mirisdr.h
PATHS
${LIBMIRISDR_PKG_INCLUDE_DIRS}
/usr/include
@ -14,14 +14,14 @@ if(NOT LIBMIRISDR_FOUND)
/usr/local/lib
)
if(LIBMIRISDR_INCLUDE_DIR AND LIBMIRISDR_LIBRARIES)
if(LIBMIRISDR_INCLUDE_DIRS AND LIBMIRISDR_LIBRARIES)
set(LIBMIRISDR_FOUND TRUE CACHE INTERNAL "libmirisdr found")
message(STATUS "Found libmirisdr: ${LIBMIRISDR_INCLUDE_DIR}, ${LIBMIRISDR_LIBRARIES}")
else(LIBMIRISDR_INCLUDE_DIR AND LIBMIRISDR_LIBRARIES)
message(STATUS "Found libmirisdr: ${LIBMIRISDR_INCLUDE_DIRS}, ${LIBMIRISDR_LIBRARIES}")
else(LIBMIRISDR_INCLUDE_DIRS AND LIBMIRISDR_LIBRARIES)
set(LIBMIRISDR_FOUND FALSE CACHE INTERNAL "libmirisdr found")
message(STATUS "libmirisdr not found.")
endif(LIBMIRISDR_INCLUDE_DIR AND LIBMIRISDR_LIBRARIES)
endif(LIBMIRISDR_INCLUDE_DIRS AND LIBMIRISDR_LIBRARIES)
mark_as_advanced(LIBMIRISDR_INCLUDE_DIR LIBMIRISDR_LIBRARIES)
mark_as_advanced(LIBMIRISDR_LIBRARIES LIBMIRISDR_INCLUDE_DIRS)
endif(NOT LIBMIRISDR_FOUND)

@ -1,6 +1,6 @@
if(NOT LIBOSMOSDR_FOUND)
pkg_check_modules (LIBOSMOSDR_PKG libosmosdr)
find_path(LIBOSMOSDR_INCLUDE_DIR NAMES osmosdr.h
find_path(LIBOSMOSDR_INCLUDE_DIRS NAMES osmosdr.h
PATHS
${LIBOSMOSDR_PKG_INCLUDE_DIRS}
/usr/include
@ -14,14 +14,14 @@ if(NOT LIBOSMOSDR_FOUND)
/usr/local/lib
)
if(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
if(LIBOSMOSDR_INCLUDE_DIRS AND LIBOSMOSDR_LIBRARIES)
set(LIBOSMOSDR_FOUND TRUE CACHE INTERNAL "libosmosdr found")
message(STATUS "Found libosmosdr: ${LIBOSMOSDR_INCLUDE_DIR}, ${LIBOSMOSDR_LIBRARIES}")
else(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
message(STATUS "Found libosmosdr: ${LIBOSMOSDR_INCLUDE_DIRS}, ${LIBOSMOSDR_LIBRARIES}")
else(LIBOSMOSDR_INCLUDE_DIRS AND LIBOSMOSDR_LIBRARIES)
set(LIBOSMOSDR_FOUND FALSE CACHE INTERNAL "libosmosdr found")
message(STATUS "libosmosdr not found.")
endif(LIBOSMOSDR_INCLUDE_DIR AND LIBOSMOSDR_LIBRARIES)
endif(LIBOSMOSDR_INCLUDE_DIRS AND LIBOSMOSDR_LIBRARIES)
mark_as_advanced(LIBOSMOSDR_INCLUDE_DIR LIBOSMOSDR_LIBRARIES)
mark_as_advanced(LIBOSMOSDR_LIBRARIES LIBOSMOSDR_INCLUDE_DIRS)
endif(NOT LIBOSMOSDR_FOUND)

@ -1,6 +1,6 @@
if(NOT LIBRTLSDR_FOUND)
pkg_check_modules (LIBRTLSDR_PKG librtlsdr)
find_path(LIBRTLSDR_INCLUDE_DIR NAMES rtl-sdr.h
find_path(LIBRTLSDR_INCLUDE_DIRS NAMES rtl-sdr.h
PATHS
${LIBRTLSDR_PKG_INCLUDE_DIRS}
/usr/include
@ -14,14 +14,14 @@ if(NOT LIBRTLSDR_FOUND)
/usr/local/lib
)
if(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES)
if(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
set(LIBRTLSDR_FOUND TRUE CACHE INTERNAL "librtlsdr found")
message(STATUS "Found librtlsdr: ${LIBRTLSDR_INCLUDE_DIR}, ${LIBRTLSDR_LIBRARIES}")
else(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES)
message(STATUS "Found librtlsdr: ${LIBRTLSDR_INCLUDE_DIRS}, ${LIBRTLSDR_LIBRARIES}")
else(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
set(LIBRTLSDR_FOUND FALSE CACHE INTERNAL "librtlsdr found")
message(STATUS "librtlsdr not found.")
endif(LIBRTLSDR_INCLUDE_DIR AND LIBRTLSDR_LIBRARIES)
endif(LIBRTLSDR_INCLUDE_DIRS AND LIBRTLSDR_LIBRARIES)
mark_as_advanced(LIBRTLSDR_INCLUDE_DIR LIBRTLSDR_LIBRARIES)