Author

Topic: Project: CGMiner 3.4.0 with USB Block Erupters on a 5W pogoplug mobile (Read 1682 times)

sr. member
Activity: 266
Merit: 250
Blitz:The price affects the perception of the news
Outstanding, bitwit.  This post pegged out my geek meter.

From what I can see, the overall dim of this outfit will be about the same as a Raspberry Pi at a somewhat smaller cost.

I wonder if any of the older models with the wireless adapter are still around.  Would be great to set this up under la esposa's dresser and let it rip.   Grin

Thanks for the post.

/Frank
newbie
Activity: 21
Merit: 0
Thanks for this. I tried it and it works great. Got the pogoplug off ebay  and using it with a  ROSEWILL RHB-500 R that I got from Newegg. Sitting here on my desk with two USB block erupters hashing away. I know they will never pay for themselves, but it is great fun.
newbie
Activity: 16
Merit: 0
Intro
I don't know if anyone needs this, but I'm a supernoob and it took me a while to piece this together. I did not come up with any of this. I used archlinuxarm.org, archlinux.org, cgminer's readme, and some other stuff. If you deserve credit and I forgot, sorry - feel free to take it :-)

Apologies if this is useless - I'm only posting because I needed a guide this simple. It's probable that no one else does. This is my first post - take it easy on me Undecided

Constructive criticism is always welcome.

WARNING: following these directions will void warranties, destroy cities, and ultimately cause an early apocalypse.

Synopsis
I wanted a standalone, low-wattage miner that could scale and was fun to experiment with. I wanted it to restart mining when interrupted. I didn't want to buy a raspberry pi because I figured I'd destroy a few pieces of technology accidentally so I opted for things I could mostly get locally. I decided on a pogoplug mobile (as of 8/30, available via ebay at $15 each free shipping) and a powered usb hub.

Background
  • I am new to most concepts here, including linux, bitcoin, and cryptography
  • I don't fully understand how bitcoin works, but I understand enough to appreciate and enjoy it
  • I've used ubuntu in the past, and I understand (VERY) basic bash commands

My (Humble) Setup
  • USB Block Erupters
  • USB 2.0 Powered Hub from Office Depot (~$27 US with tax - find a better hub!)
  • 1 PogoPlug Mobile from Radio Shack (On sale $21.39 US with tax)
  • 8 GB USB thumb drive (On sale $5.32 US with tax at WalWart)

What I Did
Step 1 - Arch Linux

  • Register device via pogoplug.com/activatep
  • Enable SSH: my.pogoplug.com -> security tab -> checkbox
  • Plug in new USB Drive for arch installation (no usb hub)
  • Power On
  • Check Router DCHP Clients Table for IP Address of "Pogoplug Mobile"
  • SSH into pogoplug (I used putty for Winblows 8 )
  • Stop pogoplug software

Code:
killall hbwd

  • Start fdisk to partition usb2 or sata drive:

Code:
/sbin/fdisk /dev/sda

  • Type o (clear partition table)
  • Type p (list partition table - confirm there are none)
  • Type n (new partition)
  • Type p (primary)
  • Type 1 (first partition)
  • Press enter, accepting default value
  • Press enter again, accepting default value
  • Type w (exit, writing changes)
  • Create ext3 filesystem

Code:
cd /tmp
wget http://archlinuxarm.org/os/pogoplug/mke2fs
chmod +x mke2fs
./mke2fs -j /dev/sda1
mkdir alarm
mount /dev/sda1 alarm

  • Download and install Arch Linux ARM:

Code:
cd alarm
wget http://archlinuxarm.org/os/ArchLinuxARM-armv5te-latest.tar.gz
tar -xzvf ArchLinuxARM-armv5te-latest.tar.gz  # This will take a long time
rm ArchLinuxARM-armv5te-latest.tar.gz
sync  # Takes a while if you are using a flash drive

  • Unmount Drive:
Code:
cd ..
umount alarm

  • Install U-boot bootloader and reboot

Code:
cd /tmp
wget http://archlinuxarm.org/os/ppv4/ppv4-install.sh
chmod +x ppv4-install.sh
./ppv4-install.sh
/sbin/reboot


Step 2 - Install wget, screen, and base-devel

  • Wait for pogoplug to restart, then ssh in (check router again - it's now called "alarm", not "pogoplug mobile") with user/pass root
  • Install the following packages with pacman (it will ask you y or n questions)

Code:
pacman -S wget
pacman -Syu base-devel
pacman -S screen

Step 3 - libusb/cgminer

Code:
cd /home
mkdir miner
cd miner
mkdir cgminer
cd cgminer
wget http://ck.kolivas.org/apps/cgminer/cgminer-3.4.0.tar.bz2
tar xvjf cgminer-3.4.0.tar.bz2
cd cgminer-3.4.0
mkdir libusb
cd libusb
wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.16-rc10/libusb-1.0.16-rc10.tar.bz2
tar xvjf libusb-1.0.16-rc10.tar.bz2
cd libusb-1.0.16-rc10
./configure
make
cd ../..

  • Build cgminer

Code:
CFLAGS="-O2 -Wall -march=native" LIBUSB_CFLAGS="-I./libusb/libusb-1.0.16-rc10/libusb" LIBUSB_LIBS="./libusb/libusb-1.0.16-rc10/libusb/.libs/libusb-1.0.a -ludev" ./configure --enable-icarus
make install

  • turn off pogoplug, Plug in usb hub, plug in usb drive
  • start cgminer - replace with your options

Code:
cgminer -o URL:PORT -u USER -p PASS --lowmem # ONE POOL

OR

Code:
cgminer -o URL1:PORT1 -u USER1 -p PASS1 -o URL2:PORT2 -u USER2 -p PASS2 --lowmem # TWO OR MORE POOLS


  • Plug in Block Erupters (They should appear and start hashing - ensure they're working)
  • Press s for settings
  • Press w for write
  • For file name, type /home/miner/cgminer.conf
  • Press q to quit

Step 4 - Create startup scripts and enable them

  • Switch to the miner directory and start a new file:

Code:
cd /home/miner
nano auto.sh

  • Type the following into nano, then press CTRL+o (to write the file Out) then CTRL+x (to eXit nano):

Code:
#!/bin/sh
screen -dmS miner /home/miner/cgminer/cgminer-3.4.0/cgminer --config /home/miner/cgminer.conf

  • Create service file

Code:
cd /usr/lib/systemd/system
nano cgminer.service

  • Enter the following, then CTRL+o, then CTRL+x:
Code:
[Unit]
Description=Start cgminer

[Service]
User=root
Type=oneshot
ExecStart=/bin/sh /home/miner/auto.sh

[Install]
WantedBy=multi-user.target
Enable the service:

  • Then enable the service:
Code:
systemctl enable cgminer.service

  • Finally, change your root password:

Code:
passwd


Results
When you turn the pogoplug on, it will automatically start mining. To see what's up with cgminer, ssh in and type screen -r to reattach the screen session. When you're done, Press CTRL+A then CTRL+D to detach.

Hope this helps at least one person.
Jump to: