The purpose of this howto is to convert a Devolo dLAN USB Extender device into a standalone internet streaming radios music player.
We'll need the Devolo dLAN USB Extender, an USB audiostick, and a Devolo power line for ethernet connectivity. The audio output of the USB audiostick can be connected to:
Since the dLAN USB Extender isn't powerful enough (only 16 MB RAM) to just install packages in a generic firmware, we must build our own firmware stripped as much as possible without stuff we don't really need.
We won't have any display to show current playing info, but do we really need it? NO. You can use an mpd client to show this info. Or better just use ssmtp to send a mail with our current playing info. I've made a simple script located at:
/etc/streamradio/mailsend.sh
It can be launched either with a HID button press or else with a infrared remote.
We can control our streaming radio with a infrared remote. No special hardware required, just any spare remote (don't you have dozens from broken hardware?), and a simple circuit connected to the microphone input. More details at
lirc audio-alsa
However we'll use an improved circuit. With a low band pass filter to minimize power supply disturbances. Also we will put the 100 nF capacitor before the voltage divider, not after:
One drawback for keeping it simple is the power supply. We can just modify our USB audiostick isolating one minijack contact and bridging it to the +5V usb power supply.
The circuit then can be wired with a minijack cable. We need a little case for the circuit with the IR module receiver, an ADSL microfilter case is perfect for this purpose (you have for sure tons of them from ISPs).
Here the custom firmware
→ openwrt-devolo-stream_radio-AA_mod.tar.gz
The idea is to provide a simple firmware, just plug'n play.
Demo video
We may want to configure some things in our fresh installed firmware. We need to login via telnet, but probably you don't know the address since the Devolo USB extender got it from a DHCP server, but you can guess it. This firmware has a LAN alias with a static IP
192.168.10.10
You can use it for login if you can't manage to use its dynamic IP. Why this rare IP? just for avoiding conflict with regular IPs used commonly by the ISPs routers such as 192.168.1.1.
This is the music player daemon. You shouln't need to configure anything else than the radiostations list. The list is located at
/etc/streamradio/playlists/radiostations.m3u
Look for some interesting radiostations. Choose only mp3 streams.
and add them to radiostations.m3u
The mpd configuration file is at
/etc/mpd.conf
They are used to control mpd.
Additionally can be configured to send mails with useful info.
The configuration file is located at
/etc/triggerhappy/triggers.d/audiostick.conf
Our mail sender. Can be used with a gmail account (pop3 enabled). This account is used to send mails to any other account.
Can be configured editing the file:
/etc/ssmtp/ssmtp.conf
This is the infrared daemon receiver. Has been built with the audio_alsa driver. It uses the microphone input for receiving signals from a remote. As described in lirc audio-alsa. Here we need to configure two files.
Once the system is fully loaded, it executes custom commands. We use it to start lircd, load playlist, play and so on.
/etc/rc.local
There are two scripts for sending mails with useful info at /etc/streamradio/
#!/bin/sh killall -s STOP lircd mpc --format "From: Devolo streaming radio <yoursenderaccount@gmail.com>\nSubject: song info \n\n Theme:\n\n [[%artist% - ]%title%] \n\n\n\n\n\n\n\n Playing from:\n %file% \n %name%"|head -n 15|ssmtp receiver@anymail.com killall -s CONT lircd
#!/bin/sh killall -s STOP lircd my_dhcp=`ifstatus lan |grep -m1 \"address\" |sed -e 's/[^[:digit:]|.]//g'` my_static=`ifstatus lan2 |grep -m1 \"address\" |sed -e 's/[^[:digit:]|.]//g'` echo "From: Devolo streaming radio <yoursenderaccount@gmail.com> Subject: my local IP My dynamic IP is $my_dhcp My static IP is $my_static"|ssmtp receiver@anymail.com killall -s CONT lircd
We need to modify yoursenderaccount@gmail.com and receiver@anymail.com
Here the complete modified build root used to build the custom firmware
→ openwrt-devolo-build_root-mod_AA.tar.gz
Details about mods ←TODO