Bitcoin Forum
April 19, 2024, 05:48:42 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BFGminer on Raspberry pi  (Read 8875 times)
kernellinux (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
August 08, 2013, 10:03:13 PM
Last edit: August 11, 2013, 06:08:27 AM by kernellinux
 #1

Greetings!

Just got my block eruptors running on my pi and I wanted to document my process as I found the currently available guides either incomplete or outdated. I've had a lot of help from the BTC community and want to give back in anyway I can so hopefully this helps someone who is just starting out. Please feel free to PM me if you run into any problems! As a side note USB 3.0 hubs (blue connector) will not work with the Pi.

UPDATE, I tried this with the newest release of Raspbian and the newest release of BFGMiner and do not have it working yet. With this method I used

2013-05-25-wheezy-raspbian
Available here (http://raspberry.mythic-beasts.com/raspberry/images/raspbian/2013-05-25-wheezy-raspbian/2013-05-25-wheezy-raspbian.zip)


and

BFGminer 3.1.3
I've tried downloading the old version from github but it will not make. The only difference between the files hosted at github and the file that I have (that works) is mine extracts to a folder called BFGminer-3.1.3 and the one on github extracts with a folder named bfgminer-bfgminer-3.1.3, which to the best of my understanding should make no difference.

1. Prepare the SD Card for the Raspberry Pi.
Code:
sudo dd bs=4M if=rbpi.img of=/dev/sdd

2. Run the
Code:
sync
command before ejecting the card from the computer.

3. Start up the Raspberry Pi. During the initial setup set the root password and enable SSH password.

4. Update the Raspberry Pi
Code:
sudo aptitude update

5. Run this command to install the necessary packages
Code:
sudo aptitude install autoconf libtool libncurses-dev yasm curl libcurl4-openssl-dev libjansson-dev pkg-config libudev-dev uthash-dev libusb-dev

6, Find the IP Address of your Raspberry Pi
Code:
ip addr

FROM A COMPUTER

Download a copy of BFGMiner (https://github.com/luke-jr/bfgminer/archive/bfgminer-3.1.3.zip)

7. Copy the zip file to your raspberry pi (replacing the username with your username and the IP address with the address of your Pi.)
Code:
scp bfgminer-3.1.4.zip user@192.168.50.1

8. Unzip bfgminer
Code:
unzip bfgminer

9. Go into the directory that you unzipped and initialize git.
Code:
cd bfgminer
git init

10. Run the autogen.sh
Code:
./autogen.sh

11. Run congure
Code:
./configure

12. Run Make
Code:
make

Start the miner
From inside the bfgminer folder
Code:
sudo ./bfgminer -o stratum.btcguild.com:3333 -O username:password -S all


It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713548922
Hero Member
*
Offline Offline

Posts: 1713548922

View Profile Personal Message (Offline)

Ignore
1713548922
Reply with quote  #2

1713548922
Report to moderator
1713548922
Hero Member
*
Offline Offline

Posts: 1713548922

View Profile Personal Message (Offline)

Ignore
1713548922
Reply with quote  #2

1713548922
Report to moderator
rabrabrab
Newbie
*
Offline Offline

Activity: 6
Merit: 0



View Profile
August 09, 2013, 03:05:12 AM
 #2

Regarding the "git init" and "autogen.sh" - I don't think you need these two commands when you have downloaded a zip archive..

Cheers,
RAB
kernellinux (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
August 09, 2013, 07:14:19 AM
 #3

rabrabrab, thanks for the correction!
BenTuras
Hero Member
*****
Offline Offline

Activity: 826
Merit: 1001



View Profile
August 09, 2013, 10:52:27 AM
 #4

2. Eject the card from the computer. After ejecting run the command sync to make sure the buffer is dumped.

Sync BEFORE ejecting.


I am selling in stock OneStringMiner boards, based on the Bitfury chips. Have a look here: https://bitcointalk.org/index.php?topic=495536.0
kernellinux (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
August 11, 2013, 12:23:29 AM
 #5

@BenTuras Thanks!! Terribly worded...it sounds like I'm saying pull the card out...then dump the buffer to the card. I was referring to the eject button in nautilus.


For my clarification...I should have used the word "unmount" not eject, but when you click on the eject button (which I assume issues the unmount command so you can remove the SD card from the reader) isn't that the in between period when you want to use the sync command to dump the buffer?

Updated Now!!
oddree
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
August 21, 2013, 11:51:14 PM
 #6

Nice tutorial.  I just did this myself earlier.  Only thing I would change with your tutorial would be to download the file and extract it from the RPi using wget and tar (are we not men?)  :-)

So around step #7 ... just do this from your RPi ...
Quote

Anyhow - I wanted to get some feedback from you folks and ask you "how's it going?".

Because I am running three ASIC USB Block Erupters and I feel like they are just not trucking along very well.  I have a setup at work where I get 80k or so doing 256-sha mining.  And I am just watching the "Accepted" messages rolling by.  Then I have my MINING MONSTER which is running through the messages at about 1/3rd the speed.  Makes NO sense.

I am mining Zetacoin, which has a very low difficulty compared to BTC.  And I have a few theories about what might be going wrong.
1) My network connection at home is not as good as at work.
2) The Raspberry Pi's built on NIC is not very good.
3) The brainpower of the RPi is not good enough to keep up with the constant work-load.
4) I don't know what the hell I am doing.

