Browse Source

Merge commit 'febcc53' into cg_merges_20130822a

Conflicts:
	README.RPC
	miner.c
Luke Dashjr 12 years ago
parent
commit
6a8d932d0a
3 changed files with 72 additions and 4 deletions
  1. 2 2
      README
  2. 68 0
      README.RPC
  3. 2 2
      miner.c

+ 2 - 2
README

@@ -175,8 +175,8 @@ Options for both config file and command line:
                     See --api-allow to overcome this
 --api-mcast         Enable API Multicast listener, default: disabled
 --api-mcast-addr <arg> API Multicast listen address (default: "224.0.0.75")
---api-mcast-code <arg> Code expected in the API Multicast (default: "FTW")
---api-mcast-port <arg> Port number of miner API Multicast listener (default: 4028)
+--api-mcast-code <arg> Code expected in the API Multicast message, don't use '-' (default: "FTW")
+--api-mcast-port <arg> API Multicast listen port (default: 4028)
 --api-network       Allow API (if enabled) to listen on/for any address (default: only 127.0.0.1)
 --api-port          Port number of miner API (default: 4028)
 --balance           Change multipool strategy from failover to even share balance

+ 68 - 0
README.RPC

@@ -32,6 +32,10 @@ Using the "--api-allow" option overrides the "--api-network" option if they
 are both specified
 With "--api-allow", 127.0.0.1 is not by default given access unless specified
 
+If you start BFGMiner also with the "--api-mcast" option, it will listen for
+a multicast message and reply to it with a message containing it's API port
+number, but only if the IP address of the sender is allowed API access
+
 More groups (like the privileged group W:) can be defined using the
 --api-groups command
 Valid groups are only the letters A-Z (except R & W are predefined) and are
@@ -908,6 +912,22 @@ to
 See --api-network or --api-allow for more access details
 and how to give write access
 
+You can however, also tell miner.php to find your mining rigs automatically
+on the local subnet
+
+Add the following to each BFGMiner:
+
+ --api-mcast
+
+or in your bfgminer.conf
+
+ "api-mcast" : true,
+
+And in miner.php set $mcast = true;
+
+This will ignore the value of $rigs and overwrite it with the list of zero or
+more rigs found on the network in the timout specified
+
 ---------
 
 Once you have a web server with PHP running
@@ -1140,6 +1160,54 @@ e.g. $rigs = array('127.0.0.1:4028','myrig.com:4028:Sugoi');
 
 ---------
 
+Default:
+ $mcast = false;
+
+Set $mcast to true to look for your rigs and ignore $rigs
+
+---------
+
+Default:
+ $mcastaddr = '224.0.0.75';
+
+API Multicast address all miners are listening on
+
+---------
+
+Default:
+ $mcastport = 4028;
+
+API Multicast UDP port all miners are listening on
+
+---------
+
+Default:
+ $mcastcode = 'FTW';
+
+The code all miners expect in the Multicast message sent
+The message sent is "cgm-code-listport"
+Don't use the '-' character if you change it
+
+---------
+
+Default:
+ $mcastlistport = 4027;
+
+UDP port number that is added to the broadcast message sent
+that specifies to the miners the port to reply on
+
+---------
+
+Default:
+ $mcasttimeout = 1.5;
+
+Set $mcasttimeout to the number of seconds (floating point)
+to wait for replies to the Multicast message
+N.B. the accuracy of the timing used to wait for the replies is
+~0.1s so there's no point making it more than one decimal place
+
+---------
+
 Default:
  $rigipsecurity = true;
 

+ 2 - 2
miner.c

@@ -1374,10 +1374,10 @@ static struct opt_table opt_config_table[] = {
 		     "API Multicast listen address"),
 	OPT_WITH_ARG("--api-mcast-code",
 		     opt_set_charp, opt_show_charp, &opt_api_mcast_code,
-		     "Code expected in the API Multicast"),
+		     "Code expected in the API Multicast message, don't use '-'"),
 	OPT_WITH_ARG("--api-mcast-port",
 		     set_int_1_to_65535, opt_show_intval, &opt_api_mcast_port,
-		     "Port number of miner API Multicast listener"),
+		     "API Multicast listen port"),
 	OPT_WITHOUT_ARG("--api-network",
 			opt_set_bool, &opt_api_network,
 			"Allow API (if enabled) to listen on/for any address, default: only 127.0.0.1"),