From charlesreid1

Line 54: Line 54:
cd build
cd build
cmake ../
cmake ../
</pre>
====LibUSB Error====
<pre>
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!
</pre>
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.
<pre>
$ apt-get install libusb
Reading package lists... Done
Building dependency tree     
Reading state information... Done
E: Unable to locate package libusb
</pre>
Oh no dude! We're doomed!
Naw, just kidding, we can fix that by looking for libusb-related packaged with aptitude:
<pre>
$ 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           
[......]
</pre>
We need both the regular and the development versions of LibUSB 1.0. So the package we need is: <code>libusb-1.0-0-dev</code>
<pre>
apt-get install libusb-1.0-0-dev
</pre>
</pre>

Revision as of 22:12, 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