Everybody is building some kind of multimedia stuff with a Raspberry Pi these days. I’m no exception as I also have one connected to my (really shitty Philips) TV, running RaspBMC. But that’s not what this post is about, and it’s also pretty lame, since there isn’t really that much to it.
Objective
I also wanted something to connect to my stereo to play music, but I didn’t want to use a Pi for that for these reasons:
- It’s rather wasteful. The Pi including a power supply and an SD-Card costs about 50,-€ and I wouldn’t even use most of the hardware it comes with.
- The SD-Card will break eventually. Depending on how much logging I would forget/neglect to disable, rather sooner than later.
- It doesn’t have wifi and I have no ethernet in the dining room where the stereo sits.
- The audio output of the Pi sucks. Plain and simple. It’s about as far from HiFi as Fox News is from being a news network. So I’d have to use an external DAC to get decent audio output from it.
- It’s about as lame as using a Pi for video playback. Perhaps even more so.
Somewhere left of the processor are R601 and R602 where D+ and D- surface |
Other than adding those data lines the hardware side of this build isn’t too interesting, so I will spare you the details.
Botched up a 7805 voltage regulator and a few caps on a piece of perfboard |
Since these cheap routers only have a few megs of flash, they can only run special embedded Linux distributions like OpenWRT, which is what I am using. But even with that, there was no way of fitting all the needed packages in there, so I added a flashdrive to deal with that. Since the processor only has one USB port a USB hub was also needed. That was actually the only thing I had to buy for this project.
For DLNA-Support there is a project based on the gstreamer framework, called gmrender-resurrect, and also an OpenWRT port of it. OpenWRT packages can be built using either the OpenWRT SDK or the OpenWRT buildroot. If you can live with the hopelessly outdated gstreamer packages provided by OpenWRT, it’s just a matter of building the gmrender-resurrect package and you’re done. I couldn’t, however, so I built packages for the current version of gstreamer, too, which took me forever.
These little routers are really amazing. With this I am now able to play music from any DLNA source (fileserver, phone, tablet, laptop, you name it…) to the stereo in my dining room. I’m using BubbleUPNP on Android as control point and it really works great! Also, it still acts as a WDS-router.
Where to go from here
There’s a lot more that can be done, given that all the LEDs and buttons in the router are actually GPIOs. So adding a LCD and putting it in a nice enclosure (like an old CD-Player) with Play/Pause/Skip-buttons should be pretty easy.
Hi, I have no idea how to use the Openwrt buildroot/SDK :(. So would it be possible for you share the gmediarender file under /usr/sbin/ of openwrt. I have installed related packages for OP chaos camler. Thanks!
PS. if you could make ipk file for it, that wouls really save the day!
It's a bit embarrassing, but I've already scrapped the project, since I wasn't able to get the gapless playback working properly, and I also had issues with the WIFI module, so there are binaries that I could give you. Don't give up on the buildroot, though, there's a lot of (admittedly sometimes confusing and contradicting) documentation. If I could do it, you can too! 🙂
I spent some time learning the openwrt wiki for buildroot and used your patch for gmediarender. And I was able to compile gmediarender XXXXXX.ipk. So thank you!!
I installed it on the OpenWRT CC 15.05-rc2. Not working…..
But, I found a work around. I deleted /etc/init.d/gemediarender ( I think there some problem with it, that’s why it is not starting) and installed the following packages: gst1-plugins-base/good/bad/ugly and start gmediarender from “/usr/sbin/gmediarender –d” in rc.local file. Now it’s working….
As for the gapless playback, as long as it plays the next song in the queue, I ‘am OK with it.
My question is: the four packages (gst1-plugins-base/good/bad/ugly) includes so many modules (gst1-mod-XX) and when I installed these four, the size became so big!! So could you tell which gst1-mod-XXs are essential and which r not so that I don’t have to install all of them?
Most of them should only be needed to decode some obscure and/or obsolete data formats, like Real Media (R) (is that stuff still around?). I don't remember which ones are essential for mp3 decoding, as they usually don't have something like mp3 in their name, but most of the others do.