Portable boombox with local audio file playback

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I was looking for a boombox to listen to music while sitting outside on my patio and rear courtyard. I'm a little exhausted from DIY efforts over the past few years, so I decided just to buy a commercial product. But here's the first stumbling block: most commercial boomboxes, or Bluetooth speakers as they're more often referred to now, sound terrible! I mean "terrible" not just from the viewpoint of a hifi elitist, but terrible as in turn-it-off-it's-hurting-my-ears! Then I read an online review which said that Audio Pro is the Bluetooth speaker for people who don't like Bluetooth speakers! That sounds like me. So on a whim I bought an Audio Pro Addon C5 in the last Black Friday sales.
Addon C5 - Audio Pro

This device, like its competitors, is mainly aimed at being a music streaming endpoint, but I'm old-school and I wish to play my own local music files through it. No problem, it has a line-in connection. So what device should I use for playback - an iPod, a smartphone? No, I decided to be "clever" and set up a Raspberry Pi with hat-DAC. But first I thought I should check the line-in function, so I connected the Audio Pro C5 to my home music server and ES9018 DAC.
Oh dear, the sound is a little muddy, and clearly inferior compared to the same music track streamed from Spotify. What gives?
I boldly opened up the C5, to discover it contains a WiiMu (aka LinkPlay) A29 streaming receiver module, connected (no doubt via I2S) to a digital amplifier chip - a NeoFidelity NTP-8230. The analogue input, then, obviously requires conversion to digital, and I can see this is via a TI PCM1863 ADC chip. I don't wish to malign the PCM1863 chip, but to my ears the NTP-8230 amp sounds obviously better with a digital input.

OK, so forget line-in, there's another option for local file playback: the C5's streaming receiver includes a DLNA endpoint. I tested this function by installing a DLNA server application on my Synology NAS box. DLNA streaming to the C5 works great, but with this current setup I can only play my local music collection when I am within wifi range of my home network.
Mmm, will I ever want to take this portable device away from home? Possibly. So ideally I should buy, or build, a small DLNA server device with internal storage, and attach it to the boombox. Extensive Google searches revealed no such commercial device. (I wasted money buying some products which were close, but not right). Looks like I will need to DIY. Sigh.
The Raspberry Pi is the go-to device for consideration here, but there are other single board computers which have better specs, and are smaller. I eventually chose the NanoPi NEO3 board, and for storage, a 480GB M.2 flash memory stick. I installed both of these in a metal case just 110mm X 75 x 30. It was a tight fit - the flash memory sits above the NEO3, and even then I had to cut away a section of the M.2 carrier board to avoid fouling the NEO3's USB3 socket.
The USB dongle at the top of the photo is a wifi adapter. The USB cable at the bottom is 5V power input. The red button is to initiate a GPIO trigger, to launch a script for a clean software shutdown.



Finally I mounted the completed DLNA server to the rear of the Audio Pro boombox, along with an AC power switch and 5V power supply. A short ethernet cable connects the server to boombox.



Now all I need is a DLNA controller app - BubbleUPnP - on my tablet, which instructs the server what tracks to stream, and instructs the boombox to render that stream.


So was this exercise worthwhile? 99% of the time I use this device in my home courtyard, within range of my wifi, so it would have been much easier just to stream from the NAS on my home network. If you need local file playback in a truly portable situation, the effort would be more justified.
 
Last edited:
For those who care about the technical configuration: the 3 devices involved - NEO3 server, Audio Pro C5 endpoint, and Android controller, need to be networked. The connection between NEO3 and C5 is ethernet, and the connection between NEO3 and Android tablet is wifi. But the Android tablet, which runs the DLNA controller app, also needs to see "through" the NEO3 server to the C5 endpoint. Conventional wisdom would be to configure network address translation between the NEO3's wifi and ethernet interfaces, in the style of a network router, but I couldn't get this to work. Google tells me that the DLNA protocol doesn't like crossing network segments, and maybe this is the problem. My network knowledge is basic, and maybe someone else with better skills could get this configuration working?
So I opted for the simple solution of bridging the wifi and ethernet interfaces, so they are seen as a single virtual interface. This solution, though, means that the wifi interface must be in access point mode, not client mode. So the connection between NEO3 and Android tablet is direct. They cannot connect via my home router, which I would have preferred. And this requirement to configure the wifi interface in access point mode creates another problem - only a limited number of wifi chips are capable of AP mode, and sellers of wifi dongles rarely identify the wifi chip contained within. I ended up buying 3 dongles before I obtained a suitable one (Ralink RT5370).

Once I had the interfaces configured on the NEO3, I then set up a DHCP server, which allocates IP addresses to the Android tablet and C5 endpoint.
And finally I configured a DLNA server application - minidlna. By default, minidlna resizes all album art to thumbnail size, which then looks terrible on the control app interface. So I patched the minidlna source code, using this patch -
minidlna-1.2.1-cover-resize.patch * GitHub
Then I compiled minidlna from source, instead of using the standard Ubuntu package.
 
Instead of using automatic DHCP for network address assignment, You can give each device it's own fixed IP address reserving them in the router "static leases" configuration page, so they are always assigned to them.
They must also be included in the router's DHCP pool range.

Some routers begin to assign addresses via DHCP after a certain number, so You can use the lower ones for that. Most common is assigning 64 upwards in triple play subscriptions. So, 63 not assigned by DHCP IP addresses are available. In this case, just assign on each device a fixed IP address lower than 64 or change & exclude some of the upper DHCP pool configured addresses in the router if TV starts to freeze.
Don't forget to remove the static leases.

MY Picoreplayer & the QNAP NAS have a fixed IP address this way.
The controller (I use a phone) find the server & players (Phone & PC) on the network.

You can also get a cheap router and configure it just for the audio network .
It doesn't bother if it's connected to the internet or not, It will only serve as an AP.

In my example, the first one is the NAS.
Second & third are the PI Wired & Wireless interfaces.
I use it mainly with WIFI and works fine.
 

Attachments

  • Capture.JPG
    Capture.JPG
    48.1 KB · Views: 139
Instead of using automatic DHCP for network address assignment, You can give each device its own fixed IP address
Yes, I already did this. This is my /etc/dhcp/dhcpd.conf
Code:
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.2 10.0.0.100;
option broadcast-address 10.0.0.255;
}

host AudioPro_C5_6942D4 {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 10.0.0.1;
}

So the C5 has a fixed IP address of 10.0.0.1, and all other devices are assigned IP addresses from 10.0.0.2 and up.
And I also use this approach on my home network - my NAS and music server both have fixed IP addresses.

You can also get a cheap router and configure it just for the audio network.
That's not relevant for my (portable) boombox setup:
- it's one more device which would need to be attached to the boombox.
- it achieves no better connectivity between NEO3 server, C5 endpoint, and Android controller than what I presently have.
- being a separate network, it gives me no access to my music acquisition PC's on my home network, nor my NAS, nor my landline internet.
 
Sorry I've misinterpreted wrong. I thought the 3 devices would operate alone, that's why I suggested a second router.

As long as the three devices are connected to the same router's network and have the same subnet mask, they should see each others. Being cable or Wifi.
So, server, endpoint & controller should see each others.

Problem is You don't have a cable on the outside for the 2 cabled devices.
I would suggest powerline adapters. There are some which include a switch & Wifi like this one.

https://www.devolo.com/magic-2-wifi-next

You put one near the router & the switched one near the boombox and connect all 3 devices to Your home network. As a bonus You gain better Wifi outside.
 
MAAC0, thanks for the suggestions, but in case I did not make it clear already, I don't actually have a problem.
I created this forum post as an FYI, or HOWTO, for anyone contemplating a similar setup.

The setup I described above is a fully functioning DLNA setup, with full network connectivity between my NEO3 server, C5 endpoint, and Android controller, albeit local, without internet access - which is unnecessary for playback of local audio files.
On the occasions when I need to add new music to the NEO3, I temporarily connect to it from my desktop PC via wifi (instead of the PC's usual ethernet connection to home router/DSL modem) and my PC can then access the music library on the NEO3 as a Samba network share. Since the wifi dongle on the NEO3 is on a USB 2.0 port, the transfer speed is slower than I would prefer, but it works seamlessly.

This network configuration also works fine for the rare occasions when I want to stream from Spotify; the Spotify app on my Android phone connects via wifi to the C5 access point and sees the C5 as a "Spotify Connect" endpoint, with the only downside being that Spotify streams consume the phone's 4G data.
This is fine if I'm away from home, but if I'm within range of my home wifi I prefer to use it (and no, I don't need a wifi repeater or extender) - so I turn off the NEO3 server, and turn off/on the Audio Pro C5 - which prompts the C5 to establish a connection to my home wifi router. Now Spotify streams via my router/DSL modem.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.