Book Image

Raspberry Pi for Secret Agents - Third Edition

Book Image

Raspberry Pi for Secret Agents - Third Edition

Overview of this book

This book is for all mischievous Raspberry Pi owners who’d like to see their computer transform into a neat spy gadget to be used in a series of practical pranks and projects. No previous skills are required to follow along, and if you’re completely new to Linux, you’ll pick up much of the basics for free. We’ll help you set up your Raspberry Pi Zero, Raspberry Pi 2 and Raspberry Pi 3 and guide you through a number of pranks and secret agent techniques that are so inconspicuous yet high on mischief. You’ll learn how to configure your operating system for maximum mischief and start exploring audio, video, or Wi-Fi techniques. We’ll show you how to record, listen, or talk to people from a distance and how to set up your own phone network. Then, you’ll plug in your webcam and set up a motion detector with an alarm and find out what the other computers on your Wi-Fi network are up to. Once you’ve mastered the techniques, we’ll combine them with a battery pack and GPS for the ultimate off-road spy kit.
Table of Contents (7 chapters)

A brief history lesson on the Pi

The Raspberry Pi is a credit-card-sized computer created by the non-profit Raspberry Pi Foundation in the UK. It all started when a chap named Eben Upton got together with his colleagues at the University of Cambridge's computer laboratory to discuss how they could bring back the kind of simple programming and experimentation that was widespread among kids in the 1980s on home computers such as the BBC Micro, ZX Spectrum, and Commodore 64. Eben is now CEO of the Raspberry Pi Foundation as well as being a technical architect at Broadcom (the company that makes the main chip for the Raspberry Pi).

After several years of tinkering, the Foundation came up with two designs for the Raspberry Pi. The £25 Model B was released first, around February 2012, originally with 256 MB of RAM. A second revision, with 512 MB of RAM, was announced in October 2012, and the £15 Model A went on sale the following year, in February 2013.

In July 2014, with over 3 million Pis sold worldwide, the Foundation unveiled the Raspberry Pi Model B+, a £25 board revision incorporating numerous improvements requested by the ever-growing Pi community.

As the Pi community grows from strength-to-strength, in February 2015 the Foundation released the Raspberry Pi 2: 6 times faster than the Model B/B+ with its upgraded ARM processor, and 1 GB of RAM.

In November 2015, the Foundation rocked the community with the launch of the Raspberry Pi Zero—an amazing feat of engineering—being a fully functional PC the size of a small luggage tag (65 mm x 30 mm) that could easily be lost down the back of a sofa. What's more amazing is the price—just £4—and they were giving these things away on the front of magazines. This device is truly a secret agent's delight.

The latest part of this story is that as I write the third edition of this book, the Foundation have just released the Raspberry Pi 3—even more awesome than the Pi 2, with a faster processor and now with onboard Wi-Fi and Bluetooth—which means no more dongles for many wireless projects:

A brief history lesson on the Pi
Say hello to the super-tiny Pi Zero - a game changer for mischief-makers everywhere...

So, which Pi is good for the spy?

As you've just discovered, there have been several versions of the mini-PC board released since 2012 and most of them are still available to purchase now. I'll go through each of the versions released with their respective features; however, for our secret agent projects we will be focusing on the Raspberry Pi 2, 3, and Zero boards, as they are the most recent and most useful for spies like us.

Raspberry Pi Model A

The baby of the family is the Model A, and was released as a lower cost version of the Model B (discussed next). Its main differences from the Model B is that it features just 256 MB of memory and has no Ethernet port, so if you want to connect this board to a network, you are limited to using a USB Wi-Fi dongle or a USB-to-Ethernet adapter:

Raspberry Pi Model A
Overhead view of the original Raspberry Pi Model A board

Raspberry Pi Model B

This was the first version of the Raspberry Pi to be released, with an updated revision coming later that improved the power system and USB port protection. It features 512 MB of memory and has an Ethernet port for connecting to your network. This was the most common version used at the time, as having the Ethernet port is incredibly useful, especially for getting up and running quickly in order to set up and configure your Pi without the need for a keyboard and monitor to always be available:

Raspberry Pi Model B
Overhead view of the original Raspberry Pi Model B board

Raspberry Pi Model B+

In 2014, the Raspberry Pi Foundation released a new version of the board, the Model B+, which had fundamental changes compared to the previous version. The most fundamental changes are the board layout, form factor and mounting points—much to the dismay of the many enclosure and accessory manufacturers out there.

The main electronic changes to this board are the addition of two more USB ports, which can deliver more power to peripherals, an expanded GPIO interface, and the removal of the composite video port, which is now consolidated into the audio jack. It also now uses a microSD card with a better card slot:

Raspberry Pi Model B+
Raspberry Pi Model B+ features more USB ports and a 40-pin GPIO connector

A lower cost model A+ was also subsequently released that had only 1 USB port and no Ethernet port:

Raspberry Pi Model B+
The smaller Raspberry Pi A+ featuring just one USB connector and no Ethernet port

Raspberry Pi Model 2

In February 2015, a more powerful Raspberry Pi was released—the Raspberry Pi Model 2. It's similar to the Model B+ in terms of form-factor and interfaces, but is now reportedly 6 times faster than the Model B/B+, with its upgraded ARM processor, and 1 GB of memory.

At the same low cost of less than £30, it's a fantastic little board and is a great power-house for embedded systems:

Raspberry Pi Model 2
Raspberry Pi 2 Model B - looks just like a Version 1 Model B+ but has more a powerful CPU and more RAM

Fortunately, the Raspberry Pi has now standardized its layout and mounting points so that add-ons will fit all of the different models:

Raspberry Pi Model 2
Raspberry Pi 2 Model B connector layout

Raspberry Pi Zero

November 2015 saw the launch of the Raspberry Pi Zero—a complete PC board that could be bought for just £4 and at the minute size of just 65mm x 30mm. The Foundation's aim was to take a Raspberry Pi Model A and make it as small and as cheap as possible. They even gave it away free on the front of The MagPi magazine when it was launched.

 

"We all need access to tools. Cost should never be a barrier."

 
 --Eben Upton

Up to now, the Raspberry Pi was always licensed to, and manufactured by, the likes of RS Components and Farnell element14, who have the financial might to ramp up production.

However, with the Zero, this is a go-it-alone project, with the Foundation funding and handling the manufacturing process themselves. As a result, even at the time of writing, demand has way outstripped supply, and Zeros are currently pretty difficult to get your hands on—no thanks to the many profiteers out there buying them for £4 in quantities and then trying to sell them online for a massive profit.

The Foundation are addressing this with plans to massively ramp-up production in Q2 of 2016, so hopefully by the time you read this, they will be in plentiful supply.

With its low cost and tiny form-factor, the Raspberry Pi Zero is going to be very useful in our stealthy and mischievous antics:

Raspberry Pi Zero
The very small Raspberry Pi Zero featuring micro-HDMI and micro-USB connectors and noticeable absence of a physical connector on the GPIO port