Introducing KnCMinion – A pimped UI for the KnC Titan miner

KnCMinion

User-interfaces for cryptocurrency-miners are notoriously old-fashioned. A machine such as the Titan, priced in the $10000-range, deserves a better user-interface.

KnCMinion is my way of giving back a more modern and beautiful UI to KnC and the mining-community.

Titan UI – Before

before
The original interface only provides the most basic information. (The HTML is, by the way, generated by a server-side bash-script, yuck!)

Titan UI – After

light
The KnCMinion interface is located in a subdirectory (/kncminion) and is designed to provide a bit more information. It creates client-side graphs of historical values as long as the page is open (it will start empty each time, as no data is stored on the Titan).

KncMinion is built using CoffeeScript, AngularJS, D3.js, Bootstrap and jQuery and adapts to different resolutions and devices.

The top graph is the total hashrate (in MHs) for the miner. The smaller graphs below represent the hash-rate of each individual die for every cube on the Titan (4 dies per cube). In my case one die is not working for one cube, hence only 15 graphs. Each graph displays the min/max and current value for the selected duration.

dark
KnCMinion comes with two built-in themes, but is easy to extend with new ones.

Screencast

Static images does not really give KnCMinion justice, checkout the video of the UI in action below!


Security?

This IS a security-related blog, so where does all this fit in the picture?

When developing KnCMinion, I came across some things about the Titan that made my life easier but also posed some security-risks.

Problem

KnCMinion is packaged as a firmware-upgrade file, but it only adds new files to the web-server and does not touch any existing files or affect anything mining-related.

The problem here is that I, without any connection to KnC, was able to create a valid firmware-upgrade file that can be installed on the Titan.

This means that i could create a custom package and trick people to install something that is malicious, for example a custom BFGMiner that mines for me when they are not looking or something that lets me access their network.

Solution

Best-practice regarding upgrade-files that execute with root-privileges are that they should be signed, and the signature should be checked before executing code and writing files to persistent storage.

Download

Firmware-image(s) are available on github: https://github.com/p4fg/kncminion/releases.
Just download the file and upload it as any other firmware upgrade. As it only adds files to the web-server it is compatible with all current official firmware releases.

The source-code and complete development-environment are also on github: https://github.com/p4fg/kncminion

As this in fact means that you are installing non-sanctioned, unsigned software on your Titan, you really should inspect the contents of the firmware-file. It is a standard .tar.gz and can be unpacked with standard tools on linux or with 7-zip on Windows.

Other miners

If KnC or any other manufacturer happens to read this and is interested in officially (or unofficially) taking their UI to the next level, contact me! My email is on the bottom of the page.

Disclaimer

Use at your own risk, no warranty expressed or implied. Works-for-me(tm).

