Couple months ago, got to know about the Pi-hole project. It’s an ad-block server that can you can configure at the network level. That is, it can be configured as the DNS in your home router.
Of course, the benefit of network-wide ad-blocking is that it does its job in all of your home devices. If however, your router does not allow configuring a DNS — then you’d have to configure the DNS on a per-device level. While it may sound painful, but trust me, it’s worth it!
Thanks to online advertising — reading even a simple news article has become painful. While a lot of people use ad-block plugins, these plugins are, limited to browsers. How do you deal with ads on devices where one does not use the browser — e.g. while playing games, etc? That’s where a network-level ad-blocking gets an upper hand!
Okay, I just realised that I haven’t talked about why is “RPi” there in this post’s title. The thing is, I came across a post on Pi-hole as I was looking for a better (read: any) use for a legacy Pi2 — which was lying about mostly unused — thanks to it being trumped by newer Pis that I got later.
Seems being a Pi-hole server is one of the best uses that I could’ve put it to! The admin console is a rich and responsive UI, which allows your to further tweak the Pi-hole server as per your needs, for example: for explicitly allowing/denying any ad server, blocking specific keywords, etc.
Depending upon your privacy requirements, there’re also options to not log, or enable data masking/anonymise the data that is logged.
Anyway, as Apache Indian would have put it: ‘nuff said! Do go ahead and try it out this amazing project and may you bask in the glory of an ad-free world! And oh, btw, one doesn’t really need a RaspberryPi for Pi-hole — you can potentially install it on anything — andd…there’s a Docker image as well!
In this age of wireless everything, I chose to stay ‘wired’ for a long time, especially when it came to music. Reason: although I don’t (can’t) claim to be an audiophile, I do appreciate hi-fidelity (hi-fi) music. Hi-fi audio is soothing even at high amplitudes, and I think good tracks deserve a listening, and not just a hearing! In other words, I am not a .mp3 guy, but more of a .wav (or .flac, if you please) person. Uncompressed/lossless audio rules!
My audio rig is a simple (non-wireless) amp and a pair of monitors, and it pretty much serves my purpose.
The main issue, however, was — the amp is about 9′ (9 ft.) away from my music source(s). Which means that I had to make do with a 10′ 3.5mm to RCA audio cable, to stream audio from the laptop, phone, etc.
This, of course, worked like a charm in terms of music quality — any loss in fidelity was too minor to be noticed — but this arrangement wasn’t very safe. I’d to be careful about myself, and more so for others, to avoid tripping over the lengthy cable that went almost diagonally across the room. (Honestly, I was more concerned about what a human, tripping over it, would take along, since the cable was attached to one of the many precious sources at any given point in time. One can easily infer that the priority wasn’t on saving the human in such a scenario.)
Anyway, so a wire-free setup was, maybe not indispensable but good-to-have. I looked into a few options, the cheapest and quite common being a Bluetooth audio receiver. There are many available on Amazon, but from my previous experiences of Bluetooth receivers, I realized that one would have to compromise on sound quality. Now, there might be fancy receivers as well, but I did not want to have to spend a lot.
The rise of the Phoenix…
I did, however, have an AppleTV 2 which was gathering dust, mostly because over time smarter devices/options had replaced whatever little purpose it originally used to serve. The only use left for it was extending/mirroring the Mac screen wirelessly, which isn’t really a jaw-dropping feature!
Point being, I was keen on making use of this, mostly useless, AppleTV in the eventual, wire-free setup. From previous experience, and a bit of Googling, it came down to two options:
Use the HDMI output option of AppleTV and use the audio port of the target device
The first option wasn’t viable because even if there are devices which are capable of extracting the audio from an HDMI source, for example, display devices like monitors, televisions or projectors — their sound processing is, as far as I expect, very rudimentary. So, again, there’s a compromise on sound quality involved. I also found a bunch of cheap HDMI audio “extractors” — but they did not look very different from the Bluetooth receivers I talked about earlier.
The second option seemed to be far more popular. If only the amp in question (or one’s AV Receiver) had an optical audio in — I’d have been all set. But there wasn’t, and hence, I wasn’t.
The process thus needed a “bridge” step — a bridging gadget was required to accept this optical audio from AppleTV, and then somehow, magically, let me hook up the amp.
Enter: Fiio D30K! This nifty little thing does exactly that. In other words, if the amp or AV Receiver has a simple RCA/3.5mm input, this optical-to-whatever converter device would do the trick of accepting the optical audio*, and providing the converted audio as RCA/3.5mm out.
There are plenty of similar devices available on Amazon, but one might want to get a decent one. I have been happy with Fiio products over the years, so I went with this one.
Anyway, that pretty much completes the setup! Once this was in place, the audio could then be streamed to my audio rig, wirelessly! Yaay!
Just when you think you’re all set…
There was a hitch! It was in the form of flaky audio, especially when the audio file was large. I correctly suspected that it was because now there was too much traffic on the Wifi network (streaming audio + regular Internet use), keeping in perspective the basic (Netgear WGR614) router that I had.
It was time to separate the concerns.
Fortunately, I had a spare Wifi router lying around, in which I set-up another network dedicated to audio streaming. This, however, posed two related challenges:
How to stream audio from the Internet (as the Internet and audio streaming on were now on two difference WLANs)
How to connect the laptop (one of the main sources) to more than one (Wifi?) networks.
The resolution was anyone’s guess: one of the networks had to be wired!
I chose to make the streaming network wired, as the router was right next to my desk. On my laptop, this enabled me to stay on (Internet) Wifi and streaming network, at the same time.
As indicated in the picture, I needed to specify that this (audio streaming ethernet) is NOT the network to seek Internet requests from, and hence I did not specify a DNS for it. [Note: IP address specification as ‘manual’ doesn’t have anything to do with the setup — it’s just there for sentimental reasons :).]
Stirred, but not shaken…
A “few minor” issues still remain, but I am happy with the overall setup now. These “few minor” issues are:
There’s often a few moments of audio lag when playing streaming video — but that’s not any related to this arrangement. I remember observing this lag even in a normal setup
Streaming from Andriod (or other non-iOS devices) requires special software/apps.