Skip to content

marafoundation/maratools

Repository files navigation

Maratools

English | 简体中文

Introduction

Maratools is a powerful Python desktop application designed to help Bitcoin miners manage and optimize their mining rigs. This tool simplifies the process of upgrading and updating firmware, configuring mining pools, and monitoring ASIC miners in real time. Whether you're running a small personal mining operation or managing a large-scale enterprise fleet, Maratools helps boost efficiency and streamline operations.

Key Features

  • Firmware Management: Easily upgrade and update firmware across multiple miners with batch support
  • Pool Configuration: Flexibly configure multiple mining pools, compatible with popular pool management systems
  • Bulk Operations: Manage multiple ASIC miners simultaneously to save time
  • Real-time Monitoring: Monitor miner status, hashrate, temperature, fan speed, and other critical metrics
  • Multi-Firmware Support: Support for stock firmware, MaraFW, Braiins, WhatsMiner, Avalon, and more

This tool is tailored for miners looking to maximize productivity with minimal manual effort.


System Requirements

  • Operating System: Windows 10/11, Linux (Ubuntu 20.04 or later), macOS 12+
  • Python Version: Python 3.8 or higher (3.9+ recommended)
  • Network: Stable internet connection for downloading dependencies and communicating with miners
  • Hardware: 4GB+ RAM recommended for managing large miner fleets

Quick Start

1. Install Python

If Python is not installed, download and install it from the official Python website.

Verify installation:

python --version
# or
python3 --version

Ensure version >= 3.8

2. Clone the Repository

git clone https://github.com/marafw/maratools.git
cd maratools

3. Create a Virtual Environment

Windows:

python -m venv venv

Linux/macOS:

python3 -m venv venv

4. Activate the Virtual Environment

Windows (PowerShell):

.\venv\Scripts\Activate.ps1

Windows (CMD):

venv\Scripts\activate.bat

Linux/macOS:

source venv/bin/activate

5. Install Dependencies

pip install -r requirements.txt

6. Run the Application

python main.py

The application will launch with a GUI interface.


Usage Guide

Scanning Miners

  1. Enter IP address ranges or import an IP list .txt on the left panel
  2. Click the "Scan" button
  3. Wait for the scan to complete; miner information will be displayed in the table

Selecting Miners

  1. Wait for the scan to complete; miners can be selected one at a time or multiple miners. Click and drag to select multiple miners or Ctrl + Click

Configuring Mining Pools

  1. Enter pool address, username, and password in the right panel
  2. Select the pool group to configure
  3. Select target miners
  4. Click "Set Selected" or "Set All"

Firmware Upgrade (currently only Antminer and MARAFW supported)

  1. Click "Choose Firmware" and select a firmware file (.zip or .bmu format)
  2. Select upgrade mode from the dropdown (Upgrade/Install/Revert)
  3. Select target miners
  4. Click "Update Firmware"
  5. Wait for the upgrade to complete

Monitoring Mode

  • Click "Monitor" to enable real-time monitoring mode
  • The application will periodically refresh miner status information
  • Click "Monitor" again to stop monitoring

Batch Operations

  • Reboot Miners: Select miners and click "Reboot Selected" or "Reboot All"
  • Change Password: Check "Change Password" option, enter old and new passwords, then execute


Project Structure

maratools/
 main.py                 # Application entry point
 core/                   # Core business logic
    mara_tools.py      # Main application class
    api_worker.py      # API worker threads
 ui/                     # User interface modules
    main_ui.py         # UI controller
    *.ui               # Qt Designer UI files
 config/                 # Configuration management
 themes/                 # Application themes
 resource/              # Resource files (icons, SVGs)
 utils/                 # Utility functions
 features/              # Feature modules
 requirements.txt       # Python dependencies

Configuration

The application configuration file is maratools.ini, which is automatically created on first run.

Main configuration options:

  • Display Settings: Language, column visibility, temperature highlight thresholds
  • Monitoring Settings: Monitor interval
  • Firmware Settings: Firmware upgrade interval, compatibility options
  • Logging Settings: Log level, log file path

FAQ

Q: Why can't I scan miners?

A:

  • Ensure miners and the computer running Maratools are on the same network
  • Check firewall settings to allow communication on required ports (80, 8080, 4028)
  • Verify the IP address range is correct

Q: What should I do if firmware upgrade fails?

A:

  • Check if the firmware file is complete and in the correct format
  • Confirm the miner model matches the firmware
  • Check the log file maratools.log for detailed error information
  • Some miners may require multiple attempts to upgrade successfully

Q: Which miner models are supported?

A:

  • Antminer series (S19, S21, etc.)
  • WhatsMiner series (M20, M30, etc.)
  • Avalon series
  • Auradine series
  • Other miners supporting standard CGMiner API

Q: How do I change default login credentials?

A: The application uses miners' default credentials for communication. If you've changed your miner's login password, you can configure custom credentials in "Settings".


Security Notes

⚠️ Important:

  1. Default Credentials: The default credentials (root/root, admin/admin) in the code are for demonstration and development environments only. In production:

    • Change default passwords on all miners
    • Use environment variables or configuration files to manage credentials
    • Never commit real passwords to version control
  2. Network Security:

    • Run in an isolated internal network environment
    • Avoid exposing miner management ports to the public internet
  3. Firmware Security:

    • Only use firmware files from trusted sources
    • Backup important configurations before upgrading

Development Guide

Setting Up Development Environment

# Clone repository
git clone https://github.com/marafw/maratools.git
cd maratools

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS
# or
.\venv\Scripts\Activate.ps1  # Windows

# Install dependencies
pip install -r requirements.txt
# pip install -r requirements-dev.txt  # Includes testing and linting tools

Code Style

This project follows PEP 8 coding standards. Recommended tools:

  • Formatting: Black
  • Import Sorting: isort
  • Linting: flake8 or ruff

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contributors

Thanks to all the developers who have contributed to this project!


License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.


Acknowledgments

This project uses the following excellent open-source projects:

  • PyQt5 - GUI framework
  • Requests - HTTP library
  • PyInstaller - Packaging tool

Disclaimer: This software is provided "as is" without warranty of any kind, express or implied. Users assume all risks associated with using this software.

About

Maratools: Python desktop app for Bitcoin ASIC miners. Batch firmware updates (MaraFW, Braiins, stock, etc.), multi-pool config, bulk management & real-time monitoring of hashrate, temp, fans. Boost efficiency for home or enterprise rigs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages