BDLMinerV2 is an open-source Bitcoin solo mining firmware designed for ESP32 microcontrollers, including the M5StickC Plus2, with experimental support for selected ASIC miners.
The project combines embedded programming, Bitcoin mining protocols, hardware SHA-256 acceleration and real-time monitoring.
The current stable version is v2.5.2.
Why I Built This ProjectI wanted to explore how Bitcoin mining works at the hardware and protocol level using inexpensive, accessible microcontrollers.
The ESP32 platform offers Wi-Fi connectivity, hardware cryptographic acceleration and enough flexibility to create a standalone educational miner.
My goal was to build more than a basic SHA-256 mining demonstration: a complete open-source firmware with an integrated web dashboard, multiple board configurations, secure updates and monitoring capabilities.
How It WorksBDLMinerV2 connects to a compatible mining pool using the Stratum protocol.
The pool provides mining jobs, and the firmware processes them using double SHA-256 hashing.
The device continuously tests different nonce values and submits valid shares back to the pool.
For Bitcoin, the firmware supports Stratum V1 and native Stratum V2.
The dashboard displays information such as hashrate, accepted shares, pool connection status and mining statistics.
Solo mining is probabilistic, and finding a Bitcoin block with an ESP32 is extraordinarily unlikely.
Hardware CompatibilityThe project supports several ESP32 and M5Stack devices, including:
M5StickC Plus2
- M5StickC Plus2
Supported ESP32 development boards
- Supported ESP32 development boards
Experimental Bitaxe Gamma 601
- Experimental Bitaxe Gamma 601
Experimental NerdNOS
- Experimental NerdNOS
Physical V2 measurements are available for the M5StickC Plus2 and Bitaxe Gamma 601. Additional hardware testing is ongoing.
Software and Development ToolsBDLMinerV2 is developed primarily in C++ using:
Arduino-ESP32 and ESP-IDF components
- Arduino-ESP32 and ESP-IDF components
PlatformIO for firmware builds
- PlatformIO for firmware builds
mbedTLS for secure network communication
- mbedTLS for secure network communication
GitHub for source control and releases
- GitHub for source control and releases
Bitcoin mining requires repeated double SHA-256 calculations. Optimizing hashing performance while respecting the limited resources of ESP32 devices is an important part of the project.
MultitaskingOn supported dual-core devices, mining tasks must coexist with Wi-Fi networking, display updates and the web dashboard.
Memory and Firmware SizeLimited flash storage creates challenges for secure firmware updates, partition management and maintaining compatibility across boards.
Network ReliabilityThe firmware must handle mining pool connections, interruptions, reconnections and secure communication.
Hardware CompatibilityDifferent ESP32 variants have different capabilities, requiring dedicated build configurations and physical testing.
FeaturesBitcoin SHA-256d solo mining
- Bitcoin SHA-256d solo mining
Stratum V1 and native Stratum V2 for BTC
- Stratum V1 and native Stratum V2 for BTC
Hardware SHA acceleration on supported ESP32 devices
- Hardware SHA acceleration on supported ESP32 devices
Real-time web dashboard
- Real-time web dashboard
Browser-based firmware installation
- Browser-based firmware installation
Signed OTA updates with rollback
- Signed OTA updates with rollback
Pool reconnection and backup pool support
- Pool reconnection and backup pool support
MQTT, Home Assistant and Prometheus integration
- MQTT, Home Assistant and Prometheus integration
Optional Linux/Raspberry Pi monitoring hub
- Optional Linux/Raspberry Pi monitoring hub
Connect a supported ESP32 device to your computer using USB.
- Connect a supported ESP32 device to your computer using USB.
Open the BDLMinerV2 Web Flasher in a compatible browser.
- Open the BDLMinerV2 Web Flasher in a compatible browser.
Select the appropriate firmware for your board.
- Select the appropriate firmware for your board.
Follow the installation instructions.
- Follow the installation instructions.
Configure your Wi-Fi, Bitcoin address and mining pool.
- Configure your Wi-Fi, Bitcoin address and mining pool.
Start mining and monitor the device through its dashboard.
- Start mining and monitor the device through its dashboard.
Web Flasher:https://bdlglua.github.io/flash.html
Dashboard and ScreenshotsThe project includes a local web dashboard and device interfaces.
The following screenshots use demonstration data.
Web dashboard:
https://github.com/bdlglua/BDLMinerV2/blob/main/docs/images/dashboard-v2.png
Mining screen:
https://github.com/bdlglua/BDLMinerV2/blob/main/installer/assets/screen-mining.png
Hashrate graph:
https://github.com/bdlglua/BDLMinerV2/blob/main/installer/assets/screen-graph.png
Bitcoin network information:
https://github.com/bdlglua/BDLMinerV2/blob/main/installer/assets/screen-global.png
Current Status and Future DevelopmentBDLMinerV2 has reached stable version v2.5.2, while development and hardware validation continue.
Current priorities include testing additional ESP32 variants, improving ASIC compatibility, validating more mining pools and refining firmware reliability.
Performance comparisons with other projects should rely on reproducible measurements rather than unverified claims.
Source Code and DemoGitHub:https://github.com/bdlglua/BDLMinerV2
Interactive Demo:https://bdlglua.github.io/demo.html
Web Flasher:https://bdlglua.github.io/flash.html
Stable Release:https://github.com/bdlglua/BDLMinerV2/releases/tag/v2.5.2
ConclusionBDLMinerV2 is an educational and experimental Bitcoin mining project, not a practical way to generate regular mining income with ESP32 hardware.
Its purpose is to explore embedded development, SHA-256 optimization, Bitcoin mining protocols, hardware integration and open-source collaboration.
Feedback, testing and contributions are welcome!
— bdlglua










Comments