Beginners Guide To Turn Your Raspberry Pi into an Affordable Bitcoin Mining Rig

raspberry pi bitcoin rig
First off, I know this post is a little late in the game as it is becoming less profitable for amateurs to mine Bitcoins, and that there are more efficient ways to go about this. But I am writing this anyways for posterity’s sake as I know for a fact there are people out there who have idle Raspberry Pis and are looking for a project. I’m sure there are also others like myself who are just looking to learn more about cryptocurrencies. To get started, here is our shopping list (if you are reading this, you probably already own some of these items):

Shopping List

QTY Required Items Price(USD)*
1 Raspberry PI $35.00
1 Micro USB cable $5.49
1 ASICMiner Erupter USB 336MH/s Sapphire Bitcoin Miner $10.99
1 Powered USB Hub** $25.00
1 SD Card (class 4 and 2gb minimum) $7.49
Total: $83.97
Optional Items
1 Power Supply $9.95
1 HDMI Cable $2.28
1 Case $12.75
1 USB Fan (The mining devices run hot) $8.43

*Prices are subject to change
**The Pi alone can not power one of these miners, a Powered USB HUB is mandatory to mine bitcoin.

Bitcoin Wallets

Before we setup the Mining software on the Pi we need to setup a bitcoin wallet where we will store the credit from the mining. There are countless options(Software, Web, Mobile) when it comes to setting up a bitcoin wallet. I’ve listed a few below but there are many more and each method has its own risks, luckily has a great writeup on how to choose a wallet.

Multi-Bit – Quick and Lightweight Bitcoin Wallet
Bitcoin-QT – Takes a day or two to download ~6gigs of Bitcoin Transactional Data
Armory – Desktop Add-on Application


Bitcoin Wallet

Currently the app store does not allow any bitcoin wallet applications.

Mining Pools

Bitcoin Pooled Mining is the best way to get started mining. Pooled Mining allows multiple users to work together to “crack” a single bitcoin and then share the benefits fairly. Due to the competitive nature of mining, if you tried to mine on your own it could be a long time before you successfully mined anything. Pooled Mining is a nice way to receive smaller and more regular payouts instead. For people with slower rigs, pooled mining might be the only way you ever earn bitcoins.

Two Mining pools I recommend and have verified are:
Slush’s Pool
BTC Guild

The setup for both pools is straight forward. You create a username, password, and then worker credentials(for each mining device). You also add the bitcoin wallet address you created above to your pool so you receive bitcoin payments when you hit the pool’s payout thresholds (usually around .01 BTC). It’s also recommended you sign up for multiple pools in case one experiences technical difficulties, the software we are about to install will switch if one goes down.

Installing Mine Peon the rPi

Now that we have a bitcoin wallet and have joined a mining pool, Neil Fincham and his project Mine Peon makes getting the software running on the rPi quite easy. Mine Peon is an ARM Mining Platform that is built specifically for Raspberry Pi. It is built on Arch Linux and uses the popular cgminer and bfgminer for the heavy lifting. To get started, you simply download the latest image here and burn it to your SD card.
If you are using Windows to flash your SD Card, I recommend using Win32DiskImager. This tool can also be used after our initial setup to create an image of our finalized implementation(very useful as a backup).


For other operating systems, you can find a handy guide on flashing SD cards from here.

After the image is flashed, you can boot your device. The first boot takes about a minute as it needs to generate the SSH keys, but future boots take only about 10 seconds. Use your router or keyboard/video/mouse to find out the IP address of the rPi. The default username and password for SSH and for the WebUI are:

Username: minepeon
Password: peon

After the rPi has booted, you can navigate to Mine Peon’s handy WebUI by opening your browser and entering the Raspberry Pi’s IP address. There you can insert the mining pool and worker information.
mine peon pools

The best part about Mine Peon is that it automatically supports the USB mining devices, so you can be up and running in a few minutes without having to worry about drivers/compatability issues. There are even handy graphs to check your stats!
mine peon stats

For Further information on Mine Peon check out their installation guide here.

Closing Remarks

Are you going to get rich quick using the Raspberry Pi for bitcoin mining? Of course not. This tutorial was never meant to give that impression. But, could you potential recoup your investment costs and perhaps end up a couple bucks ahead after 6-12 months? Definitely possible!

