Pages:
Author

Topic: Can and how do I get cgminer 3.4.3 on raspberry pi? (Read 6393 times)

hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
below is the instructions for 3.1.1 but since 3.4.3 is missing what I think I need, its probably no help at all either.

http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/install-cgminer

That's a good start...here's what I ended up doing to build cgminer 3.7.2 from GitHub source. (I had trouble retrieving source archives from ck.kolivas.org a while back, so I started pulling from GitHub instead.) A Raspberry Pi came with my Bitfury mining equipment yesterday. I'd like to have it manage my BFL Jalapeños as well so I can get rid of the power-hungry Pentium 4 that's currently running them.

Code:
# install dependencies

apt-get install autoconf automake libtool libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev

# option 1: clone the repo

git clone https://github.com/ckolivas/cgminer
git checkout 829f068 # 3.7.2 release
cd cgminer

# option 2: grab a snapshot

wget https://github.com/ckolivas/cgminer/archive/v3.7.2.tar.gz -O cgminer-3.7.2.tar.gz
tar tzf cgminer-3.7.2.tar.gz
cd cgminer-3.7.2

# build and install

./autogen.sh
./configure --enable-bflsc
make
make install

Replace --enable-bflsc with whatever's appropriate for the mining equipment you have.  As near as I can tell, the Bitfury support included in recent versions doesn't yet extend to the rigs sold by megabigpower and bitfurystrikesback.

full member
Activity: 196
Merit: 100
However the last part ">/dev/null 2>&1&" I'm not sure what it does

The final '&' is required. It runs the command in background (disconnected from the terminal).

">/dev/null 2>&1" redirects any output to the null device (just discards it), else "nohup" would write it to nohup.out

There are always two output streams under unix, standard output and error, ">/dev/null" redirects the standard output while "2>&1" tells it to put the error stream (2) in the same place as the standard output stream (1).

Finally the "nohup" just traps the "hangup" signal, so the program running in background does not quit when you log off (hangup being terminology from the old days of dialup terminal sessions).

Unix is fun  Grin
cp1
hero member
Activity: 616
Merit: 500
Stop using branwallets
If you're having trouble building it you can just download the binary: https://github.com/kanoi/cgminer-binaries/tree/master/RPi_Raspbian
Don't run it as sudo, and I prefer using screen.
newbie
Activity: 26
Merit: 0
That Rosewell should run up to 8 as long as they are well made.

The 1 amp cell power cord/adapter should be enough as long as your PS/2 Adapter doesn't draw power to "adapt" the keyboard/mouse.


As to a RTC, yes the pi doesn't have one but if it is always connected to the internet it doesn't need one.  you can add them fairly easy though.
hero member
Activity: 546
Merit: 500
I'm using a 1 amp phone adapter to power and no commands at this point other than cd'ing to the folder and sudo cgminer to get it running with a config file. I only have 3 eroupters on a  4 amp 10 port rosewill hub advised earlier in the post. I only hope to have a maximum of 6 and a bfl device(bfl device still pending) unless I start getting a crud load of bitcoins to run a setup on solar or wind, that's my max for now.

It was in my belief that mine peon was run as itself and not connected with cgminer.  I'd still have the problem either way of a limit of 4 hrs so far with no specific cooling directed at it.  I have to see if I have a log and see if that turns out to be the issue.

Hope to find that out soon.

newbie
Activity: 26
Merit: 0
On the topic of CGMiner:
I have successfully substituted version 3.4.3 using that tutorial.

The only problem I ran into was getting 3.4.3 working with the LCD Plate, and the auto run at boot up.

They dropped the need for the "-S /dev/ttyUSB##" after 3.1.1.

Also the configure and make commands do still work, however I don't believe the configure command is necessarily needed since after 3.1.1 cgminer is setup to recognize and run BE's.

The command to start running with all BE's attached should be something like this for the auto start command.
"sudo nohup ./cgminer-3.4.3/cgminer -o -u -p >/dev/null 2>&1&"

However the last part ">/dev/null 2>&1&" I'm not sure what it does or if it is needed with the newer cgminer.

