NOTE! This site uses cookies and similar technologies.

If you not change browser settings, you agree to it.

I understand

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: FM radio receiver for KODI for the Raspberry Pi 1

FM radio receiver for KODI for the Raspberry Pi 1 2 years 8 months ago #1

  • AlbrechtL
  • AlbrechtL's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 5
  • Karma: 3
RTL SDR FM streamer is a small tool to stream FM radio by using a DVB-T dongle to KODI on your Raspberry PI 1. The DVB-T dongle has to be based on the Realtek RTL2832U. See sdr.osmocom.org/trac/wiki/rtl-sdr for more RTL SDR details.

The program "rtl_fm_streamer" uses the DVB-T dongle only as an ADC (simply spoken). All the demodulation is done in software and thus it is creating a CPU load of 57 % on the Raspberry Pi 1.

Installation:
  1. Download "service.multimedia.rtl_fm_streamer-0.0.6.zip" from the attachment
  2. Upload this file to your OpenELEC device
  3. Install the add-on. Follow this description: http://kodi.wiki/view/HOW-TO:Install_add-ons_from_zip_files
  4. Create a STRM-file with the URL"http://IP:port/FrequencyInHerz" (default port is 2346) in your music folder
    e.g. FM_93_2.strm
    http://localhost:2346/93200000
  5. Only working at a Raspberry Pi 2: For stereo sound create a STRM-file with the URL"http://IP:port/FrequencyInHerz/1" (default port is 2346) in your music folder
    e.g. FM_93_2_stereo.strm
    http://localhost:2346/93200000/1
  6. Restart your Raspberry Pi and play the STRM-File e.g. FM_93_2.strm

Known KODI Addons
Supported platforms
  • Raspberry Pi 1
  • Raspberry Pi 2

Troubleshooting:
If it is not working test "rtl_fm_streamer" by starting by hand. The output should look like the following.
RPi:/ # killall rtl_fm_streamer 
RPi:/ # rtl_fm_streamer 
RTL SDR FM Streamer Version 0.0.6
Found 1 device(s):
  0:  astrometadvbt2, dvbt2, SN: 

Using device 0: Astrometa DVB-T/DVB-T2
Found Rafael Micro R828D tuner
Tuner gain set to automatic.
Init FIR hamming, size: 90 sample_rate: 240000
Tuned to 100496000 Hz.
Oversampling input by: 8x.
Oversampling output by: 1x.
Buffer size: 4.27ms
Sampling at 1920000 S/s.
Output at 240000 Hz.
Waiting for connection...

Tested with OpenELEC 6.0 Beta 4

You can find the source code here:
github.com/AlbrechtL/rtl_fm_streamer

Latest binary add-on for the Raspberry Pi 1 and 2

File Attachment:

File Name: service.mu....0.6.zip
File Size:117 KB


Have fun!
Last Edit: 2 years 2 months ago by AlbrechtL.
The administrator has disabled public write access.
The following user(s) said Thank You: f0rd.prefect, KonradSchumann, grich

FM radio receiver for KODI for the Raspberry Pi 1 2 years 8 months ago #2

  • lrusak
  • lrusak's Avatar
Cool stuff!
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 8 months ago #3

  • OnkelDead
  • OnkelDead's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi,

very good work, beore I was goolgin days to get radio working in OSMC.

The README says this in only mono. Is there a plan to change his ?

onkel
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 8 months ago #4

  • AlbrechtL
  • AlbrechtL's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 5
  • Karma: 3
Recently I added stereo support! Unfortunately the Raspberry Pi 1 is to slow to work with stereo. But a Raspberry Pi 2 is powerful enough to demodulate the stereo signal.
To use stereo use the URL: "http://IP:port/FrequencyInHerz/1"
e.g. "http://localhost:2346/93200000/1"
To use mono use the URL "http://IP:port/FrequencyInHerz" or "http://IP:port/FrequencyInHerz/0"
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: OnkelDead

FM radio receiver for KODI for the Raspberry Pi 1 2 years 7 months ago #5

  • OnkelDead
  • OnkelDead's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Yeah !!

I do love your work.

And my other issue was also solved.
The version 0.0.1 did took a long time to switch between channels.
But this is realy aceptable.

thankful greets, onkel
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 7 months ago #6

  • OnkelDead
  • OnkelDead's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi again,

The new version plays stereo well, but mostly it stops after 1-3 sec. replying with:
Send OK
Waiting for connection...

If i immediatly reselect my URL file in OSMC (Kodi) it continous playing uninterrupted.
I did verify that version 0.0.1 didn't had this issue.

The device I use is connected to a PI2 running OSMC, and lsusb shows:
Bus 001 Device 009: ID 0bda:2832 Realtek Semiconductor Corp. RTL2832U DVB-T

If I should add additional logging, please let me know.

greet
onkel
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 7 months ago #7

  • OnkelDead
  • OnkelDead's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
Hi,

one more info:
playing with a VLC do not shows this behavior

greets
onkel
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 7 months ago #8

  • AlbrechtL
  • AlbrechtL's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 5
  • Karma: 3
Nice to hear that "rtl_fm_streamer" is also working on OSMC.

I didn't see this problem on my RPi 1 with OpenELEC 5.0.8. Do you see something like the following message inside your logs after your playing stopped?
Connected
Start streaming on frequency: 97600000 Hz [stereo: 0]
Tuned to 98080000 Hz.
Mono demodulation
Waiting for connection...
Error sending stream: "Connection reset by peer". Close the connection!

I also attached a new version 0.0.5 which has a much better FM mono and stereo demodulation (thanks to Miroslav).
Attachments:
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 5 months ago #9

  • IamDan
  • IamDan's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
How would I go about getting this working on the generic version of OPENELEC? Is DAB+ possible?
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 5 months ago #10

  • startreksteve
  • startreksteve's Avatar
  • Offline
  • Junior Boarder
  • Posts: 28
  • Thank you received: 1
  • Karma: 1
Can the Radio source be recorded with this device? I used to use a Gemtek USB FM radio to record Radio shows on a Timer on Windows years ago...
Last Edit: 2 years 5 months ago by startreksteve.
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 3 months ago #11

I am now working on an OpenElec Addon where u can hear Radio! If anyone want to call me : skype:konrad2ktwenty5
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 3 months ago #12

  • Compostbak
  • Compostbak's Avatar
  • Offline
  • Junior Boarder
  • Posts: 51
  • Karma: 1
Any news on the progress??
Foxcon A3500
HD 2,5 0.5 Tb
4 GiG mem
Harmony remote
samsung UE40D6500
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 2 months ago #13

  • AlbrechtL
  • AlbrechtL's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 5
  • Karma: 3
Hi everyone,

Here are some updates:
Konrad wrote a KODI plug-in for rtl_fm_streamer: openelec.tv/forum/126-3rd-party/77724-rtl-fm-streamer-interface-for-raspberry-pi
Thanks to Konrad!

Some open questions:
Is DAB+ possible?
At the moment DAB or DAB+ is not working. To decode DAB in software a lot of CPU power is necessary. The Raspberry Pi 1 is not powerful enough and for the Raspberry Pi 2 a lot of work has to be done. To decode DAB the software SDR-J is used but this software uses only one CPU core and one core is not powerful enough. At the moment only the decoding of the channel names is working but no audio. To get audio working it is necessary to use all four cores of a RaPi2 but I don't know if the total CPU power is sufficient to decode it.

How would I go about getting this working on the generic version of OPENELEC?
Yes, you can run rtl_fm_streamer on a PC. Just compile it!
You can find the code here: github.com/AlbrechtL/rtl_fm_streamer
If anyone would like to build a DEB or RPM package help is welcome anytime!

Can the radio source be recorded with this device?
Yes. You can use any web browser to record the WAV-date. Just type the URL into your browser and download the WAV-file.
e.g. for stereo 93.2 MHz: http://localhost:2346/93200000/1
mono: "http://IP:port/FrequencyInHerz"
mono: "http://IP:port/FrequencyInHerz/0"
stereo: "http://IP:port/FrequencyInHerz/1"
You can also use tools like wget, VLC or mencoder to record the audio. In any case the file format is WAV.
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 1 month ago #14

ZOTAC ZBOX nano AQ01 (AMD A4-5000 - Kabini with Radeon HD 8330)
The administrator has disabled public write access.

FM radio receiver for KODI for the Raspberry Pi 1 2 years 1 month ago #15

  • AlbrechtL
  • AlbrechtL's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 5
  • Karma: 3
Basically yes. The plugin has also RDS functionality which is currently missing in "rtl_fm_streamer". But all additional features like RDS needs CPU power. I optimized "rtl_fm_streamer" to run on a Raspberry Pi.
There are also a few software design differences. "rtl_fm_streamer" is a standalone program which you can use without KODI. KODI is just a client for it. You can also use mplayer, VLC or any other player which supports HTTP WAV streaming.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2