Bitcoin mining on Raspberry Pi with USB ASIC Miner Block Erupter

Despite the fact it will not make any real money, I just could not resist getting one of these beautiful little USB Bitcoin mining ASICS. At the current value of a bitcoin the only one that is making money from bitcoins are people selling hardware or anyone stealing free electricity. However the whole development of crypto currency is facsinating and I consider this a very small price to pay for keeping up to date with technology.

When the Block Erupter was first available in the UK they where going for about £100, I resisted the urge and after a month got a bargain on ebay for £70 deliver from Poland. Sounds like a bargain, but when you do the maths it will be a long time before it is making me any beer money. Using the calculator with electricity 13.020p per kWh and a rough guess of 5 Watt power consumption, it is going to take a massive 1 year, 227 days to break even.

There is always the chance that the bitcoin price will go crazy again, certainly not inconceivable that it might get back to its $240 peak, but even with double or tripling of the value it is still a long haul before my little ASIC pays for itself. Never mind though, it is a nice shiny little piece of kit, gives me something to do with a Raspberry Pi and a potentially a safer bet than a lottery ticket.

Here are my install notes for getting the ASIC Miner USB Block Erupter running on a Raspberry Pi running Debian or Raspbian. The commands should work on any Debian based system including Ubuntu.

Install all the prerequisites that you will need to compile bfgminer.

root@debian:~# apt-get install build-essential autoconf automake libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthash-dev libncursesw5-dev libudev-dev libusb-1.0-0-dev libmicrohttpd-dev wget screen

Get the latest stable package from (if your brave try the github version

root@debian:~# wget 
root@debian:~# unzip
root@debian:~# cd bfgminer-3.1.4

Follow the build instructions

root@debian:~/bfgminer-3.1.4# ./configure 
root@debian:~/bfgminer-3.1.4# make
root@debian:~/bfgminer-3.1.4# make install 

For security you are better off creating a separate non-privileged user to mine.

root@debian:~#  useradd -g dialout -d /home/miner miner 

Change to the new user and make sure you can mine ok.

root@debian:~# su - miner
$ bfgminer -o -u 13sEZXeUc2RRsWfVq4sqf3zCoHZsm1gMNJ -px -S all

Once you are happy that bfgminer is detecting the ASIC and mining correctly, we add the command to the start up scripts


vi /etc/rc.local

Add the following line before the line that contains exit 0, it should look something like this.

# By default this script does nothing.
su miner -c "screen -d -m bfgminer -o -u 13sEZXeUc2RRsWfVq4sqf3zCoHZsm1gMNJ -px -S all"
exit 0

Next time you reboot the miner user will start mining with bfgminer in a detached screen session. If you want to check the status of bfgminer, login as the miner user and attach to the screen session.

$ screen -r