raspberry pi 2: reflections going forward

“Raspberry Pi 2 Model B v1.1” by Multicherry. Licensed under CC BY-SA 4.0

My work with the Raspberry Pi started with the original Raspberry Pi 1 model B, the version that came with just two USB ports and the most amount of RAM at the time, 512MB. I purchased the B+, and then earlier this year, the Raspberry Pi 2 Model B. During all that time I’ve run some distribution of Linux on it; Arch first and for the most amount of time, then Raspbian when Arch suddenly corrupted itself after what turned out to be an ill-advised update on the B+.

If you look at the entries in this blog under Raspberry Pi you’ll note that it’s been for the most part light weight and a way to get to know how the hardware and software work together. I’ve looked up and followed along, making changes necessary for it to work on my end. I’ve not published anything unique that advanced the use of the Raspberry Pi. My excuses boil down to lack of time to really research and then apply what I’ve learned. I’ve got all sorts of big ideas, but just need to figure out how to make them real.

To that end I’ve started to look at the latest releases of operating systems available for the latest Raspberry Pi 2. Before the trip I managed to install the latest Arch, Raspbian, and Windows 10 for IoT. Here’s a quick rundown on what I discovered.

Arch

The latest Arch Linux for ARM has a page devoted to installing Arch directly onto a micro SD card for the Raspberry Pi 2, using Arch Linux as the tool bench. In my case I used my Samsung R580 notebook running Ubuntu 15.04. The only tool I needed to add via apt-get was bsdtar. Otherwise the directions given for the Arch environment worked identically on Ubuntu (taking micro SD card device differences into account).

Once the installation process was finished, I put the micro SD card into the RPi 2 and watched it book into a text console. Nothing out of the ordinary in that, and in a way I prefer text over a GUI. My only complaint with the latest Arch is the lack of out-of-the-box WiFi support for the most common WiFi dongles. I had to install WiFi support after my first initial installation of Arch Linux nearly two years ago. Here I am with the latest and I find I’ve got to do that same all over again. My main reason for looking at Arch is its relatively lean footprint, but lack of WiFi support is just a bit too lean. It’s annoying to fix this issue, especially as WiFi networking on the Raspberry Pi is a big feature, two years since the last time is a long time, and when it’s not there out of the box, it’s a big issue.

Raspbian

The latest Raspbian image was installed using my Ubuntu system and the ‘dd’ method for copying the image onto another micro SD card. Once booted, Raspbian will walk you through an initial configuration and expand the file system, consuming the rest of the card. It now boots immediately into a graphical desktop. This is all well and good, but even with a quad-core ARM processor and 1GB of memory, the GUI still taxes the Raspberry Pi 2. This so-called taxing shows as a jitteriness of the mouse cursor as it moves across the screen, among other issues.

I give points to the distribution for fully recognizing my Apple USB keyboard without having to perform any kernel-level configurations, and it recognized both of my WiFi dongles and thus joined the network at boot. For a distribution where you want the greatest assurance it will come up and be usable by an absolute novice to the Raspberry Pi, the current Raspbian distribution can’t be beat. To quote Apple, “It Just Works.”

But I’m still not quite happy with it…

Windows 10 IoT

This was the most sophisticated, and in the end, the most disappointing of the three. I’m glad I gave it a spin, but I would never use it for my own work nor can I recommend it for anyone else to use.

Microsoft has a page to help you get started here. I chose to download an ISO image and to install the tools necessary to flash a micro SD card with the IoT image that comes bundled with that ISO. Once installed on the Raspberry Pi, the Pi booted into Windows 10 with absolutely no problem. The problems came later when it turned out it wouldn’t work with either of the two WiFi USB dongles I’ve been using with Linux ever since the original Raspberry Pi B was purchased.