PS – If you have any questions about earning potential, profitability, or just basic setup, just add a comment below and I’d be happy to help! And if you get your rPi working and mining Bitcoin – Feel free to send a tip to my blog’s BTC address:


Donate Bitcoins

Thanks for reading!

Read More

Google Chromecast: Unboxing and Review (Pictures and Video)

My Google Chromecast arrived last night, so I decided to write a quick post showing the unboxing, setup, and some of the features.

Chromecast Unboxing

First, the packaging:

Chrome Cast Unboxing Packaging

Chrome Cast Unboxing Packaging

Its not exactly the same experience you get from opening up an Apple product, but it does feel similar in the minimalistic style. As I expected from the photos online, the Chromecast is like a large thumbdrive that plugs into an HDMI port instead of USB. For reference:

Chrome Cast Unboxing Packaging

Chromecast Setup

After you plug the powered Chromecast into your TV, you are greeted with the following screen that invites you to set up the Chromecast on your phone or laptop. The experience was equally simple on my laptop, phone, and tablet. I factory reset the device after completion to try all three.

chromecast setup screen hdtv


The setup process takes about 5 minutes. To get started, you navigate to the setup URL as prompted above.

setup website google chrome


After you download the App, it will inform you that your network connections will go down for a moment as it connects to the WiFi network provided by the Chromecast. On my iPhone, I had to do this manually. After the setup connects to that network, it allows you to enter your home WiFi information so the Chromecast can join your wireless network.

google chromecast enter wifi info

That’s it, the Chromecast is now setup.

chromecast setup complete


Now all that is left is for you to do is install the Google Cast extension into your Chrome Browser. After that installation is complete you will have a ‘Cast’ Button in your Chrome navigation menu.

chrome cast extension

Now You can click this on any web page and it will be broadcasted to your TV. up on screen

Videos of Chromecast

My favorite feature of Chromecast so far is that browser tab you select to share stays broadcasted on your TV even if you switch tabs. Here is an example:

Netflix and Chromecast works the same way:


I updated my Netflix app on iOS and the Chrome Cast doesnt seem to be supported just yet (7/31/13), but I’m sure that’s just a matter of time.

Take aways

Is the Chromecast a mind blowing piece of technology that no one has ever seen? Not exactly. I’ve been doing something similar with my Apple TV for a few years now. However, at 35$ it is an incredible deal even if you do already have an Apple TV.

And with regards to their tagline “The easiest way to enjoy online video and music on your TV.….”

I’d have to agree.

Read More

Verified: Raspberry Pi and 3G Sierra Wireless 250u Aircard from Sprint

I am writing this quick post as I recently had a very difficult time getting the Sierra Wireless 250u 3G USB modem from Sprint working on my Raspberry Pi. I also had seen anyone else on the web or forums having success with this combination. It turns out my main issue was that I was not using a powered USB hub. The Raspberry Pi’s only output about 100mA out of their USB ports and the 3G modem requires much more than that.

sierra wireless 250u and raspberry pi

After I started using a powered USB hub, the configuration was straight forward. I am using the Wheezy version of Raspbian as my OS. This Belkin 7 Port Hub works out of the box.

The first thing I needed to do was check to make sure my device was recognized.


You should get a print out similar to this,


The important line we are looking for is:

Bus 001 Device 010: ID 1199:0301 Sierra Wireless, Inc.

Now that we have verified that the device is being recognized by the rPi, we need to install our dialer, WvDial. WvDial is a Point-to-Point Protocol dialer, it will enable a modem and start pppd in order to connect to the Internet.

sudo apt-get install wvdial

Then, edit the configuration file:

sudo nano /etc/wvdial.conf

I replace the entire contents of my file with the following:

