ESP-Miner/readme.md

112 lines
2.9 KiB
Markdown
Raw Normal View History

2023-10-12 20:33:56 -04:00
[![](https://dcbadge.vercel.app/api/server/3E8ca2dkcC)](https://discord.gg/3E8ca2dkcC)
# ESP-Miner
| Supported Targets | ESP32-S3 (BitAxe v2+) |
| ----------------- | --------------------- |
2022-11-17 17:37:27 -05:00
2023-11-23 22:26:06 +01:00
## Requires Python3.4 or later and pip
2022-11-17 17:37:27 -05:00
2023-11-23 22:26:06 +01:00
Install bitaxetool from pip. pip is included with Python 3.4 but if you need to install it check <https://pip.pypa.io/en/stable/installation/>
2023-08-12 16:50:18 +02:00
2023-05-19 22:57:07 -04:00
```
2023-11-23 22:26:06 +01:00
pip install --upgrade bitaxetool
2023-05-19 22:57:07 -04:00
```
2023-08-12 16:50:18 +02:00
2023-11-23 22:26:06 +01:00
## Hardware Required
2023-05-19 22:57:07 -04:00
2023-11-23 22:26:06 +01:00
This firmware is designed to run on a BitAxe v2+
2023-11-23 22:26:06 +01:00
If you do have a Bitaxe with no USB connectivity make sure to establish a serial connection with either a JTAG ESP-Prog device or a USB-to-UART bridge
2023-11-23 22:26:06 +01:00
## Preconfiguration
2023-11-23 22:26:06 +01:00
Starting with v2.0.0, the ESP-Miner firmware requires some basic manufacturing data to be flashed in the NVS partition.
2023-11-23 22:26:06 +01:00
1. Download the esp-miner-factory-v2.0.3.bin file from the release tab.
Click [here](https://github.com/skot/ESP-Miner/releases) for the release tab
2. Copy `config.cvs.example` to `config.cvs` and modify `asicfrequency`, `asicvoltage`, `asicmodel`, `devicemodel`, and `boardversion`
2023-11-23 22:26:06 +01:00
The following are recommendations but it is necessary that you do have all values in your `config.cvs`file to flash properly.
- recommended values for the Bitaxe 1368 (supra)
```
key,type,encoding,value
main,namespace,,
asicfrequency,data,u16,490
asicvoltage,data,u16,1200
asicmodel,data,string,BM1368
devicemodel,data,string,supra
boardversion,data,string,400
```
2023-11-23 22:26:06 +01:00
- recommended values for the Bitaxe 1366 (ultra)
2023-05-19 22:57:07 -04:00
2023-11-23 22:26:06 +01:00
```
key,type,encoding,value
main,namespace,,
asicfrequency,data,u16,485
asicvoltage,data,u16,1200
2023-11-23 22:26:06 +01:00
asicmodel,data,string,BM1366
2024-06-13 10:04:32 +02:00
devicemodel,data,string,ultra
2023-11-23 22:26:06 +01:00
boardversion,data,string,0.11
```
2023-05-19 22:57:07 -04:00
2023-11-23 22:26:06 +01:00
- recomended values for the Bitaxe 1397 (MAX)
2023-01-16 17:55:16 -05:00
2023-11-23 22:26:06 +01:00
```
key,type,encoding,value
main,namespace,,
asicfrequency,data,u16,475
asicvoltage,data,u16,1400
asicmodel,data,string,BM1397
devicemodel,data,string,max
boardversion,data,string,2.2
```
2023-01-16 17:55:16 -05:00
2023-11-23 22:26:06 +01:00
## Flash
2023-05-19 22:57:07 -04:00
2023-11-23 22:26:06 +01:00
The bitaxetool includes all necessary library for flashing the binary file to the Bitaxe Hardware.
2023-05-19 22:57:07 -04:00
2023-11-23 22:26:06 +01:00
The bitaxetool requires a config.cvs preloaded file and the appropiate firmware.bin file in it's executed directory.
2023-05-19 22:57:07 -04:00
2023-11-23 22:26:06 +01:00
3. Flash with the bitaxetool
2023-05-19 22:57:07 -04:00
```
2023-11-23 22:26:06 +01:00
bitaxetool --config ./config.cvs --firmware ./esp-miner-factory-v2.0.3.bin
2023-05-19 22:57:07 -04:00
```
2024-03-17 20:38:16 +01:00
## API
Bitaxe provides an API to expose actions and information.
For more details take a look at `main/http_server/http_server.c`.
Things that can be done are:
- Get System Info
- Get Swarm Info
- Update Swarm
- Swarm Options
- System Restart Action
- Update System Settings Action
- System Options
- Update OTA Firmware
- Update OTA WWW
- WebSocket
Some API examples in curl:
```bash
# Get system information
curl http://YOUR-BITAXE-IP/api/system/info
```
```bash
# Get swarm information
curl http://YOUR-BITAXE-IP/api/swarm/info
```
```bash
# System restart action
curl -X POST http://YOUR-BITAXE-IP/api/system/restart
```