RTLSDR Scanner Installation



Categories: 

Comments

71

Click to view comments

To install pyrtlsdr library try run the command "setup.py install" from the extracted folder.

Al's picture

Thanks!

Where is the "extracted folder" that you reference? What is it's name?

Al's picture

Hello,

It's the folder where you extracted the pyrtlsdr package to.  If you copy the 'pyrtlsdr-master' folder to your desktop from the archive you can quickly change to it by typing the following in a command prompt window:

cd %userprofile%\Desktop\pyrtlsdr-master

I've managed to install all the files for rtl-sdr and pyrtlsdr onto my Raspberry Pi running Raspbian. Now that I the files installed how do I execute the program and what sort of interface should I expect?

After running rtlsdr_scan_diag.py it informs me that "pyrtlsdr not found" even though I can see it in my file manager. The same goes for Python 2.7. The next line of diag results say "Problems found, please install the libraries for Python 2.7". I can navigate to them in my system.

/usr/lib/python2.7

Al's picture

Is the rtlsdr library in your path, pyrtlsdr will quit if it can't find the files?

Al's picture

Hi Nygel,

Glad you hear you're trying it out on a Pi, should be interesting! The matplotlib component does some heavy maths so it may run a bit slow, I would like to hear if you have any luck with it.

It's a GUI which is built using wxWidgets, you can see a screen capture on this page.

Al

Thank you for useful program.

For those who are running in trouble with pyrtlsdr see github. https://github.com/roger-/pyrtlsdr
"pyrtlsdr can be installed by downloading the source files and running python setup.py install, or using pip and pip install pyrtlsdr."

Al's picture

Thanks silverk, I really need to update this page when I have time.
Al

Hi Al, thanks for your help in sdr rtl based world! I'm running Windows 7 and i've some problem with librtlsdr path. can you explain me how can I change it? For now I have this error: Error loading librtlsdr. Make sure lib...

Al's picture

Hello,

When you extract the rtlsdr library you'll notice there are two directories, x32 and x64.  Ideally you should update your system path to point to the relevant directory.  You can use Rapid Environment Editor to do this.  For example I've extracted the library to 'C:\Program Files\rtlsdr' and as I'm using the 64 bit version my path variable now contains 'C:\Program Files\rtlsdr\x64'.  To do this start RapidEE, click 'Restart as administrator' then select the 'path' variable and press 'Alt-Ins' to add a new directory.  Now press F7 and browse to the x32 or x64 directory, click 'Save' and try the program again.

