RPi resurrection – Pt. II – NFS

The second good use you could put your Pi, more so if you have unused external HDDs lying around, is to make an NFS out of it! I’ll spare mirroring the details here, there are many good references on how to go about creating a Samba server. For example, this one.

Since my laptop’s storage is limited, oftentimes it started complaining, as soon as any space-consuming operation started. At that point, I often had to make some hard life choices! :), you know, of the “shall I keep the big file or zap it!” kinds.

On top of that, I am not sure about others, I have realised that OSX has made working with an external HDD as painful as possible! A FAT32 formatted HDD takes forever to be recognised! To top it all, there’s that eternal irk of having to “safely removing the drive”. I mean c’mon. Windows has done it — how long will OSX take??

Anyway, so those were the reasons. But, I guess, the basic reason was: because I wanted to. ūüėÄ

Once, your NFS is in the network, on Mac, it’s just a few more steps to make your new storage available, and ready to use!

The HDD did need to be formatted, as the original format of FAT32 did not go too well with the Raspberry Pi OS (erstwhile called Raspbian Buster) — in that the auto-mount used to fail. I formatted it as FAT to keep it OS-neutral, even though there are trade-offs but the benefits outweighed!

So, yes, that it.

RPi resurrection – Pt. I – Pi-hole

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.

Pi-hole Admin Console

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 anythingandd…there’s a Docker image as well!

Streaming (only) audio using an old AppleTV (and a few nuances, thereof)

Oh, the ever-unsettled human!

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:

  1. Use the HDMI output option of AppleTV and use the audio port of the target device
  2. Use AppleTV’s optical audio port, somehow.

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.

Fiio D30K

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.

[* FiioD30K accepts coaxial input as well]

The glorious 'threat/reward' model

We have witnessed this since our childhood. Right from our homes, to our schools, colleges, and finally in our jobs. The glorious ‘threat/reward’ model! As the name suggests, it’s an approach where a certain set of actions lead (or are known to lead) to a certain reward (candy, toys, perks, H1B, and of course “that-irresistible-promotion”). On the flipside, non-compliance to a given, pre-defined set of laid-out steps, leads to ‘threats’, or a consequence of those threats (read: no candy, no perks, …and..well, you get the point.)

Continue reading The glorious 'threat/reward' model

Kindle-ing

I’m highly impressed by Kindle. Not just the device — I don’t have one — but the whole idea around it; and what Amazon has done with it. I’m in awe!¬†No, seriously.
While we were busy reading about gadget wars, and tech-websites busy bombarding us with feature comparisons of Kindle, and Nook and what-not — Amazon did something very smart: it created a Kindle plugin for every platform known to mankind…Android, iOS, Windows..you name it (ok maybe not¬†all, but you get the idea!). It was blessing for people like me who might want to read something at their own convenience. All my devices are synched..so that takes care of remembering the page number/bookmarks etc.

At this point however I must confess that the intent of this particular post was not exactly blowing Kindle’s trumpet..but rather to talk about a nifty little extension that they created for Chrome, which allows me to send any webpage to my Kindle library in Kindle format with just a click (aka ‘automagically’)!

kindlebutton

I consider it as one of the coolest things I’ve been enlightened with recently — gives me the flexibility of not just bookmarking a webpage — I have thousands of those will-read-it-someday ones, but rather going several steps further and making that webpage/article available on all my Kindle-app devices. This means that I have the convenience of (re-)visiting those articles/bookmarking them/reading them in oddest of places — all at my disposal! That’s¬†√ľbercool and so very thoughtful!

About Mavericks

One of the best things Apple has done with OSX Mavericks is the feature of keeping the extended desktop (external monitor) separate. In the sense that, unlike before, it’s somewhat disconnected from the main desktop. This means that it’s now possible to have maximised applications on each of the desktops — and thus fixing the limitation in the previous versions of OSX where an app could be maximised on either of the screen. It beats me on how did that feature seep-in in the first place.
Anyway, so again, unlike before, AppleTV now allows you to use the connected monitor as a secondary desktop as well. Finally, someone seems to have put brains into these pesky little flaws.

Meanwhile…

How could I not know that such a cool product existed..until yesterday when I read about them being acquired by Google?! I tried out Flutter yesterday, and it definitely, is a remarkable idea put into being. Kudos to the team!

PS: Using Flutter app you can control various applications on your PC/Mac using you hand-gestures — changing songs in a media player for instance.

Update (Oct/10): OK, after about a week of usage — I still feel it’s a cool product. Just that the camera motion-detection¬†is a bit too sensitive IMHO — I end up switching the song whenever I touch my face/hair. ūüėČ

DB course

Over the past few weeks I’ve been taking a database course, and I must say, it’s well-worth the time (whatever meager amount) I’m able to invest.

Thanks to Sri, and his persistence on us taking it.

I have taken a so-called DBMS course in academics twice, but never have I had the perspective as this course has given me. Thank you Prof.¬†Jennifer Widom and the team of Stanford University who’ve taken efforts to come up with such a course and have had a vision of the larger good.

I would highly recommend it to all the software engineers, especially those from India.

Here’s the link¬†for the ongoing class.