ProDave

Cheap Internet radio wanted. Raspbery Pi?

Recommended Posts

10 minutes ago, ProDave said:

So I have the Pi, I have sorted the memory card programing, I have ordered the network adaptor. All  I need is a DAC board.

 

The pHAT DAC linked above has a 40 pin header, as do modern versions of the Pi.  but mine being an old Mk1 only has the original 26 pin header.  As I undrstand it this DAC works over the I2S lines, which are on the original 26 pin header, so I see no reason why a pHAT DAC would not work if I just fit a 26 pin header to it.  But the supplier linked to above says it won't work.

 

I have however found this one that clearly only has the 26 pin header so should work, but not yet found a UK supplier so may just have to wait for it from China https://www.ebay.co.uk/itm/HIFI-DAC-HIFI-Audio-Sound-Card-Module-I2S-Interface-For-Raspberry-Pi-B-Black/292203010088?hash=item4408a81828:g:Jz0AAOSwJLJZguV4

 

The HiFiBerry library should work with that DAC, I think, as it uses the same PCM5102A DAC chip.  FWIW, the PhatDAC also uses the PCM5102A and works fine with the HiFiBerry DAC library.

Share this post


Link to post
Share on other sites

My understanding is that the extra pins on the 40-pin header include some which are used to identify the HATs (via an I²C EEPROM or something) so whether one with 26 pins will work depends whether the software needs that identification for setup.

Share this post


Link to post
Share on other sites

Today my USB-Network adaptor arrived, over a week to get here by second class post.

 

The Music Box is now working, but at the moment the only audio out is via the hdmi to the tv.  It will be another couple of weeks probably before the DAC arrives from China to enable playback via the hifi

 

The only observation or "trouble" is you are supposed to be able to access it's web interface with http://musicbox.local  That works initially but then trying to navigate around it's user interface just results in the browser timing out.  Going directly to it at http://192.168.1.220 works without problem, so that is now bookmarked.  It remains to be seen if that IP address changes upon re booting the Pi.

 

Going to load some of SWMBO's music onto the memory card later and see if it can find that and play it.

Share this post


Link to post
Share on other sites
Posted (edited)
1 hour ago, ProDave said:

It remains to be seen if that IP address changes upon re booting the Pi. 

 

More likely it'll change on rebooting the router. When the Pi is rebooted it'll ask (via DHCP) the router for a new IP address. Most routers keep a list of IP addresses they've allocated to particular hardware (MAC) addresses and try to give them the same address again each time they boot. Obviously, though, when the router is rebooted it'll lose that list and just restart allocating IP addresses to devices in a cast-in-order-of-appearance manner.

 

Two ways round this:

 

1) Just configure a static IP address on your Pi, best outside the range of addresses your rooter dynamically allocates.

 

2) Set a static IP address for the Pi's hardware address (actually the hardware address of your USB adapter) in the router.

 

Personally, I go for method 2 because:

 

a) I've then got a single list of IP addresses for everything (laptop, netbook, phone, Pi, telephone adapter, …) and it's a one-stop shop if I decide to reorganize my network.

 

b) If I take my laptop and netbook elsewhere they're already set up to get their address via DHCP on other people's LANs, which is the polite thing to do.

 

Time to go explore your router's internal web site, methinks.

Edited by Ed Davies
Add “MAC“.
  • Like 1

Share this post


Link to post
Share on other sites

The router is a standard BT Home Hub 4

 

Looking at the (far from intuitive) Home Hub 4 menu's, I see my Pi network adaptor listed.

 

Below it, there is a tick box to "Always use this address"  Is turning that on all I need to do to make that a static IP address?

Share this post


Link to post
Share on other sites

I'm with @Ed Davies's option 2, set the IP as fixed in the router.  I have a set of fixed IPs right up at the top of the range, just to make it a bit easier to find them.  i.e., if my subnet range was XXX.XXX.XXX.0 to XXX.XXX.XXX.254 I set all my fixed IP devices to IPs working down from .254.  DHCP allocates dynamic IPs starting at XXX.XXX.XXX.2 upwards.  For some reason I've never been able to fathom, this works fine for everything except my network printer.  That has to have a fixed IP set in the printer itself, no idea why.  Failing to do this just stops printer sharing working reliably for some reason.