Alternatively if you extract the contents of the x32 or x64 directory to where you have the scanner installed (although technically it's best to use the first method as the library is designed to be shared by multiple programs).

Hope that helps,

Al

Thanks for your quick response and detailed solution. Now it work perfectly, after a system reboot.
Cheers!

Hi Al, I think I've installed everything correctly and when I try to start from C:\Program Files\RTLSDR Scanner\doc I get the following error "This application has failed to start because libusb-1.0.dll was not found." I'm using Windows XP as well. Thank you

Al's picture

Hi Brad,
Try running it from 'C:\Program Files\RTLSDR Scanner' (without the 'doc' on the end). libusb-1.0.dll should be in this directory.

Hi, I just found this software and decided to try. I have a windows 7 system and I have big problems on understanding whats happening when I tried to install stand-alone installer. First im Command Prompt screen came as "No librtlsdr" then in background it started to install with Python and and I couldnt understand how to run it. After search in program files(x86) I found it but now I run it it gives me error "libgcc_s_dw2-1.dll missing" Is there any way to setup it and run easy guide? (I cant fing even rtlsdr library if its downloaded on my PC or not. (I am running many software for RTL-SDR with no problem)

Al's picture

Thanks for the information, I've found a couple of bugs in the installer and I'll get a fix out in the next few days with any luck.

Al's picture

Hello again,

I think I found the problem; the location of the driver had changed.

I've updated the installer for you.

Al,

got all the dependencies installed and rtlsdr_scan_diag.py gives thumbs up - no problem found but when I run ./rtlsdr_scan.py I get::

traceback (most recent call last):
File "./rtlsdr_scan.py", line 47, in
from cli import Cli
File "/home/pi/rscan/RTLSDR-Scanner-master/src/cli.py", line 36, in
from file import save_plot, export_plot, ScanInfo, File
File "/home/pi/rscan/RTLSDR-Scanner-master/src/file.py", line 32, in
from PIL import Image
ImportError: No module named PIL

added export path to PIL but got same error. Look forward to having this run on the Pi!

Thanks, RT

Al's picture

Hi, which distro are you running?

Trying to make an OS-X Snow Leopard build ... all goes well untill ...

The cmd lines for git hub just don't work. Keep getting: Illegal instruction

Downloaded the source files manually, ... and get this error on setup.py install ...

File "setup.py", line 6
!DOCTYPE html
^
SyntaxError: invalid syntax
--
Help!
Thanks!
--
Michael

Note to self: Must learn to read all of the instructions!

Okay, up and running! So, question, was this OS-X build supposed to establish an assembled application? An Icon on the Desktop. Did not!

Runs great! Learning ... Learning ... Learning ...

Thanks for the challenges! Awesome learning experience!
--
Michael

Al's picture

Hello Michael,

Unfortunately I ran into problems releasing binary builds, I used PyInstaller but it ran into problems when I introduced multiprocessing into the code. The devs are working on it and hopefully it will be introduced into the next full release. When this happens I hope to get the standalone files released again.

I'm glad to hear the installation didn't put you off and I hope you find it useful.

Thanks very much Al,

I really appreciated the learning experience! Great experience!
--
Michael

Didn't work for me under Ubuntu 14.04.1.

First, got:
E: Unable to locate package pyserial

OK, got past that, and other errors, but eventually got

CMake Error at CMakeLists.txt:69 (message):
LibUSB 1.0 required to compile rtl-sdr

and gave up.

(It seems to me installation could be simplified, ideally 'sudo apt-get install rtlsdr-scanner')

Al's picture

Sounds like you need 'libusb-dev-1.0.0', I'll update this page at some point. Take a look at the rtlsdr page as a starting point.

Unfortunately I just don't have time to create and maintain a package, I frequently update the software so once the dependencies are installed it can be updated by running git pull

rtl_scan_diag report:
mbpro:src gosciak$ python rtlsdr_scan_diag.py
rtlsdr_scan_diag
Tests for missing libraries
librtlsdr not found in path
Download from 'http://sdr.osmocom.org/trac/wiki/rtl-sdr'

rtlsdr_scan.py reports:
Traceback (most recent call last):
File "rtlsdr_scan.py", line 37, in
import rtlsdr # @UnusedImport
File "build/bdist.macosx-10.9-intel/egg/rtlsdr/__init__.py", line 18, in
File "build/bdist.macosx-10.9-intel/egg/rtlsdr/librtlsdr.py", line 52, in
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 378, in __getattr__
func = self.__getitem__(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ctypes/__init__.py", line 383, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, rtlsdr_get_device_count): symbol not found

I'm confused because the command:
rtl_fm -f 88900000 -M wbfm -s 200000 -r 48000 - | play -r 48000 -t s16 -L -c 1 -
works just fine.

Which file must be on what path and where do I need to insert it into path. I put /opt/local/lib into my .profile PATH and same problem.

Al's picture

Hi,

Have you tried updating pyrtlsdr, I seem to remember the symbol not found is usually an indication of this.

I just followed your instructions and built librtlsdr just yesterday. But maybe I rooted the directory tree in a different place then you did. Mine went into a "build" directory in my HOME directory. Where did you put yours?

As you can see below you were not totally clear as to where the "build directory is located. All the steps prior to this could be done from any directory.


mkdir build
cd build
git clone https://github.com/roger-/pyrtlsdr.git
cd pyrtlsdr
sudo python setup.py install

Al's picture

The build directory can be more or less anywhere, opening a terminal will default to your home directory which is fine.

The next thing to try is updating macports and it's packages:

sudo port -v selfupdate
sudo port upgrade outdated

I'm running into the same issue. Has anyone found a solution to this? I've installed this package several times both manually and with macports and I still get "AttributeError: dlsym(RTLD_DEFAULT, rtlsdr_get_device_count): symbol not found" when I try to run rtlsdr_scan.py and I also get "librtlsdr not found in path
Download from 'http://sdr.osmocom.org/trac/wiki/rtl-sdr'" when I run the rtlsdr_scan_diag script

Al's picture

I've updated rtlsdr_scan_diag.py to show the location of the driver, just in case an alternative one is being used.

On my 10.8 machine MacPorts installed it at /opt/local/lib/librtlsdr.dylib if that's of any help.

Hello Allan,
Thank you very much for your outstanding program.
I managed it, to install on Ubuntu 14.04 (32 Bit), Mac OS Mavericks 10.9.5, Win7. This is documented on
http://www.rudiswiki.de/wiki9/AfuSDR-Rx#Spektrum_Analyse
(in German, please use Google Translate)

The only improvement I found, was the window height at start up, it is too small.
I changed in file main_window.py line 176
From: self.SetClientSize((toolbarSize[0] + 10, displaySize[1] / 2))
To: self.SetClientSize((toolbarSize[0] + 10, displaySize[1] * 4 / 7))

Regards, Rudolf DL5FA

Al's picture

Hello Rudolf,

Thanks very much, glad you like it and I'll add you're link to a post soon.

The start up size is a bit of a trade-off as it really depends on the user's screen size. I'm going to fiddle with it soon so thanks for the code.

Hi Al,
I installed your software (even if it wasn't easy) and it work very well.
I don't know how to use the measurement boxes, because they are always blank.
I didn't find explanation on manual.
Another question: what about SDR# plugin when click on plot?
Thanks in advance..

Al's picture

Sorry about that, I just haven't had time to update the manual with some of the new features, but I hope to do that soon.

To use the measurement boxes select a part of the spectrum by dragging and area with the middle mouse button.

Hello Al,

In the check for updates menu I saw that there a new version of the program, but I don't know how to update it.
Do I have to reinstall the whole Python and RTLSDR SCANNER?

Antoine

Al's picture

Hello,
If you used the installer just run it again, it should run in update mode rather than 'Full Installation'.

Thanks for this fantastic piece of Python, I had been struggling to find a nice how-to live in a world without GRQX / SDR# (while they are both great).

Currently have a USB RTLSDR dongle attached to my Ubuntu TV server in the garage, doing frequency scans on Ubuntu 14.04.1 on my laptop outside.

Install was simple on a fresh Ubuntu:

sudo apt-get install libusb-1.0*
sudo easy_install pillow

git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build/
cmake ../
make
sudo make install

(no reboot)

cd ../../
git clone https://github.com/EarToEarOak/RTLSDR-Scanner.git
sudo apt-get install python python-wxgtk2.8 python-matplotlib python-numpy python-imaging

cd RTLSDR-Scanner/src/

Check dependencies:
python ./rtlsdr_scan_diag.py

If everything passes:
python ./rtlsdr_scan.py

Enter in a hostname, frequency range (I tested a local FM radio station +/- 2Mhz) and away you go.

I'm building a Pi2B portable SDR unit with some decoder functionality, this scanner fits perfectly.
For anyone else interested, one of the other pieces is this lovely gnuwaterfall python GIT: https://github.com/simeonmiteff/gnuwaterfall/

Al, my only critique, the start button in the bottom left looks like a drop down list but clicking it only responds as a button, am I missing a drop down list here?

Al's picture

Thanks very much, glad it's of some use.

The button should be a drop-down (by clicking on the arrow), which allows you to select scan modes also found in the menu. If you still can't get it to work I'd like to know so I can try and fix it.

pyserial for raspbian doesn't exist. Raspbian suggests you install python-serial. However, using this package i get the error: ImportError: No module named tools.list_ports

Any ideas?

Al's picture

Try uninstalling the Raspbain pyserial package and run:

pip install pyserial

To get an up to date version with the tools package.

Im getting:
[ 5%] Built target convenience_static
[ 35%] Built target rtlsdr_shared
[ 40%] Built target rtl_adsb
[ 45%] Built target rtl_eeprom
[ 50%] Built target rtl_fm
[ 55%] Built target rtl_power
[ 60%] Built target rtl_sdr
[ 65%] Building C object src/CMakeFiles/rtl_tcp.dir/rtl_tcp.c.o
/home/davinci/rtl-sdr/src/rtl_tcp.c:28:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
src/CMakeFiles/rtl_tcp.dir/build.make:54: recipe for target 'src/CMakeFiles/rtl_tcp.dir/rtl_tcp.c.o' failed
make[2]: *** [src/CMakeFiles/rtl_tcp.dir/rtl_tcp.c.o] Error 1
CMakeFiles/Makefile2:355: recipe for target 'src/CMakeFiles/rtl_tcp.dir/all' failed
make[1]: *** [src/CMakeFiles/rtl_tcp.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2

Al's picture

If you are running Ubuntu try installing the 'build-essential' package.

I'll update this page to include that step

After the installer downloads and installs Python, the install fails with this message:

Cannot find Python - Aborting<\code>

The line preceding this is "Remove folder: C\Users\Kent\AppData\Local\Temp
rtl-sdr-release\ <\code>

The install then hangs until I click the "Cancel" button.

I've tried using the update option with the same results.

Kent

Al's picture

I haven't managed to replicate this error. It might be worth downloading Python and running the installer again.

Is this site still maintained?
My previous comments did not appear.

Al's picture

Hi John,

The site is still maintained, you can find your comment here.

Hi again Al
I was trying with 2.5-inch earlier and you made a Full Screen function key (F11).
Now the official Raspberry display is here and after installation today (ver 5 Nov 23:19:29) I have a problem
with the window size. It looks like the window witdh is1000 pixels but the screen is only 800 so It goes outside
Of the screen. I can see up to the first digit in Dwell, everything further right is lost.
I can move the whole window to the left but then the left part is not visible.
I am using Raspbian 2015-09-24 on Pi2.
/ regards Tommy

Al's picture

Hello Tommy,

I'm not really sure what to do about this, I've just tried adding a scrollbar to the panel but it caused a too many problems.

I'll keep on it and see where I get.

Pages

Click to add a comment