Most ASIC miners provides an API which is a monitoring interface for applications like Awesome Miner to connect to. Awesome Miner can connect to this interface in order to get information about hashrates, accepted shares, pools and more. The interface can often be used for controlling the mining operations as well, for example restart the miner and change pool.
Awesome Miner can connect to all standard based ASIC API's based on the Cgminer API.
Restricted and Privileged mode
The API can run in two different modes.
- Restricted (read-only mode)
This will allow Awesome Miner to connect to the miner and display mining statistics. It is however not possible to make any changes to the miner, like restarting or changing the pool. These operations will be disabled in Awesome Miner when selecting a miner with Restricted mode.
- Privileged (write/modify mode)
This mode will give Awesome Miner full access to the operations of the miner.
More recent ASIC miners, for example Antminer S17, S19 and L7 doesn't have any concept of Privileged mode. Awesome Miner can manage these miners without the need of a Privileged mode. See also Control Antminer without SSH access.
The concept of Restricted and Privileged mode are relevant for older Antminers, for example Antminer S9 and L3+.
Awesome Miner can automatically configure the API access for Antminers. For all other miners it's a manual operation.
Manually configure Cgminer
When connecting to an External Miner, the API access must be enabled in Cgminer configuration for that miner. There are two important parameters that are used to define API access. Please consult your miner configuration guide on how to configure these parameters.
This setting defines if the API should be enabled or disabled. When enabled, it will allow Awesome Miner to connect to the Cgminer/Sgminer API and request mining statistics.
If only api-listen is defined, the API will run in restricted mode. In order to enable privileged mode, api-allow needs to be defined with a prefix and IP address.
There are two prefixes. R defines the restricted mode (read-only). W defines the privileged mode (write).
The IP address specifies either a single IP address or a IP subnet (range of IP addresses).
192.168.1.10 specifies that the API allows connections only from the IP address 192.168.1.10.
192.168.1.0/24 specifies that the API allows connections from the IP address range 192.168.1.0 - 192.168.1.255 (will be written as 192.168.1.X in further examples).
Examples of api-allow usage
|192.168.1.10||Restricted access to IP address 192.168.1.10|
|W:192.168.1.10||Privileged access to IP address 192.168.1.10|
|W:192.168.1.0/24||Privileged access to IP addresses 192.168.1.X|
|W:192.168.0.0/16||Privileged access to IP addresses 192.168.X.X|
|W:192.168.0.0/16,W:127.0.0.1||Privileged access to IP addresses 192.168.X.X and 127.0.0.1|
|W:192.168.1.10,R:192.168.0.0/16||Privileged access to IP addresses 192.168.1.10 and restricted access to IP addresses 192.168.X.X (except 192.168.1.10 that will have privileged access)|
|W:0/0||Privileged access to all IP addresses. Not recommended from a security point of view.|
For a complete configuration reference for the API, please see the Cgminer API documentation.