#4 is VERY likely.  It could be that I am mining at full power, and seeing less Accepted messages because the 'chunks are bigger' ... or something.  I am a n00b to all of this.

Anywho - how are YOU GUYS doing with bfgminer on you RPi?  How does it compare to other miners you have set up?
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
August 21, 2013, 11:55:00 PM
 #7

If it's like cgminer you need to add flags to configure to enable the block eruptors and use a different version of libusb.

If you're not set on bfgminer and don't want to make it yourself, you can use cgminer, he has binaries available:  https://github.com/kanoi/cgminer-binaries/tree/master/RPi_Raspbian

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
oddree
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
August 22, 2013, 12:11:15 AM
 #8

If it's like cgminer you need to add flags to configure to enable the block eruptors and use a different version of libusb.

Ah, thank you.  So it seems that I am not crazy!  Your comment has lead me in the right directions.  I am reading through this thread now, and I am hoping there is a solution when I get to the bottom!  Smiley
https://bitcointalk.org/index.php?topic=28402.msg2817682#msg2817682

If you're not set on bfgminer and don't want to make it yourself, you can use cgminer, he has binaries available:  https://github.com/kanoi/cgminer-binaries/tree/master/RPi_Raspbian

Funny thing is that I started with cgminer, on my RPi and my windows platforms, but it seems like bfgminer was a little more reliable.  But pre-compiled binaries are tempting!  Still it seems weird that you have to run an old version of cgminer because "they changed the way it uses USB".  So they basically broke it for a large part of their user community and the solution was to island all of those users and make them run old code.  Hah!

And yes, I get the irony that bfgminer is just a cgminer split.  But hey - I can run the latest code and it works with my stuff!!  :-)  :-)
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
August 22, 2013, 01:22:13 AM
 #9

The latest cgminer works fine, it's just the usb library that you have to use a certain version of.  You can download it from that link and build it, then set your library flags when you compile cgminer.  But try the precompiled binary, it should be the latest version -- at worst it's just a couple days old.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
oddree
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
August 22, 2013, 01:55:32 AM
 #10

Being the stubborn ass that I am ... I removed libusb and libusb-dev as packages and then built them from the latest source.  But then I read into kano's post and realized that was a dumb waste of time.  Because the latest code is still 'broken', and the stuff kano is pointing to is a custom hack-job.

So I followed his instructions here:
https://bitcointalk.org/index.php?topic=28402.msg2846296#msg2846296

But I applied them to bfgminer (altering the Makefile to point to the specially built libusb).  Seemed to build with success, and I am running it now.  Although it really doesn't seem to be running any faster that I can tell.

Example ...
Quote
[2013-08-21 21:41:21] Stratum from pool 0 requested work update
 [2013-08-21 21:41:30] Accepted aace97fd ICA 0  Diff 1/1
 [2013-08-21 21:41:38] Accepted 35432ef3 ICA 0  Diff 4/1
 [2013-08-21 21:41:43] Accepted 994f0dfa ICA 0  Diff 1/1
 [2013-08-21 21:41:43] Accepted b6c7dd49 ICA 0  Diff 1/1
 [2013-08-21 21:41:46] Stratum from pool 0 requested work update
 [2013-08-21 21:41:46] Accepted 12a0587f ICA 0  Diff 13/1
 [2013-08-21 21:41:46] Network difficulty changed to 2.76k (19.77Gh/s)
 [2013-08-21 21:41:46] Stratum from pool 0 detected new block
 [2013-08-21 21:41:50] Accepted 8031d28e ICA 1  Diff 1/1
 [2013-08-21 21:41:51] Accepted 7c4c5593 ICA 0  Diff 2/1
 [2013-08-21 21:41:54] Accepted 903ba748 ICA 1  Diff 1/1
 [2013-08-21 21:41:55] Accepted 8887d5d1 ICA 0  Diff 1/1
 [2013-08-21 21:41:58] Accepted 9d170079 ICA 2  Diff 1/1
 [2013-08-21 21:41:59] Accepted 5f53bd77 ICA 2  Diff 2/1
 [2013-08-21 21:42:00] Accepted 3b7b5a9a ICA 1  Diff 4/1
 [2013-08-21 21:42:04] Accepted e9215525 ICA 1  Diff 1/1
 [2013-08-21 21:42:05] Accepted 46744b07 ICA 0  Diff 3/1

