This post is Part 3 in a series. You can read Part 2 here.
I’m going to start off by saying that the Raspberry Pi 2 Model B is the cutest little thing ever, and at only $35 it’s an amazing little computer. I’ve got one hooked up to my 16000 mAh Anker portable battery along with the TripMate Nano travel router. I was expecting it to be larger because it just looks bigger in Internet photos, but it’s so tiny. I installed the Pi in a small black plastic enclosure and the whole thing is barely the size of my wallet.
I can’t remember the last time I was this excited by a piece of hardware.
I set things up so that I could remote into the Pi using SSH over my phone, as well as copy files over from the Mac via SFTP. I’m still getting to grips with Linux as a desktop OS but so far it hasn’t given me much trouble. In fact, I kind of enjoy managing things from a terminal/command prompt, since it brings back nostalgic memories of when I first started messing around with computers.
There was a brief hiccup where I couldn’t find the Pi on the network, but I fixed that by adding a crontab entry that pings the router once a minute. I was also able to successfully make a SSH connection to administer it after setting that up. I then installed Node.js on the Pi, whipped up a quickie test socket server using Socket.IO, and did some test connections from other machines. Success!
The Client Hardware
I mentioned in the previous post that I was going to source a couple of cheap tablets and keyboard folios to serve as the client hardware. I did a lot of window shopping and review perusal over several days before making a decision. The big thing about cheap tablets is that there’s a line where if you go too cheap, “you get what you pay for” becomes a distressing truth, so there’s a lot of chaff to sift through. I went for a pair of HP Stream 7 Signature Edition tablets, which were on sale for $79.
The keyboard folios were a little harder to source–reliability is very important to me because it just won’t do for the keyboards to spontaneously disconnect every 5 minutes or misbehave in the middle of a conversation, and so many keyboard folio vendors treat the keyboard as a cheap thrown-in extra rather than an important part of the package. The other thing is that a lot of those cheap keyboard folios put size before layout, so you end up with stupid issues like you have to press Fn+L for apostrophes and nothing’s where you expect it to be.
I decided on 7″ Zagg Auto-Fit folios for them. They’re rigid clamshells with a spring-loaded top cover that holds the tablet in place, and it makes the things look like little bitty baby laptops. The key layout is good, much better than on my Dell keyboard folio, and the build quality is good. Not exactly premium, but good.
I changed the Bluetooth power management settings for both tablets to not turn off the radio to save power, and I also set it up so that the Bluetooth radio can wake up the device. This does two things: pressing a key wakes up a sleeping tablet, and prevents the keyboard from being disconnected when the radio turns off.
I went through three prototype iterations for the client application. The first one was mocked up in Unity 3D since it was a good opportunity to get to grips with the new Unity UI system for work while I was at it. The second one was done as a WebRTC webapp displayed in a fullscreen instance of Google Chrome because I’m a sucker for bleeding edge web stuff and wanted to take that for a test drive.
For the third prototype, I finally got serious and fired up Visual Studio to do a proper native Windows app. The last time I did any Windows desktop application development was in 2010, I believe, and I kinda like how far things have come since then.
Initially, I started out doing it as a Modern UI app (formerly known as Metro apps), but I changed my mind in a hurry when I saw what a gongshow that was shaping up to be. I’m not really sure what Microsoft was thinking there, but maybe they’ll get it right with Windows 10. Once I switched targets to a desktop application, things started to shape up beautifully.
I’ve now got the tablets running native Windows desktop apps that talk to the Raspberry Pi server. In the shot above, I’m running Visual Studio on my big XPS 18 tablet, I have the Raspberry Pi temporarily plugged into one of my work monitors, and the tablets are running deployed instances of the client application. At one point, I was tapping away on 4 keyboards!
The setup is getting closer and closer to what I’d consider stable enough to use in a production environment. There are a few more software and hardware tweaks I want to do, then I’ll move on to more extensive field-testing.