I spent more time than I cared to slumming through the forums, but no-one seemed to know how to get WiFi working. After about an hour of trying various so-called solutions I shut it down and deleted everything. Yes, I could have plugged the Pi 2 into an open network port on my home router, but I still had no guarantee I would find the proper drivers to make WiFi work. I know how to get all that to work under various Linux distributions. The bigger issue is the requirement to have a desktop Windows system in order to develop for the Raspberry Pi 2. As I’ve written about here you can do some serious and sophisticated work natively on the Raspberry Pi, reaching back to a desktop/laptop only when the development needs are fairly serious. I don’t want to be forced to do this out of the gate. I lived that development life back in the 1990s with Wind River’s VxWorks. While that was fine back then, I don’t want to go back to that, especially now. Even the Beagle Bone Black, which requires a laptop to bootstrap it’s development tools, has everything local to the BBB, and only requires you use a browser.

Unless it changes drastically I’m done with Windows 10 IoT.

Conclusions

There’s a lot that has happened over the last two years, especially with regards to security and encryption. I knew the Internet had devolved into a dangerous place, but I didn’t know how dangerous until the leaks from Edward Snowden and other’s he’s inspired. That has in turn motivated me to think about best practices for securing an internet-of-things device such as the Raspberry Pi 2, and how best to encrypt data both at rest on the device as well as across the wire into and out of the Pi. I’ll have more to write about later, but for the present, I can’t approach this with the same naivete I did in the beginning.

ubuntu 15.10

I’m on travel until the first of November. The only machine I brought with me is my Samsung Series 7 Chronos with Windows 10 installed. In order to get just a taste of the latest Ubuntu release, 15.10, I downloaded the ISO and created a VMware installation on Windows 10.

While I was at it I grabbed the latest 14.04 LTS, 14.04.3, and installed it as a VM as well, just to get a side-by-side appreciation of any changes.

On the surface there’s almost no difference between the two, which is actually a good thing. A quick check of the features I care about showed no discernable differences there either. There are some notable differences under the hood as it were.

  • The kernel in 15.10 has been upgraded to version 4.2. This is the first distribution I’ve run that has a version 4 kernel of any type. By comparison Ubuntu 14.04.3 is using kernel 3.19. At this point I don’t notice any changes. The fact it installed on VMware is actually a Good Thing, with one problem as noted below.
  • gcc is now at version 5.2.1. Once again this is a major upgrade from 14.04.3, which is currently using gcc 4.8.4. gcc 5.2.1 is C++14 language feature-complete. The version of gcc in ubuntu 14.04 is now on maintenance mode only. This may or may not be of interest to you, as there are many who feel that the C++11 and C++14 language features have made C++ bloated and difficult to learn. YMMV.
  • While the kernels are certainly different between the two, both distributions have broken shared folder compatibility (again) with VMware, specifically 6.0.7 build 2844087. I’m back to drag-and-dropping files between Windows 10 and both versions of Ubuntu. I should note that Linux Mint 17.2, which is based on Ubuntu 14.04, is still compatible with this version of VMware, meaning shared folders work with Windows 10.
  • Ubuntu 15.10 now comes with LibreOffice 5.0.2.2. Ubuntu 14.04 installs 4.2.8.4. At this time I personally prefer LibreOffice 5.
  • Both distributions installed without any Java, which was a bit of a surprise. In the past LibreOffice has had this horrible dependency on Java, which made no sense. That dependency forced me (and still does on other distros) to go on a remove-and-replace mission right after an installation or update. Both versions support the latest version of Oracle Java (at the time of this post publication), Java 8 update 65.

Generally speaking both run rather nicely, even when running g++ compiles or working with Java. I attribute this, in part, to the host OS upgrade to Windows 10 and the upgrade of the Samsung notebook’s hard disk to a Samsung 1TB 850 PRO SSD. All my VMs are now suspended to disk, which makes starting them up considerably faster than the older method of shut down and start up on rotating media.

I don’t know if I’m going to upgrade the older Samsung R580 notebook (which is now pushing six years) to 15.10. I might just to see what happens. If the update causes problems I can drop back and recover.