Raspberry Pi networking projects

The Raspberry Pi 3 that I have comes standard with two network interfaces; a wired interface that can do 100mbps and a WiFi interface. Older Raspberry Pi’s required that you use a USB dongle for WiFi, I don’t use those units any longer.

So for the purposes of all that follows, I assume Raspberry Pi 3, onboard WiFi and wired ethernet.

By default, these two interfaces are active and software that you run on the Raspberry Pi can connect to the outside world using one, or both.

I’ve found several interesting use-cases for the Raspberry Pi by changing the way these interfaces are configured.

  1. A WiFi satellite location

    piwifi1In this image, three devices (device 1, 2 and 3) are not WiFi enabled and are internet connected using the Raspberry Pi as effectively a wireless network extender.

    This setup is relatively straightforward on a Raspberry Pi.

  • Configure the wireless interface on the Raspberry Pi to connect to the wireless access point.
  • Enable ip forwarding
  • Configure dnsmasq
  • Enable packet forwarding from the wlan0 and eth0 interfaces

    With this setup, the three devices connected to the wired interface will get their DHCP leases from the Raspberry Pi. Packets will get forwarded by the Raspberry Pi between the wired and wireless interfaces.

  1. A WiFi satellite location without DHCP

    piwifi2The above configuration is very useful for some things but not always. I have a printer (quite old) which I have connected to a single parallel port ethernet print server (TP-Link TL-PS110P). I need to be able to access this printer from other wirelessly connected devices and so I need it to have its DHCP lease coming from the WiFi Access Point!

    This setup is similar to (1) above, but no dnsmasq, no NAT, enable proxy ARP.

  1. The Raspberry Pi as a WiFi access point

    piwifi3This is something I’ve just been playing with recently and it appears to work quite well. The Raspberry Pi 3’s WiFi interface can be configured to act as an access point using the hostapd package. The way I have this setup, dnsmasq is enabled and the wirelessly connected devices receive DHCP leases from the Raspberry Pi. Traffic is routed to the internet over the wired interface.

  2. The Raspberry Pi as a secure WiFi access point

    Eventually, this is what I want to get, a Raspberry Pi as a secure WiFi access point; the WiFi interface running in access point mode but all traffic going out of the wired interface is tunneled to a VPN.

    I use OpenVPN, and that works fine on the Raspberry Pi already. Have to put the pieces together and make it a bit more robust; right now, not quite there.

    Equally interesting would be the other configuration like (1) above but where all traffic out of the WiFi interface is tunneled. In that setup, I could, for example connect my laptop to the wired interface and connect to any WiFi access point on the Raspberry Pi. Traffic over the WiFi interface would be tunneled by the Raspberry Pi and this would be an ideal travel setup as the Raspberry Pi would just be powered off the USB port on the laptop 🙂

Raspberry Pi basics

I have been using a Raspberry Pi (I’ve bought a few of these on Amazon, at $50 each, they are a bargain) for some time now and have found them to be excellent for a number of things.

A recent project to set one up as a WiFi access point got me thinking that I should, maybe, share some of these use-cases.

So, here’s a primer on how I setup the Raspberry Pi. I have a new one on order right now so this is an actual first-time setup.

If you have never done this before, don’t worry, it is very simple.

Assembling your Raspberry Pi

New and out of the box, the only things that you have to do are

  • Figure out how to affix the heat-sink on the processor; I always use the largest one that they provide. Do this once, do it carefully and you will have no issues later
  • Figure out how to get the board neatly into the nice clear plastic case.

Formatting your SD card

I don’t purchase the “complete kit” which comes with a Micro-SD card. I usually have a card or three hanging around and set it up using NOOBS (That’s Raspberry Pi’s New Out Of Box Software).

Since I setup the card on a Windows machine, there is one thing I’d like to highlight. The documentation makes it sound hard, they have you download some special format utility and all that stuff. Don’t bother.

Just follow the easy instructions found here.

  1. Launch the disk management utility.

My new 16GB disk drive is the one that shows up as Disk 1.

This was a brand new SD card, if you are reusing an SD card, you may see multiple partitions, delete them all.

