Last active
December 5, 2020 09:44
-
-
Save thinkycx/c9ac2798c07c55f08da290c47a6b7b54 to your computer and use it in GitHub Desktop.
install USRP env
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# driver: https://github.com/EttusResearch/uhd | |
## http://files.ettus.com/manual/page_install.html | |
## sudo apt-get install libuhd-dev libuhd003 uhd-host | |
## install UHD software as well as allow you to receive package updates. | |
sudo add-apt-repository ppa:ettusresearch/uhd | |
sudo apt-get update | |
sudo apt-get install libuhd-dev libuhd003 uhd-host | |
## usrp b210 | |
## download images | |
sudo python /usr/lib/uhd/utils/uhd_images_downloader.py | |
: ' | |
[INFO] Images destination: /usr/share/uhd/images | |
[INFO] No inventory file found at /usr/share/uhd/images/inventory.json. Creating an empty one. | |
00006 kB / 00006 kB (100%) usrp1_b100_fw_default-g6bea23d.zip | |
15740 kB / 15740 kB (100%) n3xx_n310_fpga_default-g1107862.zip | |
02757 kB / 02757 kB (100%) usrp2_n210_fpga_default-g6bea23d.zip | |
02032 kB / 02032 kB (100%) n230_n230_fpga_default-g4bb66b3.zip | |
00522 kB / 00522 kB (100%) usrp1_b100_fpga_default-g6bea23d.zip | |
00511 kB / 00511 kB (100%) b2xx_b200_fpga_default-g63e630a.zip | |
02415 kB / 02415 kB (100%) usrp2_n200_fpga_default-g6bea23d.zip | |
19488 kB / 19488 kB (100%) x3xx_x310_fpga_default-g1107862.zip | |
00503 kB / 00503 kB (100%) b2xx_b205mini_fpga_default-g63e630a.zip | |
18573 kB / 18573 kB (100%) x3xx_x300_fpga_default-g1107862.zip | |
00017 kB / 00017 kB (100%) octoclock_octoclock_fw_default-g14000041.zip | |
04839 kB / 04839 kB (100%) usb_common_windrv_default-g14000041.zip | |
00007 kB / 00007 kB (100%) usrp2_usrp2_fw_default-g6bea23d.zip | |
00009 kB / 00009 kB (100%) usrp2_n200_fw_default-g6bea23d.zip | |
00450 kB / 00450 kB (100%) usrp2_usrp2_fpga_default-g6bea23d.zip | |
00149 kB / 00149 kB (100%) b2xx_common_fw_default-g455a288.zip | |
00460 kB / 00460 kB (100%) b2xx_b200mini_fpga_default-g63e630a.zip | |
00319 kB / 00319 kB (100%) usrp1_usrp1_fpga_default-g6bea23d.zip | |
00009 kB / 00009 kB (100%) usrp2_n210_fw_default-g6bea23d.zip | |
11431 kB / 11431 kB (100%) n3xx_n300_fpga_default-g1107862.zip | |
05361 kB / 05361 kB (100%) e3xx_e310_fpga_default-g1107862.zip | |
00894 kB / 00894 kB (100%) b2xx_b210_fpga_default-g63e630a.zip | |
[INFO] Images download complete. | |
' | |
## test | |
uhd_usrp_probe | |
: ' | |
[INFO] [UHD] linux; GNU C++ version 7.3.0; Boost_106501; UHD_3.13.0.1-release | |
[INFO] [B200] Detected Device: B210 | |
[INFO] [B200] Loading FPGA image: /usr/share/uhd/images/usrp_b210_fpga.bin... | |
[INFO] [B200] Operating over USB 2. | |
[INFO] [B200] Detecting internal GPSDO.... | |
[INFO] [GPS] No GPSDO found | |
[INFO] [B200] Initialize CODEC control... | |
[INFO] [B200] Initialize Radio control... | |
[INFO] [B200] Performing register loopback test... | |
[INFO] [B200] Register loopback test passed | |
[INFO] [B200] Performing register loopback test... | |
[INFO] [B200] Register loopback test passed | |
[INFO] [B200] Setting master clock rate selection to 'automatic'. | |
[INFO] [B200] Asking for clock rate 16.000000 MHz... | |
[INFO] [B200] Actually got clock rate 16.000000 MHz. | |
_____________________________________________________ | |
/ | |
| Device: B-Series Device | |
| _____________________________________________________ | |
| / | |
| | Mboard: B210 | |
| | revision: 4 | |
| | product: 2 | |
| | serial: 315F313 | |
| | name: MyB210 | |
| | FW Version: 8.0 | |
| | FPGA Version: 15.0 | |
| | | |
| | Time sources: none, internal, external, gpsdo | |
| | Clock sources: internal, external, gpsdo | |
| | Sensors: ref_locked | |
| | _____________________________________________________ | |
| | / | |
| | | RX DSP: 0 | |
| | | | |
| | | Freq range: -8.000 to 8.000 MHz | |
| | _____________________________________________________ | |
| | / | |
| | | RX DSP: 1 | |
| | | | |
| | | Freq range: -8.000 to 8.000 MHz | |
| | _____________________________________________________ | |
| | / | |
| | | RX Dboard: A | |
| | | _____________________________________________________ | |
| | | / | |
| | | | RX Frontend: A | |
| | | | Name: FE-RX2 | |
| | | | Antennas: TX/RX, RX2 | |
| | | | Sensors: temp, rssi, lo_locked | |
| | | | Freq range: 50.000 to 6000.000 MHz | |
| | | | Gain range PGA: 0.0 to 76.0 step 1.0 dB | |
| | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz | |
| | | | Connection Type: IQ | |
| | | | Uses LO offset: No | |
| | | _____________________________________________________ | |
| | | / | |
| | | | RX Frontend: B | |
| | | | Name: FE-RX1 | |
| | | | Antennas: TX/RX, RX2 | |
| | | | Sensors: temp, rssi, lo_locked | |
| | | | Freq range: 50.000 to 6000.000 MHz | |
| | | | Gain range PGA: 0.0 to 76.0 step 1.0 dB | |
| | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz | |
| | | | Connection Type: IQ | |
| | | | Uses LO offset: No | |
| | | _____________________________________________________ | |
| | | / | |
| | | | RX Codec: A | |
| | | | Name: B210 RX dual ADC | |
| | | | Gain Elements: None | |
| | _____________________________________________________ | |
| | / | |
| | | TX DSP: 0 | |
| | | | |
| | | Freq range: -8.000 to 8.000 MHz | |
| | _____________________________________________________ | |
| | / | |
| | | TX DSP: 1 | |
| | | | |
| | | Freq range: -8.000 to 8.000 MHz | |
| | _____________________________________________________ | |
| | / | |
| | | TX Dboard: A | |
| | | _____________________________________________________ | |
| | | / | |
| | | | TX Frontend: A | |
| | | | Name: FE-TX2 | |
| | | | Antennas: TX/RX | |
| | | | Sensors: temp, lo_locked | |
| | | | Freq range: 50.000 to 6000.000 MHz | |
| | | | Gain range PGA: 0.0 to 89.8 step 0.2 dB | |
| | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz | |
| | | | Connection Type: IQ | |
| | | | Uses LO offset: No | |
| | | _____________________________________________________ | |
| | | / | |
| | | | TX Frontend: B | |
| | | | Name: FE-TX1 | |
| | | | Antennas: TX/RX | |
| | | | Sensors: temp, lo_locked | |
| | | | Freq range: 50.000 to 6000.000 MHz | |
| | | | Gain range PGA: 0.0 to 89.8 step 0.2 dB | |
| | | | Bandwidth range: 200000.0 to 56000000.0 step 0.0 Hz | |
| | | | Connection Type: IQ | |
| | | | Uses LO offset: No | |
| | | _____________________________________________________ | |
| | | / | |
| | | | TX Codec: A | |
| | | | Name: B210 TX dual DAC | |
| | | | Gain Elements: None | |
' | |
## | |
## gnuradio | |
## install | |
sudo apt-get install gnuradio -y | |
## configure b210 network | |
uhd_image_loader --args="type=b200,addr=192.168.10.2" | |
## official | |
# sudo apt-get update | |
## ubuntu18.04 | |
# sudo apt-get -y install git swig cmake doxygen build-essential libboost-all-dev libtool libusb-1.0-0 libusb-1.0-0-dev libudev-dev libncurses5-dev libfftw3-bin libfftw3-dev libfftw3-doc libcppunit-1.14-0 libcppunit-dev libcppunit-doc ncurses-bin cpufrequtils python-numpy python-numpy-doc python-numpy-dbg python-scipy python-docutils qt4-bin-dbg qt4-default qt4-doc libqt4-dev libqt4-dev-bin python-qt4 python-qt4-dbg python-qt4-dev python-qt4-doc python-qt4-doc libqwt6abi1 libfftw3-bin libfftw3-dev libfftw3-doc ncurses-bin libncurses5 libncurses5-dev libncurses5-dbg libfontconfig1-dev libxrender-dev libpulse-dev swig g++ automake autoconf libtool python-dev libfftw3-dev libcppunit-dev libboost-all-dev libusb-dev libusb-1.0-0-dev fort77 libsdl1.2-dev python-wxgtk3.0 git libqt4-dev python-numpy ccache python-opengl libgsl-dev python-cheetah python-mako python-lxml doxygen qt4-default qt4-dev-tools libusb-1.0-0-dev libqwtplot3d-qt5-dev pyqt4-dev-tools python-qwt5-qt4 cmake git wget libxi-dev gtk2-engines-pixbuf r-base-dev python-tk liborc-0.4-0 liborc-0.4-dev libasound2-dev python-gtk2 libzmq3-dev libzmq5 python-requests python-sphinx libcomedi-dev python-zmq libqwt-dev libqwt6abi1 python-six libgps-dev libgps23 gpsd gpsd-clients python-gps | |
## install uhd | |
# cd $HOME | |
# mkdir workarea-uhd | |
# cd workarea-uhd | |
# git clone https://github.com/EttusResearch/uhd.git | |
# cd uhd | |
# ... | |
## reference | |
# 1. http://www.ettus.com.cn/peixun/28/#h31 | |
# 2. gnuradio https://wiki.gnuradio.org/index.php/InstallingGR | |
# 3. example http://digital.ni.com/public.nsf/allkb/825823A54D291719862580D4003410B8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment