Rapberry Pi 2 Antminer U2 CGMiner
Fix Formatting and figure out startup script.
Sign up for a bitcoin pool. A comparison of mining pools can be found at https://en.bitcoin.it/wiki/Comparison_of_mining_pools. I found this a bit overwhelming so I decide to start with Slush's pool, (https://mining.bitcoin.cz), as a few tutorials were using it. This video contains some info on setting it up. https://www.youtube.com/watch?v=blDhGFTGuhU
ssh into your raspberry pi
Pull down any updates to any packages you have currently installed,
$ sudo apt-get update
Install the updates you just downloaded,
$ sudo apt-get upgrade
Install our depencies
$ sudo apt-get install libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev libtool automake pkg-config libjansson-dev tmux
If not already there go to your home directory/
Clone cgminer from github.
Go to the cgminer directory you just cloned.
$ cd cgminer
We first need to do some configuration before compiling cgminer. There seems to be a number of options to set. I wasn't 100% sure what needed to be set for using the U2, so I decided to keep following https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046 for this step.
$ sudo ./autogen.sh $ export LIBCURL_CFLAGS=’-I/usr/include/curl’ $ ./configure --enable-icarus
Note: Running autogen and configure may take a bit to start after running the command, so be patient.
Now it's time to compile.
$ sudo make install
Time to start up our miner. Open a tmux session so we can detach without closing the program.
$ cd cgminerChanges working directory to cgminer directory. Assumes you are in your home directory.
$ cdif you are unsure.
Start up cgminger. This setup is for Antminer U2's your setup may differ.
$ sudo ./cgminer --bmsc-options 115200:20 -o POOL -u USERNAME -p PASSWORD --bmsc-freq 0981
Since I am using slush's pool, I replaced "POOL" with
stratum+tcp://stratum.bitcoin.cz:3333. Yours will be different if you are using a pool other than Slush. Some tutorials say you need to add your devices, but since I am running 2 U2's only, cgminer automatically detects and runs both. If I was running different miners, say a U2 and a U3 I would need to specify the correct device to apply the correct settings.
Reference:(Clean Me!) https://github.com/AntMiner/AntGen1/tree/master/cgminer, http://bitcoinrigs.org/instructions/antminer-u1/, http://denis-gobo.squarespace.com/denisgobo/2014/5/17/how-to-install-and-overclock-a-bitmain-antminer-u2-2ghs-usb-bitcoin-asic-miner-on-windows, [http://www.granthamm.com/bitcoin-mining-raspberry-pi-antminer-u1-fun/](http://www.granthamm.com/bitcoin-mining-raspberry-pi-a ntminer-u1-fun/), https://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/install-cgminer, https://www.youtube.com/watch?v=dPWTSytzN7g&index=2&list=PLPedo-T7QiNseMLPwm6xdknAAbZMGpQtB, https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046, https://www.youtube.com/watch?v=blDhGFTGuhU, https://bitcointalk.org/index.php?topic=259574.0, https://bitcointalk.org/index.php?topic=585225.0,
- Deciphering the interface http://bitcoin.stackexchange.com/questions/19260/deciphering-cgminer-interface-in-terminal