Thank you for your donation!


Instruction Guide Play DAB+ Radio in Moode
#1
Hi guys

I want you tell you my solution to hear DAB+ radio on a Raspberry Pi and Moode.
It works but in the end there also much work.

Here is my step-by-step guide.

Hardware 
Firstly you need a Raspberry Pi with Moode. I use a Pi3. All faster Pi should work but older Pis should be tested if it works. I think a Pi1 wouldn't work.
Also you need a RTL-SDR USB Stick. I use this one.... Nooelec NESDR SMArt v4
Please forget you need a antenna for the stick.

Connect the RTL stick to your Pi, connect a antenna on the RTL stick and start up the Pi.

Install RTL-SDR drivers
Code:
cd /home/pi
sudo apt-get install -y  git cmake pkg-config libusb-1.0-0-dev
git clone git://git.osmocom.org/rtl-sdr.git

Code:
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
sudo ldconfig

To prevent some driver problems edit a blacklist for the old drivers.
Code:
sudo nano /etc/modprobe.d/blacklist-rtl.conf

Insert this in the editor....
Code:
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Save it with ctrl+o and exit the editor.
Now should reboot the Pi and test the driver.
Code:
sudo reboot
rtl_test -t

You should see something like that.
Code:
Found 1 device(s):
 0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
[R82XX] PLL not locked!
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
pi@moode:~ $


Install DAB+ software

To run DAB on the Pi I decidet to use welle.io. More likely a part of this project.... welle.io-CLI

Code:
sudo apt-get update
sudo apt install libfaad-dev libmpg123-dev libmpg123-dev libfftw3-dev librtlsdr-dev libusb-1.0-0-dev libpulse-dev libsoapysdr-dev libairspy-dev libmp3lame-dev
cd /usr/src/
sudo git clone https://github.com/AlbrechtL/welle.io
cd welle.io
sudo git checkout v2.0-beta1
sudo mkdir build
cd build
sudo cmake .. -DRTLSDR=1 -DBUILD_WELLE_IO=0
sudo make

Using DAB+ Webplayer

Now you need to know the used DAB Channels in your region.
Do you don't know it, take a look on fmscan.org. Here you get all infos about channels, ensembles, services ect.

Code:
/usr/src/welle.io/build/welle-cli -w 7979 -c <your channel> -C 2 -P -u

At <your channel> use your deside channel. 

In my case I take "DR Deutschland" 5C. 
Code:
sudo /usr/src/welle.io/build/welle-cli -w 7979 -c 5C -C 2 -P -u

Now you can play DAB+ on your PC by using a browser. 
All you have to do is enter the following address in the browser.

<The_Ip_adress_of_your_moodeplayer>: 7979

Here you can see all information about the selected channel. The SiD (service ID) of the station that is to be played in Moode is important for the further procedure.

For example, we will play Radio ENERGY. This runs in Germany in channel 5C (we have already selected it) and the SiD 0x1a45.

In order to play this station in Moode we create a PLS file with the following content.
Code:
[playlist]
numberofentries=1
File1=http://localhost:7979/mp3/0x1a45
Title1=DAB+ Radio: ENERGY
Length1=-1
version=2

Start your playlist in Moode.... congratulations your are hearing DAB+ in Moode.  Wink


But now there are some bad news.
Unfortunately it is only possible to decode one channel. There are several ways to change the channel.
1. You shut down the server and start it with another channel
2. You send an HTTP POST request to the server.
3. It is said to still be possible via JSON. I have to make myself smart here.

Unfortunately, this is not possible directly from Moode.

Despite all of this, I wish you lots of fun with it.  Wink
Reply
#2
This is brilliant! Well done. I lack access to a DAB signal and yeah we have online radio but always nice to see traditional local signals in use.

I believe there is a project that finally cracked HDRadio in the US, for those of us left out. Much of the world uses DAB/+ DRM and such. I wish we could switchover here.
--

GitHub, Spotify and Resonate : @duracell80

My jam: ambient, lush vocals, synths and acoustic guitars
Reply
#3
Hey guys!

Now I have a solution for othe channel switching problem.

I have written a skript to switch automaticly the channels.

download it here:
https://github.com/Peziman/Moode-DAB-ADDON

How to work....

Create some Webradio station in Moode.

URL: http://localhost:7979/mp3/<your_sID_from your _DAB+_program>
Name: DAB+ - <the_name_of_the_program> - <the_channel_of_the_DAB+_programm>

For the example above it must look like this.

URL: http://localhost:7979/mp3/0x1a45
Name: DAB+ - ENERGY - C5

It's important that the Name Starts with DAB+ and ends with the Channel of the DAB+ program.

Start welle.io and the DABclient.py

Now you can switch the DAB+ programs automaticly.

Some hints:
- DAB programs on the same channels switch very fast
- DAB programs on different channels take a few seconds to start
- if you start welle.io and the DABclient script at autostart, it need to sleep 60 seconds before you start the DABclient script.
Reply


Forum Jump: