DVB-T USB SDR: Difference between revisions
From charlesreid1
| Line 123: | Line 123: | ||
apt-get install libusb-1.0-0-dev | apt-get install libusb-1.0-0-dev | ||
</pre> | </pre> | ||
====Return to the SDR Project==== | |||
Okay, now we can go back to our build directory in the rtll-sdr project, and re-run cmake: | |||
<pre> | |||
$ cmake ../ | |||
-- Build type not specified: defaulting to release. | |||
-- Extracting version information from git describe... | |||
-- checking for module 'libusb-1.0' | |||
-- found libusb-1.0, version 1.0.17 | |||
-- Found libusb-1.0: /usr/include/libusb-1.0, /usr/lib/x86_64-linux-gnu/libusb-1.0.so | |||
-- Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON | |||
-- Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON to enable | |||
-- Building for version: v0.5.3-12-ge3c0 / 0.5git | |||
-- Using install prefix: /usr/local | |||
-- Configuring done | |||
-- Generating done | |||
-- Build files have been written to: /root/codes/sdr/rtl-sdr/build | |||
</pre> | |||
All done! | |||
Revision as of 22:13, 25 July 2015
Overview
Plug It In
First thing is to hook up the antenna to the USB dongle, and plug the USB dongle into the computer, and make sure the computer sees it:
$ lsusb | grep -i rtl Bus 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Get Software
Gnu Radio
First thing is to install gnuradio.
apt-get install gnuradio
Cmake
Yer gonna need Cmake.
apt-get install cmake
Boost/GSL Development
Then we'll install the Boost and GSL headers/development libraries for building scripts:
apt-get install libboost-dev libgsl0-dev
(Note that both of these were found using aptitude search [keyword]).
RTL-SDR Project
Next, clone into the rtl-sdr repository:
git clone git://git.osmocom.org/rtl-sdr.git
This project contains the software needed to interpret the raw I/Q packets sent from the antenna to the computer.
Now build the RTL-SDR project:
mkdir build cd build cmake ../
LibUSB Error
cmake ../ -- The C compiler identification is GNU 4.7.2 -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Build type not specified: defaulting to release. -- Extracting version information from git describe... -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") -- checking for module 'libusb-1.0' -- package 'libusb-1.0' not found -- Looking for libusb_handle_events_timeout_completed -- Looking for libusb_handle_events_timeout_completed - not found -- Looking for libusb_error_name -- Looking for libusb_error_name - not found -- libusb-1.0 not found. -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE CMake Error at CMakeLists.txt:69 (message): LibUSB 1.0 required to compile rtl-sdr -- Configuring incomplete, errors occurred!
Oh no dude! We're doomed!
Naw, it's cool, we can fix that by installing LibUSB, since that's what the last line of the error said to do.
$ apt-get install libusb Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libusb
Oh no dude! We're doomed!
Naw, just kidding, we can fix that by looking for libusb-related packaged with aptitude:
$ aptitude search libusb p libusb++-0.1-4c2 - userspace C++ USB programming library p libusb++-dev - userspace C++ USB programming library development files i libusb-0.1-4 - userspace USB programming library i A libusb-1.0-0 - userspace USB programming library p libusb-1.0-0-dbg - userspace USB programming library development files p libusb-1.0-0-dev - userspace USB programming library development files p libusb-1.0-doc - documentation for userspace USB programming i A libusb-dev - userspace USB programming library development files [......]
We need both the regular and the development versions of LibUSB 1.0. So the package we need is: libusb-1.0-0-dev
apt-get install libusb-1.0-0-dev
Return to the SDR Project
Okay, now we can go back to our build directory in the rtll-sdr project, and re-run cmake:
$ cmake ../ -- Build type not specified: defaulting to release. -- Extracting version information from git describe... -- checking for module 'libusb-1.0' -- found libusb-1.0, version 1.0.17 -- Found libusb-1.0: /usr/include/libusb-1.0, /usr/lib/x86_64-linux-gnu/libusb-1.0.so -- Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON -- Building with kernel driver detaching disabled, use -DDETACH_KERNEL_DRIVER=ON to enable -- Building for version: v0.5.3-12-ge3c0 / 0.5git -- Using install prefix: /usr/local -- Configuring done -- Generating done -- Build files have been written to: /root/codes/sdr/rtl-sdr/build
All done!