Using the Raspberry Pi and a RTL2832U Stick for SDR over Ethernet

Status
Not open for further replies.

KS4JU

Member
Joined
Jun 9, 2011
Messages
63
Well, right now we can't use the RTL2832U SDR stick and Raspberry Pi to make a cheap self contained SDR receiver, but we can make half of one. The Raspberry Pi will allow you to install the RTL drivers which also contains a tcp server. It turns out that you can plug the RTL2832U stick directly into the Pi and send the SDR data over ethernet to a client computer running SDR Sharp. So in essence you get a cheap ethernet enabled SDR receiver for about $60. The system also works well when plugged into a wireless N bridge. It's kind of cool to run SDR Sharp on your laptop while the Raspberry and RTL2832U remains near the antenna point. If you are interested in building this project you can find the instructions at

Raspberry Pi as Remote Server for RTL2832u SDR | Ham Radio Science
 

Markb

Member
Premium Subscriber
Joined
Feb 21, 2002
Messages
1,360
Location
Planet Earth
That sounds pretty sweet! That was what I was shooting for in the thread I started a few weeks ago. Didn't think about running it over Ethernet. Imagine setting up one of these on a mountaintop!
 

Markb

Member
Premium Subscriber
Joined
Feb 21, 2002
Messages
1,360
Location
Planet Earth
Sorry about the dupe post!!!!

That sounds very cool! That was kinda what I was shooting for in the thread I started a few weeks ago. I was originally thinking along the lines of publishing a feed thru RR. Didn't think about running it over Ethernet.
My parents' house is about 1500' overlooking the Los Angeles/Orange County area and it would be great to build a self-contained unit to run from there.
Another thought I had was to build one into an ammo can or Pelican box. Add a solar panel and battery like you mentioned and you have a portable unit, just need network access.
Gonna go order me some Pi!!!!!
 
Last edited:

Pape

Member
Premium Subscriber
Joined
Feb 20, 2011
Messages
249
Location
Quebec
do you guys have instability issue with it ?

got a lot of crash:

to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).
comm recv socket error
Signal caught, exiting!
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_write_reg failed with -4
bye!
 

KS4JU

Member
Joined
Jun 9, 2011
Messages
63
Be sure that you are using the latest Raspian Wheezy operating system on your Pi. It might be a good idea to enable the new turbo mode when you first install it. This option will be available from a menu when you first boot the new installation. Probably best not to have any other software running while you are running the RTL server. This project seems to work reasonably well most of the time.
 

Pape

Member
Premium Subscriber
Joined
Feb 20, 2011
Messages
249
Location
Quebec
I did enable turbo mode, just did not see it kick in yet.

I do think my image is up to date but will take a look.
I guess linux did not change at all in the last 10 years always have to fight to get it to work.

Thanks
 

Pape

Member
Premium Subscriber
Joined
Feb 20, 2011
Messages
249
Location
Quebec
redid the entire thing and still same issue, is there other than SDR# tcp client out there i can use to test ?
I want to know if it my client or my server the issue
 
Joined
Mar 21, 2010
Messages
237
Location
Bellingham Washington
sudo apt-get install git
sudo apt-get install cmake

Worked fine but

sudo apt-get install libusb-1.0-0.dev
Returns:
E: Invalid operation install libusb-1.0-0.dev

sudo apt-get install build-essential
Returns:
E: Invalid operation install build-essential


In reading through the HamRadioSciece site the first step says:

1. Install the latest Debian release on your Pi and update it.

Is this the same as Rasbian or do I need to install actual Debian?
 
Last edited:

KS4JU

Member
Joined
Jun 9, 2011
Messages
63
Most likely it means that the installation package can't be found. Assuming you are running Debian Wheezy and the Pi is connected to the internet try the following:

sudo apt-get update
sudo apt-get upgrade

Then try the install again. Unless something has changed in the Debian repositories it should work. If not maybe someone here with much better Linux chops can chime in............
 
