Antminer S9ファームウェアをアップグレード(2021年7月版Braiins OS+ 21.06.1)

Antminer S9ファームウェアをアップグレード(2021年7月版Braiins OS+ 21.06.1)

Braiins OS+はマイニングプールslushpool.com運営のBraiins Systems s.r.o.(チェコ共和国)が提供する、Antminer S9等のファームウェアです。バージョン"21.06.1"に合わせて内容をアップデートしました。

説明の例はAntminer S9になります。

  • インストール(Bitmainファームウェアを上書き)
  • アンインストール(Bitmainファームウェアに戻す)
  • ブラウザによる基本的な設定
  • コマンドラインで情報を取得する
  • 設定ファイルを直接、変更する
  • コマンドの実行例

ご注意:自分が試した場合、bos-toolboxのアンインストール機能ではBitmainのファームウェアに戻せませんでした。ファームウェアの上書きは、ご自身の責任でお願いします。

インストール(Bitmainファームウェアを上書き)

ファームウェア上書きでAntminerからBraiins OS+に引き継がれる設定は、ネットワークとPool設定くらいです。

Bitmainファームウェアに戻す可能性がある場合は、あらかじめバックアップを取られる事をお勧めします。

Antminer S9に固定IPアドレスを設定

DHCPのままだとファームウェアをインストールした後に、なぜかマイナーにアクセスできませんでした。今回の例ではIPアドレス"192.168.1.149"に設定しています。
https://support.bitmain.com/hc/en-us/articles/222647908-How-to-set-a-static-IP-address

インストールに必要なツールのダウンロード

以前はコマンドラインのツールのみ提供されていましたが、GUIのツールが提供されるようになりました。

  1. braiins.comのダウンロードページにアクセス
    https://braiins.com/os/plus/download
  2. "Antminer S9, S9i, S9j"をクリック
  3. BOS+ Toolbox (With SSH Unlocker)の"DOWNLOAD"をクリック
    (WindowsまたはLinux)
  4. Google driveが開くので、bos-toolbox(.zip)を選択して、右上のその他の操作をクリック、ダウンロードをクリック
  5. Windows版はダウンロードしたzipファイルを解凍しておきます

bos-toolboxによるインストール

インストール前のご注意:自分が試した場合では、bos-toolboxのアンインストール機能ではBitmainのファームウェアに戻せませんでした。

  1. bos-toolbox起動またはbos-toolbox.batダブルクリック、GUIツールが立ち上がります
  2. Miner(s)にマイナーのIPアドレスを入力(例:192.168.1.149)
  3. "Start"をクリック
  4. インストールが完了すると"Program complited succefully!"と表示され、マイナーが自動的に再起動します(時間は3分くらい)

Bitmainのファームウェアでマイニングができていた場合は、インストールで設定する項目は、ほとんどありません。

アンインストール(正規ファームウェアに戻す)

ご注意:自分が試した場合では、bos-toolboxのアンインストール機能ではBitmainのファームウェアに戻せませんでした。この項目ではファームウェアをリセットする方法を紹介します。
https://support.bitmain.com/hc/en-us/articles/360019493654-S9-series-S9-S9i-S9j-S9-Hydro-Control-Board-Program-Recovery

  1. マイクロSDカードに"t9+ -SD Tools.zip"を解凍したファイル・フォルダをコピーします。マイクロSDカードはFAT32容量16GB以下推奨
  2. コントロールボードをマイナーから外す
  3. コントロールボードのジャンパーピンJP4をR4の反対側に差し替え
  4. マイクロSDカードをコントロールボードに挿入
  5. コントロールボードに電源を接続→90秒後にLED赤緑が同時に点滅する
  6. 電源を切る
  7. マイクロSDカードを外す。ジャンパーピンJP4を元に戻す
  8. コントロールボードに電源を接続。ブラウザからアクセスする(IPアドレスはDHCP)。
  9. T9ファームウェアをS9ファームウェアに書き換える(Keep settingsは必ずチェックを外す事)。

ブラウザによる基本的な設定

設定したIPアドレスにブラウザでアクセスすると各種の設定ができます。動作させるハッシュボードの枚数や冷却ファンの強さ(回転数)など、細かい設定が色々できます。

設定へのアクセス方法

Bitmainのファームウェアと同じ様に、ブラウザにマイナーIPアドレスを入力すると、下のようなログイン画面が表示されます。パスワードに"root"を入力して"Login"をクリックします。

ログインに成功すると、画面の上側にメニューが表示されます。主な設定について説明します。

  • Miner -> Owerview:ハッシュレートやハッシュボードの温度グラフ等のマイナー全体の状態が確認できます
  • Miner -> Configuration:マイニングプール、ハッシュレート等の設定ができます。プールの設定はグループ分けしてグループ毎に、プールの有効・無効を設定する事ができます
  • Sysetm -> Administration:マイナーのパスワード設定です
  • System -> LED Configuration:LEDの光り方を追加できます
  • Network -> Interfaces:IPアドレス等の設定です

コマンドラインで情報を取得する

コマンドの文字列をncにパイプ、json出力をjqコマンドで整形しています。jqコマンドは無くても動作します。
コマンドの実行サンプルはこのページの最後に掲載します。

マイナー全体のハッシュレート等を取得

$ echo '{"command":"summary"}' | nc 192.168.1.149 4028 | jq

ハッシュボード毎のハッシュレート等を取得

$ echo '{"command":"asc","parameter":0}' | nc 192.168.1.149 4028 | jq
$ echo '{"command":"asc","parameter":1}' | nc 192.168.1.149 4028 | jq
$ echo '{"command":"asc","parameter":2}' | nc 192.168.1.149 4028 | jq

ファンのスピード(回転数)等を取得

$ echo '{"command":"fans"}' | nc 192.168.1.149 4028 | jq

ハッシュボード数等の全体の設定を取得

$ echo '{"command":"config"}' | nc 192.168.1.149 4028 | jq

マイニングプールの設定を取得

$ echo '{"command":"pools"}' | nc 192.168.1.149 4028 | jq

設定ファイルを直接、変更する

コマンドラインで操作します。スクリプトからマイナーを簡単に設定できます。

マイナーの設定ファイルを編集・反映

  1. マイナーにsshでアクセス
    $ ssh root@192.168.1.149
  2. 設定ファイルbosminer.toml編集
    $ vi /etc/bosminer.toml
  3. マイナー再起動
    $ /etc/init.d/bosminer reload

設定ファイルテンプレート(/etc/bosminer-template.toml)

# BOSminer configuration file

# Mandatory fields for specification of configuration format 'version' and
# compatible hardware 'model'
[format]
version = '1.0'
model = 'Antminer S9'
generator = 'template'

# Optional configuration for overriding all hash-chains default settings.
# These settings can be overridden for each hash-chain with an option:
# [hash_chain.idx] where 'idx' represents numerical index of the hash-chain.
[hash_chain_global]
# Enable or disable AsicBoost support (default=true)
#asic_boost = true
# Set default chip frequency in MHz for all hash-chains (default=650.0)
#frequency = 650.0
# Set default voltage in V for all hash-chains (default=8.8)
#voltage = 8.8

# Override global settings for hash-chain '6'
[hash_chain.6]
# You can disable each chain individually (by default all chains are enabled)
#enabled = true
# Override global chip frequency in MHz for hash-chain '6'
# (default='hash_chain_global.frequency')
#frequency = 650.0
# Override global voltage in V for hash-chain '6'
# (default='hash_chain_global.voltage')
#voltage = 8.8

# Override global settings for hash-chain '7'
[hash_chain.7]
# You can disable each chain individually (by default all chains are enabled)
#enabled = true
# Override global chip frequency in MHz for hash-chain '7'
# (default='hash_chain_global.frequency')
#frequency = 650.0
# Override global voltage in V for hash-chain '7'
# (default='hash_chain_global.voltage')
#voltage = 8.8

# Override global settings for hash-chain '8'
[hash_chain.8]
# You can disable each chain individually (by default all chains are enabled)
#enabled = true
# Override global chip frequency in MHz for hash-chain '8'
# (default='hash_chain_global.frequency')
#frequency = 650.0
# Override global voltage in V for hash-chain '8'
# (default='hash_chain_global.voltage')
#voltage = 8.8

# Optional configuration for overriding temperature control default settings
[temp_control]
# Set temperature control mode (default='auto')
# * auto     - the control unit uses fans to keep the device temperature below
#              the target temperature
# * manual   - the control unit monitors only hot and dangerous temperatures,
#              but the fans are controlled by the user through 'fan_control'
# * disabled - WARNING: this may damage the device because no control is done!
#mode = 'auto'
# Set target temperature in Celsius (default=89.0)
# This option is ONLY used when 'temp_control.mode' is set to 'auto'!
#target_temp = 89.0
# Set hot temperature in Celsius (default=100.0)
# When this temperature is reached, the fan speed is set to 100%.
#hot_temp = 100.0
# Set dangerous temperature in Celsius (default=110.0)
# When this temperature is reached, the mining is turned off!
# WARNING: setting this value too high can damage the device!
#dangerous_temp = 110.0

# Optional configuration for overriding fan control default settings.
# To completely disable fan control, set 'speed' and 'min_fans' to 0.
[fan_control]
# Set fixed fan speed in % (default=70)
# This option is NOT used when 'temp_control.mode' is set to 'auto'!
#speed = 70
# Set minimum number of fans required for BOSminer to run (default=1)
#min_fans = 1

# Specify default list of pool groups. All pools in one group use fail-over
# multipool strategy. Instead, load-balance strategy is used for all groups.
# This strategy sends work to all the groups on a quota basis.
[[group]]
name = 'Default'

# Specify default list of pools which are used for connection to remote servers
# after successful run of BOSminer.
# The order of the pools specifies a priority for failover algorithm.
# This section can be repeated.
#[[group.pool]]
# Initial state of the pool after BOSminer initialization (default=true)
#enabled = true
# Mandatory option for server URL specified in format <HOSTNAME:PORT>
#url = "stratum2+tcp://v2.stratum.slushpool.com:3336"
# Mandatory option for username specified in format <USERNAME.WORKERNAME>
#user = "!non-existent-user!"
# Optional password settings
#password = 'secret'

# Optional configuration for overriding autotuning default settings
#[autotuning]
# Set true to start autotuner automatically
#enabled = true
# Set PSU power limit (in watts) for three hashboards and control board
#psu_power_limit = 1420

# Optional configuration to enable dynamic power scaling
#[power_scaling]
# Dynamic Power Scaling is not enabled by default
#enabled = false
# The `psu_power_limit` variable is lowered by `power_step` W each time miner
# hits HOT temperature
#power_step = 100
# The `psu_power_limit` will never get below `min_psu_power_limit`
#min_psu_power_limit = 800
# If `psu_power_limit` is at `min_psu_power_limit` level and miner is still
# HOT and `shutdown_enabled` is true, then miner is shut down for a period of
# time. After that, miner is started but with the initial value of
# `psu_power_limit`.
#shutdown_enabled = true
# `shutdown_duration` is in hours. The default time for shutdown is 3 hours.
#shutdown_duration = 3.0

コマンドの実行例

summary

