StoopKid
Posts: 41
Joined: Thu Jul 19, 2012 5:41 am

Bitcoin mining without other hardware

Wed Aug 21, 2013 9:48 pm

Is the raspberry pi capable of bitcoin mining without one of those USB miners? I know it would be slow and inefficient but I am looking at it from an educational standpoint rather than commercial. I have found dozens of tutorials but they all involve one of those USB devices. Are the really required or is it just not effective to be without them?

technoducky
Posts: 62
Joined: Sat Jan 26, 2013 7:29 pm
Contact: Website

Re: Bitcoin mining without other hardware

Mon Sep 09, 2013 3:40 pm

The USB devices used to mine bitcoins are what actually does the processing (as even a regular CPU would not be able to do it efficiently), I believe (don't quote me here) they used either an FPGA or ASIC which allows data to be processed very fast but only in a very specific way.

So if you can get one of those to work on a Pi, it shouldn't run significantly slower than on a desktop or laptop.

Mining just with the SoC will be hopelessly slow, but if you want to use this for education then showing the difference in speeds would be a good demonstration of the application of coprocessors.

dennis123
Posts: 3
Joined: Tue Sep 24, 2013 3:33 pm

Re: Bitcoin mining without other hardware

Tue Sep 24, 2013 7:34 pm

StoopKid wrote:Is the raspberry pi capable of bitcoin mining without one of those USB miners? I know it would be slow and inefficient but I am looking at it from an educational standpoint rather than commercial. I have found dozens of tutorials but they all involve one of those USB devices. Are the really required or is it just not effective to be without them?
It is absolutely possible to do so-called cpu mining on the raspberrypi. For what performance to expect, here is a link to some arm processors: https://en.bitcoin.it/wiki/Mining_hardw ... arison#ARM

As for how to do it, it is a short project to set it up. Follow the instructions at: https://bitcointalk.org/index.php?topic=112098.0

As far as getting other than educational results, that is another matter. Here is my output fromthe executable, minerd:
[2013-09-24 13:25:19] thread 0: 7600064 hashes, 125.60 khash/sec
[2013-09-24 13:26:19] thread 0: 7475472 hashes, 125.32 khash/sec
[2013-09-24 13:26:22] LONGPOLL detected new block
[2013-09-24 13:27:23] thread 0: 7475472 hashes, 125.70 khash/sec

I am getting about 125 Kilo-hashes/second. A block erupter is rated at 333 mega-hashs/second, a ratio of about 1:2400 . Here are the results after running for a day at my mining pool:
piminer.png
piminer.png (13.39 KiB) Viewed 48679 times
Name 33 is a pair of block erupters rated 333MH/s x2=666MH/s; 720MH/s is reasonable. Name 22 is the rpi; 125KH/s does not register on the MH/s counter. However, after a day, the pi (22) has finally processed one work unit at the mining pool. Compare that to 8771 work units by the pair of erupter sticks.

Don't bother connecting to a mining pool unless you are already running another device that registers, and the pool must be able to split out individual workers so the pi's contribution can eventually be seen.

As an educational venture, take a look at the source sha256_generic.c for insight into how it works. The code is complicated by having to do the 256 bits in 32 bit chunks. This link https://109.201.133.65/index.php?topic=229052.0 provides a discussion of the hardware version of hashing.

User avatar
sav25
Posts: 364
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Bitcoin mining without other hardware

Wed Oct 02, 2013 11:41 am

Kind of related - does anyone have any advice on the cheapest mining USB device that is compatible with the Pi? They all seem a little expensive.
Averagemaker.com

User avatar
RaTTuS
Posts: 10204
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Bitcoin mining without other hardware

Wed Oct 02, 2013 11:43 am

well USB Erupter's are available
blue fair's soon ....
I think that's about it
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
Cancelor
Posts: 754
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: Bitcoin mining without other hardware

Wed Oct 16, 2013 5:52 pm

dennis123 wrote: Name 33 is a pair of block erupters rated 333MH/s x2=666MH/s; 720MH/s is reasonable.
How much is 8771 work units worth in bitcoins or real money?
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

mikroskeem
Posts: 16
Joined: Sun Jan 27, 2013 7:23 am
Location: Estonia
Contact: Website

Re: Bitcoin mining without other hardware

Mon Nov 04, 2013 6:47 am

yes, you could mine btc with rpi, i reccomend you use pooler's cpuminer(https://github.com/pooler/cpuminer)
BUT, before you continue, do:
- Make sure you have good heat sink
- Backup your sd card(i bricked one, by cpuminer running 24-48 hrs) cuz things can get nasty
- Overclock cpu to 950mhz
And you run fine 0,2mh/s, peak is 0,4mh/s
EDIT: add slub_debug=FPUZ to cmdline.txt, it could save your rpi-s rootfs. Bitcoin miners could cause RAM corruption, like i had

pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Re: Bitcoin mining without other hardware

Thu Dec 05, 2013 6:55 am

mikroskeem wrote:yes, you could mine btc with rpi, i reccomend you use pooler's cpuminer(https://github.com/pooler/cpuminer)
BUT, before you continue, do:
- Make sure you have good heat sink
- Backup your sd card(i bricked one, by cpuminer running 24-48 hrs) cuz things can get nasty
- Overclock cpu to 950mhz
And you run fine 0,2mh/s, peak is 0,4mh/s
EDIT: add slub_debug=FPUZ to cmdline.txt, it could save your rpi-s rootfs. Bitcoin miners could cause RAM corruption, like i had
Could you elaborate on why the overclock is necessary? And did you mean overclock to mine bitcoins with the raspi alone, or overclock it to be able to manage the ASIC miners?

User avatar
RaTTuS
Posts: 10204
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Bitcoin mining without other hardware

Thu Dec 05, 2013 8:55 am

don't bother - to cpu-mine - you will not do anything of anyuse
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Re: Bitcoin mining without other hardware

Thu Dec 05, 2013 12:16 pm

RaTTuS wrote:don't bother - to cpu-mine - you will not do anything of anyuse
Which brings me to my original question, why overclock the raspi?

techis
Posts: 7
Joined: Fri Aug 16, 2013 4:30 am

Re: Bitcoin mining without other hardware

Fri Dec 06, 2013 4:02 pm

The idea behind overclocking a processor (not just the pi) is for it to be able to run faster. This may allow it to respond faster, or perform better. I have been working on a Minecraft server that in order to run smoothly, needs to be clocked to 1Ghz. This of course is a personal preference.

Ivan Tham
Posts: 75
Joined: Mon Jun 24, 2013 7:06 am

Re: Bitcoin mining without other hardware

Fri May 16, 2014 8:07 am

Can you use raspberry pi GPU?

User avatar
RaTTuS
Posts: 10204
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Bitcoin mining without other hardware

Fri May 16, 2014 8:41 am

no nothing has been written for it - and it would not get good speeds anyway as the core are clocked to low.
you could try if you wish - it's going to need a lot of effort and the returns will never get you anything [bitcoin wise]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

ghans
Posts: 7839
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Bitcoin mining without other hardware

Fri May 16, 2014 12:52 pm

I think desktop GPUs blow the Pi out of the water in
terms of ROI/Watt and ROI/$ at the same time in the case of
bitcoin mining.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

markatlnk
Posts: 40
Joined: Sun Feb 23, 2014 7:53 pm

Re: Bitcoin mining without other hardware

Fri May 16, 2014 2:20 pm

I have done mining on the pi, you might look at scrypt coins such as moon coin. Not that long ago I was getting 300+ moon coins per day by clocking my machine to 1Ghz. Scrypt coins such as Litecoin or Dogecoin all work just fine as an educational experiment, not to ever pay back the cost of the Pi itself. If you want to mine Bitcoins, go onto ebay, you can pick up an Antminer U2 for less than $20 that will work with the pi and it will get you 2 gigaHash/second, I have 4 of them on a pi and it generates something like $0.20/Day. I don't expect it to cover the cost of a hub with enough power to drive these things.

Processing the block chain on the pi is a real pain, it is something like 20G in size and the program will grow to a bit over 900Meg, swapping like crazy and still taking several weeks (if ever) to catch up. That will kill a normal SD card. If you join a pool, you won't need to do that.

On my pi, I only use the SD card for the /boot directory and rest of the OS is on an external 500G hard drive including a 4G (overkill) swap space.

A few weeks back I also added a Gridseed miner for Scrypt coins. It runs about 400KHashes/second. Both the Ant miner and the Gridseed are on the same pi with less than 5% cpu.

Every time you try something new, you learn things, go for it.

Mark

User avatar
Nfarrow
Posts: 47
Joined: Sat Dec 20, 2014 1:24 am
Location: Oklahoma, USA
Contact: Website Facebook Twitter YouTube

Re: Bitcoin mining without other hardware

Tue Feb 23, 2016 2:28 am

markatlnk,
Would you happen to give any info on how you are mining without any USB device? I have a lot of Pi's setting around wanted them to be doing something, rather than just setting in a box. And yes, I don't care about spending money on my electric bill. :)

