Starting up and Running a Pinidea DR-1 using a Raspberry Pi3 with Minera (LONG + Lots of pics)

in crypto •  9 years ago  (edited)

Setting up and Running a Raspberry Pi with Minera for Mining with a focus on X11 ASICs

I know many people involved in steem have to be into the altcoin scene, but a lot of the time mining is as simple (or complex, really) as running a miner on a spare mobo, or even your main on your downtime.

You can do some REALLY cool stuff with a simple raspberry pi.

This is also an exploration of what it takes to set up an ASIC miner when they are still relatively new, and treading some new ground.

What you need:

  1. SOFTWARE:
    a. https://getminera.com/ Download a copy of Minera - Start this NOW. It's a big file
    b. https://www.bitvise.com/ssh-client-download Download Bitvise SSH - this will let you update and control your raspberry pi from your desktop without having to get up and attach a monitor and keyboard to it
    c. https://sourceforge.net/projects/win32diskimager/ Win 32 disk imager - this lets you burn the minera image to your SD card
    d. https://github.com/PinIdea/ASIC-X11-Miner/releases Latest version of the mining software by Pinidea.

  2. Hardware:
    a. A raspberry pi (I used a pi3)
    b. A microSD card (4gb minimum, I'd say go for 8gb or more)
    c. A microUSB power cable
    d. Phone plug charger, or power strip with USB slot
    e. An ethernet cord (technically may not be required as the pi3 does support wireless)
    f. A SD card reader. You can pick these up for about $10 online, or a laptop or anything that can run a disk imager with an SD card plugged into it.
    This is the exact model I have http://www.amazon.com/Saicoo-Digital-Memory-Reader-Writer/dp/B00CMKS2DI/ref=sr_1_5?s=pc&ie=UTF8&qid=1464276725&sr=1-5&keywords=sd+card+reader
    h. A USB type B cable (The weird one printers use) - This is only for the DR-1 miner.
    http://www.amazon.com/AmazonBasics-USB-2-0-Cable-Male/dp/B00NH11KIK?ie=UTF8&keywords=usb%20type%20b&qid=1464276889&ref_=sr_1_2&sr=8-2
    This isn't the model I have, I went to Fry's because I'm impatient.
    I. A power supply capable of supplying at least 400W - Again only needed for the DR-1. A bigger power supply can take care of multiple miners if desired. I have a 1200W supply powering 3 miners.
    J. HDMI monitor is a plus, but (probably) not required
    K. An actual miner of some sort. Hopefully, at least. I mean you could do it all for fun with just a pi if you like.
    OPTIONAL:
    Some shelving to put everything on.

Some information before I go on further: The pinidea miner was limited to 1 per person at launch. Several of my friends purchased some as well and I offered to run it for them as long as they pay for the electricity. We split the payouts besides that, which lead to me having to do some experimentation to get them all working as multiple units on a pi are not "officially" supported by Pinidea at this point in time. I'll go into the exact story later.

Specs of the miner - 320W or so, 500Mhash X11 ASIC miner.

A lot of details are borrowed from http://dashpaymagazine.com/index.php/2016/04/19/setup-instructions-mining-controller-usb-miner-p2pool-node-raspberry-pi/ with some updates from myself

Checklist all done? Ready with your pi and sd card? Ready to actually do something with your miner LET'S GO ON AN ADVENTURE

Install Bitvise SSH - just leave this for now, you'll need it though
Unzip the copy of Minera

Plug in your SD card reader - insert the SD card
Run Win32 disk imager
Locate and select your Minera image
Pick your SD card (represented in a A:/B:/C: drive style format) < DO BE CAREFUL. You can accidentally select one of your actual hard drives and wipe the contents with a measly minera image if you're not sure of the SDCard drive letter.
Click "Write" and say yes to potentially losing data etc

Insert SD card into Raspberry Pi
Plug phone charger into power source, insert micro USB cable
Plug microUSB into raspberry pi
Plug keyboard into raspberry pi
If you have one - plug HDMI monitor into raspberry pi
Wait for Pi to finish booting
Here is literally the only time you need a monitor which is why you may not even need one
WithOUT a monitor, you can try typing after about 30 seconds to a minute "minera" hit enter, and type "minera" again
With a monitor just wait till you see it ask for a name and password and then do the same
At this point you SHOULD be able to type http://minera or your Pi's IP address into a browser window and get a page that looks like this

At that, you type minera as the username and the password, again, to get to a page that looks like this

Start Bitvise SSH
Plug your ethernet cable into your raspberry pi
Log into your router and find your pi's new ip address
In the Bitvise client interface enter your Pi's IP
Initial method is authentication
Username - minera
Pass - minera
Hit "Login"
It looks like this

It will open a terminal window and a SFTP window for you where you can type further commands and transfer files to your Pi
It will look like this

4a. The terminal window and the SFTP (secure file transfer protocol) window
Find your Pinidea download, unzip it (windows decompressor doesn't work. 7zip will, winrar might)
In your SFTP window
In the SFTP window you'll want to go up a level, twice. Where / is.
Then click on var
Next, www
Next minera, then minera-bin, finally: custom
Drag your unzipped Pinidea miner (the CGminer-Pi download,a nd you only need to drag the cgminer file) download into the CUSTOM folder
Like this

Don't mind my messy naming structure, the most important part is that you rename the cgminer file, because it cannot be the same name as the 'real' cgminer. And I suggest making it easy to type.
Now, to save yourself having to type more commands than needed in the terminal, right click on your miner
Click Properties, then permissions
Enter the numerical code 755 or click these boxes

If you don't want to do that, you'll need to type

sudo chmod a+x /var/www/minera/minera-bin/custom/cgminername/

You'll know if you didn't do it correctly cause it'll give you some error code
And you must do that every time you update the miner version, unless you do a git pull to update the software as Soleo is now including the permissions on git pulls.

4b. More business in the terminal window

There is also a terminal window from your Minera web interface you can use if you prefer, but the Bitvise one is much better.

Downloading your dependencies and getting everything up to date
A few things for you to run through before actually starting your miner, and this is where linux and raspberry pis and github is really cool and useful. You don't need to download anything, or click any files, you just enter a command into the terminal window and it will do it all for you, and clean it up too. No lists of downloaded files.
Anyhow let's get started.
Now supposedly Minera comes with most of these correctly installed, but let's make sure:
In your terminal window type these, in this order

cd /var/www/minera

This one is moving your directory to your minera directory

sudo git fetch --all && sudo git reset --hard origin/master && sudo ./upgrade_minera.sh

This is updating the minera itself

Now let's make sure we have what we need for the custom cgminer to run.
Type this in your terminal next:

$ sudo apt-get install -y libcurl4-openssl-dev libncurses5-dev

If this gives you any errors, just close your terminal window and reopen it so it brings you back to your default directory.

You're all done with the basic setup!

Now for the hardware. The fun part where you feel like you're getting somewhere.

Plug the power into your miner(s), keep the power supply off for now.

You need 2 6 pin PCIE power sources per miner. 6+2 also fits, I use the full 8 pins because why not.

Plug your power supply into the wall/power strip.

People have expressed concerns about breakers tripping with this, but the most I've had is a power strip 'tripping' from too much going through it, if this is a concern or has happened split up the power between plugs. You will not trip a breaker from pulling watts, amps are what trips breakers. They are related, but not directly. I have more than 2500W on one breaker circuit right now constantly with no issue. (Except a lot of electrical cost, because I live in California)

Now turn on your power supply...

If both sides of the miner have green lights turn on and the fan starts, wonderful! You're on your way.

IMPORTANT TO START YOUR POWER SUPPLY
You need to use a bit of wire to short two pins in your power supply.
You short the green wire with a ground wire, this will show you how
http://www.instructables.com/id/How-to-power-up-an-ATX-Power-Supply-without-a-PC/step2/Connect/

Wait a few seconds (this is for some quirks of the Pinidea miner. Some have reported success waiting for it to be on for a bit before trying to connect it, others have said disconnecting and reconnecting the miner after the Pi has started will help)

Plug it in to your Pi!

Almost done! Good job so far, we can begin to see that sweet, sweet ROI soon enough.

Now the Pinidea miner needs some special commands, but is pretty easy to get working and provides a very stable hashrate, with drops when VarDiff(Variable difficulty) on a pool adjusts, but goes back up eventually.

So go into your minera web interface and let's get cracking on the last bits.

Log into your web interface if you aren't still, remember the username is minera and password is minera

Go into Settings, and scroll to Custom Miners

Make sure you have custom miners enabled, and click "on" to whatever you've named your cgminer in the custom folder.

Next is making sure you have the correct custom commands - while there is advertised a command for automatic detection, it didn't work for me and I had to tell it to poll every USB port to get every miner working, so my command list is a little longer than yours needs to be

--x11 --dr1-clk 400 --dr1-fan LV3 --dr1-scan-serial /dev/ttyUSB0 --dr1-scan-serial /dev/ttyUSB1 --dr1-scan-serial /dev/ttyUSB2 --dr1-scan-serial /dev/ttyUSB3

And you'll enter the above command just below the custom miners into the manual options box

Now you just need to set up a pool. My person favorite is using miningrigrentals to direct my hash rate primarily between nicehash and zpool.ca, whichever is paying the best at the time while also making it available to rent if someone wishes to do so. (Prices are around 0.00025 BTC/Mhash/Day currently)

Navigate to Settings > Pools to do so. Enter the pool address, with your username and password as usual.

It's super easy and makes it convenient to switch pools instead of messing around in minera, though it does make it very easy to switch there as well.

Make sure you add #xnsub to the end of addresses, so it gets used anywhere that does support it.
Add a few failovers, just in case MRR goes down or anything goes wrong.

If you'd like a text example here are my settings, which you should be able to import into minera and change to your own specifications if you like.

--x11 --dr1-clk 400 --dr1-fan LV3 --dr1-scan-serial /dev/ttyUSB0 --dr1-scan-serial /dev/ttyUSB1 --dr1-scan-serial /dev/ttyUSB2 --dr1-scan-serial /dev/ttyUSB3 --api-listen --api-allow=W:127.0.0.1,W:192.168.0.1/24 --log-file=/var/log/minera/cgminer105.log stratum+tcp://us-west01.miningrigrentals.com:3333#xnsub sonarous.28181
stratum+tcp://mine.zpool.ca:3533#xnsub 197rSd4TCqgjKTgu2YyTFkL1nRdmEjj69n
stratum+tcp://x11.usa.nicehash.com:3336#xnsub 197rSd4TCqgjKTgu2YyTFkL1nRdmEjj69n

Once all this is done hit Save and Restart miner!
Wait for the Pi to boot up...

Hopefully all is done correctly and it will start the miner automatically, or, if not click the start miner button and it may start it for you.

Once it does...your screen should look like this (Don't mind the Ghash figure, it's not correct)

If it does, HURRAY. If it doesn't, Minera gives you a few lines of potential error logs from the miner/system so you can hopefully use that to troubleshoot any problems you have. My primary one was permissions when I would update the software and forget to give it permissions again.

Now over to MRR, or the pool of your choice to make sure it is mining correctly.
Make sure you have workers set up on your rig under MRR, or it won't know where to send your hashing.

Click add a pool, and enter the usual information. DO NOT add #xnsub to the MRR address protocol, it'll bug out.

If hashrate isn't showing up, restart your Pi. Make sure the miner is running.

YOU'RE DONE! Sweet hashing power, easily directed by mining rig rentals. At your fingertips.
Have a beer, have a couple beers. Monitor everything, make sure all is well. Sit back and relax.
Next is putting it all on shelving (if you like)

My shelving setup - inspired by silver who contacted me after I wrote a review of the dualminer DM348M x11 miner that was released. Apologies for the sideways pictures. He showed me a picture of his iBeLink miners and I decided I should/could do the same thing.


Network switches are cool devices

Need your airflow

Note is I have this fan (3600CFM) in one window, with another window across the room opened, and the miners directly between them for massive airflow.

Now for the little story I promised: I had purchased the iBeLink miner on a whim because of the potential profit, and was one of the first to receive it (I opted for faster shipping, judging that having it a few days sooner would pay for the shipping and then some)
I told some friends about it, because it was loud as hell and was altogether a fun project and a few of them were INTENSELY interested. They wanted to get into it. I explained the risks of ROI, that this next one (the pinidea miner) might not exist, electricity costs, potentially broken hardware, everything. A few dropped out, a few were still interested. I offered to set it up and run it for everyone as long as they paid my electricity. One didn't want to so decided to order it himself (I ended up going to help him set it up, and he didn't tell me his HDMI cable wasn't actually plugged into a monitor...I wanted to die. I spent SO LONG trying to figure out why the Pi wasn't booting...but it was the entire time)
The miners arrived and I had to get a power supply that was sufficient, get it mining while hopefully only using one raspberry pi, etc etc, which lead to me taking probably a full day to get it all running. Soleo from Pinidea was active in slack and very helpful.
I also purchased some fan covers for the miners and they do pick up a lot of dust, so I am happy I am protecting the internals of the miners.

Did I forget anything?
Questions?
What do you think?
Hope everyone interested finds this useful or informative, perhaps both.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This is great. I've got 10 of their smaller miners coming whenever they get shipped out so I'm sure some of this will apply.

Did you order the USB miners, or the DR-2?

I ordered the USB miners just to play around with.

Did they ever come threw? I have a DR-2 order in, but it seems the Pinidea folks have Houdini'd and gone fully MIA; no email answers, nor any updates on any of their online properties/accounts, at least none i could find. Is Pinidea legit?

Update: Just got a tracking number for a July DR-2 order.

Just got a DR-2, and i'm unable to log into the unit, it has a built in RasPi , or some other card-computer for a controller. Any idea what the root password or login is for these boxes?

The default IP for the DR-2 model is 192.168.1.200. If your router is within 192.168.1.* range, you will probably just need to plug in an Ethernet cable and power it up, and go to http://192.168.1.200 with password admin to configure the machine.

I have a DR3 and the password admin is not working; any chance you know if RPi is really inside the DR3? And if so, where can I access the SD Slot? I can not find it for the life of me..

Or will I have to buy a Raspberry Pi, do you know sir?