Part 5A: Linux
5A.01 Pi
5A.1 Linux Scrypt Mode
5A.2 Linux SHA Mode
5A.3 Linux Dual Mode
Linux Credit: meinhard
https://bt.irlbtc.com/view/454127.0 (Modified)
Part 5B: Windows
Windows Credit: maardein
https://bt.irlbtc.com/view/487419.msg5424040#msg5424040 (Quoted)
Part 5A.01: PiRaspberry Pi
I'll be hooking this up to power the Pi 3/12/2014
http://amzn.com/B00CBCGAL8 and testing out cgminer and cpuminer as well as casing and rack mounting the hosted set of devices I have.
http://www.raspberrypi.org/wp-content/uploads/2012/04/quick-start-guide-v2_1.pdfhttp://elinux.org/RPi_Easy_SD_Card_SetupAcquire an Rpi:
http://www.amazon.com/s/ref=nb_sb_ss_i_0_10?url=search-alias%3Daps&field-keywords=raspberry%20piDowload Raspbian from:
http://www.raspberrypi.org/downloadshttp://downloads.raspberrypi.org/raspbian_latestExtract the image file

Download SD Formatter from:
https://www.sdcard.org/downloads/formatter_4/eula_windows/Extract and install sd formatter downloaded above.

Change the "Options" to Full and Adjust size

Confirm

If everything completed move on:

Download win32diskimager:
http://sourceforge.net/projects/win32diskimager/http://downloads.sourceforge.net/project/win32diskimager/Archive/win32diskimager-v0.9-binary.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fwin32diskimager%2F&ts=1394574641&use_mirror=hivelocityExtract the program and run it

I configured a few things on first boot:
Expand the image to fill the card
Change password
Change startup method (Text only)
Enable the root account
sudo passwd root
***
***
exit
ssh back in as root and change the associated paths and groups
usermod -l miner pi
usermod -m -dhome/miner miner
groupmod -n miner pi
exit
ssh back in as miner and install the pre-requisites
sudo -s
apt-get update
apt-get install -y build-essential libtool libcurl4-openssl-dev libncurses5-dev libudev-dev autoconf automake screen
exit
Build cgminer:
git clone https://github.com/gridseed/usb-miner/
cd usb-miner/software/cgminer
autoreconf -i
./configure --enable-gridseed
make
Build cpu miner:
cd
cd usb-miner/software/cpuminer
./autogen.sh
./configure
make
Link the build directories for convenience:
ln -s ~/usb-miner/software/cpuminer ~/cpuminer
ln -s ~/usb-miner/software/cgminer ~/cgminer
? Profit ?
Part 5A.1: LinuxCredit:
https://bt.irlbtc.com/view/421921.msg5455483#msg5455483Credit:
https://github.com/gridseed/usb-miner/blob/master/software/doc/INSTALL_EN.pdfInstall Pre-Requisites:
sudo -s
apt-get update
apt-get install build-essential libtool libcurl4-openssl-dev libncurses5-dev libudev-dev autoconf automake screen
Grab possibly needed packages:
cd
wget http://curl.haxx.se/download/curl-7.34.0.tar.bz2
wget http://www.digip.org/jansson/releases/jansson-2.5.tar.bz2
Install curl and jansso packages:
tar -xvf curl-7.34.0.tar.bz2
cd curl-7.34.0/
./configure
make
make install
cd
tar -xvf jansson-2.5.tar.bz2
cd jansson-2.5/
./configure
make
make install
cd
Build cpuminer from git:
cd
git clone https://github.com/gridseed/usb-miner
cd ~/usb-miner/software/cpuminer
autoreconf -i
CFLAGS="-O2 -Wall -march=native" ./configure
make
cd
*** For ubuntu 13.10 *** Install the correct automake version so cgminer builds
wget http://ftp.osuosl.org/pub/ubuntu/pool/main/a/automake1.11/automake1.11_1.11.6-2_all.deb
sudo dpkg -i automake1.11_1.11.6-2_all.deb
Link the Jansson Libraries to fix:
./minerd: error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory
sudo ln -susr/local/lib/libjansson.*usr/lib/
*** END *** Build cgminer:
cd ~/usb-miner/software/cgminer
./autogen.sh
CFLAGS="-O2 -Wall -march=native" ./configure --enable-gridseed
make
cd
Link the build directories for convenience:
ln -s ~/usb-miner/software/cpuminer ~/cpuminer
ln -s ~/usb-miner/software/cgminer ~/cgminer

If all went well you will have the miner installed.
Now DO NOT PLUGIN the USB yet just the power cable:

tail -fvar/log/syslog
Plug in the USB cable to the computer and device:

Syslog results

*You might havedev/ttyUSBX not ttyACMX
If you don't want to run all of the miners as sudo/rootsudo usermod -G plugdev -a <username>
Where <username> is your username: sudo usermod -G plugdev -a miner
Now run the miner process:
sudo ./minerd --freq=600 --gc3355=/dev/ttyACM0 --url=stratum+tcp://middlecoin.com:3333 --userpass=13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat:x
Or using CGMiner Syntax
sudo ./minerd -F 600 -Gdev/ttyACM0 -o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x
It appears you can't combine devices to one line like this: (worldlybedouin,Powell)
sudo ./minerd -F 600 -Gdev/ttyACM0 -Gdev/ttyACM1 -Gdev/tACM2 -Gdev/ttyACM3 -Gdev/ttyACM4 -Gdev/ttyACM5 -Gdev/ttyACM6 -Gdev/ttyACM7 -Gdev/ttyACM8 -Gdev/ttyACM9 -o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x
I use dynamic pool files but something like this will work:
sudo -s
cd ~/usb-miner/software/cpuminer
for i in `seq 0 10`; do screen -dmS $i ./minerd -Gdev/ttyACM$i -F 800 -o stratum+tcp://stratum.scryptguild.com:3333 -u unicornhasher -px;done
SCREEN USAGEIn order to keep the miners running when you log off ssh you will need to use screen:
screen -ls
to list screens if you did not add your user to the plugdev group you may need to use
sudo screen -ls
screen -x xxxx.x
to join a screen
Press <ctrl> A <ctrl> D (or <ctrl> AD) to exit the screen session. You can then exit the ssh session and the miners will continue to run.
YAY means YAY

How I run the 10 miners to 10 separate pools:
***WARNING: This assumes you use username miner and home pathhome/miner ****
This also assumes that you have added your user to plugdev or are using root with (sudo -s)
1) Create 10 pool files named pool0.sh to pool9.sh
2) insert the FREQ NAME and POOL variables into each pool file
pool9.sh
NAME="miaviator"
POOL="-o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x"
FREQ="800"
3) make the mine.sh script to execute the miners
cat > mine.sh << EOF
count=0
for i in `lsdev/ttyACM*`
do
sourcehome/miner/pool$count.sh
cdhome/miner/cpuminer/
screen -dmS $NAME ./minerd -F $FREQ -G $i $POOL
count=$((count+1))
done
EOF
chmod +x mine.sh
After running mine.sh for this hosting thread
https://bt.irlbtc.com/view/471764.0 I have the following screens:
Part 5A.2: BTC ModeModified from PDF and this post:
https://bt.irlbtc.com/view/494625.msg5465107#msg5465107cd cgminer
To mine to my donation address for this guide:
./cgminer --gridseed-options=baud=115200,freq=800,chips=5,modules=1,usefifo=0,btc=16 --hotplug=0 -o stratum+tcp://stratum.mining.eligius.st:3334 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x
Breakdown: NEEDS HELP
Execute the Miner:
./cgminer
Enable Gridseed configuration flags
--gridseed-options=
The Serial/USB com speed (Don't Change)
baud=115200
The chip frequency in 50 Unit steps from 600 to 900:
freq=800
The number of chips on the device (Don't change for these devices)
*Change if you get a 10 or 25 Mh/s GridSeed box
*you bastard
* I want one
chips=5
The number of boards/modules/devices per com port (IE 1, don't change this)
modules=1
Communications method used to talk to the device board (Don't change)
*Correct me if I'm wrong
usefifo=0
A seemingly arbitrary number until someone tells me what its for

*The doc says 11 I'm sure there is a range
btc=16
I'd guess this allows devices, modules or chips to be added/removed while the miner is running?
*IDK and IDC
hotplug=0
Standard pool config
-o POOL:PORT -u USER -p PASS
Mining:

Mining per device vs all devices:
lsusb

Quick and dirty Bus:Device:
lsusb |grep STMicroelectronics|cut -d " " -f 2,4|sed 's/://g'|sed 's/:/g'

Run one or more devices using cgminers --usb flag
https://github.com/ckolivas/cgminer./cgminer --gridseed-options=baud=115200,freq=800,chips=5,modules=1,usefifo=0,btc=16 --hotplug=0 -o stratum+tcp://stratum.mining.eligius.st:3334 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x --usb 001:009

or
--usb 001:009,001:013
etc.
Part 5A.3: BTC/Dual ModeOnce you turn on BTC mining you have to attache to the LTC proxy in order to mine in scrypt mode dual mode. Or unplug the devices and replug them so they show up as ttyACM# again?
Once you are running one or more devices in SHA mode you can start Scrypt mining in dual mode with:
./minerd -F 800 -o stratum+tcp://middlecoin.com:3333 -u 13zKJjzxGpjbqJDAWAhFNHVqALqcsCWiat -p x --dual

Can I run to 10 pools this way? Let's find out.
MORE TO COME with power readings and speed/clock readings.
Part 5B: Windows *Credit:
http://cryptomining-blog.com/1461-updated-cgminer-3-7-2-for-windows-scrypt-mining-on-gridseed-5-chip-gc3355-asics/Get a copy of the pre-built cgminer for windows:
http://cryptomining-blog.com/wp-content/files/cgminer-3-7-2-gridseed-windows.zipExtract it
Open Device management: Press Window Key + R to open the run dialog or navigate through the control panel

Plug power into the gridseed(s)
Plug USB to the gridseed(s) and to a powered USB hub.
Open the extracted Cgminer folder:
Edit LTC_ONLY.bat to contain your pools and frequency

Save the file
Double click to run.
*There has to be something I missed?


Original Windows instruction set:
https://bt.irlbtc.com/view/494625.msg5791916#msg5791916