FM Radio receiver based upon RTL-SDR as pvr addon for KODI
Add-on to receive FM-Radio with RDS on very cheap USB DVB-T stick. Operation is complete performed inside CPU which allow a lot of features, but also requires a lot of CPU performance.
Currently it is only on linux and Raspberry (Kodi 15.2 Isengard) supported and need help from Developers on Windows to add RTL-SDR lib way there.
It use a from RTL-SDR supported receiver with Realtek RTL2832U as source (see http://sdr.osmocom.org/trac/wiki/rtl-sdr) to make FM radio signal receive and send the audio stream in float format to KODI and send also RDS signal translated to UECP in it.
Binaries
Installation on Raspbian and OSMC with Kodi 15.2
(need console access)
pvr.rtl.radiofm for Raspberry PI - Kodi 15.2 - Build from 20. Dec. 2015, 17:21 PM
(tested OK, only high CPU usage)
pvr.rtl.radiofm for Raspberry PI - Kodi 16.0 - Build from 20. Dec. 2015, 17:22 PM
(Not tested!!!)
Download and install add-on on home folder:
cd $HOME/.kodi/addons
wget http://esmasol.de/data/documents/pvr.rtl.radiofm_kodi-15.2_raspberry_2015-12-08_02-06.zip
unzip pvr.rtl.radiofm_kodi-15.2_raspberry_2015-12-08_02-06.zip
rm pvr.rtl.radiofm_kodi-15.2_raspberry_2015-12-08_02-06.zip
Prevent modprobe as DVB-T receiver:
sudo bash -c "echo \"blacklist dvb_usb_rtl28xxu\" > /etc/modprobe.d/librtlsdr-blacklist.conf"
Note: If stick was connected then becomes it one time needed to disconnect it.
Allow access to normal users:
wget https://raw.githubusercontent.com/AlwinEsch/pvr.rtl.radiofm/Isengard/lib/rtl-sdr/rtl-sdr.rules
sudo cp ./rtl-sdr.rules /etc/udev/rules.d/99-librtlsdr.rules
sudo invoke-rc.d udev reload
rm ./rtl-sdr.rules
One way used from me tobecome console access is the use of "SSH" from another computer:
On Raspbian:
- ssh [IP_OF_THEM] -l pi
- Confirm fingerprint if the first time.
- Enter your Raspbian password.
On OSMC:
- ssh [IP_OF_THEM] -l osmc
- Confirm fingerprint if the first time.
- Enter "osmc" or your own if you have changed before.
Then are the above console steps possible.
Note: Have no Windows here but for them is PuTTY available to become access.
Build add-on myself
Note: Make sure kodi's add-on depends are present libusb-1.0, libkodiplatform, libplatform and tinyxml):
git clone https://github.com/AlwinEsch/pvr.rtl.radiofm
mkdir ./pvr.rtl.radiofm/build
cd ./pvr.rtl.radiofm/build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
sudo make install
Conflicts with DVB-T kernel modules provided by the Linux kernel
Typical error of module conflict:
Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.
usb_claim_interface error -6
Failed to open rtlsdr device #0
You may decide to blacklist this kernel module by doing (as root):
echo "blacklist dvb_usb_rtl28xxu" > \
/etc/modprobe.d/librtlsdr-blacklist.conf
Then unplug/plug the USB stick.
Permissions
If you have permissions issues please install the example udev rules from
librtlsdr-0.5.2 folder (as root):
cp ./rtl-sdr.rules /etc/udev/rules.d/99-librtlsdr.rules
invoke-rc.d udev reload
Development code:
https://github.com/AlwinEsch/pvr.rtl.radiofm
Current Branches:
- master: Development branch
- Isengard: Fixed add-on source for Kodi 15.2, support also Raspberry PI