Joined
Mar 21, 2010
Messages
237
Location
Bellingham Washington
Did a little Googleing and it would seem my package cache was dirty:confused:

Anyway I found a list of commands to run from another forum where someone was having the same problem with installing build-essential

Open a Terminal and type:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install build-essential
sudo apt-get clean
sudo apt-get autoremove

This got everything straightened out and I was able to install build-essential and lib-usb
 
Joined
Mar 21, 2010
Messages
237
Location
Bellingham Washington
Now I can not get past step 4

4. Before this will work you will need to locate your RTL directory using the file manger where the drivers where downloaded and copy the rules file into the etc/udev/rules.d directory.

What is the rules file and where is it found?
 

Pape

Member
Premium Subscriber
Joined
Feb 20, 2011
Messages
249
Location
Quebec
Should be in rtl-sdr, if you followed the build procedure be doing a cd .. You should find yourself in the proper folder
 
Joined
Mar 21, 2010
Messages
237
Location
Bellingham Washington
Should be in rtl-sdr, if you followed the build procedure be doing a cd .. You should find yourself in the proper folder

LOL:confused: There is is! I must have looked at this directory a million times last night.

Now I feel dumb:(

Now I feel even dumber, after all this apparently it rtl-sdr only works on the rtl2832u sticks with the E4000 chip not the newer R820T chip.

As I get a ton of errors running rtl-sdt having to do with not being able find the E4000 chip.
 
Last edited:

KS4JU

Member
Joined
Jun 9, 2011
Messages
63
Actually the RTL drivers have been updated to work with the R820T sticks. If the stick can't be found it is usually a problem with the rules file. First of all check that you copied the rules file provided in the RTL distribution to the etc/udev/rules.d directory on the Pi. You might want to open the rules file with a text editor and see if the R820T exists in the rules file.
 
Joined
Mar 21, 2010
Messages
237
Location
Bellingham Washington
Here is the output I get trying to connect to the PI running rtl_tcp

Code:
pi@raspberrypi ~ $ rtl_tcp -a 192.168.1.127
Found 1 device(s).
Found Rafael Micro R820T tuner
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
Using ezcap USB 2.0 DVB-T/DAB/FM dongle
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
WARNING: Failed to set sample rate.
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
WARNING: Failed to set center freq.
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_demod_write_reg failed with -1
rtlsdr_demod_read_reg failed with -1
rtlsdr_write_reg failed with -1
rtlsdr_write_reg failed with -1
listening...
Use the device argument 'rtl_tcp=192.168.1.127:1234' in OsmoSDR (gr-osmosdr) sou rce
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).
client accepted!
set gain mode 1
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
set sample rate 2048000
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
set freq 100000000
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
set freq correction 0
worker cond timeout
Signal caught, exiting!
comm recv bye
Signal caught, exiting!
all threads dead..
listening...
Use the device argument 'rtl_tcp=192.168.1.127:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).
client accepted!
all threads dead..
listening...
Use the device argument 'rtl_tcp=192.168.1.127:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).
comm recv socket error
Signal caught, exiting!
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_demod_write_reg failed with -4
rtlsdr_demod_read_reg failed with -4
rtlsdr_write_reg failed with -4
bye!
pi@raspberrypi ~ $
I swear I saw an error before about not being able to fine the E4000:confused:
 

Pape

Member
Premium Subscriber
Joined
Feb 20, 2011
Messages
249
Location
Quebec
Yup got something similar when I was running the PI on 4 AA.
Switched to 1 amp cell phone charger fixed that but still it crash when I connect :mad:
 

Pape

Member
Premium Subscriber
Joined
Feb 20, 2011
Messages
249
Location
Quebec
this is weird, can you add a usb power hub and connect the rlt to it ?
Some devices require more power than what the PI usb can deliver, don't think this is the case but nothing to lose neither
 
Status
Not open for further replies.
Top