Thanks,
Nick
Twitter: @farrownick
Instagram veggievampire
I own a lot of Pis....

ghans
Posts: 7839
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Bitcoin mining without other hardware

Tue Feb 23, 2016 8:05 am

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Pithagoros
Posts: 580
Joined: Wed Nov 12, 2014 8:16 pm

Re: Bitcoin mining without other hardware

Tue Feb 23, 2016 8:33 am

For Bitcoin, 2 GH/s in 2016 isn't going to be worth switching on, it will only be any use as an experiment for learning or playing with.
The little USB stick mining things that work at MH/s speed are also long dead.
I switched off my 30GH/s ASICs early in 2015, operating in a pool they are capable of something like £0.40 per week now with the current Bitcoin price of around $430.
Last edited by Pithagoros on Wed Feb 24, 2016 7:26 am, edited 1 time in total.

markatlnk
Posts: 40
Joined: Sun Feb 23, 2014 7:53 pm

Re: Bitcoin mining without other hardware

Wed Feb 24, 2016 3:39 am

I have a pi2 mining moon coins, no I don't expect it to actually return money but it is running on all 4 cores. I use multipool and get about 500-600 moon coins every 3 days or so. You need to find cpuminer 2.3.3. Newer versions drop the cpu stuff. It would also mine lite coins, but don't think it would get anywhere. The script I use to start it is.

