Difference between revisions of "GNURadio: Compile GNURadio + UHD"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(24 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | '''NOTE:''' | ||
+ | * GNURadio 3.7 - ada QT & WX widgets. '''RECOMMENDED''' | ||
+ | * GNURadio 3.8 - QT & WX widget tidak terinstalasi. | ||
+ | |||
+ | |||
==Persiapan== | ==Persiapan== | ||
Line 11: | Line 16: | ||
libqwt-dev libqwt-doc libqwt-headers python3-guiqwt python3-qwt \ | libqwt-dev libqwt-doc libqwt-headers python3-guiqwt python3-qwt \ | ||
python-wxmpl python-wxtools python-wxversion \ | python-wxmpl python-wxtools python-wxversion \ | ||
+ | liblog4cpp-doc liblog4cpp5-dev liblog4cpp5v5 libgmp-dev libgmp10 \ | ||
+ | python-wxgtk3.0 python-wxgtk3.0-dev python-wxgtk4.0 python-wxmpl python-wxtools python-wxversion \ | ||
+ | libzmq3-dev libzmqpp-dev python-zmq python-zmq-dbg python3-zmq python3-zmq-dbg \ | ||
+ | libfftw3-bin libfftw3-dbg libfftw3-dev libfftw3-doc libfftw3-double3 \ | ||
+ | libfftw3-long3 libfftw3-quad3 libfftw3-single3 libfftw3-3 python-fftw | ||
Buat directory | Buat directory | ||
Line 16: | Line 26: | ||
mkdir -p /usr/local/src/SDR | mkdir -p /usr/local/src/SDR | ||
cd /usr/local/src/SDR | cd /usr/local/src/SDR | ||
+ | |||
+ | Edit | ||
+ | |||
+ | cd /etc/modprobe.d/ | ||
+ | sudo vi ban-rtl.conf | ||
+ | |||
+ | Tambahakan | ||
+ | |||
+ | blacklist dvb_usb_rtl28xxu | ||
==Upgrade CMAKE ke versi terakhir== | ==Upgrade CMAKE ke versi terakhir== | ||
Line 24: | Line 43: | ||
wget https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2-Linux-x86_64.sh | wget https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2-Linux-x86_64.sh | ||
chmod +x /opt/cmake-3.16.2-Linux-x86_64.sh | chmod +x /opt/cmake-3.16.2-Linux-x86_64.sh | ||
+ | sudo bash /opt/cmake-3.16.2-Linux-x86_64.sh | ||
# ketik Y 2x | # ketik Y 2x | ||
− | |||
sudo ln -s /opt/cmake-3.16.2-Linux-x86_64/bin/* /usr/local/bin | sudo ln -s /opt/cmake-3.16.2-Linux-x86_64/bin/* /usr/local/bin | ||
sudo ln -s /opt/cmake-3.16.2-Linux-x86_64/bin/* /usr/bin | sudo ln -s /opt/cmake-3.16.2-Linux-x86_64/bin/* /usr/bin | ||
Line 43: | Line 62: | ||
make install | make install | ||
+ | |||
+ | ==Compile rtl_sdr== | ||
+ | |||
+ | Lakukan | ||
+ | |||
+ | cd /usr/local/src/SDR | ||
+ | git clone git://git.osmocom.org/rtl-sdr.git | ||
+ | cd /usr/local/src/SDR/rtl-sdr/ | ||
+ | mkdir build | ||
+ | cd build | ||
+ | cmake ../ | ||
+ | make | ||
+ | sudo make install | ||
+ | sudo ldconfig | ||
+ | |||
+ | Aturan udev yang penting agar USB dongle terdetek dengan baik perlu di copy menggunakan perintah berikut | ||
+ | |||
+ | cd /usr/local/src/SDR/rtl-sdr/ | ||
+ | sudo cp rtl-sdr.rules /etc/udev/rules.d/40-basic-permissions.rules | ||
+ | /etc/init.d/udev restart | ||
+ | |||
+ | Kita dapat meng-unplug & replug USB dongle. | ||
+ | Cek menggunakan perintah | ||
+ | |||
+ | lsusb | ||
+ | |||
+ | Keluar | ||
+ | |||
+ | Bus 002 Device 003: ID 093a:2521 Pixart Imaging, Inc. Optical Mouse | ||
+ | Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub | ||
+ | Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
+ | '''Bus 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T''' | ||
+ | Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub | ||
+ | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub | ||
==Compile UHD== | ==Compile UHD== | ||
Line 63: | Line 116: | ||
sudo make install | sudo make install | ||
sudo ldconfig | sudo ldconfig | ||
− | export LD_LIBRARY_PATH=/usr/local/lib | + | # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64:/usr/local/lib:/usr/lib:/usr/lib64/:/usr/lib32/ |
==Compile GNURadio== | ==Compile GNURadio== | ||
Line 71: | Line 124: | ||
cd /usr/local/src/SDR | cd /usr/local/src/SDR | ||
git clone --recursive https://github.com/gnuradio/gnuradio.git | git clone --recursive https://github.com/gnuradio/gnuradio.git | ||
− | cd gnuradio | + | cd /usr/local/src/SDR/gnuradio |
− | git checkout maint-3. | + | git checkout maint-3.7 |
git submodule update --init --recursive | git submodule update --init --recursive | ||
mkdir build | mkdir build | ||
− | cd build | + | cd /usr/local/src/SDR/gnuradio/build |
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../ | cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../ | ||
make | make | ||
Line 81: | Line 134: | ||
sudo make install | sudo make install | ||
sudo ldconfig | sudo ldconfig | ||
+ | |||
+ | ==Compile gr_osmoSDR== | ||
+ | |||
+ | Lakukan | ||
+ | |||
+ | cd /usr/local/src/SDR/ | ||
+ | git clone git://git.osmocom.org/gr-osmosdr | ||
+ | cd /usr/local/src/SDR/gr-osmosdr/ | ||
+ | git checkout gr3.7 | ||
+ | mkdir build | ||
+ | cd build/ | ||
+ | cmake ../ | ||
+ | make | ||
+ | sudo make install | ||
+ | sudo ldconfig | ||
+ | |||
+ | ==Referensi== | ||
+ | |||
+ | * https://www.gnuradio.org/doc/doxygen/build_guide.html | ||
==Pranala Menarik== | ==Pranala Menarik== | ||
* [[GNURadio]] | * [[GNURadio]] |
Latest revision as of 08:49, 3 January 2020
NOTE:
- GNURadio 3.7 - ada QT & WX widgets. RECOMMENDED
- GNURadio 3.8 - QT & WX widget tidak terinstalasi.
Persiapan
Instalasi paket pendukung
sudo su apt update apt -y install libcppunit-dev python-cheetah doxygen \ libboost-all-dev python-sphinx libfftw3-dev python-numpy libqwt-dev \ libusb-dev libusb-dev libusb-1.0-0-dev libgsl-dev python-wxgtk3.0 git qtcreator \ bison flex automake \ libqwt-dev libqwt-doc libqwt-headers python3-guiqwt python3-qwt \ python-wxmpl python-wxtools python-wxversion \ liblog4cpp-doc liblog4cpp5-dev liblog4cpp5v5 libgmp-dev libgmp10 \ python-wxgtk3.0 python-wxgtk3.0-dev python-wxgtk4.0 python-wxmpl python-wxtools python-wxversion \ libzmq3-dev libzmqpp-dev python-zmq python-zmq-dbg python3-zmq python3-zmq-dbg \ libfftw3-bin libfftw3-dbg libfftw3-dev libfftw3-doc libfftw3-double3 \ libfftw3-long3 libfftw3-quad3 libfftw3-single3 libfftw3-3 python-fftw
Buat directory
mkdir -p /usr/local/src/SDR cd /usr/local/src/SDR
Edit
cd /etc/modprobe.d/ sudo vi ban-rtl.conf
Tambahakan
blacklist dvb_usb_rtl28xxu
Upgrade CMAKE ke versi terakhir
sudo du apt remove --purge cmake cd /opt/ wget https://github.com/Kitware/CMake/releases/download/v3.16.2/cmake-3.16.2-Linux-x86_64.sh chmod +x /opt/cmake-3.16.2-Linux-x86_64.sh sudo bash /opt/cmake-3.16.2-Linux-x86_64.sh # ketik Y 2x
sudo ln -s /opt/cmake-3.16.2-Linux-x86_64/bin/* /usr/local/bin sudo ln -s /opt/cmake-3.16.2-Linux-x86_64/bin/* /usr/bin cmake --version
Compile SWIG
sudo su sudo apt -y install bison flex automake cd /usr/local/src git clone https://github.com/swig/swig.git cd /usr/local/src/swig ./autogen.sh ./configure make make install
Compile rtl_sdr
Lakukan
cd /usr/local/src/SDR git clone git://git.osmocom.org/rtl-sdr.git cd /usr/local/src/SDR/rtl-sdr/ mkdir build cd build cmake ../ make sudo make install sudo ldconfig
Aturan udev yang penting agar USB dongle terdetek dengan baik perlu di copy menggunakan perintah berikut
cd /usr/local/src/SDR/rtl-sdr/ sudo cp rtl-sdr.rules /etc/udev/rules.d/40-basic-permissions.rules /etc/init.d/udev restart
Kita dapat meng-unplug & replug USB dongle. Cek menggunakan perintah
lsusb
Keluar
Bus 002 Device 003: ID 093a:2521 Pixart Imaging, Inc. Optical Mouse Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Compile UHD
WARNING: waktu compile lama
mkdir -p /usr/local/src/SDR cd /usr/local/src/SDR git clone https://github.com/EttusResearch/uhd cd /usr/local/src/SDR/uhd/ # git tag -l git checkout v3.15.0.0 cd host mkdir build cd build cmake ../ make make test sudo make install sudo ldconfig # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64:/usr/local/lib:/usr/lib:/usr/lib64/:/usr/lib32/
Compile GNURadio
WARNING: waktu compile lama
cd /usr/local/src/SDR git clone --recursive https://github.com/gnuradio/gnuradio.git cd /usr/local/src/SDR/gnuradio git checkout maint-3.7 git submodule update --init --recursive mkdir build cd /usr/local/src/SDR/gnuradio/build cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../ make make test sudo make install sudo ldconfig
Compile gr_osmoSDR
Lakukan
cd /usr/local/src/SDR/ git clone git://git.osmocom.org/gr-osmosdr cd /usr/local/src/SDR/gr-osmosdr/ git checkout gr3.7 mkdir build cd build/ cmake ../ make sudo make install sudo ldconfig