If you find that the “Delete Volume” options are greyed out, you will have to use the Windows Command Line. Use the diskpart utility, select the disk, then select each partition in turn and delete it. You will be left with a disk that looks like this.

Observe that now Disk 1 is shown as “Unallocated”. I always make sure I get here and format the disk.

  1. Format the disk
    You do this by simply right clicking on the “Unallocated” disk and choosing “Format”. Be careful to choose FAT32.
  1. Copy NOOBS onto the new SD card
    Download the latest NOOBS zip file and unzip it. Then just drag and drop the whole thing onto your new SD card. Safely eject the SD card, make sure the power is disconnected from the Raspberry Pi and plug the card into the slot. Then … the moment of truth.
  2. Power up the Raspberry Pi for the first time
    If you did everything correctly, you should see a NOOBS screen that comes up and allows you to choose the operating system. I usually enable WiFi at this point (or if the wired network is connected, that works too) , and then I follow the standard NOOBS documentation, setup Raspbian with PIXEL, and then reboot.
  3. On first boot, I enable the SSH server, set the locale, timezone and things like that and from that point the rest of the setup is done from command line.

That’s really all there is to your first time Raspberry Pi setup!


How to Understand the Curves Tool in Photoshop

Two of the most important things I’ve learned to work with in the past couple of weeks are the Curves Tool in Photoshop (for post processing) and the Histogram tool (either in Photoshop or on your camera itself, for use either while taking pictures, or in post processing).

This article is about the curves tool, well worth the read.


After you’ve mastered Levels , it’s time to take a step up to the tool that is probably the most useful for color and contrast control in Photoshop: Curves. As with levels, you should play around with the basic Curves command to get a feel for it.

Source: How to Understand the Curves Tool in Photoshop

Primes Versus Zoom Lenses: Which Lens to Use and Why?

Which type of lens is better, a prime lens or a zoom lens? This is one of the most debatable topics in photography. Some of you might choose a zoom lens and others may choose a prime lens, it all depends on what and where you are going to shoot.

Source: Primes Versus Zoom Lenses: Which Lens to Use and Why?

More than 99% of Blockchain Use Cases Are Bullshit

I’ve been following the blockchain ecosystem for some time now largely because it strikes me as yet another distributed database architecture, and I dream about those things.

For some time now, I’ve been wondering what to do after Tesora and blockchain was one of the things I’ve been looking at as a promising technology but I wasn’t seeing it. Of late I’ve been asking people who claim to be devotees at the altar of blockchain what they see as the killer app. All I hear are a large number of low rumbling sounds.

And then I saw this article by Jamie Burke of Convergence.vc and I feel better that I’m not the only one who feels that this emperor is in need of a wardrobe.

Let’s be clear, I absolutely agree that bitcoin is a wonderful use of the blockchain technology and it solves the issue of trust very cleverly through proof of work. I think there is little dispute of elegance of this solution.

But once we go past bitcoin, the applications largely sound and feel like my stomach after eating gas station sushi; they sound horrible and throw me into convulsions of pain.

In his article, Jamie Burke talks of 3d printing based on a blockchain sharded CAD file. I definitely don’t see how blockchain can prevent the double-spend (i.e. buy one Yoda CAD file, print 10,000).

Most of the blockchain ideas I’m seeing are things which are attempting to piggy-back on the hot new buzzword and where blockchain is being used to refer to “secure and encrypted database”. After all, there’s a bunch of crypto involved and there’s data stored there right? so it must be a secure encrypted database.

To which I say, Bullshit!

P.S. Oh, the irony. This blog post references a blog post with a picture labeled “Burke’s Bullshit Cycle”, and the name of this blog is hypecycles.com.

Reflections on the first #OpenStack PTG (Pike PTG, Atlanta)

A very long time ago, and on a planet very unlike the earth we are on now, Thierry sent this email [1] proposing that after Barcelona, let’s split the OpenStack Summit into what have now come to be known as the Design Summit and a Forum. The email thread that resulted from [1] was an active one and had 125 responses, along the way Thierry also posted [2], a summary of the issues and concerns raised.