8 Comments

  1. […] – For more information and to download the KnCMinion UI for the Titan Scrypt ASIC… […]

  2. […] – – – – To learn more and also to download and install the KnCMinion UI for the Tita… […]

  3. […] – For more information and to download the KnCMinion UI for the Titan Scrypt ASIC… […]

  4. David Sutherland says:

    Great job and thank you.

    Some small suggestions:
    add favicon.ico to both root and sub folder
    add (option to) red out the background of a stat box when it drops to zero
    add (option to) play a sound when hashing rate goes under an amount after it has peaked (i.e. when it stops)
    add a mute sound icon option in each box to turn off (and back on) warning sound when a die drops to zero
    add clarifying units of measure to uptime stats, 00d 01:02:03 (? 00d 01h 02m 03s)
    add option to change icons to copyright free versions. Perhaps Titan logo slowly rotating
    add a fifth row stat that is a combined graph view of all hashing power which covers the entire width of the four stats above it

  5. Rootdude says:

    Hi – and thanks… trying to install the .bin on my 1.95FW rig doesn’t seem to work. If I extract the tar.gz source from github, can you provide instructions on where to place the various files manually? Thanks!

  6. p4fg says:

    Rootdude: Rename the .bin-file to .tar.gz and unpack that. Then you can just read the runme.sh script and see what it does.

    The tar.gz-source from github is the complete dev-environment and cannot be installed as-is.

  7. joeSiT says:

    Therefore i came across a very awesome firmware mod for Kncminer Titan owners for batch 1 and two. Looks like typically the developer really has done a lot with it. It appears they are on their 12th version and it has incredibly many bells and whistles imaginable including:

    1 . Auto-bypass of dies which cause constant gentle / hard resets. The way this works: If a perish has caused more than a few soft / hard resets within 2 hours subsequently that die will be flagged for autobypass – this means monitoring of its “hashing health” will be further disregarded and the die will be itself. Its DCDC’s will still be supervised for temperature conditions even though, so if soft / tough resets are being caused by temperature issues.. these will NOT be overlooked! The list of dies bypassed is persistent across pi reboots etc, when a pass away has been bypassed a message will be shown on ADVANCED page w/ an option to clear typically the autobypass file.
    2 . Updated BFGminer to 5. 3. 0
    3. Integrated pf4g’s KNCminion webgui extension & additional a link “more goodies” about status page.

    Minor Additions:
    1 . Disabled http accessibility logging by default(option even now exists to enable in PROGRAM page).
    2 . Set bfgminer 5. 1 . 0 as default miner to be jogged (can still change it to 5. 3. 0 via SUPERIOR page).
    3. Minor tweaks to ADVANCED running bfgminer version readout.
    4. Added in reset count per pass away to /var/log/monitordcdc. log
    a few. Optimized various sections of this code additions in monitoring script.

    Also:

    CONFIGURABLE DCDC OVERHEAT PROTECTION: (The GREATEST threat to Titan masters!! ) This feature helps prevent the DCDC’s climbing around high in temp(granted temps are usually configured below 100C). Dead will be invidiually clock down by 25mhz until they can be below the DCDC temp limit specified. Dies will be deterred if 100mhz is not amazing enough.
    PROPER DIE RESETS performed when dies go into a “dead” state while mining. First attempts a number of soft resets, if those efforts fail, bfgminer is ceased, affected cube powered down, powered up then bfgminer restarted. note: will not repair permanently damaged dies.
    In addition, if certain dies were being issued nonstop soft resets via KNC’s original codes, because that will lead to a hard reset often using this code, there is a bypass_dies. conf file which manually might be edited for bypassing involving checking die status fully.
    OPTION to switch between STOCK 5. 1 . 0 BFGminer vs newer 5. 2 . not 0 BFGminer.
    Added numerous meaningful webgui stats.
    Significant changes in this release: (V. 99b)
    FAN-FAIL protection rapid The way this works is definitely, if any die DCDC’s are detected 10C over the user specified temp threshold(and DCDC protection is enabled) OR DCDC’s are above 115C(and DCDC protection is actually enabled) then those is disapated will be shut off & bfgminer restarted. A warning throughout big red letters are going to be thrown up on the CONDITION page of webgui, additionally if using the LCD, the message will switch to “Poss. Fan-Fail! ”. Both the STANDING page message & FLATSCREEN message will say what cube(as labeled per webgui innovative page) was flagged since having a possible fan malfunction.
    To clear fan-fail message on status page & LCD… a reboot of the pi will be needed. There is no way to physically detect an actual enthusiast failure as it seems there is not any sort of fan monitoring suggestions control on these panels, so thats why My partner and i came up w/ the actual rule based fan malfunction detection.

    Minor changes:
    one More options in DCDC dropdown menu
    2 . Added wall membrane watts estimation to ADVANCED page. Assumes 85% PSU effeciency plus power needed for pi, controllerboard & enthusiasts.
    3. Replaced default KNC version message on CRISTAL LÍQUIDO w/ Mod version data

    Minor fixes:
    1 . Refined hostname(minername) handling & backupname file handling
    2 . Eliminated bfgminer. sh from git & builds to avoid overwriting peoples custom command series arguments for bfgminer.

    For anybody that want to check it out, there are more pics here: http://bitcoinlasvegas.net/kncminer-titan-firmware-knc-miner-firmware-titan-firmware-kncminer-titan-customized-firmware-mod/

  8. joeSiT says:

    And so i came across a very awesome firmware mod for Kncminer Titan owners for batch 1 and two. Looks like the particular developer really has done quite a lot with it. It appears they are particular 12th version and it has incredibly many bells and whistles imaginable including:

    1 . Auto-bypass of dies which cause constant gentle / hard resets. Just how this works: If a pass away has caused more than 5 soft / hard resets within 2 hours then that die will be flagged for autobypass – which means monitoring of its “hashing health” will be further avoided and the die will be untreated. Its DCDC’s will still be checked for temperature conditions although, so if soft / hard resets are being caused by temperature issues.. these will NOT be avoided! The list of dies bypassed is persistent across pi reboots etc, when a die has been bypassed a message is going to be shown on ADVANCED web site w/ an option to clear typically the autobypass file.
    2 . Updated BFGminer to 5. 3. 0
    3. Integrated pf4g’s KNCminion webgui extension & added a link “more goodies” with status page.

    Minor Additions:
    1 . Disabled http easy access logging by default(option continue to exists to enable in SYSTEM page).
    2 . Set bfgminer 5. 1 . 0 since default miner to be went (can still change it to five. 3. 0 via SUPERIOR page).
    3. Minor changes to ADVANCED running bfgminer version readout.
    4. Extra reset count per die to /var/log/monitordcdc. log
    a few. Optimized various sections of the code additions in supervising script.

    Also:

    CONFIGURABLE DCDC OVERHEAT PROTECTION: (The MAJOR threat to Titan keepers!! ) This feature prevents the DCDC’s climbing approximately high in temp(granted temps usually are configured below 100C). Is disapated will be invidiually clock lower by 25mhz until they may be below the DCDC temp tolerance specified. Dies will be switched off if 100mhz is not cool enough.
    PROPER DIE RESETS performed when dies go to a “dead” state while gold mining. First attempts a number of soft resets, if those makes an attempt fail, bfgminer is halted, affected cube powered straight down, powered up then bfgminer restarted. note: will not resolve permanently damaged dies.
    Additionally, if certain dies have been issued nonstop soft resets via KNC’s original code, because that will lead to an overwhelming reset often using the code, there is a bypass_dies. conf file which manually is usually edited for bypassing associated with checking die status completely.
    OPTION to switch between SHARE 5. 1 . 0 BFGminer vs newer 5. 2 . 0 BFGminer.
    Added several meaningful webgui stats.
    Key changes in this release: (V. 99b)
    FAN-FAIL protection : The way this works is, if any die DCDC’s are detected 10C over the user specified temp threshold(and DCDC protection is enabled) OR DCDC’s are above 115C(and DCDC protection is definitely enabled) then those drops dead will be shut off & bfgminer restarted. A warning throughout big red letters will probably be thrown up on the STATUS page of webgui, likewise if using the LCD, the message will switch to “Poss. Fan-Fail! ”. Both the STANDING page message & FLATSCREEN message will say what cube(as labeled per webgui superior page) was flagged since having a possible fan disappointment.
    To clear fan-fail message about status page & LCD… a reboot of the pi will be needed. There is no solution to physically detect an actual enthusiast failure as it seems there is not any sort of fan monitoring or control on these snowboards, so thats why We came up w/ the rule based fan malfunction detection.

    Minor changes:
    1 ) More options in DCDC dropdown menu
    2 . Added wall watts estimation to SOPHISTICATED page. Assumes 85% PSU effeciency plus power important for pi, controllerboard & supporters.
    3. Replaced default KNC version message on CRISTAL LÍQUIDO w/ Mod version data

    Minor fixes:
    1 . Polished hostname(minername) handling & backupname file handling
    2 . Eliminated bfgminer. sh from git & builds to avoid overwriting peoples custom command line arguments for bfgminer.

    For all of us that want to check it out, a lot more pics here: http://bitcoinlasvegas.net/kncminer-titan-firmware-knc-miner-firmware-titan-firmware-kncminer-titan-customized-firmware-mod/