Skip to content

Commit 13d2b8f

Browse files
committed
examples - hack usrp1 by ai
1 parent 54ca186 commit 13d2b8f

38 files changed

Lines changed: 4943 additions & 3 deletions

.DS_Store

0 Bytes
Binary file not shown.

Readme.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
## SDR & FPGA
44

5-
- [How to install UHD GNURadio and RFNoC on Ubuntu?](sdr-n-fpga/How-to-install-uhd-gnuradio-n-rfnoc-on-ubuntu.md)
5+
- [How to install UHD GNURadio and RFNoC on Ubuntu?](./contents/sdr-n-fpga/How-to-install-uhd-gnuradio-n-rfnoc-on-ubuntu.md)
66

7-
- [How to install and lauch vivado first time?](sdr-n-fpga/How-to-install-n-first-time-run-vivado.md)
7+
- [Installing Xilinx Vitis 2020.2 on Ubuntu (Headless or GUI-Free)](./contents/sdr-n-fpga/How_gui-free_install_xilinx_vitis_on_ububtu.md)
8+
9+
- [How to install and lauch vivado first time?](./contents/sdr-n-fpga/How-to-install-n-first-time-run-vivado.md)
10+
11+
- [Setting up SSH key with GitHub for Ubuntu](https://medium.com/featurepreneur/setting-up-ssh-key-with-github-for-ubuntu-cd8f2fabf25b)
12+
13+
- [Share folder between MacOS and Ubuntu](https://medium.com/macoclock/share-folder-between-macos-and-ubuntu-4ce84fb5c1ad)
814

915
## Raspberry Pi
1016

codebase/.DS_Store

0 Bytes
Binary file not shown.

codebase/Readme.md

Lines changed: 80 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,80 @@
1-
# RFPGA
1+
# RFPGA
2+
3+
<details>
4+
<summary> ME_ISO </summary>
5+
6+
- [bladeRF-openbts5.0.iso](https://rfagora.s3.us-east-1.amazonaws.com/image/ISO/ME_ISO/bladeRF-openbts5.0/bladeRF-openbts5.0.iso)
7+
- [en.iplinkme.iso](https://rfagora.s3.us-east-1.amazonaws.com/image/ISO/ME_ISO/en.iplinkme.iso)
8+
- [Openbts_v2.09_64.iso ](https://rfagora.s3.us-east-1.amazonaws.com/image/ISO/ME_ISO/Openbts_v2.09_64.iso)
9+
- [openbts_v3.09_52M.iso ](https://rfagora.s3.us-east-1.amazonaws.com/image/ISO/ME_ISO/openbts_v3.09_52M.iso)
10+
- [V10-mode-s-openbts2.8.iso](https://rfagora.s3.us-east-1.amazonaws.com/image/ISO/ME_ISO/V10-mode-s-openbts2.8.iso)
11+
12+
</details>
13+
14+
<details>
15+
<summary> OpenBTS Startup </summary>
16+
17+
18+
```sh
19+
sudo su
20+
cd /usr/local/src/openbts-2.6Mamou/smqueue
21+
./smqueue
22+
```
23+
24+
```sh
25+
sudo su
26+
cd /usr/local/src/openbts-2.6 Mamou/apps
27+
./Openbts
28+
```
29+
30+
</details>
31+
32+
33+
<details>
34+
<summary> USRP1 test </summary>
35+
36+
- testing whether the system is connected
37+
38+
```sh
39+
usrp_probe
40+
```
41+
42+
```sh
43+
cd /usr/local/share/gnuradio/examples/usrp
44+
./usrp_benchmark_usb.py
45+
```
46+
47+
```sh
48+
sudo su
49+
cd /usr/local/share/gnuradio/examples/digital
50+
./benchmark_tx.py –f 900M –T A
51+
```
52+
53+
```sh
54+
sudo su
55+
cd /usr/local/share/gnuradio/examples/digital
56+
./benchmark_rx.py –f 900M –R A
57+
```
58+
59+
```sh
60+
usrp_fft.py -f 900M -R A
61+
```
62+
63+
</details>
64+
65+
<details>
66+
<summary> USRP1 burn eeprom </summary>
67+
68+
```sh
69+
sudo su
70+
cd /usr/local/src/gnuradio-3.3.0/usrp/host/apps
71+
./burn-serial-number s=123456
72+
```
73+
74+
```sh
75+
sudo su
76+
cd /usr/local/src/gnuradio-3.3.0/usrp/host/apps
77+
./burn-db-eeprom -t rfx1800_mimo_b -A –f
78+
```
79+
80+
</details>

codebase/uhd_gnuradio/.DS_Store

6 KB
Binary file not shown.

codebase/uhd_gnuradio/b210/readme.md

Whitespace-only changes.

codebase/uhd_gnuradio/readme.md

Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
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+
6 KB
Binary file not shown.

0 commit comments

Comments
 (0)