[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = USB Modem
Phone = #777
Username = ''
Password = ''
Carrier Check = no
Stupid Mode = 1

Now, test the connection:

sudo wvdial

A succesful connection looks like this:

--> WvDial: Internet dialer version 1.61
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Jul 11 18:46:50 2013
--> Pid of pppd: 3395
--> Using interface ppp0
--> local IP address
--> remote IP address
--> primary DNS address
--> secondary DNS address xx.xx.33.x

There is a manual from Sprint located here if you have any troubles connecting, or just comment on the blog and I’d be happy to help debug with you. Thanks for reading.

Read More

How to Tether Your Raspberry Pi with your iPhone 5

If you have been reading my blog lately you know that I have done a lot of projects involving Raspberry Pi‘s, the $35 dollar credit card sized Linux computer. Because of its small size, I recently started of thinking of projects that would allow me to be mobile with the Pi.

That led me to this post.

There are plenty of resources online about tethering the iPhone 5 with the graphical interface, but I wanted to be able ‘hotswap’ my Raspberry Pi’s Internet connection without command line, and without the graphical interface. Plug and play, essentially.

I was able to get this working last night using Raspian (a free operating system based on Debian optimized for the Raspberry Pi hardware) and a few scripts.


Make sure your iPhone is disconnected and proceed to install the following iPhone and file system utilities. Open up a terminal or SSH into your Pi and run the following commands:

sudo apt-get install gvfs ipheth-utils
sudo apt-get install libimobiledevice-utils gvfs-backends gvfs-bin gvfs-fuse

After these are installed, and with your iPhone still not plugged in, lets take a look at our available interfaces. Run the following commands:

ifconfig -s

If you have a standard installation, you should see two interfaces, eth0 and lo.

tether iphone 5 raspberry pi

The reason we did this step was to make sure we correctly identified the name of the iPhone’s network interface. Now that you have this list you can turn on your iPhone’s Personal Hotspot and then plug it into your Raspberry Pi’s USB port, and issue the same command.

ifconfig -s

iphone raspberry pi

Your Pi should now recognize your iPhone is plugged in and assign its network interface a name, usually eth1. Now we need to edit our interfaces file to allow for hotswapping and dchp.

Unplug your iPhone and then open up your network interfaces file

sudo nano /etc/network/interfaces

and add the following lines, where eth1 is the name identified above.

allow-hotplug eth1
iface eth1 inet dhcp

Save and close the interfaces file.

Graphical Interface

If you are using the graphical interface, you are now done and the above commands were all that were necessary to use your iPhone as an Internet connection!

You can test this by starting your desktop environment


Then unplug your Ethernet connection, start your Personal Hotspot, and plug in your iPhone. A popup message saying a “Removable medium is inserted” , that is safe to close. Then open a terminal, and run the following command:


You should be connected to the Internet!

Command Line

In my testing, tethering with command line only will only work when the iPhone is mounted. To do this, we need the ifuse package:

sudo aptitude install ifuse

and create a mount directory for the iPhone

sudo mkdir /media/iPhone

Now we can disconnect the ethernet of the Pi, turn on the iPhone’s Hotspot , and plug in then mount the iPhone.

sudo ifuse /media/iPhone

The Internet should now be tethered from your iPhone. Remember, while using command prompt only, the iPhone must manually be mounted each time it is plugged in using the ifuse command.

Putting It All Together

Now that we know how to tether the phone in the graphical interface, and the command line interface, we can add a script(thanks to users djpod and benebeck on the forums) that will automatically mount the iPhone it is plugged in.

To automate the process, I put the following script named iphoneconnect in /lib/udev/:

sudo nano /lib/udev/iphoneconnect

umount /media/iPhone #when the iPhone is unplugged, it is not automatically unmounted.
ifuse /media/iPhone

Remember to make the script executable

sudo chmod 755 /lib/udev/iphoneconnect

The final step is to edit the file ’90-iphone-tether.rules’ in the ‘/lib/udev/rules.d’ directory.

sudo nano /lib/udev/rules.d/90-iphone-tether.rules

This is the script that runs automatically when ever we plug in the iPhone, and we want to edit it to call the script we created (/lib/udev/iphoneconnect) instead of what it currently calls (/lib/udev/ipheth_pair). To do this, we just edit the 5th line of the file replacing ipheth_pair with iphoneconnect.

The file should look like this

# udev rules for setting correct configuration and pairing on tethered iPhones
ATTR{idVendor}!="05ac", GOTO="ipheth_rules_end"

# Execute pairing program when appropriate
ACTION=="add", SUBSYSTEM=="net", ENV{ID_USB_DRIVER}=="ipheth", SYMLINK+="iphone", RUN+="iphoneconnect"


Thats it! Your Raspberry Pi will now automatically Tether your iPhone without Graphical Interface and without Command line!




iPhone Tethered Raspberry Pi


My command line speed tests averaged at about 1.5mb/s download over Verizon LTE neat Boston, MA.

wget --output-document=/dev/null
Read More