Archives

All posts for the month November, 2013

I recently got a BitCoin ASIC miner. The wait was extreme – 7 months. But it arrived.

I decided to use my CentOS home server to run the mining software. These are the steps I followed and got it working. The following commands should run as root or use sudo when needed. For reference, I used the “$” prompt for normal user commands and the “#” prompt for commands that need to run as root.

First install a bunch of required packages:

# yum install -y wget gcc make unzip uthash libcurl libcurl-devel

Then download and install jansson:

$ wget http://www.digip.org/jansson/releases/jansson-2.4.tar.gz
$ tar -zxf jansson-2.4.tar.gz
$ cd jansson-2.4/
$ ./configure --prefix=/usr/
$ make clean
$ make
# make install

Then download and install bfgminer:

$ wget http://luke.dashjr.org/programs/bitcoin/files/bfgminer/3.4.0/bfgminer-3.4.0.zip
$ unzip bfgminer-3.4.0.zip
$ cd bfgminer-3.4.0
$ ./configure --prefix=/usr/
$ make clean
$ make
# make install

Reload the libraries:

# ldconfig

Test to make sure the miner is in your path and does the pre-check:

$ bfgminer --help

Now, plug in the miner and make sure it registers as a USB device

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 007: ID 0403:6014 Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC

Now clean the modules and make sure the new module gets loaded (this is specific to the BFL miner I have):

# modprobe -r
# modprobe ftdi_sio vendor=0x403 product=0x6014

Now if you start bfgminer with the correct options, it should detect and start processing blocks:

$ bfgminer -o stratum+tcp://somepool:port -u MyUserName -p NotMyPass

One note – if you want to run this tool as a regular user (and you should). Add the user to the “dialout” group. That group has access to the /dev/ttyUSB0 (or equivilant) device.

I then start a “screen” session, run the miner and disconnect. It allows me to check on it later on, but does not require me to keep an active session open or leave myself logged into the console.