Author Topic: Raspberry Pi with FM tuner  (Read 30430 times)

Offline Palermo

  • Newbie
  • *
  • Posts: 6
Raspberry Pi with FM tuner
« on: March 05, 2014, 12:11:13 PM »
Hi,
I`m trying to set up a raspberry pi with a USB dongle (DVB-T+DAB+FM) and stream it to internet.
May be Live ATC will accept the steam. It s a project i`m wish to to a long time already. And that time has come  :-D
The goal was to stream the local airport here in the Netherlands, but without running a PC or laptop all the time.
And the RBPI is the perfect thing to do it with. I have installed the Raspbian OS inc. the dongle. For streaming it to the internet
i`m using Icast2 witch is aso working. It seems it is all in working order but there is one thing i cannot find a solution for.
And i hope one of you can help me.

I if set the frequency to listed out on 118.7 (Tower) with the following command:
Code: [Select]
sudo rtl_fm -M wbfm -f 118.7M -r 22000 -t 40 | lame -r -s 22.0 -m m - - | ezstream -c ezstream.xmlIt is listening on a differed channel:
Code: [Select]
Tuned to 118971000 Hz
On the internet i found an article that explained the reason of this. Something to do with the crystal fine tuner.
They als mention that you make an correction on this with the -P in the execute command.
I need the program "sdrsharp" to find out the correction for the dongle.
I`m trying for 2 days how to do it but i`m having no luck yet.

Does one of you know the procedure and is willing to guide me through this?
If it all works than i`m gonna make a "building from scratch" manual as clearly as possible.

Thanks in advanced.
Greetings
Palermo



Offline Marty Becker

  • Full Member
  • ***
  • Posts: 208
Re: Raspberry Pi with FM tuner
« Reply #1 on: March 05, 2014, 12:32:31 PM »
Have you seen George's article regarding streaming: http://www.milaircomms.com/raspberry_pi_dongle_streaming.html


Offline Palermo

  • Newbie
  • *
  • Posts: 6
Re: Raspberry Pi with FM tuner
« Reply #2 on: March 05, 2014, 01:29:26 PM »
Hi Flyingnut,
I`f have been folioing his instructions from the beginning.
But it has not a clear instruction how to fond the correction amount.

Thx in advanced.

Palermo

Offline Marty Becker

  • Full Member
  • ***
  • Posts: 208
Re: Raspberry Pi with FM tuner
« Reply #3 on: March 05, 2014, 01:49:21 PM »
No problem.  I am getting a Raspberry Pi delivered today, so I will be going through George's setup article tonight.  I have to wait for a few more days before I get my USB doggle to try his audio or ADS-B articles.

Offline Palermo

  • Newbie
  • *
  • Posts: 6
Re: Raspberry Pi with FM tuner
« Reply #4 on: March 05, 2014, 02:53:25 PM »
Ok thats great, Thanks
I followed his instructions to the letter and it all works perfectly. Its a very good tuturial.
I`m sure it wil work.

Have fun building. :-)

Offline av8tor172

  • Full Member
  • ***
  • Posts: 115
    • Military Air Communication Frequenices, Live MilAir Streaming, Recorded MilAir Comms.
Re: Raspberry Pi with FM tuner
« Reply #5 on: March 05, 2014, 05:57:33 PM »
Getting the correction factor correct is a bit tricky for the Raspberry. 

First you need to get your Dongle working on a Windows PC that has the correct driver installed and working with the SDRSharp software.

Once you're to that point, start SDRSharp, connect to the dongle.  Then I tune to a NOAA weather radio frequency, I chose a NOAA weather freq. just because its always broadcasting.  Zoom in on the scope so you can see just how much off of center you're dongle is. 

Next on SDRSharp hit the 'Configure' button.  At the bottom you can adjust the correction factor while watching the scope, Get it so you're receiving on the exact center of the signal you're receiving.  Take note of the correction factor in PPM (Parts Per Million).  What ever that number is, use that for the -P value when starting RTL_FM on your Raspberry.

For me that has worked great for receiving FM signals.  However my AM signals still sound bad, I haven't found the correct settings for the rest of the RTL_FM options yet....

George
www.MilAirComms.com

Offline Palermo

  • Newbie
  • *
  • Posts: 6
Re: Raspberry Pi with FM tuner
« Reply #6 on: March 06, 2014, 10:37:17 AM »
Hi Flyingnut
So you have it working now. Thats Great.
I have followed you explanation on the letter and i`m getting it done.
Ik have the correction on 50 So the the command is now:
Code: [Select]
sudo rtl_fm -M wbfm -f 118.7M -r 22000 -p 50 | lame -r -s 22.0 -m m - - | ezstream -c ezstream.xmlWhen i listen in the on the streaming i can hear the tower of the airport.
But hear a lot of static noise.
Its online now: http://82.72.46.134:8000
do you hear the static as swell on your system?

Offline InterpreDemon

  • Hero Member
  • *****
  • Posts: 514
Re: Raspberry Pi with FM tuner
« Reply #7 on: March 06, 2014, 01:39:09 PM »
Sounds to me like 1) no squelch enabled, and possibly 2) bandwidth and/or RF gain too high. Need AM mode, 25kHz BW.

Offline Palermo

  • Newbie
  • *
  • Posts: 6
Re: Raspberry Pi with FM tuner
« Reply #8 on: March 06, 2014, 02:45:44 PM »
hi InterpreDemon,
thx for your suggestions

i`f been playing the hole evening now  :roll:
In the command i`f changed the following:
the -l 2 an changed the wbfm to am
as you suggested.
Tomorrow the airport wil be open and than i wil hear the sound.
i hope it will sound better. The noise is still there but not so hard anymore.

Code: [Select]
sudo rtl_fm -M am -f 118.7M -r 22000 -p 50 -l 2 | lame -r -s 22.0 -m m - - | ezstream -c ezstream.xml
Is there a commando to let the scanning and streaming going and exits the command prompt?

Greets
Palermo

Offline Palermo

  • Newbie
  • *
  • Posts: 6
Re: Raspberry Pi with FM tuner
« Reply #9 on: March 06, 2014, 03:07:28 PM »
Is there a commando to let the scanning and streaming going and exits the command prompt?
If you append a single ampersand ('&') at the end of the command, it should fork the process into the background.

Thank you. Work as a dream :-)

Now hoping the sound is better tomorrow