Bitcoin Forum

Other => Beginners & Help => Topic started by: willinliv on July 13, 2013, 02:10:30 PM



Title: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
Post by: willinliv on July 13, 2013, 02:10:30 PM
      Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc

      Objective

      The objective of this project was to put together a Raspberry Pi controlled Block Erupter USB mining rig using CGminer, that is contributing to a mining pool (in this case Slush's mining pool https://mining.bitcoin.cz/), with enhancements that make it headless, with automatic log on and start up, whilst being accessible via VNC.

      There are already some very good tutorials out there (used here), but I found that each of these had slighlty different enhancements of no interest to me, which meant that their specific commands were not ideal. So this is my attempt as muddling through things, interfacing different solutions together to get what I need, and troubleshooting problems as they arise using online sources. I hope others find this walkthough useful, I am sure that you'd be able to find these solutions for yourself, but I thought it might be useful for others who maybe are less confident or don't know the right search terms to put into Google. Plus it's a record in case I forget should I need to recreate it.

      If you do find this walkthrough a timesaver, and something that gets you up and running, you might like to buy me a shandy or two by tossing me a few milibits:
      bitcoin:1PhtdmAhwUB2ywGiYGEYHLY7ponXykKfBY (bitcoin:1PhtdmAhwUB2ywGiYGEYHLY7ponXykKfBY)

      http://s22.postimg.org/ou7ozavep/miner.jpg
      (updated image 1/8/13 - everything is fixed on a heavy stand that provides a nice volume of air underneath. There are two Arctic Breeze mobile fans in there too)


      As pointed out by J35st3r, the version of CGMiner that the tutorial below get's you to install is version 3.1.1. Apparently (according to the Adafruit tutorial) http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/install-cgminer the most recent version 3.3.1 has problems addressing the USB devices under Raspbian. But I'd be interested in trying it out sometime

      Sources

      • Adafruit tutorial: http://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/ (basic setup)
      • Jafc76's super tutorial: https://forums.butterflylabs.com/bitcoin-discussion/3238-super-tutorial-raspberry-pi-raspbian-cgminer-tightvnc-wifi-boot.html (useful in setting up autostart)
      • The MagPi Issue 3 Page 3: http://issuu.com/themagpi/docs/the_magpi_issue_3_final?e=4599523/2586562 (shows how to autostart RPi)

      Equipment

      • Raspberry Pi
      • SD Card (I use a 2gb one)
      • Powered USB hub/s, choose one that has an adapter that will allow for 0.5amps per block erupter. You may be able to power the raspberry pi from this also, plus an optional fan. (The Raspberry Pi has one microUSB connection for it's power but you must also use one of it's full sized USB sockets to carry data to the hub). I use Belkin USB2.0 4-port F5U23QEA, which has a 2.6A adapter which should allow for 4 block erupters ok, or if powering the RPi and a fan then 3.
      • Asicminer usb Block Erupter. I first heard about these through the Raspberry Pi blog (http://www.raspberrypi.org/archives/4243), having previously used ATi cards for mining. Adafruit talks about using Bitmit, and there are inticing prices if you can but some Bitcoin, but there are also some UK scammers on there (just make sure that you make use of it's Escrow service). Prices on eBay are coming down. All the calculators out there such as this one suggest that with ever increasing mining difficulty (as more bitcoins get released), it's pretty clear that this is a project just for kicks rather than income, and this diversion is going to be costing you money for the privillage of playing a miner. Still apparently the world is aching for a decentralised currency outside of local govt control, and if the oil producing countries get on board there is a potential to destablise the dollar, and things might get interesting (according to my economist friend over a pint that is!)
      • Monitor (hdmi, or hdmi to dvi cable), usb keyboard, mouse


      Prerequisites

      • You will have and account created at Slush's Mining Pool.
      • On the My account screen of Slush's, you will need to have registered a new worker as your RPi, giving it a descriptive name for yourself and password, leaving the difficulty as unset or auto.
      • You may wish to set up a Bitcoin wallet. There are many to choose from but I just use the main one 'Bitcoin-Qt. This is a piece of software that you have installed on a computer. When you first run it it takes ages to download all of the blocks of the blockchain (probably an overnight job). But afterwards on the Recieve tab you can create new addresses, and create one of these to enter into Slush's My account page for when it pay's out. Also in the My Accounts screen you might want to set a more manageable payout threshold from 1BTC to maybe 0.15BTC.

      Instructions
      Step 1 - Prepare the Raspberry Pi

      • 1. Download the most recent version of Wheezy from the RaspberryPi foundations website (http://www.raspberrypi.org/downloads). This is the operating system for the RPi, that sits on the SD card. I extract it onto the SD card on a PC with a card reader and Win 32 Disk Imager. When you turn on the Raspberry Pi the username is 'pi' and the password is 'raspberry', and after this you are taken to the bash prompt (which looks like Command Prompt in windoze).
      • 2. Now to install CGminer on the Raspberry Pi, follow the instructions from the Adafruit tutorial on installing software. You need to have an internet connection, via ideally an ethernet cable  which is the route covered here. You can control the Raspberry Pi over SSH as the tutorial suggests, but for simplicity for the initial setup use a local monitor via hdmi, or a hdmi to DVI adapter, keyboard and mouse. The tutorial will ask you to enter commands into the bash: you can either do this directly in the bash terminal (after you enter the username and passwd above), or you can launch LXDE which is a gui interface similar to windows, which means that you can enter the commands through a windowed application called LXterminal, but you can also have a website open in Midora so that you can copy an paste the tutorials commands from the interent instead fo having to type them in. Run LXDE in the first place by typing 'startx' when you reach the initial bash terminal, and both Lxterminal and Midora have icons on the desktop.

              Other things worth mentioning:
        • In LXDE you can logout which returns you to the bash terminal.
        • In either the LXterminal window or at the bash you can enter these two commands 'sudo reboot' and 'sudo halt' to restart or shut down the raspberry pi nicely.
        • A lot of commands start out with the word sudo, which is essentially gives your authorisation as a super user on the computer for commands considered risky for the system (think Windows 7 constantly firing up it's UAC each time you want to install something)
        • Another common thing and a feature in the instructions is to use the command nano, this fires up a basic text editor in which you can enter/edit text and then save it out to the same or a new file.
      • 3. So following Adafruit's instructions you install CGminer. Ignore the PiMiner step, but go to the next page Configure Settings where you set up a config file for CGminer to tell it about your setup and your username and password. Use your Slush miner login details as created in the prereqs section above. The PoolAddress as suggested in the tutorial is the one you need ("http://stratum.bitcoin.cz:3333").

      Now with Cgminer installed, and the config file setup, how do we actually run Cgminer for the first time just to check that everything works?

      Step 2 - Initial check of hardware
      Here we need to bifurcate slightly from the Adafruit tutorial, because they want us to use PiMiner using their LCD Raspberry Pi shield, which is nice but not what we are after.

      • 1. First we need to find out what hardware address the RPi has given our block erupter (plug it in now if it is not, via the powered USB hub). The Start Mining page of the Adafruit tutorial tells how to so this, essentially type this at either the Bash terminal or LXterminal from within LXDE:
              ls /dev/*USB*
        This should give you some addresses such as /dev/ttyUSB0 which you should make a note of.
      • 2. Next we need to return the rpi back to the root directory rather than any subfolders such as the one for cgminer. Enter:
             cd\
        (this returns the bash prompt back at the root directory, so afterwards you should see pi@raspberrypi ~ $ instead of pi@raspberrypi ~/cgminer-3.1.1 $.
      • 3. Now to launch cgminer, in a slightly different way from the Adafruit tutorial. Enter:
             sudo ./cgminer-3.1.1/cgminer --config /home/pi/cgminer.conf -S /dev/ttyUSB0
        (if you have more than one block erupter add extra of these -S /dev/ttyUSB1 and -S /dev/ttyUSB2 and so on. This command launches cgminer, tells about the config file and the hardware we want it to use.


      Now hopefully you should see CGminer starting up, then connecting to your pool, and then starting to receive and send work (Accepted blocks). If there are any problems then check things such as your cgminer config file, by retracing your steps.

      http://s17.postimg.org/k34h33c1r/cgminer.jpg

      Step 3 - Set up Auto-login and autostart of Rpi and CGminer
      Next up, to set it so that the Raspberry Pi automatically starts mining when the Raspberry Pi is turned on, without any intervention. This means that if there is a power cut it comes back online unaided, and also we can do away with the keyboard and mouse and screen. You can set it so that it mines without having to run through LXDE (loads CGminer directly at the bash), but you lose the ability to use VNC, and whilst you can use SSH to control the computer there are disadvantages to this which I will come on to in the next section. There did not seem to be any advantages in hashrate one way or the other, so do it like this.

      • 1. Follow the instructions in Issue 3, page 3 of the excellent Raspberry Pi fanzine The MagPi: http://issuu.com/themagpi/docs/the_magpi_issue_3_final?e=4599523/2586562

              Rebooting (sudo reboot in the bash/lxterminal) you should find that from power on, the Rpi automatically fires up LXDE. Ok, but what about firing up CGminer with our settings?
      • 2. To do this we follow part of Jafc76's super tutorial: https://forums.butterflylabs.com/bitcoin-discussion/3238-super-tutorial-raspberry-pi-raspbian-cgminer-tightvnc-wifi-boot.html.Look down his walkthrough until you see " - The last step is to autostart CGMiner every time...." in step 10. At the bash/lxterminal prompt enter:
              sudo nano /etc/xdg/lxsession/LXDE/autostart
      • 3. Then (slightly different from his instructions) type:
             @/usr/bin/lxterminal --geometry=90x35 -e sudo ./cgminer-3.1.1/cgminer --config /home/pi/cgminer.conf -S /dev/ttyUSB0 -S /dev/ttyUSB1 -S /dev/ttyUSB2 -S /dev/ttyUSB3 -S /dev/ttyUSB4 -S /dev/ttyUSB5
              (adding or taking extra block erupters if required). This tells cgminer about the config we want it to use.
      • 4. Now rebooting the machine (sudo reboot), you should find that Rpi fires up LXDE, and then launches cgminer in a window. If it does not check that you entered the above correctly.

      That means that we can now get rid of the screen and keyboard, and locate the machine somewhere remotely, but what about if we want to be able to remotely access the machine and update it's settings in some way?

      Step 4 - Setting up VNC access
      This is for controlling the Raspberry Pi remotely through another computer and the network rather than having to use a monitor, keyboard and mouse directly on the Raspberry Pi. There are two options put forward in the tutorials, neither work well enough for what we need:
      • Control the bash remotely using SSH, this is good if you run CGminer outside of LXDE, or for basic stuff like rebooting (sudo reboot) etc. Follow the Adafruit instructions here.
      • Alternatively run a VNC server, gives you the ability to control LXDE as if you were sat in front of it, giving you a moving image screenshot of what would be on the screen. Adafruit's instructions for this are here.

      The trouble with both of these is that when you login via these means it creates a second and new concurrent user session, so you can't see what the original one in terms of seeing what is the current session/desktop is doing. This is clever stuff and a fundamental basis of Linux, but no good when you want to dip in every now and again to see how CGminer and the block erupters are getting on.You need to have access to the actual session, not have create a new one.

      • 1. To solve this, I followed the instructions here http://www.raspberrypi.org/phpBB3/viewtopic.php?p=108862#p108862. This installs x11vnc instead of the tightvncserver Adafruit uses, which is still VNC protocol but lets you control the existing user session.
      • 2. Now after a restart (sudo reboot) you should find that you can log-in remotely to the existing session. On my Windows7 machine I use TightVNC viewer.
      • 3. You'll need the IP address of your Raspberry Pi to connect. To find this, type this into the bash on the Raspberry Pi (so don't disconnect the monitor, mouse and kb just yet!)
              sudo ifconfig

              It should be the first IP address (i.e. 192.168.1.7). This gives you the ip address of the rpi. If you connect to the internet through a router, this may be only a local network address; if you would like to access the RPi from outside your local network you'll need to set up port forwarding on your router.
      • 4. So this works great until you disconnect your monitor and then that VNC is now giving you a crappy 640x480 resolution when you next connect. This seems to be becuase the Raspberry Pi, detects no HDMI connection, and then gives you a composite video sized desktop. I tried various things that didn't work, but finally found this thread: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=19600

              The solution for me was identified by the poster Simon. In the bash/Lxterminal enter:
              sudo nano /boot/config.txt

              Then in the nano editor, scroll downwards a few pages until you see the line '#hdmi_force_hotplug=1' and delete the # (making the line of code visible to the machine). I didn't need to go any further, as I was quite happy with the widescreen HDMI dimensions over anything like VGA.
      • 5. Reboot the computer, and then give it 10-20 seconds to boot into LXDE by itself again, and then you should be able to access it from you favourite vnc client.

      http://s17.postimg.org/4wyfc5m0v/cgminer_vnc.jpg

      Using the system

      • For mining the system should 'just work', provided that it has an ethernet connection, block erupters, and sufficient usb power.
      • To check things quickly you can log into the My Accounts page of Slush's website, to check that last share is at 0minutes ago.
      • If you need to restart cgminer for whatever reason, I think it's preferable to quit CGminer via the Q key, and then do a sudo halt, or sudo reboot. Although pulling the plug I think is ok
      • If you need to change any settings, then VNC into into the RPi, after powering on and leaving it for 10-20 secs for LXDE to load
      • If you want to add further block erupters then you need to find their addresses (see Step 2 ls /dev/*USB*), then edit the /etc/xdg/lxsession/LXDE/autostart text file in Step 3 to include the new address/es
      • If you move your miner to a new location and new ethernet/IP address, you'd need to reconnect a monitor and keyboard/mouse to run the sudo ifconfig command again, although I think there is software to sniff out local IP addresses which you could use to identify the rpi.


      Power consumption
      According to my maplins energy meter, at 12p/kwh (EDF 2013), for 744 hrs/month.

      • Raspberry Pi alone - 5w - £0.48 p.m.
      • Raspberry Pi w. 1 block erupter - 8w - £0.77 p.m. (335mh/s)
      • Raspberry Pi w. 2 block erupter - 11w - £1.06 p.m. (670mh/s)
      • Raspberry Pi w. 6 block erupters - 28w - £2.50 p.m. (2004mh/s) (actual with seperate wallwart for RPi)


      Things I'd like to improve
      Any pointers or suggestions I'd welcome

      • It would be nice to find out how to tie the cgminer launch command to an LXDE desktop icon, so that I would not have to reboot the machine to relaunch cgminer or manually type it into lxterminal
      • A failover device that would monitor the hashrate of CGminer and restart either CGminer or the system if it detected a crash of some sort
      • In cases where the Rpi freezes completely, the ability to remotely or automatically restart the rpi
      • Add wifi capabaility instead of ethernet. This is really easy to do given the time, although certain Aruba wifi networks I use have complicated browser based logins that I'm not sure how it would work with RPi, and seondly at home I'd be worried about my wifi router freezing up every now and again.
      • Try out the MinePeon project to see how it compares
      • Try out with a more recent version of CGMiner - I'd have to move away from the Adafruit guide though so a big job I think
      • A way of bringing down the difficulty of bitcoin mining for a few months  ;)


      Updates to this post
      14/07/13 - Added info about the old CGminer version used[/list][/list]
      01/08/13 - Updated image to show setup with Arctic fans

      Updates to add when I get round to it
      01/08/13 - Add info about adding a backup pool to cgminer.conf


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: J35st3r on July 13, 2013, 03:10:54 PM
      You are using quite an old version of cgminer (3.1.1) here. As a heads up for any newbies reading this, this is the latest version that supports the -S parameter. More recent versions expect to communicate directly with the the USB driver, so the setup procedure is quite different. Perhaps you would like to update your tutorial with this information?


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: daze on July 13, 2013, 03:33:48 PM
      You are using quite an old version of cgminer (3.1.1) here. As a heads up for any newbies reading this, this is the latest version that supports the -S parameter. More recent versions expect to communicate directly with the the USB driver, so the setup procedure is quite different. Perhaps you would like to update your tutorial with this information?
      That's a good point. I did compile the latest version (3.3.1), but couldn't get it to run. But if I can get it to run, I'll post the instructions here.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: pty84 on July 13, 2013, 04:11:44 PM
      Looks badass, want to try this. Are you breaking even? You should update us on your production/costs.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: J35st3r on July 13, 2013, 04:24:35 PM
      You are using quite an old version of cgminer (3.1.1) here. As a heads up for any newbies reading this, this is the latest version that supports the -S parameter. More recent versions expect to communicate directly with the the USB driver, so the setup procedure is quite different. Perhaps you would like to update your tutorial with this information?
      That's a good point. I did compile the latest version (3.3.1), but couldn't get it to run. But if I can get it to run, I'll post the instructions here.

      The definitive thread for Block Erupters on RPi is https://bitcointalk.org/index.php?topic=220905.0 .

      I gather than minepeon https://bitcointalk.org/index.php?topic=137934.0 (a stand-alone RPi distribution based on ArchLinux) is well thought of too.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on July 14, 2013, 09:26:29 AM
      You are using quite an old version of cgminer (3.1.1) here. As a heads up for any newbies reading this, this is the latest version that supports the -S parameter. More recent versions expect to communicate directly with the the USB driver, so the setup procedure is quite different. Perhaps you would like to update your tutorial with this information?

      Thanks for your suggestion, and I just put a note about this in the original post. I'd be interested to see the command for running block erupters under linux for the most recent version 3.3.1. Adafruit did say there was a problem with this under Raspbian, but that might just be because they were trying to use -S tags.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: J35st3r on July 14, 2013, 10:51:06 AM
      Thanks for your suggestion, and I just put a note about this in the original post. I'd be interested to see the command for running block erupters under linux for the most recent version 3.3.1. Adafruit did say there was a problem with this under Raspbian, but that might just be because they were trying to use -S tags.

      Great, thanks. I only mentioned it just in case someone downloaded the latest cgminer instead (like not everybody reads the instructions in full before starting ::) ).

      I had a scan through the cgminer support forum, and it looks like its best to stick with 3.1.1 for now vis https://bitcointalk.org/index.php?topic=28402.msg2632152#msg2632152 (lead developer recommends 3.1.1 as newer versions are unstable on RPi).


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on July 15, 2013, 06:50:56 PM
      Great thanks for looking for confirmation on that point, and again for raising it in the first place!

      To answer the other commenter, with 6 erupters at just over 2gh/s it's making about 0.04BTC per day at present but I can't realistically expect to see any ROI financially given increasing hashrates and difficulty.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: 40-Pin on July 15, 2013, 10:37:32 PM
      I got two Pi boards myself, they are a lot of fun to mess around with. I have to ask the question though... why would one not use a 1 foot usb extension cords on each port of the hub to keep the Erupters farther apart? Hell could take a block Erupter shell off and vaccum seal all the PCBs and the exposed usb parts and just lay them in a few buckets of water, might melt the plastic but who knows! Iunno fun stuff :P


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: daze on July 15, 2013, 10:59:16 PM
      Great thanks for looking for confirmation on that point, and again for raising it in the first place!

      To answer the other commenter, with 6 erupters at just over 2gh/s it's making about 0.04BTC per day at present but I can't realistically expect to see any ROI financially given increasing hashrates and difficulty.
      Other than eBay, where the USB Erupters are over priced, is there another site or place that sells them for less? If I may ask, where did you get yours from, and did you use BTC to pay for them?

      Thanks!


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: billdavis on July 15, 2013, 11:18:23 PM
      oh my god that is so cool


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on July 16, 2013, 06:06:00 PM
      I got two Pi boards myself, they are a lot of fun to mess around with. I have to ask the question though... why would one not use a 1 foot usb extension cords on each port of the hub to keep the Erupters farther apart? Hell could take a block Erupter shell off and vaccum seal all the PCBs and the exposed usb parts and just lay them in a few buckets of water, might melt the plastic but who knows! Iunno fun stuff :P

      Yes I thought about that (the extension lead thing) and I have heard of other people using these - I just decided it was more trouble than it's worth. The hubs nicely arrange the erupters for the fan to blow over them, I think it's important to have theit heatsinks facing upwards for the heat to convex (?) off of them. I have also fitted those raspberry pi heatsinks to the be chips (on the underside), and they heat up considerably so must be doing a good job. It's surprising effective a fan is at colling down those heatsinks. Having said that I don't have the fan running at night, and some days too (and it's warm here at present) and I haven't noticed any increas in Hardware errors by having the fans off, if anything it's slightly lower by a smidgen, but we're only talking 1.002% as opposed to 0.998% errors.

      On the raspberry pi, I now have three - one for running Xbian to play films (http://youtu.be/G2-eUrGbl0I (http://youtu.be/G2-eUrGbl0I)) from my bittorrent directories on my PC, this one for mining and another as kind of a testing one. Really versatile and keeping a lot of people very happy!


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: phrog on July 18, 2013, 08:45:23 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: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on July 19, 2013, 08:28:33 PM

      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. 




      I hope this isn't being lazy but is there any benefits in going to 3.3.1 (It would be quite a bit of work for me to learn how to do that)


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: phrog on July 20, 2013, 12:13:48 AM
      hot plugging works perfect in 3.3.1 and you don't need -S anymore, also I'm getting a bunch less hardware errors.
      And was easy to get it to boot up and run at init without having to check for ttyUSB's. I'm sure there must be other improvements with keeping up with the latest versions.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: btcton on July 20, 2013, 04:35:55 AM
      Where did you buy the USB Block Erupter from?


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: Hornedfrog on July 21, 2013, 09:06:15 PM
      hot plugging works perfect in 3.3.1 and you don't need -S anymore, also I'm getting a bunch less hardware errors.
      And was easy to get it to boot up and run at init without having to check for ttyUSB's. I'm sure there must be other improvements with keeping up with the latest versions.

      Excellent.  Is there a guide for this setup?  Many thanks!


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: netfun2000 on July 22, 2013, 08:32:32 AM

      https://bitcointalk.org/index.php?topic=137934.0


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: pcpro101 on July 22, 2013, 08:48:11 AM
      you will never get an roi


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: Hornedfrog on July 22, 2013, 01:47:22 PM

      https://bitcointalk.org/index.php?topic=137934.0


      Thank you!


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: phrog on July 29, 2013, 03:06:08 PM
      hot plugging works perfect in 3.3.1 and you don't need -S anymore, also I'm getting a bunch less hardware errors.
      And was easy to get it to boot up and run at init without having to check for ttyUSB's. I'm sure there must be other improvements with keeping up with the latest versions.

      Excellent.  Is there a guide for this setup?  Many thanks!

      All you need to do is edit /etc/apt/sources.list by commenting out wheesy and adding jessie:
      Quote from: sources.list
      #deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
      deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi

      Then run "apt-get update" and then "apt-get dist-upgrade" and install cgminer from git.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: theDF on July 30, 2013, 02:49:24 PM
      Wow, that was a lot of Block Erupter  :o , I dont even have the Raspberry  :(
      Anyway are you only using the fan to cool it?


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 01, 2013, 03:59:43 PM
      Yes just using two of those Arctic Breeze mobiles (the one without the stand). Seem to do a very good job at keeping it cool. I did actually fit heatsinks onto the chips (on the other side from the preinstalled large heatsinks). Lots on ebay, and the fans hit the erupters from that side so the ridged heatsinks I installed keep nice and cool. I can't say it makes anything run faster, probably more stable though and may last longer until I sell them.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: Degenerate on August 02, 2013, 12:50:50 PM
      Is there any benefit to using the Raspberry Pi instead of a PC when mining with Block Erupters? Or is it simply a space/cost saver?

      Thanks!


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: N8isGr8 on August 02, 2013, 11:43:59 PM
      Is there any benefit to using the Raspberry Pi instead of a PC when mining with Block Erupters? Or is it simply a space/cost saver?

      Thanks!

      Using a Raspberry Pi is definitely a space/cost saver. Compared to a PC, its a fraction of the size, costs $25/$35 for 256MB/512MB models respectively, and uses much lower amount of power (5V micro-USB charger). Things like heatsinks and fans add a little bit of cost, but definitely improve the performance (I know this from experience).

      If you have an old PC layout around, you could certainly use it. Over time the extra energy costs will definitely add up though.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 05, 2013, 08:20:17 AM
      Is there any benefit to using the Raspberry Pi instead of a PC when mining with Block Erupters? Or is it simply a space/cost saver?

      Thanks!

      Using a Raspberry Pi is definitely a space/cost saver. Compared to a PC, its a fraction of the size, costs $25/$35 for 256MB/512MB models respectively, and uses much lower amount of power (5V micro-USB charger). Things like heatsinks and fans add a little bit of cost, but definitely improve the performance (I know this from experience).

      If you have an old PC layout around, you could certainly use it. Over time the extra energy costs will definitely add up though.

      I'll add to that that it is also a discrete package, nice and small to hide away somewhere. And also with the way I have set it up, I have every faith (touch wood) that if I had a power outage/cut it would happily turn on, boot up and start mining all by itself. Certainly a lot more confidence that it won't BSOD or someother reason why it shuts down and then doesn't come back up. Very robust I'd say


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: uletter on August 05, 2013, 10:32:07 AM
      Going to fall in love with this things, are we can mining using raspberry pi model a?


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: AussieHash on August 05, 2013, 02:23:25 PM
      Thank you.  Looking forward to my bitfury rig  ;D


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: alpha5th on August 05, 2013, 06:36:30 PM
      Great walkthrough. Thanks.. Wondering what do you do if you have used the 2 usb ports on the pi. Can you chain usb hubs or is there another trick to it?


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: emospacemonkey on August 05, 2013, 10:20:56 PM
      Still make no money on this. 600 MHZ is not enough


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: jimsonunique on August 05, 2013, 10:54:03 PM
      work in progress. 2 block erupters using 2 usb hubs from macbook pro.

      9v RC car battery powering an old CPU fan :)

      http://s23.postimg.org/qfj0ityaj/IMG_0440.jpg

      just finished turning it into a usb fan, with an old pc power switch to turn it on/off

      http://s23.postimg.org/l0evvlw4b/IMG_0441.jpg

      still waiting for raspberry pi, usb hub and 8 more block erupters to arrive


      all donations will go towards some less ghetto setups lol

      148sqSg9uz41X1Q4METXJYzgsBpHrr149A




      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 08, 2013, 06:49:35 PM
      Going to fall in love with this things, are we can mining using raspberry pi model a?

      Hi yeah I should think so, I greatly assume that no difference in Ram or speed (or if there is that it wouldn't cause any hassles), the only thing is that you'd have to get the wifi up and running as model A doesn't have ethernet I think? I think this is pretty easy to so but you might find it useful search google or the raspberry pi foundation for a list of known compatible usb wifi receivers. There are loads of instructions on line, but if you run into probs or need more info, post back to here and eventually I check here again. Thanks for taking a look. Cheers, Will


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 08, 2013, 07:01:09 PM
      Thank you.  Looking forward to my bitfury rig  ;D

      Yeah that's the only thing putting me off upgrading (plus no money ;) is that any bigger miner I would really still like to have control of the computer part of the miner. Look at kncminer or anything like that, lots of gigahashes but you have to use the linux board that comes built into it to control it. I like tinkering with my pi - guess that's the difference between a hobbyist and an investor. Anythink I think the bitfury works through usb? I am envious


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 08, 2013, 07:10:07 PM
      Great walkthrough. Thanks.. Wondering what do you do if you have used the 2 usb ports on the pi. Can you chain usb hubs or is there another trick to it?

      Hi, for my setup I have a 4-port powered hub (2.5Amp power adapter for each), and each of these hubs plugs into 1 of the usb sockets on the rPi (I don't need a keyboard or mouse or whatever because I have it set up to be controlled over the network). If I had to plug in a keyboard I have a spare socket on each of the two hubs because I have 6 block erupters instead of 8. If I wanted to get more block erupters then I would buy another hub and hope and pray that this would daisy chain on from one of the hubs, but from what I have read this can be iffy with an RPi. best of luck


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 08, 2013, 07:30:54 PM
      Still make no money on this. 600 MHZ is not enough

      They're 336mhz each and I have 6, so that's just over 2gh. They are turning over about £1.30 / $2.30 per day. And in order to work out if I was making any money you'd have to know how much I paid for them! :P


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 08, 2013, 08:21:44 PM
      How would you manage sending mined earnings to different wallets automatically?

      Could you just use different workers?

      Is it safe to get worker usernames and passwords from other people (for yourself and them) if you want to mine for them?

      First and foremost I'm no expert at this, but as a professional troubleshooter my suggest is below. I think you are correct but to be sure

      If you wanted to have the earnings of one miner sending to one address and the earnings of another (lets say block erupter) sending to another address, assuming that you are mining via a pool (and from my experience that would have to be Slush's), what I would do would be:
      • Set up two accounts for a pool, each with one worker, and each with a different payout address
      • Run two instances of CGMiner on the RPi (you might get warning about API but that is not important), because I don't think you can have more than one worker logged in in one instance of Rpi
        Have both having a separate config file with each going to the pool but with different users and workers.

      I am currently comparing slush vs btcguild pps vs btcguild pplns weekly payouts, and have written some personal documentation on the processes, currently up to top of head with a dissertation but if I get a chance I'll update the OP with some instructions about running multiple instances with different block erupters.

      Thanks for looking, Will


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 08, 2013, 08:23:54 PM
      work in progress. 2 block erupters using 2 usb hubs from macbook pro.

      9v RC car battery powering an old CPU fan :)

      http://s23.postimg.org/qfj0ityaj/IMG_0440.jpg

      just finished turning it into a usb fan, with an old pc power switch to turn it on/off

      http://s23.postimg.org/l0evvlw4b/IMG_0441.jpg

      still waiting for raspberry pi, usb hub and 8 more block erupters to arrive


      all donations will go towards some less ghetto setups lol

      148sqSg9uz41X1Q4METXJYzgsBpHrr149A




      Looks good, like the power switch idea. Post back if you use my guide and have any q's.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: jimsonunique on August 10, 2013, 09:00:52 PM
      work in progress. 2 block erupters using 2 usb hubs from macbook pro.

      9v RC car battery powering an old CPU fan :)


      just finished turning it into a usb fan, with an old pc power switch to turn it on/off


      still waiting for raspberry pi, usb hub and 8 more block erupters to arrive


      all donations will go towards some less ghetto setups lol

      148sqSg9uz41X1Q4METXJYzgsBpHrr149A




      Looks good, like the power switch idea. Post back if you use my guide and have any q's.

      used the guide, didnt have any problems, a friend of mine used it too and now we are both up and running. cheers


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: recon3325 on August 12, 2013, 05:07:50 PM
      hopping you gents can help out a total beginner using Linux.

      I have tried the tutorial on adifruit but can't get cgminer to download.

      whenever I put the line


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

      I get a message along the lines of: failed.  timed out
      and it retries over and over continually timing our
      after a few minutes each time

      do I need to change a timeout setting and if so
      could someone help me learn how?

      thanks


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 12, 2013, 07:47:32 PM
      Hia, I am no expert but lets work through the simple things - so you have got the internet up and running via either wifi or ethernet? (did you check it out by opening up Midori)


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 12, 2013, 07:53:11 PM
      I take it that you didn't have any issues running the first parts sudo apt-get update etc. maybe the site was down when you tried because it downloads the file in my browser


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: recon3325 on August 12, 2013, 08:24:37 PM
      I have no problems updating. just this one step.

      useing all equipment including raspbian from the tutorial.
      I tried saterday night and Sunday morning.

      I so pose the site could have been down for quite a while and will try again after work.

      read somewhere a time out setting exists and is defaulted to 900 seconds
      but my attempts timeout much quicker than that.



      *Update:* problem resolved- I guess their site was down all weekend. worked right away this afternoon.
      Now I have an error   input/output  when starting cgminer

      perhaps because i don't have the lcd keypad kit connected yet. still waiting for it in mail.


      Title: Re: Walkthrough: Raspberry Pi/Block Erupter mining rig setup with autostart and vnc
      Post by: willinliv on August 13, 2013, 10:35:05 AM


      perhaps because i don't have the lcd keypad kit connected yet. still waiting for it in mail.

      I don't have one of those either - but I do actually have the lcd coming through the post too, but I won't get a chance to solder it up for a few weeks yet.

      When you connect the lcd panel I'm not sure but I don't think you would have to change the settings to call up CGminer that I wrote (if you have been following them also). You'd have to follow the PiMiner steps of the Adafruti tutorial though. I think that CGMiner provides an API port on the computer and in some way the PiMiner links up to that port to broadcast information and provide some control. But I think that API runs independantly of any settings that you apply - so hopefully nothing has to be changed.

      I am enjoying this work, although I am very ominous about the release of the 400gh chips, apparently there was a 100TH surge on the network yesterday and people thought it might have been KNCminer doing some testing. So the next few months could be bad news for these, I was considering selling them on ebay whilst I still had a chance to mitigate a bit of the losses, but I figured that I wouldn't get that much for the number I have (6) and to have a 'poker in the fire' would be more interesting than not to have. Lets say for example that shipping by all these companies are put back a few months/years as with BFL - here's to hoping anyway!

      thanks