Bitcoin Forum

Bitcoin => Hardware => Topic started by: LaserHorse on June 23, 2013, 09:47:08 PM



Title: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on June 23, 2013, 09:47:08 PM
http://i1289.photobucket.com/albums/b517/LaserHorse/PiMiner1_800_zps7ab3c9e4.jpg (http://s1289.photobucket.com/user/LaserHorse/media/PiMiner1_800_zps7ab3c9e4.jpg.html)


The PiMiner project (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner) was conceived as a way to turn a Raspberry Pi into a bitcoin mining host 'appliance' with integrated LCD.
The project scripts currently display the following info:

    • Hashrate
    • Error %
    • Share data
    • Pool address & user name
    • Network difficulty
    • Mining duration / Uptime
    • Exchange rate via MtGox

Full tutorial available here:
http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner

The tutorial contains information which should be helpful to anyone interested in mining with Raspberry Pi (even w/o an LCD, etc); including links to getting started with Pi, network setup, logging in via ssh, etc

Note: The tutorial example uses Block Erupter USBs, but minor software changes should allow use with any USB miner compatible with cgminer v3.1.1

New in v1.1:
    • Added mining auto-start after boot (see tutorial for setup (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/configure-auto-start))
    • Time format changed to dd:hh:mm
    • Abbreviated large share count (ex. 12300 == "12k3")
    • Revised error % calculation: 100 * HW / (diff1shares + HW)
    • Added MtGox last, high, & low price (currency can be changed in PiMinerInfo.py)
    • Removed cgminer data logging (was appending nohup.out)
    • Misc. tutorial revisions/clarifications


http://i1289.photobucket.com/albums/b517/LaserHorse/PiMiner-angle-800_zps725d1c19.jpg (http://s1289.photobucket.com/user/LaserHorse/media/PiMiner-angle-800_zps725d1c19.jpg.html)

Feel free to make suggestions as to what you'd like to see added, or additional details to include in the tutorial.

Also, If you build this project - please share pics of your setup!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: gateway on June 23, 2013, 10:51:56 PM
Very cool great job!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Red_Wolf_2 on June 23, 2013, 10:58:10 PM
If you've got room on the bus, why not stick an RGB LED in there for instant status observation. Red for bad, blue for something, green for good, orange for warning (say if one or more asics isn't happy), etc...


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on June 23, 2013, 11:58:36 PM
If you've got room on the bus, why not stick an RGB LED in there for instant status observation. Red for bad, blue for something, green for good, orange for warning (say if one or more asics isn't happy), etc...

Plenty of room on the i2c bus - LED could def be handy.  Alternatively, could just use an LCD with an RGB backlight and change backlight color per status.
(The LCD in the pics above is actually RGB, just set to green)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: JLM on June 24, 2013, 03:12:54 PM
Sweet.
I´ll try it.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: cchan on June 24, 2013, 03:27:23 PM
Cool


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: hotwired007 on June 24, 2013, 03:48:20 PM
Brilliant project! If only ASICMiner drops the price for their USB hardware ...

havent they just dropped them?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: forum2005 on June 24, 2013, 04:06:07 PM
interesting project... all in one.

Another pi miner, my mini rig

http://img209.imageshack.us/img209/5761/usld.jpg


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: evilscoop on June 24, 2013, 04:12:26 PM
being an avid fan of mining with the pi, which I do already, ill keep an eye on this...

Was looking into putting an lcd shield on myself, but was after more graphical display of my cacti graphs...as I graph the cg/bfg miner api outputs
Pi's work well with the fpga's too :D


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: erschiessen on June 24, 2013, 04:23:20 PM
This is so sweet.

I would like to build two. One for K1's and one for K16's.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: hotwired007 on June 24, 2013, 04:31:41 PM
interesting project... all in one.

Another pi miner, my mini rig

[]http://anonymouse.org/cgi-bin/anon-www.cgi/http://img209.imageshack.us/img209/5761/usld.jpg[]

is this not a bit expensive now as the FPGA board does around 5-6Mhash for 70 and the USB Asic does 333 for around the same? (based on 0.99 BTC) (GBP prices)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: billotronic on June 24, 2013, 05:12:12 PM
this is UBER sexy!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Bitcoinorama on June 24, 2013, 06:19:13 PM
Very cool, love your anonymous Tor Pi project as well!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: MWNinja on June 24, 2013, 06:24:54 PM
Cool project, I've added a few raspberry pi's to my collection of toys too.  That LCD is really trick, but the thought of having to solder is a bit off-putting.  It would be really cool if they were sold in a more "complete" state. Also I would love it if adafruit would accept bitcoin payment!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: NR3000 on June 24, 2013, 09:51:33 PM
Where can I buy assembled Adafruit 16x2 LCD display? Thank you.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on June 24, 2013, 11:22:01 PM
Thanks all - appreciate the feedback.

Assembled LCD kits are not currently available - but I will post here if they become available.
In any case - soldering is fun!  No, really - I quite enjoy it myself  ;)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: sdminer on June 26, 2013, 08:26:01 AM
how many usb block erupters can the rasberry pi handle?
it has two usb connections, so can I hook up 2 x 10 port hubs to it?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: hotwired007 on June 26, 2013, 09:13:53 AM
how many usb block erupters can the rasberry pi handle?
it has two usb connections, so can I hook up 2 x 10 port hubs to it?

i would assume that the hard limit would be 127 *2 USB devices? depending on whether the the two USB ports are separate controllers...


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: notlist3d on June 26, 2013, 09:23:30 AM
Very cool with LCD.  Love this project.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: tom_o on June 26, 2013, 10:04:27 AM
Cool project. Wish I could afford to waste money on block erupters, here's my piminer running scrypt, only several orders of magnitude slower.
https://i.imgur.com/ipcVF2w.jpg


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: hotwired007 on June 26, 2013, 10:25:19 AM
can't quite tell but have you put a heatsink on the CPU?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: evilscoop on June 26, 2013, 10:38:57 AM
unless yer overclocking, in an open case, with a fan....a cpu heatsink is useless on a pi...


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: tom_o on June 26, 2013, 10:41:41 AM
can't quite tell but have you put a heatsink on the CPU?

Yeah runs at 64.8 even with that! 975 core/475 cache/500 ram at 1.35v.

Gonna reformat it soon and make it into a lil VPN/fileserver and send it off for free colocation (http://www.edis.at/en/server/colocation/austria/raspberrypi/), running it as a miner is a bit pointless at 0.48khash/s. Stock speed is normally 0.33khash/s!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Bitcoinorama on June 26, 2013, 01:21:47 PM
can't quite tell but have you put a heatsink on the CPU?

Yeah runs at 64.8 even with that! 975 core/475 cache/500 ram at 1.35v.

Gonna reformat it soon and make it into a lil VPN/fileserver and send it off for free colocation (http://www.edis.at/en/server/colocation/austria/raspberrypi/), running it as a miner is a bit pointless at 0.48khash/s. Stock speed is normally 0.33khash/s!

That free collocation offer is incredible!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: NR3000 on June 27, 2013, 07:28:18 AM
Nice device! Can you add mtgox live prices?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on June 27, 2013, 07:43:14 AM
Nice device! Can you add mtgox live prices?

Good idea - added to my list.

Also had an earlier version of the script displaying confirmed+unconfirmed rewards total pulled from the pool.
May add it back in if there's interest …


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: turtle83 on June 27, 2013, 09:09:39 AM
how many usb block erupters can the rasberry pi handle?
it has two usb connections, so can I hook up 2 x 10 port hubs to it?

i would assume that the hard limit would be 127 *2 USB devices? depending on whether the the two USB ports are separate controllers...

the 2 ports are from a single bus...


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: hotwired007 on June 27, 2013, 12:05:33 PM
how many usb block erupters can the rasberry pi handle?
it has two usb connections, so can I hook up 2 x 10 port hubs to it?

i would assume that the hard limit would be 127 *2 USB devices? depending on whether the the two USB ports are separate controllers...

the 2 ports are from a single bus...

so its a maximum of 127 devices then...


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: tom_o on June 27, 2013, 12:30:07 PM
how many usb block erupters can the rasberry pi handle?
it has two usb connections, so can I hook up 2 x 10 port hubs to it?

i would assume that the hard limit would be 127 *2 USB devices? depending on whether the the two USB ports are separate controllers...

the 2 ports are from a single bus...

so its a maximum of 127 devices then...

The 700Mhz ARMv6 will become the bottleneck before 127 USB devices I would have thought.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: hotwired007 on June 27, 2013, 12:33:04 PM
apparently you 'can' overclock the CPU - i dont know how or to what value - i'd definately investigate cooling - as i've seen people say they've over clocked to 800mhz

just googled and found this:

http://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-overclock-raspberry-pi/

1000Mhz and much improved RAM speed? I think thats a win BUT i'd definiatly want a cooler on the chip ;)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: tom_o on June 27, 2013, 12:44:26 PM
apparently you 'can' overclock the CPU - i dont know how or to what value - i'd definately investigate cooling - as i've seen people say they've over clocked to 800mhz

just googled and found this:

http://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-overclock-raspberry-pi/

1000Mhz and much improved RAM speed? I think thats a win BUT i'd definiatly want a cooler on the chip ;)

Trouble with that is that overclocking often corrupts the SD card requiring a complete reinstall. Gonna be a bit of a pain if your miner goes down cause of this, mine is at 975 core/475 cache/500 mem with +0.15v Heat shouldn't be too much of an issue; it only gets to 64 degrees even with a little aluminium ramsink and a sealed plastic case (see top post on this page) after 3 days of LTC mining on the CPU. But I certainly won't run it this way for long!

When I send it off to the datacentre it'll definitely be back to stock - not worth risking it; the performance is so low anyway, even 30% more is still really slow!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Rotorgeek on July 06, 2013, 02:33:02 PM
Ask here for troubleshooting help? If not I'll edit this out to keep your post clean.

I ran through the Adafruit tutorial with both the Raspbian and the Occ distros with the same results.

I get to the part where you start cgminer and then PiMiner and nothing seems to happen. The LEDs on the USB sticks stay solid and the LCD says "no connection to cgminer"

http://imgur.com/M8u95D8

Thanks
Rotor


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 06, 2013, 10:16:59 PM
Ask here for troubleshooting help? If not I'll edit this out to keep your post clean.

I ran through the Adafruit tutorial with both the Raspbian and the Occ distros with the same results.

I get to the part where you start cgminer and then PiMiner and nothing seems to happen. The LEDs on the USB sticks stay solid and the LCD says "no connection to cgminer"

https://i.imgur.com/M8u95D8.png

Thanks
Rotor

k, it looks like cgminer was unable to start mining and therefore exitted/quit

So just to confirm, you have 2 miners connected?
you can double-check by entering:
ls /dev/*USB*

EDIT: also - what type of miners are you using - ASICMiner Block Erupters?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: crazyates on July 06, 2013, 10:36:41 PM
You can OC the rPi all you all you want, it's still going to be slow. It's an ARMv6 CPU. They've been using ARMv7 for years now, and ARMv8 is coming out in the next year or so (gonna be sweet!). That's like OCing a PIII to compete with an i3.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Rotorgeek on July 06, 2013, 10:47:25 PM
Ask here for troubleshooting help? If not I'll edit this out to keep your post clean.

I ran through the Adafruit tutorial with both the Raspbian and the Occ distros with the same results.

I get to the part where you start cgminer and then PiMiner and nothing seems to happen. The LEDs on the USB sticks stay solid and the LCD says "no connection to cgminer"

http://imgur.com/M8u95D8

Thanks
Rotor

k, it looks like cgminer was unable to start mining and therefore exitted/quit

So just to confirm, you have 2 miners connected?
you can double-check by entering:
ls /dev/*USB*

EDIT: also - what type of miners are you using - ASICMiner Block Erupters?

Yea 2 usb block erupters miners they showed as usb0 and 1. 
Edit: same ones from the tutorial. The also work fine on my PC, so I know it's not an equipment problem from that side.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 06, 2013, 10:56:22 PM
Yea 2 usb block erupters miners they showed as usb0 and 1. 
Edit: same ones from the tutorial. The also work fine on my PC, so I know it's not an equipment problem from that side.

you're using Raspbian or Occidentalis?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 06, 2013, 11:02:14 PM
Also - please ensure you're using a USB hub which is compatible with the RPi.
As a general rule - avoid USB 3.0 hubs!

a list of verified compatible hubs can be found here:
http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Hubs


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Rotorgeek on July 07, 2013, 01:22:02 AM
Yea 2 usb block erupters miners they showed as usb0 and 1. 
Edit: same ones from the tutorial. The also work fine on my PC, so I know it's not an equipment problem from that side.

you're using Raspbian or Occidentalis?

Occidentalis this time but I tried Raspbian and had the same problem.

As far as the USB hub, I have used it for several things, and never had an issue. I'll try it without the hub and 1 miner.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 07, 2013, 01:44:36 AM
Occidentalis this time but I tried Raspbian and had the same problem.

As far as the USB hub, I have used it for several things, and never had an issue. I'll try it without the hub and 1 miner.

And it's a powered USB hub capable of supplying a full 500mA to each port?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Rotorgeek on July 07, 2013, 02:58:27 AM
Occidentalis this time but I tried Raspbian and had the same problem.

As far as the USB hub, I have used it for several things, and never had an issue. I'll try it without the hub and 1 miner.

And it's a powered USB hub capable of supplying a full 500mA to each port?

Yea the Hub is on the list. Trendnet TU2-700. It has a 2a power supply.

Oh yea I remembered I cant try it without the hub. No power in the main USB header.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 07, 2013, 03:21:26 AM
hrrrmm … possible you have another instance cgminer running in the background?

Your best bet is to reboot the Pi and try running cgminer normally (not in background) using:

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

If cgminer runs into an issue, it should display an error.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: Rotorgeek on July 07, 2013, 04:00:32 AM
Guys thanks for all the help, I got it fixed.
Someone asked me for a screen grab of the .conf file and when I was editing out the login info I noticed something.

The instructions said Update the below template with your mining pool credentials by replacing "PoolAddress:Port",
"UserName.WorkerName", and "Password" with your info, then copy & paste into the nano editor:
Well I din't verify it transferred over properly.  ::) There were some line break errors. I fixed those and it's up and hashing away.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 07, 2013, 04:03:18 AM
excellent  :)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: howzbit on July 09, 2013, 03:45:58 AM
Also - please ensure you're using a USB hub which is compatible with the RPi.
As a general rule - avoid USB 3.0 hubs!

a list of verified compatible hubs can be found here:
http://elinux.org/RPi_VerifiedPeripherals#Working_USB_Hubs

Thank you for this!

I'm planning on building a PiMiner also...just gather all the parts.

Wish me luck!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 09, 2013, 06:25:35 AM
Thank you for this!

I'm planning on building a PiMiner also...just gather all the parts.

Wish me luck!

Good Luck!

Working on v1.1 now - new features coming soon.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: howzbit on July 09, 2013, 09:08:55 AM
Quick question:

I'm planning to run 30 usb miners with the PiMiner, could I hook up 3 of these 10 port USB hubs (http://"http://www.amazon.com/Aitech-Adapter-backward-Compatible-aluminum/dp/B009NESU4M/ref=sr_1_13?ie=UTF8&qid=1373360761&sr=8-13&keywords=anker+usb+hub") (RPi non-compatible) to say 1 D-link hub that is compatible for the RPi?

Will this work?

I plan to add more later.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 09, 2013, 09:16:33 AM
I'm planning to run 30 usb miners with the PiMiner, could I hook up 3 of these 10 port USB hubs (http://"http://www.amazon.com/Aitech-Adapter-backward-Compatible-aluminum/dp/B009NESU4M/ref=sr_1_13?ie=UTF8&qid=1373360761&sr=8-13&keywords=anker+usb+hub") (RPi non-compatible) to say 1 D-link hub that is compatible for the RPi?

Will this work?

Unforch, not likely.  USB 1.1 devices, like the Erupters, don't work through USB3 hubs on the Pi.
sucks. I wanted to use one as well.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: howzbit on July 09, 2013, 09:36:45 AM
I'm planning to run 30 usb miners with the PiMiner, could I hook up 3 of these 10 port USB hubs (http://"http://www.amazon.com/Aitech-Adapter-backward-Compatible-aluminum/dp/B009NESU4M/ref=sr_1_13?ie=UTF8&qid=1373360761&sr=8-13&keywords=anker+usb+hub") (RPi non-compatible) to say 1 D-link hub that is compatible for the RPi?

Will this work?

Unforch, not likely.  USB 1.1 devices, like the Erupters, don't work through USB3 hubs on the Pi.
sucks. I wanted to use one as well.

So my best bet would to use link multiple USB 2.0 hubs but I'm hardly seeing compatible 10-port on that list with enough amps to use all 10-ports.

Correct me if I'm wrong but each USB miner uses .5a, right?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: LaserHorse on July 09, 2013, 10:19:53 AM
So my best bet would to use link multiple USB 2.0 hubs but I'm hardly seeing compatible 10-port on that list with enough amps to use all 10-ports.

Correct me if I'm wrong but each USB miner uses .5a, right?

yup .5A
most accomodating hub i've used so far is the d-link dub-h7


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: jimmy3dita on July 09, 2013, 10:35:04 AM

yup .5A
most accomodating hub i've used so far is the d-link dub-h7

+1

I'm using the same model (newer, black version) it's well built and works great connected to the Pi.

Note that I haven't done tests with the Block Erupters, by now it's connected only to some FPGAs
(powering the Pi itself too)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 11, 2013, 01:45:36 AM
Project updated to version 1.1

New in v1.1:
    • Added mining auto-start after boot (see tutorial for setup (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/configure-auto-start))
    • Time format changed to dd:hh:mm
    • Abbreviated large share count (ex. 12300 == "12k3")
    • Revised error % calculation: 100 * HW / (diff1shares + HW)
    • Added MtGox last, high, & low price (currency can be changed in PiMinerInfo.py)
    • Removed cgminer data logging (was appending nohup.out)
    • Misc. tutorial revisions/clarifications

Tutorial: http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/
Code: https://github.com/adafruit/PiMiner


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: MineForeman.com on July 11, 2013, 03:26:59 AM
Project updated to version 1.1

I STILL have not received my LCD, it was supposed to get here on Friday but I just called the UPS guys and apparently it has taken a scenic  trip around New Zealand.

When it does actually manage to get here I will be 'git pull'ing :) .

It does bring something up, my intentions are to be including a version of PiMiner in MinePeon (if that is OK with you, I have always had intentions to add LCD's and TFT's and there is no point re-inventing the wheel).  How would you like to work together (assuming you do), my preference is that I just push from my own git any improvements and pull any of yours.

The last thing I want to do is fork, that never seems to work out happily :P .

Neil


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 11, 2013, 04:22:14 AM
Project updated to version 1.1

I STILL have not received my LCD, it was supposed to get here on Friday but I just called the UPS guys and apparently it has taken a scenic  trip around New Zealand.

When it does actually manage to get here I will be 'git pull'ing :) .

It does bring something up, my intentions are to be including a version of PiMiner in MinePeon (if that is OK with you, I have always had intentions to add LCD's and TFT's and there is no point re-inventing the wheel).  How would you like to work together (assuming you do), my preference is that I just push from my own git any improvements and pull any of yours.

The last thing I want to do is fork, that never seems to work out happily :P .

Neil

Ugh - sorry to hear about UPS going off-course!  They're usually rock-solid for me here :/

I'd love to collaborate - and you are totally welcome to use the PiMiner code in MinePeon.  
I have to check a few things regarding push privileges - can get back to you on that tho.

and yah - forking seems a very effect way to divide good intentions …


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Rotorgeek on July 11, 2013, 03:38:55 PM
So I was wondering if there was a way to launch Pi.Miner form a "autorun" script when the Pi boots? Then press and hold the up button to launch cgminer with the predefined config file? The bonus would be still having the ability to SSH in independently and see the output from cgminer.

P.S. I also think you should come up with a way for people to mine on a schedule and be able to set aside time to mine (say thanks) to you for a given period of time per day/week, like cgwatcher does.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 12, 2013, 03:45:19 AM
So I was wondering if there was a way to launch Pi.Miner form a "autorun" script when the Pi boots? Then press and hold the up button to launch cgminer with the predefined config file? The bonus would be still having the ability to SSH in independently and see the output from cgminer.

The tutorial now describes how to add auto-start and the scripts have been updated to support this functionality. This method starts cgminer up as well. Unfortunately, I haven't been able to run cgminer as a background job which can then be brought to the foreground. Whenever I tried, cgminer just stops while in background - this is why I ended up using nohup.  I'm open to better solutions, of course.

P.S. I also think you should come up with a way for people to mine on a schedule and be able to set aside time to mine (say thanks) to you for a given period of time per day/week, like cgwatcher does.

Interesting, but would need to be 1000% bulletproof/bug free - don't want to risk messing with folks' income!
In any case, my address in in my sig :)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: MineForeman.com on July 12, 2013, 04:03:37 AM
I haven't been able to run cgminer as a background job which can then be brought to the foreground. Whenever I tried, cgminer just stops while in background - this is why I ended up using nohup.  I'm open to better solutions, of course.

I don't know what you are using for init there are a few ways around it, if your using something oldish like SystemV (it has the /etc/init.d file structure) I have used this method a few times with limited success;-

http://askubuntu.com/questions/257808/how-can-i-use-init-d-or-some-other-method-to-run-a-screen-script-on-boot-up/

The issue with SystemV is that it is brain dead when it comes to monitoring processes and if the miner dies in background its dead.  You can do some sort of bash loop but its not ideal.

Id your using a more modern distro that has systemd instead everything gets easy, use this;-

Code:
[Unit]
Description=cgminer
After=network.target openntpd.service

[Service]
Type=forking
ExecStart=/usr/bin/screen -dmS cgminer /opt/minepeon/bin/cgminer --api-listen --api-allow W:127.0.0.1 --sharelog /opt/minepeon/log/share.log -c /opt/mi
nepeon/etc/miner.conf
ExecStop=/usr/bin/screen -S cgminer -X quit
Restart=always

[Install]
WantedBy=multi-user.target

And systemd will baby sit the process for you, you can even switch too it (screen -r) kill the miner and get dumped out and when you look at your process list it is still there ;) .

Neil


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: pitan on July 12, 2013, 04:12:36 AM
Love it but not the tinker type...
Anybody doing mass production or anything similar will be interested
 


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: alexrossi on July 13, 2013, 11:02:07 AM
Project updated to version 1.1

New in v1.1:
    • Added mining auto-start after boot (see tutorial for setup (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/configure-auto-start))
    • Time format changed to dd:hh:mm
    • Abbreviated large share count (ex. 12300 == "12k3")
    • Revised error % calculation: 100 * HW / (diff1shares + HW)
    • Added MtGox last, high, & low price (currency can be changed in PiMinerInfo.py)
    • Removed cgminer data logging (was appending nohup.out)
    • Misc. tutorial revisions/clarifications

Tutorial: http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/
Code: https://github.com/adafruit/PiMiner

definitely love this project! Hope you'll continue to keep updated the code with new features.
I'm going to build a piminer + 5/6 block erupters (with the d-link dub-h7), do you think that 6 is too much for the dlink? (higher probability of hw errors?)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 14, 2013, 07:06:57 AM
definitely love this project! Hope you'll continue to keep updated the code with new features.
I'm going to build a piminer + 5/6 block erupters (with the d-link dub-h7), do you think that 6 is too much for the dlink? (higher probability of hw errors?)

Thnx - always good to hear!  Been a bit busy of late, but additional features are in the works.

I use the dub-h7 with 5 erupters @ <1% HW errors.  I've seen reports of it being used w up to 6, but no comparisons of error rate.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SilentStray on July 14, 2013, 07:24:07 AM
I'm totally in love with this project! Will be adapting it for BFL Jalapenos.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 14, 2013, 08:37:19 AM
I don't know what you are using for init there are a few ways around it, if your using something oldish like SystemV (it has the /etc/init.d file structure) I have used this method a few times with limited success;-

http://askubuntu.com/questions/257808/how-can-i-use-init-d-or-some-other-method-to-run-a-screen-script-on-boot-up/

Thanks for the link - appears Raspbian is still using sysvinit.  Will give this a try.

Learning more about Arch - looks pretty mean & lean, can see why you use it  ;)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 14, 2013, 08:41:21 AM
I'm totally in love with this project! Will be adapting it for BFL Jalapenos.

That would be nice!  I have some ideas for incorporating the RPi+LCD with the enclosure I'd like to try.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: xgtele on July 14, 2013, 12:29:59 PM
How many USB Block Erupters one Raspberry Pi can handle? 10, 20, 100??


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SpAcEDeViL on July 14, 2013, 09:36:18 PM
Hy,

i read only "connecting to cgminer..." on my LCD.

The Miner is running, but there dont connect? Or is this a error in PiMiner?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 14, 2013, 10:15:49 PM
i read only "connecting to cgminer..." on my LCD.

The Miner is running, but there dont connect? Or is this a error in PiMiner?

Hmm … can you check to ensure the contents of cgminer.conf (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/configure-settings) have copied correctly with no formatting errors?

If so, then please try the following:

    • Confirm cgminer is running with:
       ps aux | grep cgminer

You should see a multi-line response, including at least one line beginning w "root" - example (http://learn.adafruit.com/assets/9144)
If not, then try starting cgminer again (PiMiner scripts should find it automatically after a few moments.)

If you've confirmed cgminer *is* running, then you can try:

    • Manually shutting down processes (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/to-stop-mining-dot-dot-dot#option-2-stop-mining-without-shutting-down) and then restarting them (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/start-mining#run-cgminer).
    • Reboot the Pi, and wait for auto-start (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/configure-auto-start) to begin & connect.

If none of the above resolves the issue, confirm that you've followed all steps in the tutorial, then let me know what model RPi and OS(Raspbian, Occidentalis) you're using, and we'll go from there.

fyi - I'll be adding a FAQ/troubleshooting page to the tutorial soon which will cover the above steps.


How many USB Block Erupters one Raspberry Pi can handle? 10, 20, 100??

I believe the theoretical limit of 127 devices - have yet to verify this myself tho ;)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: notlist3d on July 15, 2013, 03:42:29 AM
I believe the theoretical limit of 127 devices - have yet to verify this myself tho ;)

What is the highest that someone has proved?  I would LOVE to see a pic of large amount using this.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: alexrossi on July 15, 2013, 05:46:27 AM
I believe the theoretical limit of 127 devices - have yet to verify this myself tho ;)

What is the highest that someone has proved?  I would LOVE to see a pic of large amount using this.

I've read something about this, rpi can handle with a decent percentage of hw errors 40 block erupters, over 40 CPU load is always on 100% and hw errors % increase


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SpAcEDeViL on July 15, 2013, 09:13:34 AM
i read only "connecting to cgminer..." on my LCD.

The Miner is running, but there dont connect? Or is this a error in PiMiner?

Hmm … can you check to ensure the contents of cgminer.conf (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/configure-settings) have copied correctly with no formatting errors?

If so, then please try the following:

    • Confirm cgminer is running with:
       ps aux | grep cgminer

You should see a multi-line response, including at least one line beginning w "root" - example (http://learn.adafruit.com/assets/9144)
If not, then try starting cgminer again (PiMiner scripts should find it automatically after a few moments.)

If you've confirmed cgminer *is* running, then you can try:

    • Manually shutting down processes (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/to-stop-mining-dot-dot-dot#option-2-stop-mining-without-shutting-down) and then restarting them (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/start-mining#run-cgminer).
    • Reboot the Pi, and wait for auto-start (http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/configure-auto-start) to begin & connect.

If none of the above resolves the issue, confirm that you've followed all steps in the tutorial, then let me know what model RPi and OS(Raspbian, Occidentalis) you're using, and we'll go from there.

fyi - I'll be adding a FAQ/troubleshooting page to the tutorial soon which will cover the above steps.


How many USB Block Erupters one Raspberry Pi can handle? 10, 20, 100??

I believe the theoretical limit of 127 devices - have yet to verify this myself tho ;)

Hy,

yes i have used that tut. from adafruit. The Miner is up and running good.

I can connect to the api from my windows computer with CGWatcher.

I use Raspbian.

When PiMiner starts boot or by restart it show the IP address from the raspberry, and then comes "connecting to cgminer ... " thats all.

When i push up or down i become on one display the actual prices. Hi and Lo. ...

So i thing the PiMiner becomes so API connect or dont connect to them?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Stale on July 16, 2013, 12:27:51 AM
I believe the theoretical limit of 127 devices - have yet to verify this myself tho ;)

What is the highest that someone has proved?  I would LOVE to see a pic of large amount using this.

I've read something about this, rpi can handle with a decent percentage of hw errors 40 block erupters, over 40 CPU load is always on 100% and hw errors % increase

On a related note, can anyone chime in on how stable the RasPi is as a mining platform? I've heard that the RasPi has some stability issues (especially when dealing with USB), though I've never actually used one myself.

I'd be inclined to order one if they can handle ~40 USB Erupters for 24x7 stably.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 16, 2013, 05:16:09 AM
yes i have used that tut. from adafruit. The Miner is up and running good.

I can connect to the api from my windows computer with CGWatcher.

I use Raspbian.

When PiMiner starts boot or by restart it show the IP address from the raspberry, and then comes "connecting to cgminer ... " thats all.

When i push up or down i become on one display the actual prices. Hi and Lo. ...

So i thing the PiMiner becomes so API connect or dont connect to them?

Strange, I'm unable to recreate this bug - PiMiner always manages to connect to cgminer for me, tho it can take up to ~30 seconds or so.
Which version of the RPi are you using - Model A or Model B?

I'll check a few more possible causes …


On a related note, can anyone chime in on how stable the RasPi is as a mining platform? I've heard that the RasPi has some stability issues (especially when dealing with USB), though I've never actually used one myself.

I'd be inclined to order one if they can handle ~40 USB Erupters for 24x7 stably.
I've mined for about 2 weeks with with 5 USB Block Erupters, no issues - only stopped as I had to restart the RPi for testing.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: boost75 on July 16, 2013, 06:56:51 AM
Where can I buy assembled Adafruit 16x2 LCD display? Thank you.

Drop me a line if you're still looking. I'm selling assembled and tested ones for $45 shipped.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SpAcEDeViL on July 16, 2013, 08:40:03 AM


Strange, I'm unable to recreate this bug - PiMiner always manages to connect to cgminer for me, tho it can take up to ~30 seconds or so.
Which version of the RPi are you using - Model A or Model B?

I'll check a few more possible causes …

I have Raspi  Model B.

CG Miner 3.1.1

On one screen i become the message
"format
error"

when i push the up or down button.

i use german language config in raspi.

so in Germany we work with comma, for numbers eg. 1.000 in English is 1000 in German and the comma is for *,00 

i dont know if this the right way... but a idea.



Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SpAcEDeViL on July 16, 2013, 05:31:13 PM
Hy,

now its running. But, why? : Here is my old config file

Code:
{
"pools" : [
{
"url" : "eu-stratum.btcguild.com:3333",
"user" : "spacedevil_4",
"pass" : "egalo"
}
],

"api-port" : "4028",
"api-listen" : true,
"api-allow" : "W:127.0.0.1, 192.168.0.142",
"expiry" : "120",
"failover-only" : true,
"hotplug" : "5",
"log" : "5",
"no-pool-disable" : true,
"queue" : "2",
"scan-time" : "60",
"worktime" : true,
"shares" : "0",
"kernel-path" : "/usr/local/bin",
"icarus-options" : "115200:1:1",
"icarus-timing" : "3.0=100"
}

And the working one:

Code:
{
"pools" : [
{
"url" : "eu-stratum.btcguild.com:3333",
"user" : "spacedevil_4",
"pass" : "egalo"
}
]
,
"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"
}


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Rotorgeek on July 16, 2013, 06:27:09 PM
I'm certainly no expert, but I notice on line 8-9 the comma is in different place. When I had trouble with mine it was formatting errors like that. (I think)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: turtle83 on July 16, 2013, 06:48:30 PM
Code:
"api-allow" : "W:127.0.0.1, 192.168.0.142",

maybe the space between the 2 ips?

cgminer 3.1.1 on my desktop accepted your old config without any fuss...


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: agath on July 16, 2013, 07:02:41 PM
With 40 B.E. CPU occupation is at ~45%, so I think it can handle up to around 60 of them. The problem are USB hubs. For some reason the installed USB controller can't handle very well those hubs made with two cascaded hub internally. And I didn't find any (not expensive) solution to hook more than 20 devices reliably and 40 devices with stability problems. I would be happy to being able to connect 40 to 60 devices, I'm still looking for a serious USB HUB.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 16, 2013, 08:02:53 PM
now its running. But, why? : Here is my old config file
[…]

comparing the files, I see the following differences:

https://i.imgur.com/7ZTarL8l.png

likely the api-allow address
also cgminer 3.1.1 doesn't use hotplug


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SpAcEDeViL on July 16, 2013, 08:18:58 PM
now its running. But, why? : Here is my old config file
[…]

comparing the files, I see the following differences:

https://i.imgur.com/7ZTarL8l.png

likely the api-allow address
also cgminer 3.1.1 doesn't use hotplug

Hy, ok, but why i cant not use two IPs... so when i will check the miner over CGWatcher or anything...


Another question : can i change the color on startup to green? And change the glow of the display ?
I am new in this ;)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 17, 2013, 02:42:36 AM
Hy, ok, but why i cant not use two IPs... so when i will check the miner over CGWatcher or anything...

In "cgminer.conf" try replacing this line:
Code:
        "api-allow" : "0/0",
with this:
Code:
        "api-allow" : "0/0, W:127.0.0.1, 192.168.0.142",
I don't use CGWatcher, so can't test it myself.


Another question : can i change the color on startup to green? And change the glow of the display ?
I am new in this ;)

You can edit the file named "PiMinerDisplay.py" to change which LCD colors can be selected.
The list of colors is defined starting at line #19:
Code:
		self.col = (self.lcd.ON,   self.lcd.OFF, self.lcd.YELLOW, self.lcd.OFF,
               self.lcd.GREEN, self.lcd.OFF, self.lcd.TEAL,   self.lcd.OFF,
                self.lcd.BLUE,  self.lcd.OFF, self.lcd.VIOLET, self.lcd.OFF,
                 self.lcd.RED,    self.lcd.OFF)

If you'd prefer to only use green, you can replace those 4 lines with this line:
Code:
		self.col = (self.lcd.GREEN, self.lcd.OFF)

EDIT: you'll also need to change line #51 in "PiMiner.py" from:
Code:
                lcd.backlight(lcd.ON)
to:
Code:
                lcd.backlight(lcd.GREEN)

Just remember to keep the indentations as seen above, or python may bite ;)

The only other LCD function which can be controlled is the display contrast, which can be altered using the onboard potentiometer (http://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-raspberry-pi/usage#adjusting-contrast)


Hope that helps!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: JLM on July 17, 2013, 04:08:08 PM
I'm totally in love with this project! Will be adapting it for BFL Jalapenos.
Post progress


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: phrog on July 18, 2013, 08:23:26 AM
Quote from: The tutorial
Note: this is not the latest version of cgminer, at the time of this writing, the current version (3.3.1) has issues communicating with Block Erupter USB on Raspbian

FYI, I also experienced issues with Block Erupter USB's on Raspbain. However I was successful at building and running cgminer from git (3.3.1) after dist-upgrading Raspbain from wheesy to jessie.  



Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 18, 2013, 09:22:54 AM
FYI, I also experienced issues with Block Erupter USB's on Raspbain. However I was successful at building and running cgminer from git (3.3.1) after dist-upgrading Raspbain from wheesy to jessie.  

Thnx - good to know!  I'll update the tutorial once jessie is considered stable.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: 33Warlord on July 21, 2013, 01:43:57 AM
Thanks for the great project, LaserHorse.

My Pi Miner has been running great for the past week with 9 Erupters.   But, I'm having a problem adding more Erupters to it and hope that someone may be able to share some guidance.  

When trying to add 6 additional Erupters (for a total of 15), I discovered that it will only "see" 13 total.  i.e., typing "ls /dev/*USB*" only lists ttyUSB0 - ttyUSB12, even though there are 15 Erupters installed.

A few notes:
  • I built a second RPi Miner, with a newly imaged SD-card, and ran into the exact same issue.
  • The 15 Erupters were installed across 3 DLink DUB-H7 hubs, 5 in each hub.  So I don't think its power related.
  • These 3 hubs feed into a 4th hub which is connected to the RPi.
  • I'm using Raspbian, and followed the build process specified in your project walk-through.
  • The 2 Erupters that it wont see are running fine on a separate RPi miner.  So it doesn't appear to be a hardware problem with those Erupters.

Any recommendations for troubleshooting this?   Is there a default max number of USB serial devices that are enumerated in Raspbian?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Rotorgeek on July 21, 2013, 11:19:24 PM
Laserhorse,
Can a backup pool be put in the .conf? I added a pool while mining and hit 'S' and 'W' but it didn't change anything. What about other options can be added, like difficulty?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 22, 2013, 11:43:58 PM
Laserhorse,
Can a backup pool be put in the .conf? I added a pool while mining and hit 'S' and 'W' but it didn't change anything. What about other options can be added, like difficulty?

yup - add'l pools can be added to the conf file like so:

Code:
"pools" : [
        {
                "url" : "FIRST POOL ADDRESS:PORT",
                "user" : "WORKER NAME",
                "pass" : "PASSWORD"
        },
        {
                "url" : "SECOND POOL ADDRESS:PORT",
                "user" : "WORKER NAME",
                "pass" : "PASSWORD"
        },
]

And yes - you can add a pool or make other changes from within cgminer:
hit "S" to go to settings,
then "W" to write the config file
and save it by entering the following location: "/home/pi/cgminer.conf"
and enter "y" confirm that you wish to overwrite the preexisting file.


Thanks for the great project, LaserHorse.

My Pi Miner has been running great for the past week with 9 Erupters.   But, I'm having a problem adding more Erupters to it and hope that someone may be able to share some guidance.  

When trying to add 6 additional Erupters (for a total of 15), I discovered that it will only "see" 13 total.  i.e., typing "ls /dev/*USB*" only lists ttyUSB0 - ttyUSB12, even though there are 15 Erupters installed.

A few notes:
  • I built a second RPi Miner, with a newly imaged SD-card, and ran into the exact same issue.
  • The 15 Erupters were installed across 3 DLink DUB-H7 hubs, 5 in each hub.  So I don't think its power related.
  • These 3 hubs feed into a 4th hub which is connected to the RPi.
  • I'm using Raspbian, and followed the build process specified in your project walk-through.
  • The 2 Erupters that it wont see are running fine on a separate RPi miner.  So it doesn't appear to be a hardware problem with those Erupters.

Any recommendations for troubleshooting this?   Is there a default max number of USB serial devices that are enumerated in Raspbian?


hmm … so the hubs are *not* connected in a series/chain, correct?
I haven't tested with more than six erupters myself, so you have me at a bit of a loss here.  
Shot in the dark, but have you tried specifying ttyUSB13 & ttyUSB14 even though they don't show with ls?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: 33Warlord on July 23, 2013, 02:09:51 AM
hmm … so the hubs are *not* connected in a series/chain, correct?
I haven't tested with more than six erupters myself, so you have me at a bit of a loss here.  
Shot in the dark, but have you tried specifying ttyUSB13 & ttyUSB14 even though they don't show with ls?

Thanks for the ideas and feedback.

To answer your question - you are correct, the hubs are not in series, but rather connected in a hub/spoke style.  (RPi -> Hub1. Then Hub1 connects to Hub2, 3 and 4 directly.)

I did not try specifying ttyUSB13 & 14, although that is a great suggestion.  

I'll try it in a few days when I get back in town, and post my results back here.



Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SamHa1n on July 23, 2013, 03:40:46 AM
I like pi! half finished.

http://imgur.com/BiIMKJb (http://imgur.com/BiIMKJb)


Have had 80+ on a single pi.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on July 23, 2013, 06:04:03 AM
I like pi! half finished.

http://imgur.com/BiIMKJb


Have had 80+ on a single pi.

... ladies & gentlemen, I believe we have a new pi-hi-score


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: jimmy3dita on July 23, 2013, 07:53:43 AM
I like pi! half finished.

http://imgur.com/BiIMKJb


Have had 80+ on a single pi.

... ladies & gentlemen, I believe we have a new pi-hi-score

I can't ever see the poor little thing... Buried with hashpower ;D


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: dc81 on July 26, 2013, 04:08:20 PM
anyone know of a case that will also accommodate the lcd?

also, I made a slight change to PiMinerInfo.py (https://github.com/ncstdc/PiMiner/commit/fce68f4e9c064551d5713f6f5392b3f12023694e) since if you have multiple pools, it doesn't actually know which one you are currently mining on


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: 33Warlord on July 26, 2013, 06:52:04 PM
anyone know of a case that will also accommodate the lcd?

The original Adafruit Pi Case works with the LCD if you leave the top off:  http://www.adafruit.com/products/859 (http://www.adafruit.com/products/859)

Also the new Geauxrobot Compact Enclosure works great with the LCD:  http://www.amazon.com/gp/product/B00DT5FJEK/ref=oh_details_o03_s01_i03?ie=UTF8&psc=1 (http://www.amazon.com/gp/product/B00DT5FJEK/ref=oh_details_o03_s01_i03?ie=UTF8&psc=1)  (This amazon link has my referral ID, but I'm not sure how to get the link without it.)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi
Post by: tombs on August 02, 2013, 05:03:03 AM
Where can I buy assembled Adafruit 16x2 LCD display? Thank you.

Drop me a line if you're still looking. I'm selling assembled and tested ones for $45 shipped.

I would be interested in one as I don't have the time to assemble it myself.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: kmtan on August 03, 2013, 01:05:03 AM
I love this project, is that any more controller available for purchase in china?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: pluMmet on August 06, 2013, 10:55:54 PM
How would you set up the config file for Eligius?

I'm not to bright all these different hosts and I'm confused
Stratum Host:  stratum.mining.eligius.st Port:  3334 | Getwork Host:  getwork.mining.eligius.st Port: 8337
GBT Host:  gbt.mining.eligius.st Port: 9337


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: LaserHorse on August 07, 2013, 12:22:59 AM
I love this project, is that any more controller available for purchase in china?

hmm - list of distributors is here (http://www.adafruit.com/distributors/).  None in China quite yet.

How would you set up the config file for Eligius?

I'm not to bright all these different hosts and I'm confused
Stratum Host:  stratum.mining.eligius.st Port:  3334 | Getwork Host:  getwork.mining.eligius.st Port: 8337
GBT Host:  gbt.mining.eligius.st Port: 9337

Try using this format for the URL:
Code:
http://stratum.mining.eligius.st:3334


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: djjacket on August 09, 2013, 03:21:09 PM
Great Project!

Got mine up and running and thought I'd post a couple pics!

http://i309.photobucket.com/albums/kk398/djjacket/IMAG0702.jpg
http://i309.photobucket.com/albums/kk398/djjacket/IMAG0697.jpg


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SpAcEDeViL on September 11, 2013, 08:47:53 PM
HY,

The PiMiner is very cool!

Can you write a PiMiner Script for a another Display, with more infos?

Like this: http://42loop.de:8888/garage/uploads/233/raspberrypi_lcd.JPG


Or this : https://www.mikrocontroller.net/attachment/137752/dockstar.jpg

Or this: http://raspberrycenter.de/sites/default/files/styles/lightbox/public/field/image/raspi-lcd.jpg


With info of uptime, a diagramm with mining infos? Or Infos from APIs from BTCGuild?

 ;)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Xwolf on September 21, 2013, 05:44:08 PM
Has anyone heard of or tried to get the LCD Plate working with BFGminer using PiMiner?

I am not a code expert so really don't know what I'd be looking at editing PiMiner.py to get it to work.

Cheers,


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: SpAcEDeViL on September 23, 2013, 04:52:04 PM
Hy,

you need to know, how the api from the bfgminer works.

If it works with the same parameters you dont need any changes.


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: onryo on September 28, 2013, 05:00:04 PM
Has anyone heard of or tried to get the LCD Plate working with BFGminer using PiMiner?

I am not a code expert so really don't know what I'd be looking at editing PiMiner.py to get it to work.

Cheers,


# Been running Raspbian, BFGMiner, Adafruit 2x16 LCD and a handful of BE with no problems at all.
# Forgot all about my little setup them until I saw this post.
# The erupters have been hashing away for 2-3 weeks non-stop. HW errors 0.48%. No lockups or issues. Really solid!

git clone https://github.com/luke-jr/bfgminer.git
cd bfgminer
./autogen.sh
./configure
make

# I like to run BFGMiner from the build dir. I don't install.
# BFGMiner's API does not blindly listen to any old crap. We need to enable the api in a way
# that is not going to restict the port.
# There are a few ways to do this but the easyest is to use api-network.

./bfgminer -o http://xxxxx:port -u onryo -p xxx --api-listen --api-network -S erupter:all

# Now your Adafruit is hashing away with your erupters with BFGMiner and your Adafruit is
# working just fine with your erupters.

# Make a nice bfgminer.conf file and save it in lets say ~/.bfgminer/ so you dont lose it.
# I just pull my "play around" gits in a dir called sandbox.

Add this to your /etc/rc.local

cd /home/pi/sandbox/PiMiner
python PiMiner.py &
cd /home/pi/sandbox/bfgminer
./bfgminer --config /home/pi/.bfgminer/bfgminer.conf -S erupter:all

# I don't use nohup for a lot of reasons.

# If you do not want to see "connecting to cgminer" when you start your RPi
# change the line in PiMinerDisplay.py to

self.lcd.message('connecting\nto BFGMiner ...')

# top shows that PiMiner is a CPU hog though. 28%   ::)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: miningfever on December 13, 2013, 08:52:37 AM
The tutorial now describes how to add auto-start and the scripts have been updated to support this functionality. This method starts cgminer up as well. Unfortunately, I haven't been able to run cgminer as a background job which can then be brought to the foreground. Whenever I tried, cgminer just stops while in background - this is why I ended up using nohup.  I'm open to better solutions, of course.

Have you considered using "screen" instead of nohup? This should allow you to watch the cgminer output when you log in via ssh, but I am not sure if/how you would make it start automatically at boot, nor have I actually tried it.
Here's an interesting link explaining the differences between nohup and screen:  http://www.52nlp.com/nohup-and-screen/

On a side note: I just switched over my BFL jalapeno from an old laptop to my RPi and following these instructions I was able to get things up and running just fine! Awesome tutorial! :)

A few comments that may help others:
  • The tutorial assumes that you are using the user 'pi' and that you have installed the Adafruit python code in /home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCDPlate/; if you installed the python files in a different directory or use a different user, you will have to edit the file /home/PiMiner/PiMiner.py: on line 4 change the location of the Adafruit library to wherever you installed it
  • If you're like me and don't have a soldering iron lying around (anymore) or don't feel comfortable using one, you can order assembled LCD monitors from here: http://raspberrypilcd.com/ . They also sell RPi cases for the RPi including the LCD monitor. I ordered mine there and it arrived perfectly assembled and in working order. Shipped on the same day I placed my order! :)

Keep up the good work! :)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Blackwolve on December 18, 2013, 09:06:28 PM
Requst/Help:

Hi,

i want to monitor an usb hub on a PC via network because this hub deliver USB3 for the Twin Fury (upto 900mA). USB3 is not supportet with this hub on the rpi, so i need to take this option.

The quick`n`dirty was to change the s.connect ((host, port)) to s.connect (('192.168.178.xx, port)) but it is no well modification.

Have you ideas how i fix it well or is there a feature i didn't see?

Greetings :)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: cs2000 on January 04, 2014, 09:59:27 PM
May be a long shot here, but ive just upgraded from BlockEruptors to the new Bitmain Antminer U1's. This meant needing to change from CGminer 3.1.1 to CGMiner 3.8.5.

Sadly, my screen now just says

'MHS av'
'MHS av'

Im guessing CGminer changes its API or something from the 2 versions. All the other functions still work such as miner & pool name, bitcoin price, network difficulty and the devices screen, just not the most important one showing the hashing rate and the Accepted, Rejected, HW Error stats on the first screen.

I don't really know Python, but I understand that the "fault" lies with the PiMinerInfo.py file (https://github.com/adafruit/PiMiner/blob/master/PiMinerInfo.py)

Wonder if maybe the project author, or some other kind person could assist.

Perhaps its worth creating an updated version of the tutorial, it seems as though its been hugely successful, tons of people use RPI's as mining controllers, just would be nice for it to work with the newer CGminer versions and seeing as block eruptors are getting more and more obsolete, maybe its time!

Would be a shame for me to have no use for the adafruit screen, that tutorial was the only reason I purchased the LCD plate!


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: chadgroover on January 06, 2014, 05:01:52 PM
Another guy here who bought an Adafruit 16x2 display on the basis of how cool it looked in the article!

Unfortunately I'm also at a bit of a standstill in getting the display working alongside some new Antminer U1s as per this post - https://bitcointalk.org/index.php?topic=390929.msg4345581#msg4345581
Would be cool if someone could take a look at some point... I'm happy to be a guinea pig if needs be!

Not sure if this is of any relevance, but CGWatcher can connect to the API listen port on my Pi without any issues, but doesn't display average hashrates...


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: MWNinja on January 06, 2014, 06:02:25 PM
Just wanted to drop in and mention that PiMiner comes pre-installed on the Bitcoinpi.org distribution.



Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: OliRS on January 21, 2014, 08:42:29 PM
May be a long shot here, but ive just upgraded from BlockEruptors to the new Bitmain Antminer U1's. This meant needing to change from CGminer 3.1.1 to CGMiner 3.8.5.

Sadly, my screen now just says

'MHS av'
'MHS av'

Im guessing CGminer changes its API or something from the 2 versions. All the other functions still work such as miner & pool name, bitcoin price, network difficulty and the devices screen, just not the most important one showing the hashing rate and the Accepted, Rejected, HW Error stats on the first screen.

I don't really know Python, but I understand that the "fault" lies with the PiMinerInfo.py file (https://github.com/adafruit/PiMiner/blob/master/PiMinerInfo.py)

Wonder if maybe the project author, or some other kind person could assist.

Perhaps its worth creating an updated version of the tutorial, it seems as though its been hugely successful, tons of people use RPI's as mining controllers, just would be nice for it to work with the newer CGminer versions and seeing as block eruptors are getting more and more obsolete, maybe its time!

Would be a shame for me to have no use for the adafruit screen, that tutorial was the only reason I purchased the LCD plate!

I am having the same trouble as you.

I also have just purchased a Bitmain Antminer U1 miner to test before I set up a proper rig with my RPi. I also just assembled the Adafruit I2C 16x2 LCD plate, great bit of kit and only took 30 mins to assemble and I'm no expert, so those not liking the thought of soldering anything give it a go!

Anyway I installed the latest version of cgminer (3.10.0) but following the tutorial on Adafruit, I run it using the example cgminer.conf file and the LCD plate works just fine and displays all the info correctly.

However, my Antminer was only hashing at around 700 MH/s, but it's rated at 1.6 GH/s, up to 2.2 GH/s overclocked. The official install of cgminer does not to my knowledge have the ability to set overclock parameters for my device as it does not have the proper bit main drivers. For those I looked at two different sources which use a "patched" version of cgminer 3.8.5 with the bit main drivers. I build and configure it fine using the --enable-bmsc option instead of the --enable-icarus option as per the tutorial. I edited the cgminer.conf file to replace:

Quote
"icarus-options" : "115200:1:1",
"icarus-timing" : "3.0=100"

with:

Quote
"bmsc-options" : "115200:20",
"bmsc-freq" : "0981"


Now when I run this 'forked' version of cgminer with the bmsc options enabled, the display just shows:

Quote
'MHS av'
'MHS av'


I'm pretty sure it must be something quite simple that requires a little editing of the python scripts, but I wouldn't know what at the moment and it's been years since I scripted in python!!  :-\

Would be great to hear from the projects author. :)


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: OliRS on January 21, 2014, 10:46:49 PM
Well after a lot of reading and searching around I found this thread, and this post in particular: https://bitcointalk.org/index.php?topic=390929.msg4379693#msg4379693

The short version is that the AdvancedStyle and bitmaintech versions have alterations to the API which stops the functionality of the Adafruit LCD screen. The version below does not.

After installing the repo in that post (https://github.com/fractalbc/cgminer) I now have full bitmain support and the I2C LCD screen is functional again :)



Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: RemoteBC on February 03, 2014, 07:47:58 PM
To resolve the 'MHS av' 'MHS av' problem edit the file PiMinerInfo.py ...

nano PiMinerInfo.py

Change line 143 which shows

      s2 = 'avg:%s' % self.hashrate(float(d['MHS av']))
      return [s1, s2]


to this

      if ('MHS av' in d):
            s2 = 'avg:%s' % self.hashrate(float(d['MHS av']))
      else:
            s2 = 'avg GHs:%s' % float(d['GHS av'])
      return [s1, s2]


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Sp00n1980 on March 05, 2014, 04:53:32 PM
Hi i am having a slight issue with piminer, i am running minpeon  0.2.4.4, with bfgminer3.10.0

yet i always get "connecting to miner ..." on the display  :(

is there a fix somewhere?


Title: Re: PiMiner - DIY mining controller/monitor with Raspberry Pi [v1.1]
Post by: Semtex199 on April 24, 2014, 03:39:54 PM
Same problem here :/

Raspberry running cgminer 3.5.0 with dualminer.
stuck on "Connecting to Miner..."

The lcd is correctly installed but nothing happen.
i tried to run CGminer using screen, i also tried to run it normally but nothing happen
Any help is welcome :)

+
S