Difference between revisions of "SDR: rtl-sdr Ubuntu 12.04"

From OnnoWiki
Jump to navigation Jump to search
Line 16: Line 16:
  
  
 +
==Persiapan==
  
Step 1Install gnu-radio
+
Buat directory
guts.JPG
 
It looks like there are two options for installing an up-to-date gnuradio on ubuntu:
 
  
1) use an install script
+
mkdir /usr/local/src/SDR
2) install from source
+
cd /usr/local/src/SDR
  
Don't ask me why, but I tried the second option (probably the harder). After a first attempt that failed, I went for the first (and recommended option) to much success! So... lesson learned. Note to self, follow advice of program developers when installing software.
+
Instalasi paket pendukung
  
My advice, use the install script.  
+
sudo apt-get install cmake swig libcppunit-dev python-cheetah doxygen \
 +
libboost-all-dev python-sphinx fftw3-dev python-numpy libqwt-dev \
 +
libusb++-dev libusb-dev libusb-1.0-0-dev libgsl0-dev python-wxgtk2.6 git qtcreator
  
  
 +
==Install GNURadio==
  
 +
Lakukan
  
 +
cd /usr/local/src/SDR
 +
git clone git://gnuradio.org/gnuradio
  
Step 2Install rtl-sdr tools
+
Compile
Next, you want to install any missing rtl-sdr specific tools from here:
 
  
  http://sdr.osmocom.org/trac/wiki/rtl-sdr
+
  cd /usr/local/src/SDR/gnuradio
 +
mkdir build
 +
cd build
 +
cmake ../
 +
make
 +
sudo make install
 +
sudo ldconfig
  
Again, rather than duplicating instructions, follow the steps outlined here to install the rtlsdr library & capture tool: git://git.osmocom.org/rtl-sdr.git
+
==Install rtl-sdr tools==
  
Although this page also mentions a gnu radio module (git://git.osmocom.org/gr-osmosdr) I was unable to get it to work. Instead, I installed:
+
Lakukan
  
  https://github.com/balint256/gr-baz
+
  cd /usr/local/src/SDR
 +
git clone git://git.osmocom.org/rtl-sdr.git
  
as recommended from here: http://2h2o.tumblr.com/
+
Masuk ke directory rtl-sdr & lakukan
  
the basic steps are:
+
cd /usr/local/src/SDR/rtl-sdr/
 +
mkdir build
 +
cd build
 +
cmake ../
  
git clone https://github.com/balint256/gr-baz
 
cd gr-baz
 
sh bootstrap
 
./configure
 
 
  make
 
  make
 
  sudo make install
 
  sudo make install
 
  sudo ldconfig
 
  sudo ldconfig
  
Now you should have all the necessary software to communicate with the DVB-T dongle using gnuradio.
+
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 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp.
  
 +
Tampaknya gr-osmosdr tidak jalan.
  
 +
==Install gr-baz==
  
 +
Rekomendasi dari http://2h2o.tumblr.com/ install gr-baz dari https://github.com/balint256/gr-baz . Lakukan.
  
Step 3Setup udev rules
+
cd /usr/local/src/SDR/
Next, you need to add some udev rules to make the dongle available for the non-root users. First you want to find the vendor id and product id for your dongle.
+
git clone https://github.com/balint256/gr-baz.git
  
The way I did this was to run:
+
cd /usr/local/src/SDR/gr-baz
 +
chmod +x bootstrap
 +
./boostrap
 +
./configure
 +
make
 +
make check
 +
make install
 +
ldconfig
  
lsusb
 
  
The last line was the Realtek dongle:
+
Step 3Setup udev rules
 +
Next, you need to add some udev rules to make the dongle available for the non-root users. First you want to find the vendor id and product id for your dongle.
  
Bus 001 Device 008: ID 0bda:2838 Realtek Semiconductor Corp.
 
  
The important parts are "0bda" (the vendor id) and "2838" (the product id).
 
  
 
Create a new file as root named /etc/udev/rules.d/20.rtlsdr.rules that contains the following line:
 
Create a new file as root named /etc/udev/rules.d/20.rtlsdr.rules that contains the following line:

Revision as of 09:00, 16 October 2012

It was recently discovered that several cheap DVB-T usb dongles could be configured to be used as cheap ham radio receivers. Follow along with the discussions here: http://www.reddit.com/r/rtlsdr or find some of the useful software here: http://sdr.osmocom.org/trac/wiki/rtl-sdr

I picked up one of the compatible receivers from ali-express: http://www.aliexpress.com/snapshot/106450763.html

and will document here the steps I took to set it up with gnuradio on ubuntu 12.04.

There are a few things that I won't cover in this instructable, because they deserve an instructable of their own. These include:

1) using the Ubuntu command line (terminal) 2) cloning a git repository 3) building software from source on Ubuntu (especially with cmake)

If anyone has links to stellar, class A++ quality tutorials on any of these things, please add them to the comment and I will link them here.


Persiapan

Buat directory

mkdir /usr/local/src/SDR
cd /usr/local/src/SDR

Instalasi paket pendukung

sudo apt-get install cmake swig libcppunit-dev python-cheetah doxygen \
libboost-all-dev python-sphinx fftw3-dev python-numpy libqwt-dev \
libusb++-dev libusb-dev libusb-1.0-0-dev libgsl0-dev python-wxgtk2.6 git qtcreator


Install GNURadio

Lakukan

cd /usr/local/src/SDR
git clone git://gnuradio.org/gnuradio

Compile

cd /usr/local/src/SDR/gnuradio
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

Install rtl-sdr tools

Lakukan

cd /usr/local/src/SDR
git clone git://git.osmocom.org/rtl-sdr.git

Masuk ke directory rtl-sdr & lakukan

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 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp.

Tampaknya gr-osmosdr tidak jalan.

Install gr-baz

Rekomendasi dari http://2h2o.tumblr.com/ install gr-baz dari https://github.com/balint256/gr-baz . Lakukan.

cd /usr/local/src/SDR/
git clone https://github.com/balint256/gr-baz.git
cd /usr/local/src/SDR/gr-baz
chmod +x bootstrap
./boostrap
./configure
make
make check
make install
ldconfig


Step 3Setup udev rules Next, you need to add some udev rules to make the dongle available for the non-root users. First you want to find the vendor id and product id for your dongle.


Create a new file as root named /etc/udev/rules.d/20.rtlsdr.rules that contains the following line:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", GROUP="adm", MODE="0666", SYMLINK+="rtl_sdr"

With the vendor and product ids for your particular dongle. This should make the dongle accessible to any user in the adm group. and add a /dev/rtl_sdr symlink when the dongle is attached.

It's probably a good idea to unplug the dongle, restart udev (sudo restart udev) and re-plug in the dongle at this point.







Referensi


Pranala Menarik