Bitcoin Forum

Bitcoin => Mining support => Topic started by: gigawatt on July 20, 2013, 06:25:53 PM



Title: Block Erupter + RasPi + cgminer = Hashing but no submitted shares?
Post by: gigawatt on July 20, 2013, 06:25:53 PM
I've been racking my brain trying to figure out why this isn't working.

My install procedures:

Code:
export LIBCURL_CFLAGS="-I/usr/include/curl"
export LIBCURL_LIBS="-L/usr/lib -lcurl"

wget http://ck.kolivas.org/apps/cgminer/3.1/cgminer-3.1.1.tar.bz2
tar xvf cgminer-3.1.1.tar.bz2
mv cgminer-3.1.1 cgminer
cd cgminer
./configure --enable-bitforce --enable-icarus
make
make install

My cgminer.conf is only my pool info.

I run cgminer with:
Code:
cgminer -c ~/cgminer/cgminer.conf --icarus-options 115200:1:1 --icarus-timing 3.0=100 -S /dev/ttyUSB0

It runs and detects the two block erupters and begins hashing, but submits no shares.  This is a screenshot after ~10 minutes:

https://i.imgur.com/8LKWz5e.png


I've also tried cgminer versions 3.2.2 (it ends up disconnecting the USB devices from /dev/) and 3.3.1 (it detects them, but no hashing at all) to no avail.
If I connect the erupter to my desktop computer running Windows 7 + cgminer 3.1.1, it works just fine.

Any help would be greatly appreciated.



edit: The erupter is connected to a powered USB hub supplied with 5v 1000mA power, so that shouldn't be an issue.


Title: Re: Block Erupter + RasPi + cgminer = Hashing but no submitted shares?
Post by: c789 on July 20, 2013, 07:00:46 PM
Those installation instructions are a little different from the ones I followed. Here's what I did and everything is working (my pi is on a "Pluggable" powered hub with 2 Erupters running cgminer 3.1.1 on Raspberrian).

http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/install-cgminer  (see this and its 2 following pages)

The following is from cgminer's git page and it seems that a lot of people miss these steps when setting up their pi. I'm not saying you missed it, but just being thorough:

Quote
On linux, the direct USB support requires no drivers at all. However due to
permissions issues, you may not be able to mine directly on the devices as a
regular user without giving the user access to the device or by mining as
root (administrator). In order to give your regular user access, you can make
him a member of the plugdev group with the following commands:

 sudo usermod -G plugdev -a `whoami`

If your distribution does not have the plugdev group you can create it with:

 sudo groupadd plugdev

In order for the BFL devices to instantly be owned by the plugdev group and
accessible by anyone from the plugdev group you can copy the file
"01-cgminer.rules" from the cgminer archive into the /etc/udev/rules.d
directory with the following command:

 sudo cp 01-cgminer.rules /etc/udev/rules.d/

After this you can either manually restart udev and re-login, or more easily
just reboot.



Title: Re: Block Erupter + RasPi + cgminer = Hashing but no submitted shares?
Post by: gigawatt on July 20, 2013, 07:22:05 PM
I did miss those git steps in the install.  I've run them now (added my user account to the plugdev group) and copied the rules file and copy/pasted the cgminer.conf file from the tutorial (minus the pool info).

Still nothing.  It hashes, but no shares.


I even tried using the newest version of the rules file directly from the repo.
Then I reran
Code:
sudo apt-get update; sudo apt-get upgrade; sudo rpi-update

Still nothing.



There's got to be something obvious that I'm missing.


Title: Re: Block Erupter + RasPi + cgminer = Hashing but no submitted shares?
Post by: c789 on July 20, 2013, 07:52:21 PM
Are the Erupter LEDs flashing or solid when you run cgminer?

Try checking to make sure you have the correct USB devices identified:
Code:
ls /dev/*USB*

This will return something like this and will tell you the number of the USB device to use in your command line
Code:
/dev/ttyUSB0 /dev/ttyUSB1


Title: Re: Block Erupter + RasPi + cgminer = Hashing but no submitted shares?
Post by: gigawatt on July 20, 2013, 07:54:47 PM
The Eupter LEDs blink 3 times, then stay solid when plugged in.

I've hacked together the following to make sure I pick up every ttyUSB#:
Code:
usb_list=$(find /dev -name 'ttyUSB*' | awk '{ printf "-S " $1 " " }')
cgminer --config ~/cgminer/cgminer.con $usb_list

I have also manually listed out the -S /dev/ttyUSB0, etc.



I feel like I'm reaching the point where the next sane option is to backup my RasPi, fresh install and see if that works.


Title: Re: Block Erupter + RasPi + cgminer = Hashing but no submitted shares?
Post by: gigawatt on July 21, 2013, 12:34:08 AM
I feel like I'm taking crazy pills.

I did a fresh install of Raspbian and ran updates.  Followed the adafruit guide from here (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/install-cgminer).

Ran cgminer...

https://i.imgur.com/ieVepbV.png

ONE.  One share in ~5 minutes.  When I restarted and tried again, no shares.
Plugged it back into my Windows 7 desktop, got "U" of ~4/m.

I'm slowly, very slowly going insane.


Title: Re: Block Erupter + RasPi + cgminer = Hashing but no submitted shares?
Post by: gigawatt on July 21, 2013, 02:44:59 AM
I think I may have found the culprit: my USB hub's AC adapter.

Every test I've run has had both block erupters connected to the hub even if I was just using one of them for testing.
Unplugging either of the erupters makes the other work correctly.

The AC adapter is rated at 5v 1000ma, but given how bulk produced they are, it wouldn't surprise me if it's actually much less.


It would explain why it works on my desktop but not my RasPi: the desktop can actually deliver the missing 500ma via the USB port, the RasPi cannot.





SOLVED: Yep, it's the AC adapter.  Just hooked it up to my trusty voltmeter.  The AC adapter is rated at 5v 1000ma but puts out 5v 350ma.