Bitcoin Forum

Bitcoin => Mining support => Topic started by: chadtn on September 08, 2013, 06:26:22 PM



Title: Linux noob needs help with Rpi & cgminer
Post by: chadtn on September 08, 2013, 06:26:22 PM
I know next to nothing about Linux so I am sure my problem is relatively simple.  I'm trying to set up my Raspberry Pi with cgminer.  I'm running Raspbian Wheezy on my Rpi.  I was able to successfully build cgminer 3.4.2 with the updated libsub components. 

The first problem I'm having is starting cgminer with my normal command line inputs.  Does the syntax change with linux?  Here is what I'm using to mine on Slush' pool:
cgminer -o stratum+tcp://stratum.bitcoin.cz:3333 -u xxxxxx - p xxxxxx
It works fine using Windows, but on the Rpi cgminer halts with an error saying stratum (auth) failed.  If I ONLY type cgminer the program will prompt me for the pool address/password and start hashing away no problem after I manually type them in.

The second problem I'm having is every time I start cgminer it reports that the devices are already in use.  If I unplug the USB hub and reinsert it while cgminer is running they start hashing away just fine.

I'm sure these are just minor problems that show my ignorance of Linux in general.  Any help/tips would be greatly appreciated.

Thanks!

Chad


Title: Re: Linux noob needs help with Rpi & cgminer
Post by: viriat0 on September 08, 2013, 08:05:34 PM
Install minepeon  ;D



Title: Re: Linux noob needs help with Rpi & cgminer
Post by: chadtn on September 08, 2013, 10:14:59 PM
Install minepeon  ;D



I was tempted, but I also wanted this to be a learning experience to get more familiar with Linux.  I'd like to stick with a more mainstream distribution for now.  I'm probably showing more of my ignorance here, but I was under the impression that Debian variants are pretty common.  heh..

Thanks!

Chad


Title: Re: Linux noob needs help with Rpi & cgminer
Post by: OtaconEmmerich on September 08, 2013, 11:02:08 PM
I'd try Arch, I heard it has decent support for rPi and it's a pretty stable distro. Also I think the proper command is "./cgminer -o stratum.bitcoin.cz:3333 -u xxxxxx - p xxxxxx" while in the cgminer folder.


Title: Re: Linux noob needs help with Rpi & cgminer
Post by: chadtn on September 08, 2013, 11:15:07 PM
I'd try Arch, I heard it has decent support for rPi and it's a pretty stable distro. Also I think the proper command is "./cgminer -o stratum.bitcoin.cz:3333 -u xxxxxx - p xxxxxx" while in the cgminer folder.

I tried that from the cgminer directory and got the same error.  The exact error is "Pool 0 JSON auth failed:  (null)"

As a work around I guess I might try setting up miner.conf with all of my pool information in there.  Maybe that would take care of things.

I should probably add that just using cgminer says I don't have permission to access the devices.  I've been starting it with sudo cgminer.  Should I continue to do it this way or change some kind of user permissions?

Thanks!

Chad


Title: Re: Linux noob needs help with Rpi & cgminer
Post by: viriat0 on September 08, 2013, 11:26:02 PM
I'd try Arch, I heard it has decent support for rPi and it's a pretty stable distro. Also I think the proper command is "./cgminer -o stratum.bitcoin.cz:3333 -u xxxxxx - p xxxxxx" while in the cgminer folder.

I tried that from the cgminer directory and got the same error.  The exact error is "Pool 0 JSON auth failed:  (null)"

As a work around I guess I might try setting up miner.conf with all of my pool information in there.  Maybe that would take care of things.

I should probably add that just using cgminer says I don't have permission to access the devices.  I've been starting it with sudo cgminer.  Should I continue to do it this way or change some kind of user permissions?

Thanks!

Chad

Try bfgminer,

1: Open Terminal or SSH into your Linux machine.

2: Run "apt-get update"

3: Run "apt-get install git autoconf automake libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthash-dev libncurses5-dev"

4: Run "git clone git://github.com/luke-jr/bfgminer.git"

5: Enter the bfgminer directory

6: Run "./autogen.sh"

7: Run "./configure" (if you do not want to use GPUs on the machine, add --disable-opencl)

8: Run "make"

9: After make completes, you can run bfgminer directly (may require sudo), or create a shell script that includes your arguments.

Running BFGMiner:
./bfgminer -o stratum+tcp://pool:port -u yourUSERNAME -p your_PW -S all --icarus-options 115200:1:1 --icarus-timing 3.0=100

good luck


Title: Re: Linux noob needs help with Rpi & cgminer
Post by: -ck on September 08, 2013, 11:56:24 PM
I'd try Arch, I heard it has decent support for rPi and it's a pretty stable distro. Also I think the proper command is "./cgminer -o stratum.bitcoin.cz:3333 -u xxxxxx - p xxxxxx" while in the cgminer folder.

I tried that from the cgminer directory and got the same error.  The exact error is "Pool 0 JSON auth failed:  (null)"

As a work around I guess I might try setting up miner.conf with all of my pool information in there.  Maybe that would take care of things.

I should probably add that just using cgminer says I don't have permission to access the devices.  I've been starting it with sudo cgminer.  Should I continue to do it this way or change some kind of user permissions?

Thanks!

Chad
Read ASIC-README. You have not installed the udev rules that give regular users access to the devices.


Title: Re: Linux noob needs help with Rpi & cgminer
Post by: chadtn on September 09, 2013, 01:40:45 AM
ckolivas,

Thanks for pointing me towards ASIC-README.  That fixed me right up!

I setup a conf file for the Rpi and all of my problems are solved.  It starts hashing away with no more sudo, stratum errors, or hardware detection issues.

Thanks so much for all of the help everyone!!!  I'm having a lot of fun with this little Rpi.  Wish I had bought one a long time ago.

Chad