From e4737b8cecf01d3fcd0cc6850d22effa4dc7117c Mon Sep 17 00:00:00 2001 From: smusihin <musihin_sergei@mail.ru> Date: Sun, 21 Nov 2021 03:29:08 +0300 Subject: [PATCH] Update RPi instructions --- raspberry/README.md | 124 ++++++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 68 deletions(-) diff --git a/raspberry/README.md b/raspberry/README.md index 67ca0d5..4dbd148 100644 --- a/raspberry/README.md +++ b/raspberry/README.md @@ -1,58 +1,50 @@ -How to install gr-bladeRF to + ## How to install gr-bladeRF on Raspberry Pi 4 -O. Prepare Raspberry Pi4 + ### 1. Prepare Raspberry Pi4 -0.1. Download and install rpi-imager: + #### 1.1. Download and install rpi-imager: visit https://www.raspberrypi.com/software and download rpi imager or run ``` wget https://downloads.raspberrypi.org/imager/imager_latest_amd64.deb sudo dpkg -i imager_1.6.2_amd64.deb ``` -0.2. Flash image and setup network + #### 1.2. Flash image and setup network Insert microSD card to slot on your computer an run rpi-imager - Choose OS: Other general purpose OS - Ubuntu - Ubuntu Server 21.04.3 LTS (RPi 3/4/400) 64-bit server OS for arm64 architectures + Choose OS: `Other general purpose OS` - `Ubuntu` - `Ubuntu Server 21.04.3 LTS (RPi 3/4/400) 64-bit server OS for arm64 architectures` Choose storage - your microSD card - Press write + Press `WRITE` Insert microSD into RPi and plug ethernet & power cables. -0.3. Determining the Pi’s IP address - To determine the IP address of your board, open a terminal and run the `arp` command: + #### 1.3. Determining the Pi’s IP address + +To determine the IP address of your board, open a terminal and run the `arp` command: - On Ubuntu and Mac OS: - ``` +On Ubuntu and Mac OS: + + arp -na | grep -i "e4:5f" ? (192.168.1.105) at e4:5f:01:35:c0:92 [ether] on wlp3s0 - ``` - ubuntu@ubuntu:~$ sudoedit /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg - - Connect to rpi4 via ssh: - ``` + +Connect to rpi4 via ssh: ssh ubuntu@192.168.1.105 - ``` - password: `ubuntu` - Change password on first login and connect again. + +password: `ubuntu` +Change password on first login and connect again. -0.5. Install a desktop + #### 1.5. Install a desktop - check architecture - ``` - ubuntu@ubuntu:~$ dpkg --print-architecture - arm64 - ``` - ``` sudo apt update sudo apt -y upgrade sudo apt install -y xubuntu-desktop - ``` -2. Install bladeRF + ### 2. Install bladeRF + - ``` sudo add-apt-repository ppa:nuandllc/bladerf sudo apt-get update sudo apt-get install -y bladerf libbladerf-dev bladerf-firmware-fx3 @@ -60,10 +52,11 @@ O. Prepare Raspberry Pi4 sudo apt-get install bladerf-fpga-hostedx115 # for bladeRF x115 sudo apt-get install bladerf-fpga-hostedxa4 # for bladeRF 2.0 Micro A4 sudo apt-get install bladerf-fpga-hostedxa9 # for bladeRF 2.0 Micro A9 - ``` - Check bladeRF: - ``` - ubuntu@ubuntu:~$ bladeRF-cli -i + +Check bladeRF: + + `ubuntu@ubuntu:~$ bladeRF-cli -i` + bladeRF> info Board: Nuand bladeRF 2.0 (bladerf2) @@ -79,21 +72,21 @@ O. Prepare Raspberry Pi4 Instance: 0 bladeRF> exit - ``` -3. Crossplatform build volk and gnuradio using docker and install on RPi + + ### 3. Crossplatform build volk and gnuradio using docker and install on RPi ./build_gnuradio.sh - Transfer files to RPi: - ``` +Transfer files to RPi: + scp *.deb ubuntu@192.168.1.105:/home/ubuntu - ``` - Connect to RPi + +Connect to RPi ssh -X ubuntu@192.168.1.105 # -X for run GUI applications - Install - ``` +Install + sudo dpkg -i volk.deb sudo dpkg -i gnuradio.deb sudo apt-get install -y libusb-1.0-0-dev libusb-1.0-0 git cmake g++ \ @@ -104,20 +97,21 @@ O. Prepare Raspberry Pi4 python3-zmq python3-scipy python3-gi python3-gi-cairo gir1.2-gtk-3.0 \ libcodec2-dev libgsm1-dev libqt5svg5-dev libpulse-dev pulseaudio alsa-base \ libasound2 libasound2-dev pybind11-dev libsndfile-dev - ``` - Run gnuradio - ``` + +Run gnuradio + export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH gnuradio-companion - ``` -4. Build and install gr-iqbal, gr-osmosdr, gr-bladeRF - Make directory for source - ``` + + ### 4. Build and install gr-iqbal, gr-osmosdr, gr-bladeRF + +Make directory for source + mkdir ~/gr - ``` - # gr-iqbal - ``` + +###### gr-iqbal + cd ~/gr git clone git://git.osmocom.org/gr-iqbal cd gr-iqbal @@ -126,10 +120,10 @@ O. Prepare Raspberry Pi4 cmake .. make -j$(nproc) sudo make install && sudo ldconfig - ``` - # gr-osmosdr - ############# - ``` + + +###### gr-osmosdr + cd ~/gr git clone https://git.osmocom.org/gr-osmosdr cd gr-osmosdr @@ -137,10 +131,10 @@ O. Prepare Raspberry Pi4 cmake .. make -j$(nproc) sudo make install && sudo ldconfig - ``` - #gr-bladeRF - ############ - ``` + + +###### gr-bladeRF + cd ~/gr git clone https://github.com/Nuand/gr-bladeRF.git cd gr-bladeRF @@ -149,16 +143,10 @@ O. Prepare Raspberry Pi4 cmake .. make -j4 sudo make install - ``` - - Check `gr-bladeRF`: - - Setup audio forwarding: - ``` - scp ~/.config/pulse/cookie ubuntu@192.168.1.105:/home/ubuntu/.config/pulse/cookie - ``` - ``` + +###### Check `gr-bladeRF`: + gnuradio-companion ~/gr/gr-bladeRF/apps/fm_receiver.grc - ``` + -- GitLab