Bitcoin Forum
December 15, 2024, 06:07:03 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: API for CGMiner  (Read 13348 times)
tuckertz1992 (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 07:07:29 PM
 #1

Struggling to get it to work, anyone got an example .bat file or .conf file with API enabled? Cry

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
milone
Sr. Member
****
Offline Offline

Activity: 434
Merit: 251


CGWatcher & CGRemote


View Profile WWW
July 22, 2013, 07:24:46 PM
 #2

Assuming you're trying to access the miner from the same computer and want full API privileges, the command line arguments would be:

Code:
--api-listen --api-allow W:127.0.0.1

If using a config file, add these two lines:

Code:
"api-listen" : true,
"api-allow" : "W:127.0.0.1"

You may need to add a comma at the end depending on where in your config file you place it.

If you're trying to access the miner from a different computer, give more info and I'll try to help.

CGWatcher, a GUI/monitor for CGMiner & BFGMiner: http://www.cgwatcher.com
CGRemote, a remote mining dashboard for all of your miners: http://www.minerremote.com
BTC: 12TAYjmSrdDHLNpmix2MG6y3R868SMM7Fx    LTC: LM6Un6hZvPzLBggJWiAVG6E6w2GfaHukXY
tuckertz1992 (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 07:27:35 PM
 #3

Assuming you're trying to access the miner from the same computer and want full API privileges, the command line arguments would be:

Code:
--api-listen --api-allow W:127.0.0.1

If using a config file, add these two lines:

Code:
"api-listen" : true,
"api-allow" : "W:127.0.0.1"

You may need to add a comma at the end depending on where in your config file you place it.

If you're trying to access the miner from a different computer, give more info and I'll try to help.

Please see:   https://bitcointalk.org/index.php?topic=222632.0

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
milone
Sr. Member
****
Offline Offline

Activity: 434
Merit: 251


CGWatcher & CGRemote


View Profile WWW
July 22, 2013, 07:41:27 PM
 #4

If you're trying to host that page on a web server (that isn't the computer cgminer is running on), you'll need to

1.) Enable the API in cgminer and set it to allow connections from your web server's IP address.

2.) If you're mining computer is connected to a router, forward the port cgminer's API is using (default is 4028) to your mining computer. http://portforward.com has a lot of helpful information on how to do this and a free utility to check if the port is forwarded correctly.

3.) Set your mining computer's public IP address in that monitor page's PHP. I don't use that monitor but I'd imagine the IP is either hard-coded or is displayed in a textbox.

That page on your web server is what is connecting to cgminer, so you have to make sure it can connect to your mining computer and to cgminer. If your mining computer's public IP address changes, you'll need to update the PHP with the new IP address.


CGWatcher, a GUI/monitor for CGMiner & BFGMiner: http://www.cgwatcher.com
CGRemote, a remote mining dashboard for all of your miners: http://www.minerremote.com
BTC: 12TAYjmSrdDHLNpmix2MG6y3R868SMM7Fx    LTC: LM6Un6hZvPzLBggJWiAVG6E6w2GfaHukXY
tuckertz1992 (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 07:47:16 PM
 #5

If you're trying to host that page on a web server (that isn't the computer cgminer is running on), you'll need to

1.) Enable the API in cgminer and set it to allow connections from your web server's IP address.

2.) If you're mining computer is connected to a router, forward the port cgminer's API is using (default is 4028) to your mining computer. http://portforward.com has a lot of helpful information on how to do this and a free utility to check if the port is forwarded correctly.

3.) Set your mining computer's public IP address in that monitor page's PHP. I don't use that monitor but I'd imagine the IP is either hard-coded or is displayed in a textbox.

That page on your web server is what is connecting to cgminer, so you have to make sure it can connect to your mining computer and to cgminer. If your mining computer's public IP address changes, you'll need to update the PHP with the new IP address.



I think it may be my ports, all IP's seem to be setup okay

BT Home Hubs...

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
tuckertz1992 (OP)
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
July 22, 2013, 08:06:04 PM
 #6

Deffo BT Home Hub Problems, Still cant get the bloody port open! Gutted! Sad

New Bitcoin Miner - If i've helped you, please donate: 15G6Zm6rAJu6ME5BQqX9GXGwGLgzC9Mboc
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!