I also am not sure if PiMiner will work with the newer versions of cgminer, it may require modification and I'm no Programmer.

If you run "sudo ./cgminer -o -u -p " from the cgminer-3.4.3 folder it will launch and start using any BE's you have recognized by the rpi OS. 

I'm back to using 3.1.1 from that Tutorial and have zero issues.  It's been humming along for over a week now.  I can't think of a reason to upgrade really, perhaps if new BE's come out and CGminer is updated to support them.

On the subject of Power and USB Hubs:
You really need to pay attention to is power, for the rpi and the BE's themselves.

See my write up at the end of this thread: https://bitcointalksearch.org/topic/raspi-d-link-dub-h-7-asic-erupters-problem-296936

One possible optimal setup for a single rpi and 10 BE's is might be this, and will be my setup once my DLINK Hubs arrive.
- 1 rpi with A/C Power adapter, either using wireless or wired network.
---- If you are going to use a wifi adapter make sure it is verified to be compatible.
- 2 x DLINK 3 amp 7 port Hubs.
- 10 x BE usb miners.
--- You use 1 USB port off the rpi for the 1st DLINK hub, 6 BE's plug in leaving 1 USB port to chain to the next HUB.

You can find bigger hubs that support more ports but pay attention to the Power it delivers to each port.

If you have a 20 Port USB Hub with a 5 amp power supply you will only ever get 5 BE's working, unless you hardware hack the hub to 10 amps, but that may start melting components... lol

I would not recommend running a rpi on off the same powered hub as your BE's, doing so you limit how many BE's you can run.  Factor in the 700mA needed, then factor in 3 amps provided by a specific model DLINK 7 port USB HUB, you now can only run 4 BE's on this Hub.  That leaves .1 amps of wiggle room.
hero member
Activity: 546
Merit: 500
It had some limitation that it wasn't getting the same power the pc was giving when I used that hub. The pc ran fine withe the hub but not the pi with it. Either way it recognizes them now with the rosewill but I have to experiment with bfgMiner and see if.it doesn´t stick (it seemed to crash after a which was listed as a posibility with cgminer). I'm using an old ps2 keyboard and mouse with an adaptor so that could be sucking power. I'll plug it in hub next time I try to set up the pi.

I want to be able to use this outside of mining so I'm not looking in to minion pi.
member
Activity: 70
Merit: 10
Take a look at Minepeon for the PI, nice easy to use interface, easy setup.  What ever hub you use it must have 0.5 amps for each erupter used.  Most 7 port hubs are 2.0 amp or less, so 4 erupter max.  You have a keyboard or mouse in the hub that takes some power.

There are really no limitations caused from the Pi, problems are from software and hubs.  I guess the Pi does have one limitation, no RTC but you can add one.
hero member
Activity: 546
Merit: 500
8 functiomal ports will keep me good for a while I hope. Just a thought... If the other one couldn't handle enough power for the pi to notice my devices will that probably make it incapable to use as a linking hub if I ever have as many devices as your pictures show?
sr. member
Activity: 266
Merit: 250
Any idea on a good one. All the ones that specify amps and watts want alot on amazon. I haven't checked maybe if there's a specific bitcoin site to buy "recommended Wink " hardware for mining yet but I'll have to if my hub is not satisfactory.

I thought since it had enough power on one pc the hub should do its job on another. It did 21,000 shares apparently without blinding me with the euroupters last night (mixed pools to limit that). The eroupter will make a good security light after they stop having a purpose at some point Wink.

The only one I could recommend is the Rosewill RHB-500, check out the post I made here: http://minepeon.com/forums/viewtopic.php?f=16&t=121
hero member
Activity: 546
Merit: 500
Any idea on a good one. All the ones that specify amps and watts want alot on amazon. I haven't checked maybe if there's a specific bitcoin site to buy "recommended Wink " hardware for mining yet but I'll have to if my hub is not satisfactory.

I thought since it had enough power on one pc the hub should do its job on another. It did 21,000 shares apparently without blinding me with the euroupters last night (mixed pools to limit that). The eroupter will make a good security light after they stop having a purpose at some point Wink.
sr. member
Activity: 266
Merit: 250
O.k just wondering how long to wait for cgminer on pi to start working. it at least recognized 2 of the 3 europters I have and the 3rds not showing up while the other 2 are buffering.

Any ideas. I haven't come across the buffering when I was using windows for these devices


Sounds like you might have some power issues there, both my rPi's will recognize all USB miners within 5-10 seconds of cgminer starting (if even that long). Which includes the rPi running 20 erupters. The only time I noticed 'buffering' messages of delayed USB detection is when I was using different hubs and hitting power limitations of the hub.
hero member
Activity: 546
Merit: 500
O.k just wondering how long to wait for cgminer on pi to start working. it at least recognized 2 of the 3 europters I have and the 3rds not showing up while the other 2 are buffering.

Any ideas. I haven't come across the buffering when I was using windows for these devices
hero member
Activity: 546
Merit: 500
My wifi seems to work as long as I don't try to install something while just on it. I just am having more trouble with detecting the miners and keeping cgminer running.

I did at least try to make sure I had the admin plugin settings listed on github cgminer instructions below the files set for my user so I shouldn't need to "sudo" when autorunning.
sr. member
Activity: 266
Merit: 250
Right now I've got raspbian wheezy with a d-link dwa160 rev-A2 (which I read can't be powered by the pi and needs to be on a hub) with block eroupters connected to it.

ahh... year the rPi is really picky about wifi dongles (see info http://elinux.org/RPi_USB_Wi-Fi_Adapters if you haven't already), I've been just buying the cheap ones that are known to have a 90%+ compatibility.
hero member
Activity: 546
Merit: 500
Right now I've got raspbian wheezy with a d-link dwa160 rev-A2 (which I read can't be powered by the pi and needs to be on a hub) with block eroupters connected to it.
sr. member
Activity: 266
Merit: 250
At this point your better off you didn't. It's probably just me getting greeted with the pi's limitations but when I plug my powered hub in 2 usually don't light and the 3rd I have is solid light and none are noticed and even when they are , I call "sudo cgminer" and it asks for questions of what to connect to and closes. I've gotten ticked for the night and plugged them back into my pc.

I have yet to find info on autostart since I can't get it to call by itself and go and add more difficulty to the mix.

Should it make any problems that the wifi is on the same hub as the miners?

See my post here, https://bitcointalksearch.org/topic/m.3156304 - it's my MinePeon setup (and you'll see the small Raspbian setup there as well), I put a message at the bottom about USB Wifi. The Raspbian installation doesn't have any issues with the Wifi dongle either plugged into the 2nd port on the rPi or on the hub or chained from a root hub on another hub (same dongle on both, the small $12 (USD) wifi from adafruit.com/newark/element14).

Are you using MinePeon, Raspian or what distro?
hero member
Activity: 546
Merit: 500
At this point your better off you didn't. It's probably just me getting greeted with the pi's limitations but when I plug my powered hub in 2 usually don't light and the 3rd I have is solid light and none are noticed and even when they are , I call "sudo cgminer" and it asks for questions of what to connect to and closes. I've gotten ticked for the night and plugged them back into my pc.

I have yet to find info on autostart since I can't get it to call by itself and go and add more difficulty to the mix.

Should it make any problems that the wifi is on the same hub as the miners?

sr. member
Activity: 266
Merit: 250
I tried that and got configure doesn't exist even though I see it does and then when I just for kicks try to send the make command it says makefile doesn't exist.

My pi is being sour. Are you using raspbian or something else on your pi with cgMiner?

Ah, yes, actually that rPi is indeed running Raspbian, it's easier to test with (and I wanted to test cgMiner 3.4.3 before putting it on the other rPi). Of which it keeps locking up after about an hour of usage.

I keep the stable rPi running MinePeon (currently 0.2.3a).
hero member
Activity: 546
Merit: 500
I tried that and got configure doesn't exist even though I see it does and then when I just for kicks try to send the make command it says makefile doesn't exist.

My pi is being sour. Are you using raspbian or something else on your pi with cgMiner?
Pages:
Jump to: