Compare commits

...

71 Commits

Author SHA1 Message Date
Jon Szymaniak fe99478a0c bladeRF: RXVGA2 range is [0, 30] 9 years ago
Jon Szymaniak b7360fc879 bladerf: Added 'verbosity' and 'loopback' device parameters 9 years ago
Dimitri Stolnikov 99c9e5ead9 osmosdr/rtl/miri/hackrf: use 15 buffers by default 9 years ago
Dimitri Stolnikov 9d85dcf6d1 airspy: add support for AirSpy wideband receiver 9 years ago
Dimitri Stolnikov 0e99eb95f7 rfspace: properly cover the absense of a serial number 9 years ago
Brian Padalino 98a6e7604f bladeRF: Modifying correction calls. 9 years ago
Jon Szymaniak 9964a5e6a9 bladerf: Removed sign extension and masking of samples 9 years ago
Jon Szymaniak 9a8710757f bladerf: Updates for libbladeRF v0.11.0 API changes 9 years ago
Jon Szymaniak 0ee06038ae bladerf: Use rational sample rate functions 9 years ago
Jon Szymaniak 1905cdc64c bladerf: Added start()/stop() implementations 9 years ago
Dimitri Stolnikov a734c1ae85 osmocom_fft: print the exception thrown in DC/IQ correction setters 9 years ago
Dimitri Stolnikov d7557d9432 osmocom_siggen: add controls for DC offset and IQ imbalance correction 9 years ago
Dimitri Stolnikov 9701906aaf bladerf: shorten the serial number that is being shown to the user 9 years ago
Dimitri Stolnikov 27a5e07ba3 bladerf: implement DC offset and IQ imbalance correction 9 years ago
Dimitri Stolnikov 22705c89cf bladerf: FX3 firmware loading not supported from within gr-osmosdr 9 years ago
Dimitri Stolnikov f78d79398f bladerf: prepare functions to control DC offset / IQ balance (WIP) 9 years ago
Dimitri Stolnikov 6b61662b37 apps/osmocom_fft: gui to set DC offset / IQ imbalance correction mode 9 years ago
Dimitri Stolnikov 2a54ac2aed rfspace: add missing header for basename() 9 years ago
Sylvain Munaut 81c53bf547 osmocom_fft: Properly set initial sample rate for fosphor output 9 years ago
Dimitri Stolnikov 9b76d230e9 rfspace: add support for RFSPACE SDR-IQ and SDR-IP 9 years ago
Dimitri Stolnikov c7a77e88d9 device: implement "nofake" hint to exclude dummy devices from discovery 9 years ago
Dimitri Stolnikov 411a2b683b cmake: pull updates from gnuradio master 9 years ago
Dimitri Stolnikov 8984357be5 add UmTRX to the list of supported devices 9 years ago
Dimitri Stolnikov e48f8cf2c9 file: add missing include for boost::format 9 years ago
Steve Markgraf 19556d00da rtl/rtl_tcp: add 2.56e6 as 'good' sample rate 9 years ago
Dimitri Stolnikov 505c19f82e apps/osmocom_fft: recover when .step property is not given for a range 9 years ago
Dimitri Stolnikov 8522c4edf2 sink/source: fix error message when unable to connect blocks internally 9 years ago
Dimitri Stolnikov 2bd29cbe99 netsdr: implement sample rate change in run mode 9 years ago
Steve Markgraf eb3865010d rtl: add R828D tuner 9 years ago
Dimitri Stolnikov 8c5e74c213 netsdr: replace boost asio sockets with native bsd sockets 9 years ago
Jon Szymaniak dd35921292 bladerf: Don't reload the FPGA unless the force-reload param is set 9 years ago
Jon Szymaniak e735418224 bladerf: Moved initializations to bladerf_common.c, misc. cleanup 9 years ago
Jon Szymaniak 3ef7394f61 bladerf: Moved no longer "common" items out of bladerf_common 9 years ago
Daniel Gröber 0d75ab353d bladerf: Added device caching, this enables full-duplex operation. 9 years ago
Sylvain Munaut 49a3772491 osmocom_fft: Make the scope area fill all available space 9 years ago
Sylvain Munaut 2cbc1e14e0 osmocom_fft: Use the new WX version of fosphor sink 9 years ago
Dimitri Stolnikov 0ee591f163 netsdr: add support for RFSPACE NetSDR receiver 9 years ago
Dimitri Stolnikov 8f86bd2dca apps/osmocom_fft: use reasonable defaults for gain & center frequency 9 years ago
Dimitri Stolnikov f7640dc11c bladerf: remove unused variable 9 years ago
Dimitri Stolnikov 26acce3d35 use numchan instead of nchan to prevent ambiguity... 9 years ago
Dimitri Stolnikov dd7d584137 hackrf: implement device discovery 9 years ago
Dimitri Stolnikov 68481ac40d uhd: improve device discovery 9 years ago
Dimitri Stolnikov 860962e501 file: allow changing the sample rate when throttle=true 9 years ago
Dimitri Stolnikov 8300354c05 cmake: fix flag passing to Clang compiler 9 years ago
Dimitri Stolnikov 2934d8512b apps: catch corner cases for file= mode in osmocom_fft 9 years ago
Sylvain Munaut 5534662c0c apps/osmocom_fft: Add option to use fosphor for the main display 9 years ago
Dimitri Stolnikov f61734e58b cmake: make uhd component optional in standalone mode 9 years ago
Dimitri Stolnikov d81936d907 bladerf: use newstyle version getters 9 years ago
Dimitri Stolnikov 7b199a8b95 bladerf: make source less picky wrt rf gain 9 years ago
Dimitri Stolnikov 1f44c44054 source/sink: initialize sample rate cache variable 9 years ago
Dimitri Stolnikov 56281a6a30 source/sink: fix automatic bandwidth selection 9 years ago
Dimitri Stolnikov 882cac8465 rtl: don't try to parse empty device index values 9 years ago
Dimitri Stolnikov 217872a785 apps: filter bandwidth follows sample rate in osmocom_fft 9 years ago
Dimitri Stolnikov b97cac30c6 updated header documentation for bandwidth setter 9 years ago
Dimitri Stolnikov d8534d8721 bladerf: implement automatic bandwidth selection 9 years ago
Dimitri Stolnikov 851e94b82f hackrf: enable AMP gain stage by default 9 years ago
Dimitri Stolnikov a279fb1455 hackrf: don't set automatic bandwidth on samplerate change 9 years ago
Jon Szymaniak cbf791469c bladeRF: Refactored buffering scheme in sink 9 years ago
Dimitri Stolnikov 0690c077d2 bladerf: migration to async api (WIP) 9 years ago
Dimitri Stolnikov 154100a11f cmake: drop gnuradio-pmt dependency in .pc file 9 years ago
Sylvain Munaut 970658c071 apps: Improve the GSM burst generation 9 years ago
Frederik M.J. Vestre cdeb105495 Support setting external sampling to bladerf 9 years ago
Dimitri Stolnikov 6fe392546a bladerf: follow recent API changes 9 years ago
Dimitri Stolnikov e65dd08785 cmake: use *_INCLUDE_DIRS in modules 9 years ago
Dimitri Stolnikov 80f72d52ea grc: move around documentation 9 years ago
Dimitri Stolnikov bdc8f22132 uhd: use gr-uhd by default, fall back to built-in code if not found 9 years ago
Dimitri Stolnikov 6e29bf179f rtl_tcp: remove gr-blocks usage for float-to-complex conversion 9 years ago
Dimitri Stolnikov bd800ed89e file: import file_source to make it independent from gr blocks 9 years ago
Dimitri Stolnikov f4fd3a176a runtime: always export runtime and blocks symbols 9 years ago
Dimitri Stolnikov 3df0e00276 uhd: import gr-uhd code to be independent from gnuradio-runtime 9 years ago
Dimitri Stolnikov be1314af10 runtime: import minimal gr runtime for standalone mode (wip) 9 years ago
  1. 74
      CMakeLists.txt
  2. 13
      README
  3. 367
      apps/osmocom_fft
  4. 124
      apps/osmocom_siggen
  5. 65
      apps/osmocom_siggen_base.py
  6. 24
      cmake/Modules/FindLibAIRSPY.cmake
  7. 12
      cmake/Modules/FindLibMiriSDR.cmake
  8. 12
      cmake/Modules/FindLibOsmoSDR.cmake
  9. 12
      cmake/Modules/FindLibRTLSDR.cmake
  10. 12
      cmake/Modules/FindLibbladeRF.cmake
  11. 7
      cmake/Modules/GrPython.cmake
  12. 8
      cmake/Modules/GrTest.cmake
  13. 58
      cmake/msvc/config.h
  14. 301
      cmake/msvc/inttypes.h
  15. 45
      cmake/msvc/stdbool.h
  16. 251
      cmake/msvc/stdint.h
  17. 69
      cmake/msvc/sys/time.h
  18. 10
      cmake/msvc/unistd.h
  19. 12
      gnuradio-osmosdr.pc.in
  20. 23
      grc/gen_osmosdr_blocks.py
  21. 3
      include/osmosdr/device.h
  22. 83
      include/osmosdr/runtime/CMakeLists.txt
  23. 33
      include/osmosdr/runtime/gnuradio/api.h
  24. 74
      include/osmosdr/runtime/gnuradio/attributes.h
  25. 209
      include/osmosdr/runtime/gnuradio/basic_block.h
  26. 573
      include/osmosdr/runtime/gnuradio/block.h
  27. 207
      include/osmosdr/runtime/gnuradio/block_detail.h
  28. 178
      include/osmosdr/runtime/gnuradio/block_gateway.h
  29. 66
      include/osmosdr/runtime/gnuradio/block_registry.h
  30. 33
      include/osmosdr/runtime/gnuradio/blocks/api.h
  31. 85
      include/osmosdr/runtime/gnuradio/blocks/file_source.h
  32. 55
      include/osmosdr/runtime/gnuradio/blocks/null_sink.h
  33. 53
      include/osmosdr/runtime/gnuradio/blocks/null_source.h
  34. 63
      include/osmosdr/runtime/gnuradio/blocks/throttle.h
  35. 258
      include/osmosdr/runtime/gnuradio/buffer.h
  36. 58
      include/osmosdr/runtime/gnuradio/constants.h
  37. 32
      include/osmosdr/runtime/gnuradio/endianness.h
  38. 38
      include/osmosdr/runtime/gnuradio/expj.h
  39. 186
      include/osmosdr/runtime/gnuradio/feval.h
  40. 194
      include/osmosdr/runtime/gnuradio/flowgraph.h
  41. 108
      include/osmosdr/runtime/gnuradio/fxpt.h
  42. 160
      include/osmosdr/runtime/gnuradio/fxpt_nco.h
  43. 80
      include/osmosdr/runtime/gnuradio/fxpt_vco.h
  44. 45
      include/osmosdr/runtime/gnuradio/gr_complex.h
  45. 192
      include/osmosdr/runtime/gnuradio/hier_block2.h
  46. 156
      include/osmosdr/runtime/gnuradio/high_res_timer.h
  47. 111
      include/osmosdr/runtime/gnuradio/io_signature.h
  48. 733
      include/osmosdr/runtime/gnuradio/logger.h
  49. 733
      include/osmosdr/runtime/gnuradio/logger.h.in
  50. 227
      include/osmosdr/runtime/gnuradio/math.h
  51. 39
      include/osmosdr/runtime/gnuradio/misc.h
  52. 152
      include/osmosdr/runtime/gnuradio/prefs.h
  53. 81
      include/osmosdr/runtime/gnuradio/random.h
  54. 39
      include/osmosdr/runtime/gnuradio/realtime.h
  55. 96
      include/osmosdr/runtime/gnuradio/realtime_impl.h
  56. 56
      include/osmosdr/runtime/gnuradio/runtime_types.h
  57. 35
      include/osmosdr/runtime/gnuradio/sincos.h
  58. 57
      include/osmosdr/runtime/gnuradio/sptr_magic.h
  59. 69
      include/osmosdr/runtime/gnuradio/sync_block.h
  60. 72
      include/osmosdr/runtime/gnuradio/sync_decimator.h
  61. 74
      include/osmosdr/runtime/gnuradio/sync_interpolator.h
  62. 37
      include/osmosdr/runtime/gnuradio/sys_paths.h
  63. 156
      include/osmosdr/runtime/gnuradio/thread/thread.h
  64. 72
      include/osmosdr/runtime/gnuradio/thread/thread_body_wrapper.h
  65. 48
      include/osmosdr/runtime/gnuradio/thread/thread_group.h
  66. 146
      include/osmosdr/runtime/gnuradio/top_block.h
  67. 92
      include/osmosdr/runtime/gnuradio/tpb_detail.h
  68. 65
      include/osmosdr/runtime/gnuradio/types.h
  69. 33
      include/osmosdr/runtime/gnuradio/uhd/api.h
  70. 530
      include/osmosdr/runtime/gnuradio/uhd/usrp_sink.h
  71. 581
      include/osmosdr/runtime/gnuradio/uhd/usrp_source.h
  72. 2
      include/osmosdr/sink.h
  73. 2
      include/osmosdr/source.h
  74. 188
      lib/CMakeLists.txt
  75. 204
      lib/ConfigChecks.cmake
  76. 37
      lib/airspy/CMakeLists.txt
  77. 609
      lib/airspy/airspy_source_c.cc
  78. 146
      lib/airspy/airspy_source_c.h
  79. 4
      lib/arg_helpers.h
  80. 1
      lib/bladerf/CMakeLists.txt
  81. 393
      lib/bladerf/bladerf_common.cc
  82. 67
      lib/bladerf/bladerf_common.h
  83. 448
      lib/bladerf/bladerf_sink_c.cc
  84. 46
      lib/bladerf/bladerf_sink_c.h
  85. 500
      lib/bladerf/bladerf_source_c.cc
  86. 40
      lib/bladerf/bladerf_source_c.h
  87. 2
      lib/config.h.in
  88. 25
      lib/device.cc
  89. 39
      lib/file/file_source_c.cc
  90. 5
      lib/file/file_source_c.h
  91. 58
      lib/hackrf/hackrf_sink_c.cc
  92. 67
      lib/hackrf/hackrf_source_c.cc
  93. 2
      lib/miri/CMakeLists.txt
  94. 4
      lib/miri/miri_source_c.cc
  95. 2
      lib/osmosdr/CMakeLists.txt
  96. 4
      lib/osmosdr/osmosdr_src_c.cc
  97. 37
      lib/rfspace/CMakeLists.txt
  98. 1673
      lib/rfspace/rfspace_source_c.cc
  99. 174
      lib/rfspace/rfspace_source_c.h
  100. 2
      lib/rtl/CMakeLists.txt
  101. Some files were not shown because too many files have changed in this diff Show More

