Archive | GNU Radio RSS feed for this section

CMakeLists.txt for dial_tone.cc

30 May

If you want to compile dial_tone.cc outside of either the GR source tree or OOT module, this is the minimum required CMakeLists.txt (courtesy of Johnathan Corgan)

https://github.com/gnuradio/gnuradio/blob/64a702e19d1e8e1b948e6ef76e98dff41837bb92/gr-audio/examples/c%2B%2B/dial_tone.cc


cmake_minimum_required(VERSION 2.6)
project(dialtone CXX)

find_package(Boost "1.35" COMPONENTS system)
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG AUDIO)
find_package(Gnuradio "3.7.2" REQUIRED)

include_directories(${GNURADIO_ALL_INCLUDE_DIRS})

add_executable(dialtone dial_tone.cc)
target_link_libraries(dialtone ${Boost_LIBRARIES} ${GNURADIO_ALL_LIBRARIES})

GNURadio Tricks

20 Apr

Dynamic recording of files
Create a QT GUI Check Box with ID “Record” and set type to Boolean, and Default Value to False.

Create a variable with ID “file_name” and set Value to:
'data.bin' if Record==True else '/dev/null'

Create a File Sink with file “file_name”

GNU Radio Build Notes

8 Feb

Assumes Fedora 23 x86_64
Instructions at http://gnuradio.org/redmine/projects/gnuradio/wiki/BuildGuide

Dependencies
Dependencies listed at http://gnuradio.org/doc/doxygen/build_guide.html

sudo dnf install
git
cmake
boost
boost-devel
cppunit
cppunit-devel
fftw
fftw-devel
python
swig
numpy
doxygen
python-cheetah
pygtk2
gsl
gsl-devel
qt
qwt
qwt-devel
pyqt5
pyqt5-devel
PyQwt
PyQwt-devel
wxPython
wxPython-devel
python-lxml
alsa-lib
alsa-lib-devel
jack-audio-connection-kit
jack-audio-connection-kit-devel
ncurses-devel
portaudio
portaudio-devel
python-docutils
python-sphinx
python-mako
libusbx
libusbx-devel
SDL
SDL-devel
sdcc
texlive-dvips
xmlto
graphviz
orc
orc-compiler
orc-devel
scipy
PyOpenGL
zeromq
zeromq-devel
cppzmq-devel
python-zmq
thrift-devel

Add to .profile
export PATH=/usr/libexec/sdcc:$PATH
export PYTHONPATH=/usr/local/lib64/python2.7/site-packages
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig

Build Ettus UHD
cd /usr/local/src/
git clone https://github.com/EttusResearch/uhd.git
cd uhd/host/
mkdir build
cd build
cmake ../
make
make test
sudo make install

Files will be installed in:
/usr/local/bin
/usr/local/include/uhd
/usr/local/lib64

Build GNU Radio
cd /usr/local/src
git clone --recursive https://github.com/gnuradio/gnuradio.git
cd gnuradio
mkdir build
cd build
cmake ..
make
make test
sudo make install

Update and rebuild
cd build
sudo make uninstall
cd ..
rm -rf build
git pull --recurse-submodules=on
git submodule update
mkdir build
cd build
cmake ../
make
make test
sudo make install