Tips, tricks and fixes for some common USB ASIC Bitcoin mining hardware issues
Here are some random things learned after years of mining cryptos. These notes began before ASICs took over in 2013/14. So, much of this info is rather dated, but may still be useful to some.
Oftentimes it seems that an obscure, reproducible issue will occur - here's a list of some of those issues and their solutions, some hardware's identifying text / Bus Device String as reported to *lsusb*, and hopefully some useful tips for many common USB ASIC mining devices:
- Hardware
- Controllers
- Cubieboard tips: To build on a v1 cubie, use the following:CFLAGS="-O2 -Wall -march=armv7" ./configure <build-flags-here>
- RasPi - until the Raspberry Pi3 came out in 2016, the main issue with RasPi as controller is the lack of USB3 support, thereby limiting the high-powered hubs many USB asicminers like to use. To build bfgminer on titan controller: CFLAGS=“-O2 -Wall -March=armv6” ./configure --enable-scrypt --disable-sha256d --enable-titan --disable-other-drivers
- USB ASIC Hardware: A primary issue with USB ASICs is providing them with adequate power, due to the constraints of most USB hubs & power supplies, and of the USB spec itself
- Bitmain U1 sticks [Bus Device string: **Cygnal Integrated Products, Inc. CP210x Composite Device**]
- Use **--enable-icarus** build option for cgminer, or use BFGMiner
- 1.6GHs to 2-3GHs with overclocking via software (active cooling is recommended)
- USB Dualminer sticks [Bus Device string: **Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC**]
- [cgminer fork for USB Dualminer sticks](https://github.com/dualminer/dualminer-cgminer.git)
- Gridseed GC3355 USB combo miner (5-chip units with attached fan) [Bus Device string: **SGS Thomson Microelectronics**]
- [cgminer fork for Gridseed 5 chip USB combo miners](https://github.com/dtbartle/cgminer-gc3355)
- Rockminer RBox and New RBox miners [Bus Device string: **Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light**]
- use **--enable-icarus** build option for cgminer
- [Dragonminer scrypt USB](https://bitcointalk.org/index.php?topic=1140837.msg12922953#msg12922953) [Device String: **Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light**]
`$ git clone https://wareck@bitbucket.org/wareck/cgminer-dragon.git`
`$ cd cgminer-dragon`
`$ sh autogen.sh`
`$ ./configure --enable-scrypt --enable-zeus`
`$ make`
./cgminer --scrypt -o pool_address -u user_or_ltc-address -p password --zeus-chips 1 --zeus-clo
- Drill-bit systems Thumbstick miners [Device String: **Atmel Corp.**]
- If you have USB hubs that can only provide 500mA per port, or you are aiming for best performance per watt, use the default settings **--drillbit-options int:40:1:850** for around 400mA power consumption and a hash rate around 2.2GH/s.
- If you can power 1000mA per Thumb and have only passive cooling, try **--drillbit-options ext:230:1:950** for around 2.7GH/s.
- If you can power 1000mA per Thumb and have active cooling , try **--drillbit-options ext:250:1:950** for up to 3GH/s (not guaranteed.)
- In either case, experiment with the clock speed (the second field in ext:_230_:1:950) in steps of 10MHz order to find the optimal hashing rate with the least Hardware Errors (HW). See the [Thumb performance and hashing tests](http://drillbitsystem.com/forum/index.php?PHPSESSID=0nfduncgk0vq04h5qbsscug4j1&topic=193.msg743#msg743) thread for more info.
- Butterfly Labs (really?) [ Device String: **Future Technology Devices International, Ltd FT232H Single HS USB-UART/FIFO IC**]
- GekkoScience Compac [Bus Device: **Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light**]
- [gekkoscience.com/misc/cgminer-gekko.tar.gz](http://gekkoscience.com/misc/cgminer-gekko.tar.gz)
- autogen.sh --enable-gekko
- use **--compac-freq NNN**
- Avalon Nano [Bus Device string: **NXP Semiconductors**]
- cgminer 4.9.1 compiled with **--enable-icarus**, and using the following runtime flags: **--icarus-options 115200:1:1 --icarus-timing 0.22**
- Bitmain U3 [Bus Device string: **Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light**]
- [cgminer v4.9.0](https://github.com/ckolivas/cgminer/releases/tag/v4.9.0) built with **--enable-icarus** most stable, with options: **--au3-freq 237.5 --au3-volt 775**
- Software
- Scripta OS - ssh port is at 7722, username root, pw scripta; startup script is at: /opt/minepeon/startup/miner-start.sh [mega download link](https://mega.co.nz/#!ZVkACTAD!aCRXr1W860jcic5bl12fbSRpHZwSX0WEgmu4PcuZlDE)
startup script: _sudo /usr/bin/screen -dmS cgminer /opt/minepeon/bin/cgminer --scrypt --no-submit-stale --gridseed-options=baud=115200,freq=850 -c /opt/minepeon_
- [Starminer](https://sourceforge.net/projects/starminer/):
- Based on Raspbian; login: root pw: live
- MinePeon:
- To update **MinePeon**
`$ cd /opt/minepeon/`
`$ git pull`
- To update **MinePeon** WebUI (use with caution):
`$ cd /opt/minepeon/http/`
`$ git pull`
- To update the OS system packages:
`$ sudo pacman -Syu`
- Default startup:
`$ #!/bin/bash`
`$ sleep 10`
`$ /usr/bin/screen -dmS miner /opt/minepeon/bin/bfgminer -S all -c /opt/minepeon/etc/miner.conf`
- steps to recreate RSA & DSA keys:
`$ sudo ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa`
`ssh-keygen`
`sudo systemctl start sshd`
`sudo systemctl start cgminer.service`
`sudo systemctl stop bfgminer.service`
`sudo systemctl disable bfgminer.service`
`sudo systemctl enable cgminer.service`
- [Minera](https://bitcointalk.org/index.php?topic=596620.0):
- Default login: user:minera, pass:minera
- Excellent GUI, and easy to add & configure custom miner software packages
- GUI for updating system
- To install on existing Raspian system:
- on a brand new system, make sure locales are set: `sudo apt-get install --reinstall locales`
According to [There is no public key available for the following key ID](http://www.linuxquestions.org/questions/debian-26/there-is-no-public-key-available-for-the-following-key-id-705108/), this will fix it:
`sudo aptitude install debian-keyring debian-archive-keyring`
`dpkg-reconfigure tzdata apt-get install libusb-1.0-0-dev`
`apt-get install pkg-config`
`sudo apt-get install -y redis-server git screen php5-cli php5-curl`
`cd /var/www`
`sudo git clone https://github.com/michelem09/minera`
`cd minera`
`sudo ./install_minera.sh`
- To install required websever & php:
`sudo apt-get install -y lighttpd php5-cgi`
`sudo lighty-enable-mod fastcgi`
`sudo lighty-enable-mod fastcgi-php`
`sudo service lighttpd force-reload`
- To install Berkeley DB 4.8:
`sudo apt-get install libdb4.8++-dev `
miniupnpc:
` wget http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.6.tar.gz`
`tar -xzvf miniupnpc-1.6.tar.gz`
`cd miniupnpc-1.6`
`make`
`sudo su`
`make install`
##### scrypt (and x11 & other GPU) mining info:
> Install AMD Drivers
EACH NEW COMMAND STARTS WITH A $
`$ sudo apt-get install fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev`
`$ sudo aticonfig --lsa`
`$ sudo aticonfig --adapter=all --initial`
`$ sudo reboot`
`$ sudo aticonfig --adapter=all --odgt`
>Install Curl and package updates
`$ sudo apt-get install curl`
`$ sudo apt-get update`
`$ sudo apt-get upgrade`
>Install cgminer
`$ wget http://ck.kolivas.org/apps/cgminer/3.7/cgminer-3.7.2-x86_64-built.tar.bz2`
`$ tar jxvf cgminer-3.7.2-x86_64-built.tar.bz2`
`$ cd cgminer-3.7.2-x86_64-built`
`$ export DISPLAY=:0`
`$ export GPU_USE_SYNC_OBJECTS=1`
`$ ./cgminer -n`
The *./cgminer -n* command will list all the mining devices cgminer & the system can see
>Make a startup file and start Mining!
`$ sudo nano start.sh`
>Plug in this body of text replacing YOUR_XUBUNTU_USERNAME, USERNAME, and PASSWORD
> !/bin/sh
> export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
cd /home/YOUR_XUBUNTU_USERNAME/cgminer-3.7.2-x86_64-built ./cgminer -scrypt -I 19 --thread-concurrency 21712 -o stratum+tcp://pool2.d2.cc:3335 -u USERNAME -p PASSWORD
Nicehash's [extranonce support fork for cgminer](https://github.com/nicehash/cgminer-ckolivas). To get the extranonce subscription to work, you may need to append "/#xnsub" to the pool's URL
Gridseed GC3355 USB combo miner (5-chip units with attached fan)
- [cgminer fork for Gridseed 5 chip USB combo miners](https://github.com/dtbartle/cgminer-gc3355)
cgminer --gridseed-options=baud=115200,freq=650,chips=5,modules=1,usefifo=0,btc=16
##### USB Power on RasPi/2
With the release of the raspberry Pi B+, a new config.txt setting was introduced, to allow for up to 1A of power at the USB port.
**max_usb_current=1** in your /boot/config.txt file
To fix the "**paymentrequestplus.h:8:31: fatal error: paymentrequest.pb.h: No such file or directory**" issue:
`apt-get install libqt4-dev libprotobuf-dev protobuf-compiler`
To fix the "**Unable to find current revision in submodule path 'libblkmaker'**" error: Before running autogen.sh, execute:
`git clone https://github.com/bitcoin/libblkmaker`