Sshpass Osx



home · news · about · security · documentation

  1. How To Run Multiple SSH Command. Run date and hostname commands: $ ssh user@host 'date && hostname' You can run sudo command as follows on a remote box called server1.cyberciti.biz.
  2. This post summarizes several types of uses for.nix bash aliases: Setting default options for a command (e.g. Set eth0 as default option for ethtool command via alias ethtool='ethtool eth0').
  3. Hello All, I am completely out of scripting and programming background, so apologize for throwing a dum question here. I am on Python 2.7.10. I wanted to have a.py script for ssh'ing into multiple remote servers.
· changelog · used by · support/contact · S9 · T9 · restore ssh · fix hashboards · pool · psu
ASIC management, monitoring, and optimization system.
ASICseer is running on 64,034 ASICs (63.7 megawatts).
download ASICseer 1.2.2 now · ·
download ASICseer BoardRestore 1.0.3

The Multi-ASIC Installer runs on any.nix environment (ubuntu, ethos, fedora, mac osx, windows wsl) local to your ASIC network. The.nix environment needs to have sshpass awk sha256sum curl installed. This installer runs an asyncronous ssh script that takes about 1 minute per 15 ASICs (150 ASICs will take 10 minutes).

Table of Contents

Quick Start Guide (with ConfigMaker)

ASICseer is separated into read-only and read-write. Your Panel is read-only and your Remote Config File is read-write.

  1. Go to ASICseer Downloads. When the page loads, your Remote Config File will be generated and hosted on ConfigMaker.com automatically.
  2. Under Before Installation, save your new ASIC login information and secret Remote Config File editor (for ASIC login / management)
  3. Set your custompanel in your Remote Config File, which can be used for multiple farms to report to the same Panel.
  4. Your worker name is derived from your pool's username and your ASIC hostname automatically. You can customize your worker names.
  5. Follow the instructions under 'Simple and Easy' installation and wait for the installation to complete.
  6. After installation finishes, go to 'Miner Configuration' on your ASIC. NOTE: Default passwords will be changed. See security / recovery.
  7. Make changes in your Remote Config File to manage your ASICs.

You can use the 'Powerful and Advanced' installation to quickly install ASICseer on multiple units via SSH.

Setting up your own Remote Config File

If you want to avoid using ConfigMaker, you can host your Remote Config File on your own world-reachable remote server, vps, or shared hosting account.

  1. Copy https://asicseer.com/config.txt and host it yourself (see Setting up a Server)
  2. Get the link to your Remote Config File like http://your-server.com/config.txt
    NOTE: The link http://your-server.com/config.txt is an example. You must use your own link.
  3. Make changes to your Remote Config File to manage your ASICs. See Writing your Config for instructions.
  4. Paste the link to your Remote Config File into the 'Remote Config File' field on the Downloads page and press 'Regenerate Downloads.'
  5. Re/install ASICseer with your new Remote Config File.

Setting up a Server for your Remote Config File

If you do not have a remote server and do not want to use ConfigMaker, you can create a remote server with DigitalOcean.

  1. Go to DigitalOcean (follow this link to get $50 credit), create an account, then press 'Create -> Droplet.'
  2. Click on 'Marketplace' and select the 'LEMP on 18.04' software stack.
  3. Scroll down, press the left arrow, select '$5/month' droplet (not $40/month), your closest region, 'one-time password', and press 'Create.'
  4. After the droplet is created, follow the SSH guide to SSH to your DigitalOcean droplet.
  5. Descend into the world-readable html directory with cd /var/www/html
  6. Copy the sample Remote Config File to your DigitalOcean Droplet with wget -O config.txt https://asicseer.com/config.txt
  7. Make changes to your Remote Config File on your DigitalOcean droplet with nano /var/www/html/config.txt
  8. The link to your Remote Config File is now http://digital.ocean.ip.address/config.txt
  9. Paste the link to your Remote Config File into the 'Remote Config File' field on the Downloads page and press 'Regenerate Downloads.'
  10. Re/install ASICseer with your new Remote Config File.

Using the Multi-ASIC Installer on Windows 10

Ubuntu Windows Subsystem for Linux (WSL) Instructions

  1. Update Windows 10 to at least Version 10.0.18362 (Build 18362)
  2. Download and Install Ubuntu 18.04 from the Microsoft Store.
  3. When Ubuntu prompts Enter new UNIX username: use asicseer for both the username and password settings.
  4. Once the username and password is set, sudo su to become the root user.
  5. When prompted for your password, enter asicseer
  6. Run the below line to install the required packages:
    apt-get update; apt-get -fy install sshpass

You have now prepared a *nix environment. Proceed with 'Using the Multi-ASIC Installer on Linux, Mac, or Windows WSL'.

Using the Multi-ASIC Installer on Linux, Mac, or Windows WSL

  • The Multi-ASIC Installer runs on any *nix environment (ubuntu, ethos, fedora, mac osx, windows wsl) local to your ASIC network.
  • The *nix environment needs to have sshpassawksha256sumcurl installed.
  • This installer runs an asyncronous ssh script that takes about 1 minute per 15 ASICs (150 ASICs will take 10 minutes)
  1. Add your vlan or include lists into your Remote Config File (see example)
    NOTE: Each vlan must look like 10.8.250.0-255 (last octet is a range)
  2. Open your terminal.
  3. Become root with sudo su
  4. Installsshpassawksha256sumcurl if your *nix environment does not have them, examples:
    • ubuntu, debian: apt-get -fy install sshpass
    • ethos: apt-get-ubuntu -fy install sshpass
    • fedora, centos: yum -y install sshpass
    • mac: follow homebrew installation instructions, then brew install http://git.io/sshpass.rb
    • windows wsl:apt-get update; apt-get -fy install sshpass
    • ubuntu 20.04:
      1. being root is not recommended. instead, be a normal user.
      2. sudo apt-get -fy install sshpass
      3. mkdir ~/.ssh && chmod 700 ~/.ssh
      4. touch ~/.ssh/config && chmod 600 ~/.ssh/config
      5. add the below definition into ~/.ssh/config (using nano or your favorite text editor)
  5. Follow the Quick Start Guide to generate your installer script.
  6. Copy-paste the line under MULTI-ASIC INSTALLER into your terminal and press ENTER.
  7. Watch the asyncronous installer output. When there is no more output (check by pressing ENTER a few times), installation is finished.