$ echo '{"command":"summary"}' | nc 192.168.1.149 4028 | jq
{
  "STATUS": [
    {
      "STATUS": "S",
      "When": 1626594624,
      "Code": 11,
      "Msg": "Summary",
      "Description": "BOSminer bosminer-plus-am1-s9 0.7.0-52331c5f"
    }
  ],
  "SUMMARY": [
    {
      "Accepted": 38,
      "Best Share": 8192,
      "Device Hardware%": 0,
      "Device Rejected%": 0,
      "Difficulty Accepted": 115891,
      "Difficulty Rejected": 0,
      "Difficulty Stale": 0,
      "Discarded": 0,
      "Elapsed": 114,
      "Found Blocks": 0,
      "Get Failures": 0,
      "Getworks": 14,
      "Hardware Errors": 0,
      "Last getwork": 1626594624,
      "Local Work": 176300,
      "MHS 15m": 660317.8164587701,
      "MHS 1m": 5752460.222060395,
      "MHS 24h": 6878.310588112188,
      "MHS 5m": 1980953.4493763102,
      "MHS 5s": 5560524.533477788,
      "MHS av": 4951441.199483517,
      "Network Blocks": 0,
      "Pool Rejected%": 0,
      "Pool Stale%": 0,
      "Rejected": 0,
      "Remote Failures": 0,
      "Stale": 0,
      "Total MH": 568116799.0784,
      "Utility": 20,
      "Work Utility": 72357.05935837909
    }
  ],
  "id": 1
}

acs

$ echo '{"command":"asc","parameter":0}' | nc 192.168.1.149 4028 | jq
{
  "STATUS": [
    {
      "STATUS": "S",
      "When": 1626594624,
      "Code": 106,
      "Msg": "ASC0",
      "Description": "BOSminer bosminer-plus-am1-s9 0.7.0-52331c5f"
    }
  ],
  "ASC": [
    {
      "ASC": 0,
      "Accepted": 0,
      "Device Elapsed": 114,
      "Device Hardware%": 0,
      "Device Rejected%": 0,
      "Diff1 Work": 1044,
      "Difficulty Accepted": 0,
      "Difficulty Rejected": 0,
      "Enabled": "Y",
      "Hardware Error MHS 15m": 0,
      "Hardware Errors": 0,
      "ID": 6,
      "Last Share Difficulty": 8192,
      "Last Share Pool": -1,
      "Last Share Time": 1626594624,
      "Last Valid Work": 1626594624,
      "MHS 15m": 318858.37205503875,
      "MHS 1m": 2819046.8164287047,
      "MHS 5m": 956575.1161651162,
      "MHS 5s": 3149627.6242818083,
      "MHS av": 2759269.4823277257,
      "Name": "",
      "Nominal MHS": 2872800,
      "Rejected": 0,
      "Status": "Alive",
      "Temperature": 0,
      "Total MH": 316633578.995712,
      "Utility": 0
    }
  ],
  "id": 1
}

fans

$ echo '{"command":"fans"}' | nc 192.168.1.149 4028 | jq
{
  "STATUS": [
    {
      "STATUS": "S",
      "When": 1626594625,
      "Code": 202,
      "Msg": "4 Fan(s)",
      "Description": "BOSminer bosminer-plus-am1-s9 0.7.0-52331c5f"

    }
  ],
  "FANS": [
    {
      "FAN": 0,
      "ID": 0,
      "RPM": 1560,
      "Speed": 17
    },
    {
      "FAN": 1,
      "ID": 1,
      "RPM": 2700,
      "Speed": 17
    },
    {
      "FAN": 2,
      "ID": 2,
      "RPM": 0,
      "Speed": 17
    },
    {
      "FAN": 3,
      "ID": 3,
      "RPM": 0,
      "Speed": 17
    }
  ],
  "id": 1
}

config

$ echo '{"command":"config"}' | nc 192.168.1.149 4028 | jq
{
  "STATUS": [
    {
      "STATUS": "S",
      "When": 1626594624,
      "Code": 33,
      "Msg": "BOSminer config",
      "Description": "BOSminer bosminer-plus-am1-s9 0.7.0-52331c5f"
    }
  ],
  "CONFIG": [
    {
      "ASC Count": 3,
      "Device Code": "",
      "Hotplug": "None",
      "Log Interval": 5,
      "OS": "Braiins OS",
      "PGA Count": 0,
      "Pool Count": 5,
      "Strategy": "Failover"
    }
  ],
  "id": 1
}