Maybe I am off base here, but I figure I should be getting at least one share a second on Zetacoin when I am mining with 1Gh/s. 

Here is what my 75 Kh/s looks like ...
Quote
[2013-08-21 21:52:41] Accepted 6184efc0 Diff 4/0 GPU 0 pool 0
[2013-08-21 21:52:41] Accepted a5790af8 Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:42] Accepted 1c1791b6 Diff 4/0 GPU 0 pool 0
[2013-08-21 21:52:43] Accepted 4fe444b1 Diff 2/0 GPU 0 pool 0
[2013-08-21 21:52:43] Accepted 89df5d73 Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:43] Accepted b190a341 Diff 8/0 GPU 0 pool 0
[2013-08-21 21:52:45] Accepted c5d4a44c Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:45] Accepted 0c607f0a Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:45] Accepted 8531753a Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:47] Accepted e085c7e0 Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:47] Accepted d60b151a Diff 8/0 GPU 0 pool 0
[2013-08-21 21:52:48] Accepted 54e079f8 Diff 2/0 GPU 0 pool 0
[2013-08-21 21:52:48] Accepted 4d58edc1 Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:49] Accepted d4226469 Diff 1/0 GPU 0 pool 0
[2013-08-21 21:52:51] Accepted 28b18318 Diff 1/0 GPU 0 pool 0

I think I will try one of those compiled cgminer's now and see what I get.
rabrabrab
Newbie
*
Offline Offline

Activity: 6
Merit: 0



View Profile
August 22, 2013, 02:37:36 AM
 #11

Anywho - how are YOU GUYS doing with bfgminer on you RPi?  How does it compare to other miners you have set up?


My RPi (with bfgminer 3.1.4) has been hashing away non-stop for two weeks with 4 ICA devices and is achieving the expected hashing rate for the devices.

RAB
Buffer Overflow
Legendary
*
Offline Offline

Activity: 1652
Merit: 1015



View Profile
August 22, 2013, 02:57:31 AM
 #12

OP, why are you running bfgminer as root? I don't like the sound of that.

cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
August 22, 2013, 03:00:20 AM
 #13

Probably because he didn't want to bother with usb device permissions.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
oddree
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
August 22, 2013, 03:31:02 AM
 #14

The precompiled cgminer gave me the same crap results.  I think I have been barking up the wrong tree.

I just built bfgminer for my laptop and then plugged my USB hub with my three mining sticks right into my laptop ... and got the same lame speeds.  So then I pulled one of the sticks out of the hub and plugged it directly into my laptop to rule the hub out.  Same thing with one stick.

I think this may actually be a network connectivity issue.  I am going to drag all my gear into work tomorrow and then run through all these same tests there to see what I get.

Thanks for the feedback everyone.  Nice to know I am not entirely crazy.  ;-)
cp1
Hero Member
*****
Offline Offline

Activity: 616
Merit: 500


Stop using branwallets


View Profile
August 22, 2013, 04:51:05 AM
 #15

I'm not sure if you mentioned -- does it work fine with bitcoin, and just doesn't work with zetacoin?

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
oddree
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
August 22, 2013, 01:23:20 PM
 #16

I'm not sure if you mentioned -- does it work fine with bitcoin, and just doesn't work with zetacoin?

At the moment I am trying to mine Zetacoin through p00l.co.  However, I get the same thing when mining BTC using my BitMinter account.

Now this morning I dragged all this crap into work and set it up on my desk.  And right now I have two miners running.  One is mining with my GPU at 75 K/hs and one is running cgminer-nogpu and it using only the ASIC Block Erupters.  And the video card is still beating the damned pants off of my 3 Block Erupters.

This makes no sense at all.  All I know now is, I have hijacked this thread.  Because this is clearly not a Raspberry Pi issue (because I am seeing all of this on a Windows 7 x64 workstation).  I probably need to pick up my soapbox and go find another corner to bark about this issue.

But hey, here is a screenshot:

https://i.imgur.com/8sqemwI.jpg
oddree
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
August 22, 2013, 02:38:48 PM
 #17

FYI - I have moved my soapbox on this topic.

Cross-posting for prosperity: https://bitcointalk.org/index.php?topic=279512
Kaiavatar
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
April 22, 2014, 04:16:46 AM
 #18

I have a question for those more knowledgeable on BFGMINER on RPI than I.

After about 4 days I just get pool requests... then have to restart the program...

Any suggestions... I am running 3.99.0 compiled from Luke-jr github.

Help me please?
Luke-Jr
Legendary
*
Offline Offline

Activity: 2576
Merit: 1186



View Profile
April 22, 2014, 03:30:54 PM
 #19

If you're not set on bfgminer and don't want to make it yourself, you can use cgminer, he has binaries available
You should be able to just apt-get install bfgminer too Smiley

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!