Including and Excluding lists of IPs in the Multi-ASIC Installer

These options are specified in your Remote Config File.

You can include additonal lists (optional) of ASIC IPs by adding include lines.
include http://any.remotely.reachable.url/include_list.txt
include http://another.remotely.reachable.url/another_include_list.txt

You can exclude lists of ASIC IPs (optional) to prevent them from re/installing ASICseer by adding exclude lines.
exclude http://any.remotely.reachable.url/exclude_list.txt
exclude http://another.remotely.reachable.url/another_exclude_list.txt

NOTE:exclude lists supersede include lists.

You can generate these lists with your Panel:

  1. Select any checkbox conditions and/or versions in the checkbox interface at the top of your Panel.
  2. Select 'ip list' from the dropdown menu and press the 'submit' button.
  3. Copy-paste the URL from your browser URL bar into your Remote Config File according to the above examples.

NOTE: When using include and exclude with panelpass, you must use proper authentication in the list URLs:
https://admin:panelpass@public.asicseer.com/?showstyle=s_ips

Securing your ASIC with Passwordless Login and Public Key

To secure your ASIC and to prevent unauthorized logins, you should use passwordless public key authentication. This procedure disables passworded SSH logins and only allows the machine containing the private key to access your ASICs.

  1. Login to (or create) your *nix environment local to your ASIC network.
  2. Take appropriate precautions to secure this machine from outside users (vpn, ssh password protection, etc)
  3. Become the appropriate non-root user (usually asicseer if you followed *nix environment instructions)
  4. Run cd ~; ssh-keygen and press ENTER (~3 times) until your fingerprint is generated (do not input/select any options)
  5. Run cat /home/asicseer/.ssh/id_rsa.pub
  6. Copy your public key to your Remote Config File, starting with 'pubkey ': pubkey ssh-rsa AAAAB3gZk1XXX...this.is.a.long.string...XXX
  7. Re/install ASICseer on a single test ASIC (open multiple SSH windows/sessions to this ASIC, just in case)
  8. SSH to your test ASIC from this machine in another separate window. If everything worked, you will not be prompted for an SSH password.
  9. Re/install ASICseer on all your ASICs.

NOTE: If you can't SSH to your test ASIC in Step 8:

  1. Remove the public key from your Remote Config File.
  2. Run echo 'NO_START=0' > /etc/default/dropbear; /etc/init.d/dropbear restart on your test ASIC to remove public key authentication.
  3. Hire a security consultant to assist you with securing your network.

Writing your Config

  • Your entire farm can be controlled with a single Remote Config File.
  • Each ASIC downloads and applies the Remote Config File settings once every 10 minutes (customizable with response)
  • It may take up to 15 minutes for farm-wide Remote Config Files changes to apply to all ASICs.
  • Every line preceded with a # is considered a 'comment' and is ignored.
  • See https://asicseer.com/config.txt for an example Remote Config File.
  • All ASICseer settings, except for various usernames and passwords, are always lowercase.

Formatting Overview for One-Time Installation Settings

The following settings are used only during ASICseer installation, they are specified like setting value

  • vlan See Using the Multi-ASIC Installer on Linux, Mac, or Windows WSL
  • include See Including and Excluding lists of IPs in the Multi-ASIC Installer
  • exclude See Including and Excluding lists of IPs in the Multi-ASIC Installer
  • pubkey See Securing your ASIC with Passwordless Login and Public Key
  • congress1-200 (default is 15). Customizes concurrent installations (speed) of Multi-ASIC installer.
  • autoinstall1-60 Reruns Multi-ASIC Installer every N minutes that you specify. Requires unused DHCP leases.

Formatting Overview for Runtime Settings

After ASICseer is installed, edit your Remote Config File using the asicid setting value format to send runtime instructions to your ASICs.

  • asicid is your ASIC ID (used as the worker name if your hostname is stock) and is derived from the last 6 digits of its MAC address.
  • setting is the setting that you are applying to your ASIC.
  • value is what you are passing to the setting

Use global instead of the asicid to apply a setting and value to all ASICs with the same Remote Config File.

Panel Settings

  • custompanel takes a 12-digit alphanumeric string and sets a custom Panel using the first 6 digits. See setting custompanel.
  • panelpass takes a string which is used to password protect your Panel (if set, login is admin/panelpass)
  • autoupdate takes values yes or no. Setting to yes will update ASICseer to the latest version within 24 hours of its release.
  • location takes up to a 24-digit worker name (like rack1/rowb2/number34/shelfa5). See Customizing your Worker Name / Location)
    NOTE: location should only be applied to individual ASICs.
  • response takes values 1-20 (i.e. global response 5, default is 10 mins); altering response sets Remote Config File pull rate.
    NOTE: ConfigMaker.com does not support the response setting. This option is only for Remote Config Files hosted on other services.
  • smallpipe takes values yes or no. Setting to yes will reduce bandwidth requirements associated with panel reporting.
  • panelclear takes a value in days (ex: 1, 2, 3) and removes ASICs from your Panel if they stop reporting after panelclear days.
  • remove takes a comma-separated list of asicids and removes them from your Panel.
  • options takes a comma-separated string like global options nightmode,nocolor,chips
    • nightmode turns on nightmode
    • nocolor removes color rendering to increase loading speed
    • chips adds a hover that displays individual chip frequencies (slows down panel loading)

See Deleting/Removing ASICs from your Panel for more information.

Pool Settings

  • poolname1 is the 1st defined pool to which your ASIC will try to connect. Use format pool.com:port (don't include stratum+tcp://)
  • username1 is the 1st pool's username from your pool's site (don't define workers here, see Customizing your Worker Name / Location)
  • poolpass1 is the 1st pool's password from your pool's site (leave as x if your pool does not require a password)
  • sendworker1 takes iplocationusernamecustompanelhostregexipregex or no to assign your worker name.
  • extranonce1 ist the 1st pool's extranonce subscription status. Defaults to no and takes yes if necessary.

Using REGEX to Derive a Worker name from your Hostname

You can use a regex string to derive a worker name either your ASIC hostname or ASIC IP:

  • global sendworker1 hostregex /REGEX/STRING/
  • global sendworker1 ipregex /REGEX/STRING/

The regex-derived worker name is sent to your pool without altering your actual ASIC hostname or ASIC IP.

Pool Settings for the Failover Pools

  • poolname2,username2,poolpass2,sendworker2,extranonce2
  • poolname3,username3,poolpass3,sendworker3,extranonce3

To prevent pool-related downtime, you must have poolname1, poolname2, and poolname3 defined to at least two different pool domains/companies (see ASICseer recommendation)

Whitelabel Settings

  • customer takes an alphanumeric string to track stats across multiple Panels, replaces 'ASICseer' in Logic/BMminer Versions.
  • logo takes a world-reachable logo (global logo http://domain.com/img.jpg) and sets a company logo on your Panel / ASIC webUI.
  • icon takes a world-reachable favicon (global icon http://domain.com/icon.png) and sets it on your Panel / ASIC webUI.
  • link takes a world-reachable link (global link http://domain.com/) and sets a company link on your Panel / ASIC webUI.
  • css takes a world-reachable css file (global css http://domain.com/file.css) and sets a custom css template on your ASIC webUI.
    NOTE: the css option replaces /css/cascade.css (click for source) on your ASIC.

Setting an Operator Fee

The owner of the Remote Config File is typically the operator of the ASICs. In some cases, the operator and the actual ASIC owner are not the same entity. In this case, the owner and operator may decide on a revenue share agreement using the operator fee. The operator can set an additional pool and fee percentage. The operator fee instructs healthy ASICs to mine a certain percentage of the time to the operator pool.

  1. Make a new account at your preferred pool. This account will be dedicated to your fee.
  2. Add the above stanza to your Remote Config File.
    NOTE: In this example, if your panel is abc123.asicseer.com, your fee worker name is feeaccount.abc123
  3. Change poolname-operator and username-operator to the operator pool and username.
  4. Change operator to a value between 1-100 (this is a percent)

The operator fee will trigger randomly every four hours, and mine to the operator pool equal to the operator percentage. You can increase operator payouts by repairing and triaging ASICs, or by increasing the operator percentage value.

Power Settings

  • asicboost takes values yes or no. Setting to yes will increase hashrate.
  • autotune takes values yes, no, fancheck, or a numeric value.
    • yes allows autotuning and increases hashrate.
    • no prevents autotuning.
    • fancheck prevents autotuning and sets fans to 100% (for visual checking of broken fans)
    • X (replace X with a numeric value) limits tuning to X cycles.
  • allowed takes values yes (allows mining), no (prevents mining), contact (prevents mining, provides ability for fast power-up)
    API Method:echo 'ascset|miner-enabled,0' | nc ip.of.asic 4028 or echo 'ascset|miner-enabled,1' | nc ip.of.asic 4028
  • maxwatts takes a watt value as low as 400, and sets target/max watts for your ASIC. Increasing this value will increase hashrate.
  • throttle takes values 25-200, which throttles your maxwatts setting if maxtemp is reached (see Reducing Facility Overheats)
Sshpass Osx

Temperature Settings

  • maxtemp takes two values: temp in Chours (default 90 6) and is used for overheat protection and the cool-down period.
  • maxfan takes: maxfan 20 up to maxfan 100 (air cooling) or maxfan liquid 0 up to maxfan liquid 25 (immersion)
  • exhaust takes values 0-100 (default 50), which helps facility exhaust by running fans even during cool-down periods.

Advanced Settings

  • threshold takes values 1-50 (i.e. global threshold 3, default is 3); increasing threshold reduces tuning aggressiveness.
  • hpc takes values 60-120 (i.e. global hpc 97, default is 97); using hpc adjusts chip tuning and may alter hashrates/efficiency.
  • mvt takes values 5-95 (i.e. global mvt 25, default is 25); using mvt adjusts voltage tuning and may alter hashrates/efficiency.

LED Settings

examples:

global blinkgreen hashrate
global blinkred idle

status
hashrateblinks faster as hashrate increases, solid if tuning
idleturns on light if ASIC is not mining
fanturns on light if a fan is not detected and blinks if a fan is degrading
hashboard detection(use both)
blinkgreen boardblinks GREEN light extremely rapidly if all hashboards are ALIVE, turns it OFF if any hashboards are DEAD
blinkred boardblinks RED light extremely rapidly if any hashboards are DEAD, turns it OFF if all hashboards are ALIVE
NOTE: You can specify a chain like: global blinkred board 7 to ONLY blink RED if the specified chain/board (i.e. middle board) is down.
manual
rapidblinks rapidly
solidsolid light
normalblink speed similar to stock firmware
offno light
morse code
sosblinks sos in morse code
workerblinks the worker name in morse code
ipblinks the ip in morse code
panelblinks the panel name in morse code
locationblinks the location in morse code

ASIC Troubleshooting Settings

The below settings take an incrementing value. If the value is higher than the previously used value, the setting will reapply. Because of this, it is recommended to use the unix timestamp (1616810077) for these settings, as it will always be higher.

  • asicid gethelp 1616810077 sends a gethelp diagnostics file to ASICseer support staff (replace asicid with your ASIC's asicid)
  • global retune 1616810077 retunes your ASICs.
  • global reboot 1616810077 reboots your ASICs.
  • global uncork 1616810077 deletes throttle data from your ASICs.
  • global reset 1616810077 resets your ASICs as if you had just installed ASICseer for the first time.

Applying Settings by Location

You must have locations defined to apply settings using locations. group= searches the beginning of your location for a string and applies your setting to any ASIC location that has a match. The locationmust start with the string to match.

The below example reboots ASICs with a location starting with rowc, and stops mining on ASICs with a location that has rowd in it.

Applying Settings by CIDR

Applying Settings by CIDR is useful if you have farms separated by IP ranges. cidr=10.8.200.0/21 matches all ASICs with IPs in a specific CIDR range and applies your setting to those ASICs.

The below example assigns a specific custompanel to a specific CIDR range.

cidr=10.8.200.0/21 custompanel 5xcolo123456 (all ASICs in 10.8.200.0/21 will then report to 5xcolo.asicseer.com)

Applying Settings by Model

Applying Settings by Model is useful if you have different ASIC models. model= searches the beginning of your ASIC model for a string and applies your setting to any ASIC model that has a match. The model must start with the string to match.

The below example reboots T9+ ASICs.

model=T9+ reboot 1616810077

Efficient chain switching between BTC and BCH

You can automatically switch to BCH mining whenever the BCH chain experiences low difficulty periods by adding a BCH pool endpoint to your Remote Config File.

  1. Add the above stanza to your Remote Config File.
  2. Change poolname-bchdiff and username-bchdiff to your own BCH pool and username.
  3. Make sure poolname1 is a BTC pool.

Now, you will automatically switch to your BCH pool whenever the BCH chain difficulty is low.

Customizing your Worker Name / Location

You can use one Remote Config File for all ASICs. Specifying multiple workers does not require separate Remote Config Files.

To switch your worker name and assign a location:

  • either change your ASIC hostname on the ASIC itself, OR
  • set asicid location customxname in your Remote Config File (asicid is your 6-digit asicid, customxname is your new worker name)
    example:ab34ef location rowc2
  • Do not add a customxname to username[1-3]
    • correct: global username1 poolusername
    • not correct: global username1 poolusername.customxname
  • Do not use the same worker name for multiple ASICs.
  • Do not exceed 24 characters for your worker/location names (to ensure maximum pool compatibility)

For more advanced worker settings, see Pool Settings.

Assigning Worker Names / Locations with the IP Report Button

If you use hostnames to manage your worker names and ASIC locations, ASICseer will use them to set Worker Names / Locations during installation. If you have a big farm and don't know where any of your ASICs are located, you can order them with the IP Report button.

NOTE: It is important to do the below steps when your Internet is stable, and your ASICs are online and reporting.

  1. After installing ASICseer, go to your Panel. Then, physically go to your first Rack ('Rack A') and decide on an order for your ASICs.
  2. Press and hold the IP Report button for 5 seconds on each 'Rack A' ASIC in order, one by one (wait at least 3 seconds between press-holds)
  3. Wait at least 3 minutes.
  4. Your Panel will show a number in the 'ipr' column (seconds ago that the IP Report button was pressed)
  5. Select 'assign workers' from the dropdown menu and press the 'submit' button.
  6. Set your worker names like: a1,a2,a3...
  7. Continue this process for all rows/racks. If you press the IP Report button on all ASICs in your preferred order, they will be ordered correctly.

Remotely Rebooting ASICs

If your ASICs are reachable (i.e. they don't have a ❌ condition), you can reboot them remotely using your Remote Config File.

  1. Go to your Panel.
  2. Select any checkbox conditions and/or versions in the checkbox interface at the top of your Panel.
  3. Select 'reboot manager' from the dropdown menu and press the 'submit' button.
  4. Your Panel will generate settings for your Remote Config File to reboot your affected ASICs.
  5. Copy-paste the entire output into your Remote Config File.

Reducing Facility Overheats

Due to environmental conditions (fan health, physical location, airflow, poor facility design, etc) not all ASICs can operate at the same maxwatts setting. Using the below settings, you can maximize hashrate by allowing ASICseer to tune your entire facility to the individual highest possible hashrate of each ASIC.

Overheats should not be considered normal. If an ASIC overheats, it will enter a 6 hour cool-down period (1 is the smallest possible value). The cool-down period is necessary to avoid cascading heat-related facility-wide failures.

With the above settings, each ASIC will...

  • start mining/tuning at 1440 watts.
  • trigger an overheat and will enter a cool-down period if any hashboard reaches 90C.
  • restart mining automatically after a 6 hour cool-down period.
  • throttle maxwatts by 100 watts (1340, 1240, 1140, ...) each time an overheat is triggered.

The minimum and maximum settings for throttle (an optional setting) are 25-200 watts. Using the above settings, each ASIC will tune to its highest possible maxwatts setting automatically, with as much granularity as you prefer.

Temperature Legend

  • previously throttled
  • 🧯
    continuously throttled
  • currently throttled
  • 🌶️
    currently overheated
  • ambient temperature fluctuations
  • ❄️
    too cold

To restore throttled ASICs back to their original maxwatts setting, add this line to your Remote Config File:
global uncork 1616810077 (use the asicid instead of global)

ASICs throttling/overheating due to unaddressed environmental conditions will throttle/overheat again even after uncork is run.

You can use LED settings to find ASICs with temperature problems, and diagnose them for physical problems or environmental conditions. You can also physically swap ASICs in your farm.

ASICs that are too cold cannot maintain their hashrates. Decrease or block facility airflow and exhaust in sections of your facility that have an abnormal amount of cold ASICs.

Managing Temperature

If any hashboard temperature exceeds maxtemp, mining will turn off for the amount of hours defined (default 6)

Follow the below steps to reduce the chances of your ASICs overheating:

  • Set maxfan to a higher value (NOTE: higher maxfan settings increase watts and reduce fan lifespan)
  • Set maxwatts to a lower value (this will retune your ASIC)
  • Set maxtemp to 90 if it has been set lower.
  • Observe fans: repair broken fans, missing fan blades, and/or remove loose material obstructing fan movement.
  • Remove obstacles: remove airflow obstacles such as cables, connectors, racks, etc, which may impede airflow.
  • Balance temperature: swap the overheated ASIC with one that is closer to the floor.

Setting a Custom Panel

ASICseer assigns a 6-character Panel based on a hash of your external IP. This way, all ASICs on one network can report to the same Panel.

If your public IP changes, your Panel link will change.

You can set your own Custom Panel with the custompanel parameter.

  • Set global custompanel publicsecret in your Remote Config File (must be the same exact 12 alphanumeric characters on all ASICs)
  • public (EXACTLY 6 ALPHANUMERIC CHARACTERS) is your preferred Panel ID.
  • secret (EXACTLY 6 ALPHANUMERIC CHARACTERS) is your private key.
  • Example CORRECT usage: global custompanel suresh987abc will make all your rigs report to https://suresh.asicseer.com
  • Example INCORRECT usage: global custompanel suresh will do nothing.

Deleting/Removing ASICs from your Panel

Automatic Removal

  1. Adjust the panelclear parameter as described in Writing your Config.
  2. ASICs on the latest ASICseer version will be removed after panelclear days.
  3. ASICs on older ASICseer versions will be removed after panelclear + another 10 days.

Manual Removal

  1. Select any checkbox conditions and/or versions in the checkbox interface at the top of your Panel.
  2. Select 'remove units' in the dropdown menu and press the 'submit' button.
  3. Paste the resulting line beginning with global remove into your Remote Config File.

NOTE: You can adjust the ASICIDs in the global remove line to suit your preferences.

Forcing Remote Config and Panel Sync

Sometimes, you may need to sync your Remote Config File to your ASICs.

For a Single ASIC

Navigate to your Miner Configuration page and press the sync config and panel button.

For Multiple ASICs

NOTE: This is an intensive script and is not meant to be run regularly.

Updating to the Latest ASICseer Version

When a new version is released, your Panel will alert you.

It is highly recommended to keep global autoupdate yes in your Remote Config File. ASICseer drops support for all previous versions whenever a new version is released, in line with an aggressive development schedule. If any issues occur with previous versions, no support will be provided until you update.

NOTE: There is no difference between updating and installing ASICseer. You can always update by re/installing ASICseer.

If some ASICs miss their update, update them by either re/installing ASICseer or by using the below example methods.

For a Single ASIC

  • run the following command directly on the ASIC:
    curl -s -k https://install.asicseer.com/deploy/a/autoupdate | sh

For Multiple ASICs

  1. Add include http://any.remotely.reachable.url/include_list.txt to your Remote Config File (like the one from your Panel)
  2. Add # in front of all other vlanincludeexclude definitions to comment them (like #vlan)
  3. Re-run the Multi-ASIC installer to update/reinstall ASICseer on just the ASICs running older versions.

Importing a CSV of your Panel into Google Sheets

  1. Open the ASICseer API Example Sheet.
  2. This opens a read only sheet. To be able to edit the sheet, select 'File' -> 'Make a Copy' in the top left and press OK.
  3. Edit the A2 cell to reflect your 6-digit Panel name.

Note: Google Sheets does not support native authentication. If you have a panelpass specified, add your panelpass in cell B2

Using JSON API to load per-Panel or per-ASIC Data

Using historical API

The following API endpoints can load historical monthly per-Panel and per-ASIC data, useful for enterprise-class customer billing purposes.

https://asicseer.com/api/type-call/panel/month

examples using 02 (the last month):

  • https://asicseer.com/api/panel-kwh/asdemo/02 · per-panel kilowatt-hours (Google Sheet)
  • https://asicseer.com/api/panel-hash/asdemo/02 · per-panel hashrate (Google Sheet)
  • https://asicseer.com/api/asic-kwh/asdemo/02 · per-asic kilowatt-hours (Google Sheet)
  • https://asicseer.com/api/asic-hash/asdemo/02 · per-asic hashrate (Google Sheet)

How to load ASICseer API data in Google Sheets

  1. Open the ASICseer API Example Sheet (this example has an JSON loading function in the 'Tools' -> 'Script Editor' menu item)
  2. This opens a read only sheet. To be able to edit the sheet, select 'File' -> 'Make a Copy' in the top left and press OK.
  3. Select one of the API tabs at the bottom.
  4. Edit the A2 cell to reflect your 6-digit Panel name.

Note: Google Sheets does not support native authentication. If you have a panelpass specified, change the D2 cell to the below:

https://asicseer.com/apisecure/type-call/panel/month/panelpass

Using Nicehash for Mining

For mining on Nicehash, use only Nicehash AsicBoost endpoints and extranonce subscription.When Nicehash prompts you to 'select algorithm', select SHA256-AsicBoost. ASICseer will automatically rewrite non-AsicBoost Nicehash endpoints to AsicBoost ones.

If you don't want to set up an account, you can use a wallet address as your pool's username.

Use the following stanza as a guide for mining on Nicehash.

Using SSH to Login to ASICs from Windows 10

  1. Set up your *nix environment.
  2. Connect your computer to the same network as your ASICs, using VPN, or by SSHing to a jump box.
  3. Find the IP of your ASIC (either on your Panel or on your router DHCP client table)
  4. In your terminal, ssh -v root@ip.of.your.asic
  5. Enter your ASIC SSH password when prompted.
  6. A list of available commands will appear.

Copy-pasting Text: In Windows, CTRL+C copies text. In Windows WSL, CTRL+SHIFT+V pastes text.

List of Common ASICseer Terminal Commands

Clearing your ASIC MAC addresses to Prevent Conficts

In large farms, there may be conflicting MAC addresses that result in multiple ASICs appearing as if they are one device. This results in arp conflicts, incorrect reporting, etc.

If you see multiple ASICs with the same MAC address, you should regenerate the MAC address on your ASIC and then reboot it:

rm /config/mac && sync && sleep 1 && reboot

Identifying Faulty Hashboards

Many people who install ASICseer are surprised to see faulty hashboards after tuning is complete. Don't shoot the messenger.These faulty hashboards existed before you installed ASICseer, you just did not know about them.

See the Restoring Hashboards guide for a detailed explanation regarding how to fix faulty hashboards.

Review the following points:

  • ASICseer has developed robust error reporting using metrics from tens of thousands of ASICs.
  • The ASICseer error reporting matches pool-side hash losses accurately.
  • Pool-side hash is the most accurate metric for determining whether or not hardware is faulty.
  • It is not correct to rely on potentially false-negative data provided by stock and/or other firmware.
  • It is not possible to fix faulty hashboards with software, regardless of the firmware that you're running.
  • Faulty hashboards are usually the result of physical hardware problems.

If your ASIC has identified a faulty hashboard, it will show a 🔗 or 🔘. You can identify the faulty hashboard using the Panel and the [ | ] hashboard detection symbols.

The below symbols identify which hashboard is detected and working fine from the exhaust side.

  • [ left hashboard (chain6) detected and working fine.
  • | middle hashboard (chain7) detected and working fine.
  • ] right hashboard (chain8) detected and working fine.

Using the Global Hashrate Viewer

If you manage many different Panels, you can set a company name to track hashrates across all of them.

Removal of 'braiins' Firmware (and ASICseer Installation)

Use the asicseer_installer tool to remove 'braiins' firmware.

Controlling Power Usage based on Scheduled Power

If your facility has special requirements for scheduled power usage, you can use a php script to serve your Remote Config File.

  1. Set up your own Remote Config File Server.
  2. Run: mkdir -p /var/www/html/config && curl -o /var/www/html/config/index.php http://p.asicseer.com/raw/omcpl
  3. Run: nano /var/www/html/config/index.php to edit your script.
  4. Re/install your ASICs using your Remote Config Link: http://ip.of.your.server/config/

Uninstalling ASICseer and/or Restoring to Factory Settings

Using the IP Report Button

Use the 'Restore via IP Report Button' functionality as described in Point 3 of the Bitmain© factory restore guide.

Using the WebUI firmware Upgrade Page

  1. Download the correct Bitmain© firmware for your ASIC.
    NOTE: Be careful, any Bitmain© firmware described as having a 'security' or 'secure' firmware actually prevents SSH to your ASIC.
  2. Navigate to the ASIC webUI firmware upgrade page and upload the Bitmain© firmware to your ASIC.
  3. This will restore all settings and pools to factory settings.

Powerful and Advanced

Robust

Use ./asicseer_installer -u any.firmware.tar.gz ip.of.target.asic webuipass

For robust ASICseer un/installation tools, restoring SSH, and removal of foreign firmwares, use the asicseer_installer tool.

Get Immediate 24/7 Support via Telegram

Free 24/7 support: Free lifetime support 24/7 via the ASICseer Support Group.

Contact info@asicseer.com for an invitation.

Contacting the ASICseer Team

Direct all Media and Business inquiries to info@asicseer.com

See Get Immediate 24/7 Support via Telegram for access to the ASICseer Support Group.


1.ADALM2000简介¶

ADALM2000主动学习模块配套硬件和外设:

  • 带差分输入的双通道示波器
  • 双通道任意函数发生器
  • 16通道数字逻辑分析仪(3.3V CMOS,容差范围1.8V~5V,速率100MS/s)
  • 16通道模式发生器(3.3V CMOS,速率100MS/s)
  • 可用于连接多个仪器的双输入/输出数字触发信号(3.3V CMOS)
  • 双通道电压表(交/直流 ±20V)
  • 网络分析仪——电路的伯德图、奈奎斯特图和尼科尔斯传输特性曲线,范围:1Hz ~ 10MHz
  • 频谱分析仪——功率谱和频谱测量(噪声基底、无杂散动态范围、信噪比及总谐波失真等)
  • 数字总线分析仪(串行外设接口、I²C、通用异步收发传输器、并行)
  • 两个可编程电源(0…+5V、0…-5V)
  • 用于主机连接流数据的USB
    • USB 2(480 Mbps)
    • 用于与RF设备通信的libiio USB设备
    • 网络设备
      • 远程网络驱动接口规范(RNDIS)
      • 默认情况下IP地址为 192.168.2.1
    • USB串行设备
      • 通过USB通信设备类抽象控制模型(USB CDC ACM)规范访问M2K设备上的Linux控制台
    • 大容量存储设备:主机会将其识别为一个磁盘,磁盘里您将能看见软件更新链接和设备序列号
  • 外部电源
    • 外部适配器 (可选用此款来自 Seeed 的适配器)

1.1 为什么叫 “ADALM2000”¶

“ADALM2000”名称延续自第一代产品“ADALM1000”,ADALM2000的性能相比前一代产品有了很大的提升。与昂贵且体积庞大的传统实验设备不同,它将高性能实验设备缩小到口袋大小,为电气工程专业的学生和爱好者们探索频率达数十兆赫兹的信号与系统提供了便利条件。

1.2 ADALM2000 内部概览¶

模块图

引脚图

接线图

2.快速入门指南¶

对于大多数不熟悉产品或未仔细阅读说明书的用户,以下是快速启动的基本操作:

  • 1、安装驱动程序
    • Windows、Linux 或 MAC
  • 2、连接USB,检查设备是否正常工作
    • Windows、Linux 或 MAC
  • 3、安装 Scopy

3.软件介绍及设备驱动安装¶

3.1 Windows Driver (驱动)¶

ADALM-PLUTO和ADALM2000的软件有几个方面不同:

  • 设备驱动程序,它允许您的PC正确设置PC和实际设备之间的通信。
  • 应用程序代码,比如MATLAB, Simulink, GNU Radio, iio-oscilloscope (即osc),或scopy

下载和运行 driver installer 即可安装驱动程序。

Tip

安装包支持Windows 10, Windows 8.1, Windows 8, Windows 7 Service Pack 1。如果遇到问题,请向我们反馈。

完成后,您应该会看到如下图片所示的:

3.1.1 驱动卸载¶

进入控制面板,选择程序和功能,双击或右键选择卸载。卸载 PlutoSDR-M2k-USB-Win-Drivers 程序包时会自动卸载 Windows Driver Packages (USBser, WinUSB和Net)。

3.1.2 USB设备¶

安装驱动程序并插入设备(Pluto or M2K)后,以下子系统将会可用:

  • USB复合设备(单个USB装置内含多种功能,在操作系统中显示为多个设备)
  • USB以太网/RNDIS装置(远程网络驱动接口规范 RNDIS 是主要运用在USB上层的微软专有协议,它为大多数版本的 Windows, Linux及OS X操作系统提供了虚拟以太网连接。对于主机而言,USB设备就是一张外部以太网卡。)
  • USB大容量存储(USB大容量存储是由USB开发者论坛定义的一系列协议,它让任何主机计算设备都能访问这台USB设备,并允许主机和USB设备之间进行文件传输。对于主机而言,USB设备就是一个外部硬盘驱动器。)
  • 串行控制台(115200-8N1),在COM15上表示为此,但在您的PC上会有所不同。
  • IIO USBD。
  • Linux文件保存装置USB设备(确保USB大容量存储正常工作)

3.1.3 串行端口¶

您需要找到您最喜欢的终端程序,这里列举了一些我们使用的程序。(我们不提供支持,如果遇到问题,请自行查询网络或谷歌。)

  • 或者其他终端程序

终端设置为115200波特、8位、无奇偶校验、1位停止位,表示为115200-8N1。默认用户名为 root,根密码为 analog

找到串行端口(它会随着您每次插入设备而改变)以检查设备管理器(见上文)。

3.1.4 大容量存储¶

打开驱动器,以下图为例,双击进入D盘以访问info.html页面。

3.1.5 以太网¶

Danger

  • 像Pluto或M2K上的大部分网络设置一样,以太网的使用非常方便,但这也意味着伴有一定的风险。
  • 例如,Pluto的根密码是 analog,我们将其发布到网上,这可能导致有人通过IP连接控制此设备并将其用于恶意目的。
  • 在网络和Pluto默认映像连接时,请勿将该网络直接连上互联网。

很遗憾,主机不能解析USB设备的IP地址,您在任何类型的网络工作之前都需要知道这一点。要确定IP地址,这里会介绍两种主要的方法:

  • 1.确定IP地址

IP地址是由设备设置的。进入ADALM-PLUTO大容量存储设备,在 info.html 页面可以找到相关信息。进入页面后,点击页面顶端的 version

然后就可以看到Pluto和主机的IP地址。

在此例中,Pluto设备的IP地址为 192.168.2.1(默认下所有设备都是如此),如果您需要改变IP(如果您有多个设备)时,请查看 customizing Pluto 文档。

  • 2.从串口查看

打开您常用的串行应用程序, 您将看到如下的界面:

  • 3.IIO 设备

IIO设备显示在设备管理器中,您可以让它与设备建立本地连接。打开Windows控制台,您应该会看见以下内容:

3.2 Linux Driver (驱动)¶

Sshpass Osx

请先确保内核中安装了以下模块:

  • cdc-acm,cdc_ether
  • rndis_host
  • rndis_wlan
  • usbnet

大部分现在发行的版本中,默认情况下以上模块均会被安装和编译,您只需将USB数据线插入Linux设备。我们在以下系统中进行了测试和验证:

  • Ubuntu 16.04 LTS
  • Red Hat Enterprise Linux 7 1)
  • SUSE Linux Enterprise Desktop 12 2)
  • Debian 8.x
  • Debian 9.1
  • SUSE Leap 15

1) 我们的支持服务遵循Red Hat关于RHEL次要版本的支持政策。

2) 我们的支持服务遵循SUSE关于Enterprise Desktop次要版本的支持政策。

ADALM-PLUTO和ADALM2000在其他发行的版本中可能也能使用,但我们所能提供的技术支持十分有限。

没有root权限时,为了访问某些USB的功能,建议安装PlutoSDR或ADALM2000 udev rules。只需下载 53-adi-plutosdr-usb.rules或 53-adi-m2k-usb.rules 并将其复制到 /etc/udev/rules.d/ 文件夹中即可,您也可以使用这个 plutosdr-m2k-udev.deb package 同时安装两者。安装debian包时,使用以下两者中任意一个即可:

之后重新加载rules或重启udev时,只需使用

3.2.1 Dmesg实例¶

插入Pluto或M2K时,您可以看到内核信息:

展示以太网、串行和大容量存储三种设备及与标准Linux系统的接口程序。如果您看见了以下内容:

解决方法是使用外部集线器。

3.2.2 串行端口¶

3.2.3 大容量存储¶

3.2.4 以太网¶

Danger

  • 像Pluto或M2K上的大部分网络设置一样,以太网的使用非常方便,但这也意味着伴有一定的风险。
  • 例如,Pluto的根密码是analog,我们将其发布到网上,这可能导致有人通过IP连接控制此设备并将其用于恶意目的。
  • 在网络和Pluto默认映像连接时,切勿将该网络直接连上互联网。

很遗憾,主机不能解析USB设备的IP地址,您在任何类型的网络工作之前都需要知道这一点。要确定IP地址,这里会介绍两种主要的方法:

Sshpass Osx

基于 debian 的发行版中(我的主机也是基于debian),systemd 会产生一串字符 enx00e022d6d804,前缀 enu*(有时候是wlu*)用于解析USB端口,剩下的 00e022d6d804 指的是主机USB MAC地址。USB路径并不是一成不变或可预测的(它随着您插入的端口的改变而改变),因此这串字符并不是用来表示USB路径的。

  • SSH 配置

建议添加一个很小的文件 ssh config file,这个文件对于解析USB设备很有帮助。它保存在github中,提取原始文本文件很容易。如果您有 ~/.ssh/config 文件,您可以跳过这步。如果您没有,点击此链接,将其复制粘贴进系统文件 /etc/ssh/ssh_config 中或用户指定文件 ~/.ssh/config 中。

每次Pluto启动时ssh key都会改变,因此我们希望从不保存 key (所以我们将它保存在 /dev/null)。由于不用一直编辑 known_hosts 文件,操作会变得简单,但却容易遭到攻击。

如果您安装了 sshpass,则不需要手动输入密码:

  • IIO devices

对于SUSE,进入https://software.opensuse.org/package/libiio 选择 repo 并一键安装。

确保您可以找到IIO设备:

从IIO设备缓存区中读取:

3.3 Mac OS X Diver (驱动)¶

确保安装以下驱动程序:

  • HoRNDIS(发音为“horrendous”)是一个Mac OS X驱动程序,它允许用户使用RNDIS通过网络访问Pluto,匹配Mac OS X版本10.6.8到10.12。虽然安装时您需要注意某些驱动程序,但经过测试,HoRNDIS在作者本人和其他人的PC上能全时运行。然而毕竟RNDIS是微软指定的规范,苹果是不可能原生支持的。

驱动程序和文件应该兼容:

  • macOS El Capitan 10.11
  • macOS Yosemite 10.10

安装完成后会要求重启电脑。

3.3.1 串行端口¶

3.3.2 大容量存储¶

3.3.3 以太网¶

Danger

  • 像Pluto或M2K上的大部分网络设置一样,以太网的使用非常方便,但这也意味着伴有一定的风险。
  • 例如,Pluto的根密码是 analog,我们将其发布到网上,这可能导致有人通过IP连接控制此设备并将其用于恶意目的。
  • 在网络和Pluto默认映像连接时,请勿将该网络直接连上互联网。

Sshpass Linux Install

很遗憾,主机不能解析USB设备的IP地址,您在任何类型的网络工作之前都需要知道这一点。要确定IP地址,这里会介绍两种主要的方法:

当 HoRNDIS 安装完成后,当您点击System Preferences → Network时应该看见以下内容:

程序正确安装时,dmesg 中会显示:

SSH 配置

建议添加一个很小的文件 ssh config file,这个文件对于解析USB设备很有帮助。它保存在github中,提取原始文本文件很容易。如果您有 ~/.ssh/config 文件,您可以跳过这步。如果您没有,点击此链接,将其复制粘贴进系统文件 /etc/ssh/ssh_config 中或用户指定文件 ~/.ssh/config 中。

每次Pluto启动时ssh key都会改变,因此我们希望从不保存 key (所以我们将它保存在 /dev/null)。由于不用一直编辑 known_hosts 文件,操作会变得简单,但却容易遭到攻击。

如果您安装了 sshpass,则不需要手动输入密码:

4.ADALM2000 (M2K) 固件更新¶

更新固件最简单的方法是使用包含在默认映像里的大容量存储设备,但当用户不使用默认映像时该方法可能失效。

Attention

将其他固件映像加载到M2K这样的设备时存在一定的安全风险。由于我们的学习工具向来都是开放且无障碍的,请从受信任途径获取固件映像。

ADI 默认固件镜像下载地址:

以上 ZIP 下载包里应该包括以下文件:

文件名用途
boot.dfu用于第一阶段引导加载程序和U-boot
boot.frm第一阶段引导加载程序和U-boot的配置环境
m2k.dfuM2K固件的 DFU 文件,内含FPGA位文件、Linux内核(所有驱动)和基于RAM的文件系统
m2k.frmM2K固件的 固件 文件,内含FPGA位文件、Linux内核(所有驱动)和基于RAM的文件系统
uboot-env.dfu包含默认U-boot 配置环境的 DFU 文件

4.1 使用大容量存储更新¶

m2k.frm 复制到大容量存储设备中,然后将其弹出。LED1将会快速闪烁。

4.1.1 Windows/OSX 固件更新¶

  • 1、打开M2K大容量存储设备
  • 2、下载并打开固件文件
  • 3、将文件复制到大容量存储设备
  • 4、弹出大容量存储设备(不要强行拔出)
  • 5、LED1开始闪烁,这意味着设备正在执行程序,期间请勿移除电源(或USB),过程大约4分钟。
  • 6、稍等片刻,请勿提前拔出设备。
  • 7、程序执行结束,大容量存储设备将重新显示出来。
  • 8、移除设备并正常使用。

4.1.2 Linux 固件更新¶

GUI

Command Line (命令行)

与GUI指令完全相同,复制文件、弹出设备和重启设备。由于弹出需要基础设备,操作会相对复杂一些。(需要 /dev/sdb 而非 /dev/sdb1

4.2 使用 DFU 更新¶

USB Device Firmware Upgrade (DFU) 是由 USB 开发者论坛提供的官方 USB 设备类型规范。它指定了一种与供应商和设备无关的更新USB设备固件的方法。其思路是保留一个独立于供应商的升级工具作为操作系统的一部分,之后可以下载到设备中(给定一个特定的固件映像)。固件升级期间(M2K处于DFU模式时),M2K改变操作模式(不再使用标准PID/VID,而是成为一个闪存编程器)。

4.2.1 进入 DFU 模式¶

  • 如何手动进入DFU模式?

通常情况下,推荐的固件升级是通过大容量存储设备。手动进入DFU模式有三种方法:

  • 1、用牙签、回形针之类的小物件按压设备按键,并接上USB数据线供电。

  • 2、在设备Linux控制台中输入device_reboot sf。进入控制台有三种方法:

    • USB控制台USB CDC ACM,即使用putty、minicom或tera Term等串口工具的ttyACM0
    • 使用 ADALM-JTAGUART 的 UART 工具台
    • 使用 ssh/slogin 的网络控制台
  • 3、直接在U-boot串行控制台中输入:run dfu_sf。只有使用 ADALM-JTAGUART 时才能访问 uboot 命令控制台

  • 设备何时会自动进入DFU模式?

启动多组件FIT(Flattened Image Tree)映像失败时设备将进入DFU模式,原因可能是之前的固件更新错误或损坏导致的校验失败。

  • 如何检查设备是否处于DFU模式?

设备处于DFU模式时,DONE LED灯灭而LED1灯常亮.

4.2.2 在 DFU 模式下更新¶

如何使用DFU模式更新固件?如何重写uboot默认环境?

  • Windows

M2K 驱动程序包捆绑了一个 dfu 小程序。UPDATE.BAT 是简化升级过程的 Windows 命令控制台批处理脚本。

  • 1、下载并保存 UPDATE.BAT
  • 2、下载并解压最新的 M2k release
  • 3、打开Windows命令提示符
  • 4、以m2k.dfu文件所在路径执行UPDATE.BAT。(如果需要重写默认的uboot环境,使用 uboot-env.dfu文件)
  • 5、等待脚本执行完毕
  • Linux

m2k.dfu 是 dfu 格式的固件文件

  • OSX

OSX 默认安装是不含 dfu-util 文件的,您可以使用 brew 指令进行安装

升级固件与Linux相同:

m2k.dfu 是 dfu 格式的固件文件

5. Scopy 使用指南¶

Scope是一个具有强大信号分析能力的多功能软件工具包。

6. Alice 使用指南¶

本文档用作ALICE桌面软件界面的用户指南,该界面是为与ADALM2000主动学习工具包硬件一起使用而编写的。