pools

$ echo '{"command":"pools"}' | nc 192.168.1.149 4028 | jq
{
  "STATUS": [
    {
      "STATUS": "S",
      "When": 1626594624,
      "Code": 7,
      "Msg": "2 Pool(s)",
      "Description": "BOSminer bosminer-plus-am1-s9 0.7.0-52331c5f"
    }
  ],
  "POOLS": [
    {
      "Accepted": 32,
      "AsicBoost": true,
      "Bad Work": 0,
      "Best Share": 8192,
      "Current Block Height": 0,
      "Current Block Version": 536870916,
      "Diff1 Shares": 1049,
      "Difficulty Accepted": 72078,
      "Difficulty Rejected": 0,
      "Difficulty Stale": 0,
      "Discarded": 0,
      "Get Failures": 0,
      "Getworks": 5,
      "Has GBT": false,
      "Has Stratum": true,
      "Has Vmask": true,
      "Last Share Difficulty": 1638,
      "Last Share Time": 1626594624,
      "Long Poll": "N",
      "POOL": 0,
      "Pool Rejected%": 0,
      "Pool Stale%": 0,
      "Priority": 0,
      "Proxy": "",
      "Proxy Type": "",
      "Quota": 1,
      "Rejected": 0,
      "Remote Failures": 0,
      "Stale": 0,
      "Status": "Alive",
      "Stratum Active": true,
      "Stratum Difficulty": 1638,
      "Stratum URL": "v2.stratum.slushpool.com",
      "URL": "stratum2+tcp://v2.stratum.slushpool.com",
      "User": "<USER>",
      "Work Difficulty": 1638,
      "Works": 86180
    },
    {
      "Accepted": 5,
      "AsicBoost": true,
      "Bad Work": 0,
      "Best Share": 8192,
      "Current Block Height": 0,
      "Current Block Version": 536870916,
      "Diff1 Shares": 1068,
      "Difficulty Accepted": 40960,
      "Difficulty Rejected": 0,
      "Difficulty Stale": 0,
      "Discarded": 0,
      "Get Failures": 0,
      "Getworks": 5,
      "Has GBT": false,
      "Has Stratum": true,
      "Has Vmask": true,
      "Last Share Difficulty": 2853,
      "Last Share Time": 1626594624,
      "Long Poll": "N",
      "POOL": 2,
      "Pool Rejected%": 0,
      "Pool Stale%": 0,
      "Priority": 2,
      "Proxy": "",
      "Proxy Type": "",
      "Quota": 1,
      "Rejected": 0,
      "Remote Failures": 0,
      "Stale": 0,
      "Status": "Alive",
      "Stratum Active": true,
      "Stratum Difficulty": 2853,
      "Stratum URL": "jp.stratum.slushpool.com:3333",
      "URL": "stratum+tcp://jp.stratum.slushpool.com:3333",
      "User": "<USER>",
      "Work Difficulty": 2853,
      "Works": 86576
    }
  ],
  "id": 1
}

おわりに

またバージョンアップ進んだら内容をアップデートするつもりです。

参考

この続き : 0字 / 画像 0枚
100

会員登録 / ログインして続きを読む

関連記事

記事を書いた人

The Shiba Inu (柴犬) is a most popular dog in Japan.

SNSにシェア

このクリエイターの人気記事

RaspberryPi小ネタ(OS起動でLED点滅、シャットダウンスイッチ、Lチカ)備忘録

4470

RaspberryPiでダッシュボードを作る(Grafana InfluxDB)備忘録

2297

裁定取引bot R2の実験(2020年2月~7月)

1039