• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Pinidea DR-1 Minera Raspberry Pi3 Walkthrough

sonarous

Member
https://steemit.com/crypto/@sonarou...inidea-dr-1-using-a-raspberry-pi3-with-minera

Hello everyone! I would like to link you to my thread on steemit showing a very indepth look at how you can start mining with the Pinidea miner using Minera
The below is COPY AND PASTED

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-Digita...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 type b&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.ph...ontroller-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

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

2.
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

3.
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
https://i.gyazo.com/8b2884bde65d3642c46f1bedaae4b83a.png
At that, you type minera as the username and the password, again, to get to a page that looks like this
https://i.gyazo.com/69ccaf0efb4856b4b741cc6ed0370c80.png

4.
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
https://i.gyazo.com/b05cffa963ea82687a9b8a8b25ef27a4.png
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
https://i.gyazo.com/a7373439c33b1632d4b932b2b511e755.png


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
https://i.gyazo.com/1a604e491f88e08cdb4274dc528978c8.png
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
https://i.gyazo.com/7f91a0d1c47faea15ae771bb34fff63c.png
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
https://i.gyazo.com/7a521b2df95a38ca356a2bd874f8e7ed.png

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.

5.
Plug the power into your miner(s), keep the power supply off for now.
https://dl2.pushbulletusercontent.com/HM5EumnZ0Gg1PH1QkLbaFs1lP9Je19BU/20160526_163729.jpg
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.
https://dl2.pushbulletusercontent.com/FWXmeRdIe0Agk9G7NHoIRbBfa6hThzmT/20160526_163704.jpg

Now turn on your power supply...
https://dl2.pushbulletusercontent.com/jyMPEEvqEUSFwN11f8xMgAJ1ra96bCQn/20160526_163806.jpg
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)

6.
Plug it in to your Pi!

https://dl2.pushbulletusercontent.com/SSPa5w4m70TIhHypqDC3S7x1M2fCz8sO/20160526_163713.jpg

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
https://i.gyazo.com/28180e9eb3526d77d1e8709a5016bee9.png
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
https://i.gyazo.com/74a9b14d232537a9208ea188d43ac6a8.png

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.

https://i.gyazo.com/db28dab8859cb6e474fd157887846ef2.png

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.

https://i.gyazo.com/4468e4ab8e8931fd04939c1d19453370.png

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)
https://i.gyazo.com/ce42bc0ba370bc8c7ed1d013e026a0ef.png

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.
https://i.gyazo.com/087ae73133a7d6ebb6687b4332cf19b2.png
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.

https://dl2.pushbulletusercontent.com/yYxhzDIKRUL9io6efCtepzCmHWCZFxzU/20160526_173016.jpg
Network switches are cool devices
https://dl2.pushbulletusercontent.com/8zFrHAUneRfAVNbfVGlqbCRl39AweP1j/20160526_163848.jpg
Need your airflow
https://dl2.pushbulletusercontent.com/sB2bbKQdYN57t3bVD4pAmYF8tmnXAvqQ/20160522_161407.jpg
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.

Did I forget anything?
Questions?
What do you think?
Hope everyone interested finds this useful or informative, perhaps both.
 
Sure sounds like Pi fun, but the miner is out of my reach... Oh well... life in the SLO lane !
Best
rc
 
Back
Top