@ -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
@ -97,6 +101,7 @@ MESSAGE(STATUS "Configuring Boost C++ Libraries...")
SET(BOOST_REQUIRED_COMPONENTS
thread
system
filesystem
)
if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
@ -140,6 +145,26 @@ set(GR_LIBEXEC_DIR libexec)
set(GR_PKG_LIBEXEC_DIR ${GR_LIBEXEC_DIR}/${CMAKE_PROJECT_NAME})
set(GRC_BLOCKS_DIR ${GR_PKG_DATA_DIR}/grc/blocks)
# Special exception if prefix is /usr so we don't make a /usr/etc.
string(COMPARE EQUAL ${CMAKE_INSTALL_PREFIX} "/usr" isusr)
if(isusr)
set(SYSCONFDIR "/${GR_CONF_DIR}" CACHE PATH "System configuration directory")
else(isusr)
set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/${GR_CONF_DIR}" CACHE PATH "System configuration directory" FORCE)
endif(isusr)
set(GR_PREFSDIR ${SYSCONFDIR}/${CMAKE_PROJECT_NAME}/conf.d)
########################################################################
# Variables replaced when configuring the package config files
########################################################################
file(TO_NATIVE_PATH "${CMAKE_INSTALL_PREFIX}" prefix)
file(TO_NATIVE_PATH "\${prefix}" exec_prefix)
file(TO_NATIVE_PATH "\${exec_prefix}/${GR_LIBRARY_DIR}" libdir)
file(TO_NATIVE_PATH "\${prefix}/${GR_INCLUDE_DIR}" includedir)
file(TO_NATIVE_PATH "${SYSCONFDIR}" SYSCONFDIR)
file(TO_NATIVE_PATH "${GR_PREFSDIR}" GR_PREFSDIR)
########################################################################
# Find build dependencies
########################################################################
@ -154,12 +179,48 @@ find_package(LibOsmoSDR)
find_package(LibRTLSDR)
find_package(LibMiriSDR)
find_package(LibHackRF)
find_package(LibAIRSPY)
find_package(LibbladeRF)
find_package(Doxygen)
set(PYTHON_RUNTIME_CHECK TRUE)
if(NOT GNURADIO_RUNTIME_FOUND)
message(FATAL_ERROR "GnuRadio Runtime required to build " ${CMAKE_PROJECT_NAME})
endif()
message(STATUS "Enabling built-in GNU Radio runtime...")
set(RUNTIME_MODE TRUE CACHE INTERNAL "Built-in GNU Radio runtime")
add_subdirectory(include/osmosdr/runtime)
set(GNURADIO_RUNTIME_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/include/osmosdr/runtime)
set(GNURADIO_RUNTIME_LIBRARY_DIRS "")
set(GNURADIO_RUNTIME_LIBRARIES "")
set(GNURADIO_PMT_INCLUDE_DIRS "")
set(GNURADIO_PMT_LIBRARY_DIRS "")
set(GNURADIO_PMT_LIBRARIES "")
set(GNURADIO_BLOCKS_INCLUDE_DIRS "")
set(GNURADIO_BLOCKS_LIBRARY_DIRS "")
set(GNURADIO_BLOCKS_LIBRARIES "")
set(GNURADIO_UHD_INCLUDE_DIRS "")
set(GNURADIO_UHD_LIBRARIES "")
LIST(APPEND GR_OSMOSDR_PC_CFLAGS "-I\${includedir}/osmosdr/runtime")
# disable python bindings as long as we don't have any swig files for the runtime
set(PYTHON_RUNTIME_CHECK FALSE)
endif(NOT GNURADIO_RUNTIME_FOUND)
if(GNURADIO_RUNTIME_FOUND)
LIST(APPEND GR_OSMOSDR_PC_REQUIRES "gnuradio-runtime")
endif(GNURADIO_RUNTIME_FOUND)
if(GNURADIO_PMT_FOUND)
# LIST(APPEND GR_OSMOSDR_PC_REQUIRES "gnuradio-pmt")
endif(GNURADIO_PMT_FOUND)
if(GNURADIO_BLOCKS_FOUND)
LIST(APPEND GR_OSMOSDR_PC_REQUIRES "gnuradio-blocks")
endif(GNURADIO_BLOCKS_FOUND)
########################################################################
# Setup the include and linker paths
@ -211,10 +272,11 @@ if(SWIG_FOUND)
endif(SWIG_FOUND)
include(GrComponent)
GR_REGISTER_COMPONENT("Python support" ENABLE_PYTHON
GR_REGISTER_COMPONENT("Python bindings" ENABLE_PYTHON
PYTHONLIBS_FOUND
SWIG_FOUND
SWIG_VERSION_CHECK
PYTHON_RUNTIME_CHECK
)
########################################################################

@ -4,13 +4,16 @@ as well supports:
* FUNcube Dongle through libgnuradio-fcd
* FUNcube Dongle Pro+ through gr-fcdproplus
* sysmocom OsmoSDR Devices through libosmosdr
* Nuand LLC bladeRF through libbladeRF library
* Great Scott Gadgets HackRF through libhackrf
* Ettus USRP Devices through Ettus UHD library
* 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-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.
@ -18,11 +21,11 @@ your application(s) independent of the underlying radio hardware.
For installation and usage guidelines please read the documentation available
at http://sdr.osmocom.org/trac/wiki/GrOsmoSDR
For the impatient :) a short excerpt:
A short excerpt from the wiki:
The Gnu Radio block requires a recent gnuradio (>= v3.7) to be installed.
Before building the block you have to make sure that all the dependencies
Before building the block you have to make sure that all dependencies
(see list of supported devices above) you are intend to work with are
properly installed. The build system of gr-osmosdr will recognize them and
enable specific source/sink components thereafter.

@ -66,17 +66,23 @@ 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("-F", "--fosphor", action="store_true", default=False,
help="Enable fosphor 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]")
@ -111,16 +117,29 @@ 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)
@ -143,6 +162,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)
@ -153,12 +181,22 @@ 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]
#self[key] = self[key]
if options.waterfall:
if options.fosphor:
from gnuradio import fosphor
self.scope = fosphor.wx_sink_c(panel, size=(800,300))
self.scope.set_sample_rate(input_rate)
self.frame.SetMinSize((800,600))
elif options.waterfall:
self.scope = waterfallsink2.waterfall_sink_c (panel,
fft_size=options.fft_size,
sample_rate=input_rate,
@ -189,6 +227,12 @@ class app_top_block(stdgui2.std_top_block, pubsub):
self._build_gui(vbox)
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")
@ -201,8 +245,9 @@ class app_top_block(stdgui2.std_top_block, pubsub):
def _build_gui(self, vbox):
vbox.Add(self.scope.win, 0, wx.EXPAND)
vbox.AddSpacer(3)
if hasattr(self.scope, 'win'):
vbox.Add(self.scope.win, 1, wx.EXPAND)
vbox.AddSpacer(3)
# add control area at the bottom
self.myform = myform = form.form()
@ -227,7 +272,6 @@ class app_top_block(stdgui2.std_top_block, pubsub):
# Add frequency controls to top window sizer
vbox.Add(fc_vbox, 0, wx.EXPAND)
vbox.AddSpacer(5)
vbox.AddStretchSpacer()
freq_hbox.AddSpacer(3)
forms.text_box(
@ -240,39 +284,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.float_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=2010,
step_size=0.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
@ -286,7 +337,6 @@ class app_top_block(stdgui2.std_top_block, pubsub):
# Add gain controls to top window sizer
vbox.Add(gc_vbox, 0, wx.EXPAND)
vbox.AddSpacer(5)
vbox.AddStretchSpacer()
for gain_name in self.get_gain_names():
range = self[GAIN_RANGE_KEY(gain_name)]
@ -315,7 +365,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)
@ -338,7 +388,6 @@ class app_top_block(stdgui2.std_top_block, pubsub):
vbox.Add(bwidth_vbox, 0, wx.EXPAND)
vbox.AddSpacer(5)
vbox.AddStretchSpacer()
bwidth_hbox.AddSpacer(3)
forms.text_box(
@ -357,7 +406,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)
@ -381,7 +430,6 @@ class app_top_block(stdgui2.std_top_block, pubsub):
# Add frequency controls to top window sizer
vbox.Add(sr_vbox, 0, wx.EXPAND)
vbox.AddSpacer(5)
vbox.AddStretchSpacer()
sr_hbox.AddSpacer(3)
forms.text_box(
@ -405,11 +453,228 @@ 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 hasattr(self.scope, 'set_sample_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):
@ -436,6 +701,8 @@ class app_top_block(stdgui2.std_top_block, pubsub):
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;
@ -451,7 +718,7 @@ class app_top_block(stdgui2.std_top_block, pubsub):
freq = self.src.set_center_freq(freq)
if not self.options.oscilloscope:
if hasattr(self.scope, 'set_baseband_freq'):
self.scope.set_baseband_freq(freq)
if freq is not None:

@ -314,6 +314,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
##################################################

@ -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
@ -67,22 +71,28 @@ class gsm_source_c(gr.hier_block2):
gr.io_signature(0, 0, 0), # Input signature
gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
self._bits = blocks.vector_source_b(self.gen_gsm_seq(), True)
self._symb_rate = 270833
self._symb_rate = 13e6 / 48;
self._samples_per_symbol = 2
bits_per_symbol = 1
self._pack = blocks.unpacked_to_packed_bb(bits_per_symbol, gr.GR_MSB_FIRST)
self._data = blocks.vector_source_b(self.gen_gsm_seq(), True, 2)
self._split = blocks.vector_to_streams(gr.sizeof_char*1, 2)
self._pack = blocks.unpacked_to_packed_bb(1, gr.GR_MSB_FIRST)
self._mod = digital.gmsk_mod(self._samples_per_symbol, bt=0.35)
self._mod = digital.gmsk_mod( self._samples_per_symbol, bt=0.35 )
self._pwr_f = blocks.char_to_float(1, 1)
self._pwr_c = blocks.float_to_complex(1)
self._pwr_w = blocks.repeat(gr.sizeof_gr_complex*1, self._samples_per_symbol)
self._mul = blocks.multiply_vcc(1)
self._interpolate = filter.fractional_resampler_cc( 0,
(self._symb_rate * self._samples_per_symbol) / sample_rate )
self._scale = blocks.multiply_const_cc(amplitude)
self.connect(self._bits, self._pack, self._mod, self._interpolate, self._scale, self)
self.connect(self._data, self._split)
self.connect((self._split, 0), self._pack, self._mod, (self._mul, 0))
self.connect((self._split, 1), self._pwr_f, self._pwr_c, self._pwr_w, (self._mul, 1))
self.connect(self._mul, self._interpolate, self._scale, self)
def set_amplitude(self, amplitude):
self._scale.set_k(amplitude)
@ -97,9 +107,11 @@ class gsm_source_c(gr.hier_block2):
[0,0,1,0,0,1,0,1,1,1,0,0,0,0,1,0,0,0,1,0,0,1,0,1,1,1],
list(numpy.random.randint(0, 2, 58)),
[0,0,0],
[1] * (l-148)
]
return map(int, sum(chunks,[]))
burst = sum(chunks,[])
burst = sum(map(list, zip(burst, (1,) * len(burst))), [])
burst += [1,0] * (l-148)
return map(int, burst)
def gen_gsm_frame(self):
return \
@ -135,6 +147,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)
@ -149,6 +167,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,
@ -240,6 +263,28 @@ class top_block(gr.top_block, pubsub):
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:
f = self[FREQ_RANGE_KEY]

@ -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)
mark_as_advanced(LIBRTLSDR_LIBRARIES LIBRTLSDR_INCLUDE_DIRS)
endif(NOT LIBRTLSDR_FOUND)