/home/mark/miners/cpuMiner/minerd --a scrypt --threads 4 -q -o stratum+tcp://us-east.multipool.us:3358 --userpass markatlnk.pi3cpu:xxxxxxx

I also "nice" the task so they will slow down if I do other things on the pi.

My pi uses a 500 gig hard drive for the OS, only the boot directory is on the SD card.

Have fun,

Mark

pavel78
Posts: 1
Joined: Sun Nov 06, 2016 9:12 am

Re: Bitcoin mining without other hardware

Sun Nov 06, 2016 9:16 am

Hello,
I would like to ask you for what type of cpuminer you are using?
I tried to use many versions but always I get error during run :
JSON-RPC call failed: {
"code": -32601,
"message": "Procedure not found."
}
Do you know how to fix it.
I have RPi2 and OS last jessie or jessie-lite.
Thanks for your help

ArjenWols
Posts: 3
Joined: Thu Sep 19, 2013 8:15 pm

Re: Bitcoin mining without other hardware

Mon Nov 20, 2017 11:32 pm

I'm looking for a RPi only mining solution for example Bitcoins or other e-currency.
Purpose off the project is simply a how to learning project without any additional investment in hardware.
Followed this link, https://bitcointalk.org/index.php?topic=112098.0
but it is not working anymore.

Is there another example which i can use for this learning project on RPi 3??

Thanks for reply in advance.
Arjen


Heater
Posts: 11471
Joined: Tue Jul 17, 2012 3:02 pm

Re: Bitcoin mining without other hardware

Mon Jan 22, 2018 8:31 pm

I love the way all these mining questions are about "learning". Not making money. Oh no.

If you want to learn, just read the source code. If there is no source code, don't go there.

Heater
Posts: 11471
Joined: Tue Jul 17, 2012 3:02 pm

Re: Bitcoin mining without other hardware

Wed May 23, 2018 7:46 am

Easy:

1) Visit google.com with your web browser of choice.

2) Type "how to mine bitcoin" into the text box that appears in your browser window and hit the return key.

3) Magically lots of links to videos, tutorials, blogs, etc will appear in your browser window.

4) Click on some likely looking links.

Return to “General discussion”