Bitcoin Forum

Other => CPU/GPU Bitcoin mining hardware => Topic started by: bitspender on March 04, 2014, 12:04:11 PM



Title: Antminer S1 - Privileged API ??
Post by: bitspender on March 04, 2014, 12:04:11 PM
Hi guys,

I've noticed that i cant make my S1's execute privileged API commands, like switchpool etc.
Can someone explain how i need to enable this on my S1's?

API_ALLOW is setup to my computer, and the API has readonly false, and showinputs true.
Seems something Bitmaintech baked into their firmware issue

Thank you!


Title: Re: Antminer S1 - Privileged API ??
Post by: salfter on March 05, 2014, 05:08:28 PM
I've noticed that i cant make my S1's execute privileged API commands, like switchpool etc.
Can someone explain how i need to enable this on my S1's?

API_ALLOW is setup to my computer, and the API has readonly false, and showinputs true.
Seems something Bitmaintech baked into their firmware issue

It should've been possible to set this up in /etc/config/cgminer, but the relevant options there didn't have any effect.  Instead, I edited /etc/init.d/cgminer.

Look for a line similar to this:

Code:
PARAMS="$AOPTIONS $POOL1 $POOL2 $POOL3 $_pb --api-listen --api-network"

Change it to something more like this:

Code:
PARAMS="$AOPTIONS $POOL1 $POOL2 $POOL3 $_pb --api-listen --api-network --api-allow W:127.0.0.1,W:192.168.100.0/24"

Restart:

Code:
/etc/init.d/cgminer stop && /etc/init.d/cgminer start

I did this to enable CryptoSwitcher (running on a Raspberry Pi in a Bitfury rig) to switch between altcoins on my Antminers.  It worked, but there wasn't enough extra income to make it worthwhile.


Title: Re: Antminer S1 - Privileged API ??
Post by: jamesc760 on March 05, 2014, 11:45:59 PM
Thank you, salfter!

I'm book-marking this for posterior.



Title: Re: Antminer S1 - Privileged API ??
Post by: bitspender on March 06, 2014, 12:19:23 PM
Thank you!!!!!


Title: Re: Antminer S1 - Privileged API ??
Post by: BuildTheFuture on March 06, 2014, 11:35:27 PM
Good tip salfter, I'm going to give it a whirl.