I had my reservations about the idea, and now, after returning from the first of these, have had some time to reflect on the result.

On the whole, the event was very well done, and I believe that everyone who attended the feedback session had positive things to say about the event, and my congratulations to Erin Disney and the rest of the team at the Foundation. The attendance was a solid 500 to 600 people (I don’t know the exact number) and Thierry must be psychic because he predicted almost exactly that in February [3].

pike-coffeeI did not realize that the foundation had gone as far as to get Starbucks to customize a blend of coffee for us, and to get the Sheraton to distribute in our rooms (image courtesy of Masayuki Igawa, @masayukig).

The format gave attendees the opportunity to get a significant amount of work done both within their own project teams, as well as with other project teams, without the interruptions and distractions of the summit.

I particularly liked the fact that I could attend two days of cross project sessions and then two and a half days of sessions with other projects. By giving projects two or three room-days instead of four or five room-hours dramatically improved the amount of time that projects could focus on their own discussions, and spend on cross project discussions.

Personally, I think the PTG was a success, and seems to have delivered most if not all of the things that it set out to do. Some things outside of our control, certainly outside the control of the foundation have cast a small shadow on the proceedings and we need to seriously consider the consequences of where the next summit and PTG’s are. The location has implication for many attendees, and I think we should seriously consider having remote participation at future events.

From my recollection of the feedback session (unfortunately I don’t have a link to the etherpad, if someone has it, please post a comment with it) everyone had good things to say about the event as a whole. The consensus was that the food was good but cold sandwiches get boring after day 3, the air handlers were noisy, the rooms were too cold (or hot), the chairs were uncomfortable, and there was no soda. That feedback is consistent with organizing an event for 500 people in a hotel or convention facility anywhere in the world. And if that’s all that people could put down in the “needs improvement” section, the event was a huge success.

designateI think the award for the best picture at the summit (thanks to Thierry for the tweet) goes to the Designate team[4]. I should’ve thought to get a Trove team photo while we were there!

[1] http://markmail.org/thread/v6h3qzs7rb35h6fo

[2] http://markmail.org/message/slzcvunoxccse5k4

[3] http://markmail.org/message/bultywgyxued5khl

[4] https://twitter.com/tcarrez/status/835149239571316736/photo/1

Stratoscale acquires Tesora

Yesterday it was announced that Tesora had been acquired by Stratoscale, here are some of the articles that were published about this.

and this official announcement by Stratoscale

Thanks to all of you who emailed, texted, tweeted, called, and pinged me on IRC 🙂 I’m overwhelmed by the volume and all the good wishes. I’ll reply to each of you individually, sorry it may take a couple of days for me to do that.

To all of our investors and advisors, first in ParElastic and later in Tesora, thank you all for your help and support. To everyone at Tesora who is moving to Stratoscale, all the very best to you. It has truly been a wonderful six years working with you and I thoroughly enjoyed it.

Doug: It’s been especially awesome working with you these past six years. You are a great leader of people, and you have built and managed a truly exceptional team. People in your team like you, respect you, are comfortable approaching you with the strangest questions, and are willing to work with you over and over again. Not an easy thing to pull off over the extraordinarily long period that you’ve been able to do this. You were clearly not an easy taskmaster and your team consistently delivered miracles. But along the way you managed to ensure that everyone was having a good time.

Ken: No entrepreneur can have hoped for a better partner than you. It has been an extraordinary ride and it has been truly my honor and privilege to have taken this ride along with you. I think you were instrumental in building a company which was a very special place to work, where we built some excellent technology, got some marquee customers, and had a lot of fun doing it. I’ve learned a lot, about startups, about technology, about business, and about myself; thank you very much for this awesome experience.

Several of you have asked me “what’s next for Amrith”. I don’t know yet, I’m trying to figure that out (thanks to all of you who have offered to help me figure this out, I will certainly take you up on that).

In the short term, I’m going to continue to work on Trove, finish up my term as the PTL for Ocata and continue to work on the project as we begin the Pike cycle.

What comes later, I have no idea but if you have ideas, I’m all ears.