Share this post


Link to post
Share on other sites
Posted (edited)

There's not an awful lot online about the BT Home Hub 4 setup beyond repeats of the BT manual which is very basic. There is this screenshot though:

 

http://screenshots.portforward.com/routers/BT/Home_Hub_4/IP_Addresses.htm

 

which indicates this sort of thing is configurable. Look in the DHCP Table tab, I think. Or maybe the Devices tab.

 

Some routers allow (prefer/require?) you to configure static DHCP addresses outside the dynamic range (192.168.1.64…192.168.1.254 in that screenshot). Others insist that you configure addresses only within that range in which case @JSHarris 's strategy of putting them at the top of the range is a good one.

Edited by Ed Davies

Share this post


Link to post
Share on other sites
29 minutes ago, ProDave said:

Below it, there is a tick box to "Always use this address"  Is turning that on all I need to do to make that a static IP address?

 

Yes, I'd guess so.

Share this post


Link to post
Share on other sites

Setting up more radio stations now.  I could not get the BBC streams that Jeremy linked to earlier to play on the Music box, but I found an alternative list here that works http://www.suppertime.co.uk/blogmywiki/2015/04/updated-list-of-bbc-network-radio-urls/ 

 

In fact I have found finding the stream URL's for radio stations particularly difficult. I get the impression the stations don't want you to know them. There are lots of sites listing the internet radio stations but almost all of them just want to open them in a browser window and play them from there without showing the stream URL.  Some I only found the URL by downloading a .PLS file. I don't know what that is and neither does my computer, but opening it with a text editor found the URL inside the file.

Share this post


Link to post
Share on other sites

Okay, nothing goes smoothly.

 

I have copied some of our music files over but can't get any to play.

 

Some are .WMA files.  It seems to see those and list the tracks, but when you press play, it immediately goes back to stop without playing anything at all.

Others are .m4a files.  It sees the title of the album but lists no tracks, so I assume that is a format that the music box does not support.

 

I can see me having to join another forum to get help on this one.

Share this post


Link to post
Share on other sites
8 minutes ago, Onoff said:

Presume you've found this link:

 

http://docs.pimusicbox.com/en/latest/manual/

Yes but it does not solve the problem.  I have posted on the Mopidy forum to see if anyone can help there.

Share this post


Link to post
Share on other sites

I think I have got to the bottom of why it won't play my music files.  I don't think the Music Box supports the .WMA  file format, which it turns our is a Microsoft proprietary format.

 

So I am now trying to find if it is possible to add a .WMA codec to the Pi Music box, or convert my files to something else, or rip them all from CD again and store in a different format.  None of these seems an easy option.

Share this post


Link to post
Share on other sites
20 minutes ago, ProDave said:

None of these seems an easy option.

 

I’ve got a desktop app that cost me about $15 and it does 100 at a time from pretty much any format to any format. Quick and simple. 

Share this post


Link to post
Share on other sites
Just now, PeterW said:

 

I’ve got a desktop app that cost me about $15 and it does 100 at a time from pretty much any format to any format. Quick and simple. 

Someone suggested VLC, which I have, but it only seems to do one file at a time, which is tedious.

Share this post


Link to post
Share on other sites

I think this is pretty much concluded now.

 

The DAC arrived from China today, not bad just 10 days since I ordered it, and way quicker than I expected.

 

It didn't work at first, but then I noticed it had an 8 pin header next to the 28 pin header. My Pi did not have any pins in that, and it was clear that the DAC had connections to that 8 way header. So I soldered an 8 way set of pins there on my Pi and it now works, and as speculated, it works with one of the HiFiBerry drivers.

 

No answers on either of the 2 forums I posted to find out what file formats the Pi Music box supports or how to load extra codecs.  All I know is it appears not to work with WMA or M4A files.  So today I ripped one of the CD's again and this time saved it as MP3 and the Pi Music Box plays that okay.  So it looks like as a background activity I have a lot of CD's to rip to MP3 files.  I still did not get anywhere with VLC, I used Rythm Box in the end (on the ubunta pc) to rip the CD to MP3

 

When this is all done, it should give SWMBO what she wanted, the ability to play all her music through the hifi controlled either from her phone or any of the pc's in the house, with the bonus (more for me) of the internet radio stations.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now