|
| 1 | +# Installing UHD 4.8, GNU Radio 3.11, and RFNoC on Ubuntu 24.04.2 (VMware) |
| 2 | + |
| 3 | +This guide walks you through installing the **latest UHD 4.8**, **GNU Radio 3.11**, and **RFNoC** support on **Ubuntu 24.04.2** running in **VMware**. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## ✅ System Preparation |
| 8 | + |
| 9 | +### 1. Install Dependencies |
| 10 | + |
| 11 | +```bash |
| 12 | +sudo apt update |
| 13 | +sudo apt install -y \ |
| 14 | + cmake g++ python3-dev python3-mako python3-numpy python3-gi \ |
| 15 | + libboost-all-dev libgmp-dev swig libusb-1.0-0-dev \ |
| 16 | + libfftw3-dev libcomedi-dev libcppunit-dev libgsl-dev \ |
| 17 | + libqwt-qt5-dev libqt5svg5-dev python3-pyqt5 \ |
| 18 | + liblog4cpp5-dev libzmq3-dev libsndfile1-dev \ |
| 19 | + git pkg-config doxygen graphviz python3-sphinx \ |
| 20 | + python3-lxml liborc-0.4-dev python3-setuptools \ |
| 21 | + libspdlog-dev libvolk-dev pybind11-dev \ |
| 22 | + python3-pygccxml python3-cairo \ |
| 23 | + gir1.2-cairo-1.0 python3-gi-cairo \ |
| 24 | + python3-matplotlib qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools |
| 25 | +``` |
| 26 | + |
| 27 | +> ✅ **Note**: `python3-setuptools` is **required** to build the UHD Python components (e.g., `pyuhd`, `usrp_mpm`). If missing, `make` will fail at the final stages with a `ModuleNotFoundError`. ✅ `python3-matplotlib` is required if you want to use instrumentation blocks in GNU Radio Companion (e.g., DistanceRadar, AzElPlot). ✅ `qtbase5-dev`, `qtchooser`, `qt5-qmake`, and `qtbase5-dev-tools` are essential for building `gr-qtgui`, which provides QT GUI and instrumentation blocks. |
| 28 | +
|
| 29 | +--- |
| 30 | + |
| 31 | +## 📦 UHD 4.8 Installation (Latest) |
| 32 | + |
| 33 | +### 2. Clone UHD 4.8 from Source |
| 34 | + |
| 35 | +```bash |
| 36 | +cd ~/src |
| 37 | +git clone --branch UHD-4.8 https://github.com/EttusResearch/uhd.git |
| 38 | +cd uhd/host |
| 39 | +mkdir build && cd build |
| 40 | +``` |
| 41 | + |
| 42 | +### 3. Configure UHD with RFNoC |
| 43 | + |
| 44 | +```bash |
| 45 | +cmake -DENABLE_RFNOC=ON .. |
| 46 | +``` |
| 47 | + |
| 48 | +### 4. Build and Install UHD |
| 49 | + |
| 50 | +```bash |
| 51 | +make -j$(nproc) |
| 52 | +sudo make install |
| 53 | +sudo ldconfig |
| 54 | +``` |
| 55 | + |
| 56 | +### 5. Download Firmware and FPGA Images |
| 57 | + |
| 58 | +```bash |
| 59 | +sudo /usr/local/lib/uhd/utils/uhd_images_downloader.py |
| 60 | +``` |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## 📻 GNU Radio Installation (Latest from `main` Branch) |
| 65 | + |
| 66 | +### 6. Clone GNU Radio |
| 67 | + |
| 68 | +```bash |
| 69 | +cd ~/src |
| 70 | +git clone --recursive https://github.com/gnuradio/gnuradio.git |
| 71 | +cd gnuradio |
| 72 | +``` |
| 73 | + |
| 74 | +### 7. Checkout GNU Radio Source Code |
| 75 | + |
| 76 | +```bash |
| 77 | +# Already cloned in previous step |
| 78 | +git checkout main |
| 79 | +git pull |
| 80 | +git submodule update --init --recursive |
| 81 | +``` |
| 82 | + |
| 83 | +### 8. Build GNU Radio |
| 84 | + |
| 85 | +```bash |
| 86 | +rm -rf build |
| 87 | +mkdir build && cd build |
| 88 | +cmake -DENABLE_GR_UHD=ON -DENABLE_GR_FFT=ON -DENABLE_GR_ANALOG=ON \ |
| 89 | + -DENABLE_GR_BLOCKS=ON -DENABLE_GRC=ON -DENABLE_GR_QTGUI=ON .. |
| 90 | +make -j$(nproc) |
| 91 | +sudo make install |
| 92 | +sudo ldconfig |
| 93 | +``` |
| 94 | + |
| 95 | +> 🔄 If Instrumentation blocks (like `AzElPlot`) are still missing in GRC: |
| 96 | +> |
| 97 | +> Ensure `python3-matplotlib` and all QT5 dev packages are installed: |
| 98 | +> |
| 99 | +> ```bash |
| 100 | +> sudo apt install python3-matplotlib qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools |
| 101 | +> ``` |
| 102 | +> |
| 103 | +> Then **rebuild GNU Radio** from Step 8. |
| 104 | +
|
| 105 | +--- |
| 106 | +
|
| 107 | +## ⚙️ RFNoC Enablement |
| 108 | +
|
| 109 | +RFNoC (RF Network-on-Chip) enables FPGA-accelerated block processing for supported USRPs. UHD 4.8 includes RFNoC support by default when `-DENABLE_RFNOC=ON` is passed to `cmake`. |
| 110 | +
|
| 111 | +To verify: |
| 112 | +
|
| 113 | +```bash |
| 114 | +uhd_usrp_probe | grep RFNOC |
| 115 | +``` |
| 116 | +
|
| 117 | +If you see lines like: |
| 118 | + |
| 119 | +``` |
| 120 | +[INFO] [RFNOC] Initialized RFNoC blocks... |
| 121 | +``` |
| 122 | + |
| 123 | +Then RFNoC is successfully enabled and loaded. |
| 124 | + |
| 125 | +Note: |
| 126 | + |
| 127 | +- RFNoC blocks are only supported by FPGA-enabled USRPs (e.g., X310, N310). USRP1 does **not** support FPGA RFNoC block execution, but UHD will still compile with RFNoC libraries present. |
| 128 | +- Useful for mixed environments where newer USRPs are also used. |
| 129 | + |
| 130 | +--- |
| 131 | + |
| 132 | +## 🧰 Optional: gr-ettus and RFNoCModTool (Legacy UHD 4.0 + GR 3.8) |
| 133 | + |
| 134 | +If you are working with UHD 4.0 and GNU Radio 3.8 and want to create or customize your own RFNoC blocks, you may also install `gr-ettus` and use the `rfnocmodtool`. |
| 135 | + |
| 136 | +```bash |
| 137 | +cd ~/src |
| 138 | +git clone --branch maint-3.8-uhd4.0 https://github.com/ettusresearch/gr-ettus.git gr-ettus |
| 139 | +mkdir gr-ettus/build && cd gr-ettus/build |
| 140 | +cmake -DENABLE_QT=True .. |
| 141 | +make -j$(nproc) |
| 142 | +sudo make install |
| 143 | +sudo ldconfig |
| 144 | +``` |
| 145 | + |
| 146 | +Then verify the tool: |
| 147 | + |
| 148 | +```bash |
| 149 | +export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH |
| 150 | +rfnocmodtool help |
| 151 | +``` |
| 152 | + |
| 153 | +This step is **not needed** for UHD 4.8 and GNU Radio 3.11+, where RFNoC support is built into the UHD and GRC tools directly. |
| 154 | + |
| 155 | +--- |
| 156 | + |
| 157 | +## 🧪 Testing UHD and GNU Radio |
| 158 | + |
| 159 | +### 9. Verify UHD Installation |
| 160 | + |
| 161 | +```bash |
| 162 | +sudo uhd_usrp_probe |
| 163 | +``` |
| 164 | + |
| 165 | +You can confirm the UHD version from the output, e.g.: |
| 166 | + |
| 167 | +``` |
| 168 | +[INFO] [UHD] UHD version: 4.8.0.x |
| 169 | +``` |
| 170 | + |
| 171 | +### 10. Verify GNU Radio Version |
| 172 | + |
| 173 | +```bash |
| 174 | +gnuradio-config-info --version |
| 175 | +``` |
| 176 | + |
| 177 | +This should return something like: |
| 178 | + |
| 179 | +``` |
| 180 | +3.11.x |
| 181 | +``` |
| 182 | + |
| 183 | +### 11. Verify RFNoC Support |
| 184 | + |
| 185 | +```bash |
| 186 | +uhd_usrp_probe | grep RFNOC |
| 187 | +``` |
| 188 | + |
| 189 | +If RFNoC blocks are listed or not marked as disabled, RFNoC is properly built in. |
| 190 | + |
| 191 | +### 12. Launch UHD FFT Tool |
| 192 | + |
| 193 | +```bash |
| 194 | +uhd_fft --args="type=usrp1" --freq=10e6 |
| 195 | +``` |
| 196 | + |
| 197 | +### 13. Start GNU Radio Companion |
| 198 | + |
| 199 | +```bash |
| 200 | +gnuradio-companion |
| 201 | +``` |
| 202 | + |
| 203 | +Build a simple flowgraph with `UHD: USRP Source` and `QT GUI Sink` to verify. |
| 204 | + |
| 205 | +> 🔍 **Missing Instrumentation Blocks?** |
| 206 | +> |
| 207 | +> If you don’t see blocks like `AzElPlot` or `DistanceRadar`, ensure: |
| 208 | +> |
| 209 | +> - `python3-matplotlib` was installed before building GNU Radio. |
| 210 | +> - All QT5 dev tools were installed. |
| 211 | +> - You **rebuilt GNU Radio** (Step 8). |
| 212 | +
|
| 213 | +--- |
| 214 | + |
| 215 | +## ⚙️ VMware USB Passthrough |
| 216 | + |
| 217 | +### 14. Connect USRP to VM |
| 218 | + |
| 219 | +- Shut down VM |
| 220 | +- In VMware settings: |
| 221 | + - Add USB Controller (2.0 or 3.0) |
| 222 | + - Add USRP USB device |
| 223 | +- Boot VM and verify with `uhd_find_devices` |
| 224 | + |
| 225 | +--- |
| 226 | + |
| 227 | +## 🛠 USB Device Not Detected? Try This |
| 228 | + |
| 229 | +If you see the following error: |
| 230 | + |
| 231 | +``` |
| 232 | +[ERROR] [USB] USB open failed: insufficient permissions. |
| 233 | +No UHD Devices Found |
| 234 | +``` |
| 235 | + |
| 236 | +Try: |
| 237 | + |
| 238 | +1. Shut down the VM. |
| 239 | +2. In VMware: |
| 240 | + - Go to **Settings > USB & Bluetooth** |
| 241 | + - Under “Connect USB devices”, make sure your **USRP1** (or similar) is listed and set to **“Connect to Linux”** |
| 242 | +3. Restart VM and check again: |
| 243 | + |
| 244 | +```bash |
| 245 | +uhd_find_devices |
| 246 | +``` |
| 247 | + |
| 248 | +It should now detect the device and print something like: |
| 249 | + |
| 250 | +```text |
| 251 | +[INFO] [UHD] Found USRP1... |
| 252 | +``` |
| 253 | + |
| 254 | +--- |
| 255 | + |
| 256 | +## 📂 Optional: Set Environment Variables |
| 257 | + |
| 258 | +### 15. Add to `~/.bashrc` |
| 259 | + |
| 260 | +```bash |
| 261 | +export PATH=/usr/local/bin:$PATH |
| 262 | +export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH |
| 263 | +export PYTHONPATH=/usr/local/lib/python3/dist-packages/:$PYTHONPATH |
| 264 | +``` |
| 265 | + |
| 266 | +```bash |
| 267 | +source ~/.bashrc |
| 268 | +``` |
| 269 | + |
| 270 | +--- |
| 271 | + |
| 272 | +## ✅ Summary |
| 273 | + |
| 274 | +| Component | Version | Status | |
| 275 | +| -------------- | ------- | -------------------------- | |
| 276 | +| Ubuntu | 24.04.2 | ✅ Installed | |
| 277 | +| UHD | 4.8.x | ✅ From source | |
| 278 | +| GNU Radio | main | ✅ From source | |
| 279 | +| RFNoC | Enabled | ✅ Verified | |
| 280 | +| VMware USB | Yes | ✅ Connected | |
| 281 | +| USRP1 + RFX900 | ✅ | ✅ Works with UHD 4.8 + GRC | |
| 282 | + |
| 283 | +--- |
| 284 | + |
| 285 | +For questions or troubleshooting, refer to: |
| 286 | + |
| 287 | +- [Ettus UHD Docs](https://files.ettus.com/manual/) |
| 288 | +- [GNU Radio Wiki](https://wiki.gnuradio.org/index.php/Main_Page) |
| 289 | + |
0 commit comments