Compac A1 Setup Mac

Preparation

For the successful setup of CGMiner for the Compac A1 for Mac, I recommend the following operating system versions and extensions

  • Mac OS Big Sur 11.16 or higher
  • Homebrew Package Manager for Mac OS

The first step is to install the Apple Command Line Tools on your Mac OS operating system. Open the Terminal app and enter the following to install the Apple Command Line Tools:

xcode-select --install

Install package manager and resolve package dependencies

First, the free package manager Homebrew (https://brew.sh) for Mac OS must be installed. This takes 5-10 minutes, depending on the speed of your internet connection.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew analytics off

The following packages must be installed to resolve the package dependencies of CGMiner:

Build

For the Mac, Kano has a prepared “recipe” (tap) in Homebrew:

brew tap kanoi/cgminer
brew install cgminer

If you already use Homebrew as a package manager on your Mac, you can follow these steps to update Hombrew and install CGMiner:

brew analytics off
brew doctor
brew update
brew upgrade
brew cleanup
brew tap kanoi/cgminer
brew install cgminer

To install smaller updates of CGMiner (with an already current Homebrew installation, the following command is sufficient:

brew reinstall cgminer

Afterwards, I recommend testing the newly compiled binary as follows:

sudo cgminer -n

This command lists the detected miners. Example output “Compac F BM1397 Bitcoin Miner”.

Setup

I recommend setting up a configuration file, it is much clearer than starting CGMiner with console parameters.

Example of a gekko.conf configuration file:

{
"pools" : [
{
"url" : "stratum+tcp://stratum.kano.is:3333",
"user" : "benutzername.worker",
"pass" : "x"
}
],
"gekko-compaca1-start-freq" : "300",
"gekko-compaca1-freq" : "300",
"gekko-compaca1-corev" : "300",
"gekko-compaca1-detect" : true,
"gekko-r909-freq" : "450",
"gekko-r909-detect" : true,
"gekko-compacf-freq" : "400",
"gekko-compacf-detect" : true,
"gekko-tune2" : "60",
"suggest-diff" : "442",
"failover-only" : true,
"api-listen" : true,
"api-port" : "4028",
"api-allow" : "W:192.168.1.0/24,W:127.0.0.1"
}

How to start CGMiner with configuration file:

cgminer -c gekko.conf 

This is how the command line looks like without a configuration file

cgminer --o stratum+tcp://stratum.kano.is:3333 -u 1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr -p x --suggest-diff 442 --gekko-compacf-freq 400 --gekko-compacf-detect true

In the examples above, please replace the pool data as well as the user name and worker with your own pool data, user data and worker.

Depending on the intended use, it is recommended to log the output of CGMiner in a log file:

cgminer -c gekko.conf 2> "run-`date +%Y%m%d%H%M%S`.log"

Alternatively, you can put CGMiner into a shell script that writes a log file:

touch cgminer.sh
sudo nano cgminer.sh

Content of the shell script:

#!/bin/sh
#
while true ; do
now="`date +%Y%m%d%H%M%S`"
#
./cgminer -c gekko.conf "$@" 2> "run.$now.log"
#
echo "Sleeping for 5 seconds ..."
sleep 5
done

Then make the shell script executable:

chmod +x cgminer.sh

The “$@” means that you can pass additional parameters to the shell script to be added to the running cgminer, e.g. to disable asicboost.

cgminer.sh --gekko-noboost

Accessing the API on Mac

Install Java for Mac. Oracle suggests the correct version of Java for desktop applications. Make sure you select the correct Java installation package for Intel or Apple Arm64 CPU.

https://java.com/

Please make sure that you have enabled the API functionality in the configuration file or via the console parameter:

--api-enable --api-allow "W:127.0.0.1"

Finally, you can test the Java API functionality on your Mac. Please enter the following in a terminal window

cd Library/Caches/Homebrew/cgminer--git/
java API estats

Accessories

In particular, to operate the miner with a Raspberry Pi, it requires a USB hub with an active power supply that is able to provide at least 3 A per USB port. We have had good experiences with USB 2.0 devices from Anker and Orico. Our 7-port USB hub has self-resetting fuses on each port and can provide up to 6 amps per port.

The Compac A1 hardware design is geared towards high performance and requires good cooling. Although the Compac A1 is the first USB stick miner to have a thermal fuse, I recommend good cooling to increase the lifespan of the components. We have had good experiences with the Arctic Breeze Mobile 92 mm. Very quiet, powerful and durable.

Alternatively, we also offer the Compac A1 with a snap-on fan, which can be powered directly on the circuit board. The Sunon 40 mm fan installed here provides sufficient cooling at a noise level of just 23 decibels.