User talk:Duggabe: Difference between revisions
(Install UHD from source) |
|||
Line 14: | Line 14: | ||
== Install UHD from source == | == Install UHD from source == | ||
If you want to use GNU Radio with a USRP, install the UHD package from source using the following instructions, or refer to the [[https:// | If you want to use GNU Radio with a USRP, install the UHD package from source using the following instructions, or refer to the [[https://kb.ettus.com/Building_and_Installing_the_USRP_Open-Source_Toolchain_(UHD_and_GNU_Radio)_on_Linux USRP Manual]] for other options and Operating Systems. | ||
UHD sits at the same level as GNU Radio as an independent driver, which gr-uhd references. So if you want gr-uhd enabled, you <b>FIRST</b> must clone and install UHD. | UHD sits at the same level as GNU Radio as an independent driver, which gr-uhd references. So if you want gr-uhd enabled, you <b>FIRST</b> must clone and install UHD. | ||
Line 56: | Line 56: | ||
<pre>sudo ldconfig</pre> | <pre>sudo ldconfig</pre> | ||
You can now download the UHD FPGA Images for this installation. | |||
<pre> | <pre> | ||
sudo uhd_images_downloader | sudo uhd_images_downloader | ||
</pre> | |||
On Linux, udev handles USB plug and unplug events. The following commands install a udev rule so that non-root users may access the device. | |||
<pre> | |||
cd ~/uhd/host/utils | cd ~/uhd/host/utils | ||
sudo cp uhd-usrp.rules /etc/udev/rules.d/ | sudo cp uhd-usrp.rules /etc/udev/rules.d/ | ||
sudo udevadm control --reload-rules | sudo udevadm control --reload-rules | ||
sudo udevadm trigger | sudo udevadm trigger | ||
</pre> | |||
The installation of UHD and GNU Radio should now be complete. At this point, connect the USRP to the host computer and run: | |||
<pre> | |||
uhd_usrp_probe | uhd_usrp_probe | ||
</pre> | </pre> |
Revision as of 01:58, 3 July 2020
"Recycle Bin": content we no longer link to that we may eventually just delete
- Programming GNU Radio in Python
- Remote GRC Operations - needs updating!
- Using VIM plugins for GNU Radio development
- QTGUI Tutorial - A tutorial on how to develop Python GNU Radio applications.
- Guided_Tutorial_Extras_Sample_Rates#E2.3._A_Note_on_Resampling - covered by Understanding sample rate
- Core concepts of GNU Radio applications - content used in other pages
- WritePythonApplications - content used in other pages
- Tutorial on how to configure OOT packages to find and link against GNU Radio - for 3.7; also, most of the content is covered in Writing blocks in C++
- Writing a Python Function for GRC - for 3.7; content used in other pages; it doesn't work as written!
- How to debug your applications - not well written; would need major rework and update
Install UHD from source
If you want to use GNU Radio with a USRP, install the UHD package from source using the following instructions, or refer to the [USRP Manual] for other options and Operating Systems. UHD sits at the same level as GNU Radio as an independent driver, which gr-uhd references. So if you want gr-uhd enabled, you FIRST must clone and install UHD.
For this example, we will start in the home directory to parallel the steps in InstallingGR#To_install_system_wide.
cd ~/
The following command line script will install all the required dependencies for UHD:
sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins python3-zmq python3-scipy python3-gi python3-gi-cairo gobject-introspection gir1.2-gtk-3.0 libusb-1.0-0 libusb-1.0-0-dev libudev-dev python3-setuptools
Clone the code into your home directory:
git clone git://github.com/EttusResearch/uhd.git
cd ~/uhd
Note: In the following command, change v3.15.0.0-rc3
to some other branch or tag if you want to build a different version.
git tag -l git checkout v3.15.0.0-rc3
Note: Unlike most build processes, this one builds under the host
directory.
cd host mkdir build cd build
Note: In the following command, we will use -DCMAKE_INSTALL_PREFIX=/usr/local
to install UHD into the same prefix as GNU Radio.
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../
Note: In the following command, if your computer's CPU has multiple cores, you can use the argument -j#
to speed compilation;
e.g., make -j3
will use 3 threads in the build. Specify at least one less than the total number of CPU cores so the system does not appear to 'freeze' during the build. If not specified, then a single thread is used for the build.
make -j3 make test sudo make install
If you're running Linux, then always do the following command after installing any library:
sudo ldconfig
You can now download the UHD FPGA Images for this installation.
sudo uhd_images_downloader
On Linux, udev handles USB plug and unplug events. The following commands install a udev rule so that non-root users may access the device.
cd ~/uhd/host/utils sudo cp uhd-usrp.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules sudo udevadm trigger
The installation of UHD and GNU Radio should now be complete. At this point, connect the USRP to the host computer and run:
uhd_usrp_probe