ukanonymous
Posts: 71
Joined: Sat May 25, 2013 10:17 am

cgminer on raspberrian

Sun Jul 07, 2013 12:55 pm

If anyone can help me to get cgminer running on my pi I will give them 0.5 bit coins
Preffer to chat with Skype chat or something.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am

Re: cgminer on raspberrian

Sun Jul 07, 2013 12:59 pm

http://www.raspians.com/cpu-mining-on-t ... ke-mining/

These instructions are for an older version. For the Newest version follow this:

Code: Select all

sudo apt-get update

sudo apt-get install libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev

wget http://ck.kolivas.org/apps/cgminer/3.1/cgminer-3.1.1.tar.bz2

tar xvf cgminer-3.1.1.tar.bz2

cd cgminer-3.1.1
Configure the software for use with Block Erupter USB devices:

Code: Select all

./configure --enable-icarus

make
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am

Re: cgminer on raspberrian

Sun Jul 07, 2013 1:03 pm

The above code comes from http://learn.adafruit.com/piminer-raspb ... ll-cgminer

I forgot the config settings

Code: Select all

sudo nano cgminer.conf

Code: Select all

{
"pools" : [
        {
                "url" : "PoolAddress:Port",
                "user" : "UserName.WorkerName",
                "pass" : "Password"
        }
]
,
	"api-listen" : true,
	"api-port" : "4028",
	"expiry" : "120",
	"failover-only" : true,
	"log" : "5",
	"no-pool-disable" : true,
	"queue" : "2",
	"scan-time" : "60",
	"worktime" : true,
	"shares" : "0",
	"kernel-path" : "/usr/local/bin",
	"api-allow" : "0/0",
	"icarus-options" : "115200:1:1",
	"icarus-timing" : "3.0=100"
}
Save the file with CTRL+X

I use screen

Code: Select all

sudo apt-get install screen
Then run screen which can be connected to and disconnected from ssh. So ssh into the Pi

Code: Select all

screen -S mine

cd cgminer-3.1.1

./cgminer
and your off mining.

To disconnect from the screen but leave it running press

Code: Select all

CTRL+a
d
To reconnect to the screen after you ssh in or whenever you like if always up

Code: Select all

screen -r mine
To sum it up follow the entire Adafruit tutorial but stop at Run PiMiner if you don't have the LCD Plate then get screen and run it.

Or for help with nohup which they use to run on this link http://learn.adafruit.com/piminer-raspb ... art-mining you can go here for more help with nohup http://www.cyberciti.biz/tips/nohup-exe ... rompt.html
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

ukanonymous
Posts: 71
Joined: Sat May 25, 2013 10:17 am

Re: cgminer on raspberrian

Sun Jul 07, 2013 1:33 pm

wow thankyou! I am just installing the os now and will try asap

jacix
Posts: 2
Joined: Mon Jul 29, 2013 5:17 am

Re: cgminer on raspberrian

Mon Jul 29, 2013 6:18 am

I can get my Raspi to mine with a single Block Erupter through a powered hub but when I plug in a second Erupter it can't see the first and stops seeing the second. The same hub and miners work fine on an Ubuntu box so it's something with the Raspi. Any ideas?

Thanks.

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am

Re: cgminer on raspberrian

Mon Jul 29, 2013 6:59 am

What version of cgminer are you running? You could try https://github.com/kanoi/cgminer it's the fork being used in MinePeon
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

jacix
Posts: 2
Joined: Mon Jul 29, 2013 5:17 am

Re: cgminer on raspberrian

Mon Jul 29, 2013 7:11 am

I'm running 3.3.1 now but according to https://bitcointalk.org/index.php?topic ... msg2817682 it's a problem with Raspian's stock libusb. I'm compiling the newer version now to see if that helps. If not I'll give the fork a shot. Thanks!

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am

Re: cgminer on raspberrian

Mon Jul 29, 2013 7:32 am

The person that posted that is the maintainer of the Fork

From what I can tell cgminer is a forked from jgarzik/cpuminer and was written by https://github.com/ckolivas/cgminer and then Kano forked it https://github.com/kanoi/cgminer

And to make it more confusing both are working together:
From Kolivas:
All files available from here:
http://ck.kolivas.org/apps/cgminer

As a backup they can be downloaded here:
https://github.com/kanoi/cgminer-binaries
According to the Adafruit tutorial http://learn.adafruit.com/piminer-raspb ... ll-cgminer you will need to get 3.1.1 on Raspbian if your using ckolivas cgminer.

Personally I opted for MinePeon as it is so much more lightweight than Raspbian and Kano and MineForeman (See two posts down from that forum thread.) Are way more active in the support of Mining on a Pi than any other source. But it really comes down to taste I suppose and what options your after.

And it also depends on the Hardware your mining with most likely they're ASIC's
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

terrapinflyer25
Posts: 2
Joined: Tue Aug 27, 2013 7:12 am

Re: cgminer on raspberrian

Fri Oct 11, 2013 8:40 am

when I run cgminer I get the error that states
All devises disabled, cannot mine!
but when I use the nohup command it works just fine.

terrapinflyer25
Posts: 2
Joined: Tue Aug 27, 2013 7:12 am

Re: cgminer on raspberrian

Fri Oct 11, 2013 5:42 pm

okay so I got it working fine I just had to edit the command I was using to start cgminer from

Code: Select all

sudo ./cgminer
to:

Code: Select all

   sudo ./cgminer --config /home/pi/cgminer.conf -S /dev/ttyUSB0 -S /dev/ttyUSB1 

lukejduncan
Posts: 1
Joined: Wed Dec 25, 2013 1:24 am

Re: cgminer on raspberrian

Wed Dec 25, 2013 1:25 am

If this is useful for anyone else, I create a vanilla Raspberrian image that has cgminer installed and ready to use.

https://github.com/lukejduncan/raspberrypibitcoin

aritoniulian
Posts: 1
Joined: Wed Jan 29, 2014 8:41 pm

I NEED THE HELP

Thu Jan 30, 2014 9:57 am

I try to connect my mining machine to cgminer
and i stop where say
all device is not connected
and i don t know how to add my ring in cgminer

FiZ
Posts: 2
Joined: Wed Feb 20, 2013 1:41 am

Re: cgminer on raspberrian

Sat Mar 08, 2014 4:25 pm

Thank you for the great instructions. This got me up and running with my AntMiner U1 in little time. However, I was noticing that the configurations used in this tutorial, my U1 was maxing around 660 Mh/s when the U1 is capable of 1.6 Gh/s before overclocking. I tried a few things, and I finally found the solution. Rather than use the icarus-options, and icarus-timing, I replaced those lines with

Code: Select all

"bmsc-option" : "115200:20",
"bmsc-freq" : "0781"
and I'm steadily clocking in at 1.6 Gh/s now. I'm currently running cgminer 4.1.0 and bmsc seems to have already been included without the need for build options. I hope this helps anyone running into the same issues.

Cheers!

rockminerraspi
Posts: 1
Joined: Sun Oct 26, 2014 9:37 am

Re: cgminer on raspberrian

Sun Oct 26, 2014 9:40 am

Can you post the codes to get this to work with the rockminer rbox r-100
http://shop.rockminer.com/goods.php?id=44
Thank you

jeroenV1982
Posts: 1
Joined: Sun Sep 06, 2015 5:49 pm

Re: cgminer on raspberrian

Sun Sep 06, 2015 5:54 pm

Sorry guys, this is an old topic but Google brought me here.

I.m. using this *** command on my Pi 2 to get mining using Cgminer and it works great. I use an app to SSH into the Pi and off we go. The problem is that each reboot causes my "screen" to get a different value, no big deal but is there a way to get a "static" screen so it saves me time and effort?

***
cd cgminer
sudo su
screen -ls
screen -r 2449.cgminer


the "2449" changes to a rondom value with every reboot.


Best Regards,

leopheard
Posts: 54
Joined: Thu Jun 27, 2013 5:34 pm

Re: cgminer on raspberrian

Wed Aug 09, 2017 2:03 pm

ukanonymous wrote:
Sun Jul 07, 2013 12:55 pm
If anyone can help me to get cgminer running on my pi I will give them 0.5 bit coins
Seeing as 0.5 BTC is currently around $1,600 USD, can I offer any help! :D

iamdabossatpi
Posts: 1
Joined: Thu Mar 05, 2020 5:16 am

Re: cgminer on raspberrian

Thu Mar 05, 2020 5:23 am

Ok open bash and type these commands:
(for CGMiner)
~$ sudo apt install cgminer
(cgminer will now install, once installed type this)
~$ cgminer
(this will open cgminer but yet you need all of the additional compenent add-ons)

(for bfgminer)
~$ sudo apt install cminer
confirm? [Y/n]
~$ Y
(this will download but could take 10 minutes, once downloaded type this)
~$ bfgminer
(bfgminer will open and as I said you need all the additional compenent add-ons)

I hope I could help you.

Return to “General discussion”