@ -1,6 +1,6 @@
if(NOT LIBBLADERF_FOUND)
pkg_check_modules (LIBBLADERF_PKG libbladeRF)
find_path(LIBBLADERF_INCLUDE_DIR NAMES libbladeRF.h
find_path(LIBBLADERF_INCLUDE_DIRS NAMES libbladeRF.h
PATHS
${LIBBLADERF_PKG_INCLUDE_DIRS}
/usr/include
@ -14,14 +14,14 @@ if(NOT LIBBLADERF_FOUND)
/usr/local/lib
)
if(LIBBLADERF_INCLUDE_DIR AND LIBBLADERF_LIBRARIES)
if(LIBBLADERF_INCLUDE_DIRS AND LIBBLADERF_LIBRARIES)
set(LIBBLADERF_FOUND TRUE CACHE INTERNAL "libbladeRF found")
message(STATUS "Found libbladeRF: ${LIBBLADERF_INCLUDE_DIR}, ${LIBBLADERF_LIBRARIES}")
else(LIBBLADERF_INCLUDE_DIR AND LIBBLADERF_LIBRARIES)
message(STATUS "Found libbladeRF: ${LIBBLADERF_INCLUDE_DIRS}, ${LIBBLADERF_LIBRARIES}")
else(LIBBLADERF_INCLUDE_DIRS AND LIBBLADERF_LIBRARIES)
set(LIBBLADERF_FOUND FALSE CACHE INTERNAL "libbladeRF found")
message(STATUS "libbladeRF not found.")
endif(LIBBLADERF_INCLUDE_DIR AND LIBBLADERF_LIBRARIES)
endif(LIBBLADERF_INCLUDE_DIRS AND LIBBLADERF_LIBRARIES)
mark_as_advanced(LIBBLADERF_INCLUDE_DIR LIBBLADERF_LIBRARIES)
mark_as_advanced(LIBBLADERF_LIBRARIES LIBBLADERF_INCLUDE_DIRS)
endif(NOT LIBBLADERF_FOUND)

@ -48,8 +48,15 @@ else(PYTHON_EXECUTABLE)
endif(PYTHON_EXECUTABLE)
if (CMAKE_CROSSCOMPILING)
set(QA_PYTHON_EXECUTABLE "/usr/bin/python")
else (CMAKE_CROSSCOMPILING)
set(QA_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
endif(CMAKE_CROSSCOMPILING)
#make the path to the executable appear in the cmake gui
set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter")
set(QA_PYTHON_EXECUTABLE ${QA_PYTHON_EXECUTABLE} CACHE FILEPATH "python interpreter for QA tests")
#make sure we can use -B with python (introduced in 2.6)
if(PYTHON_EXECUTABLE)

@ -30,6 +30,7 @@ set(__INCLUDED_GR_TEST_CMAKE TRUE)
# GR_TEST_TARGET_DEPS - built targets for the library path
# GR_TEST_LIBRARY_DIRS - directories for the li