2023-07-01 15:41:26 -04:00
| Supported Targets | ESP32-S3 (BitAxe v2+) |
| ----------------- | --------------------- |
2022-11-17 17:37:27 -05:00
2023-07-01 15:39:16 -04:00
# ESP-Miner
2022-11-17 17:37:27 -05:00
2023-08-16 16:57:42 +02:00
## Requires ESP-IDF v5.1
2023-08-12 16:50:18 +02:00
You can chose between 2 methods of installations:
### Manual Installation
2023-08-16 16:57:42 +02:00
Follow the official [instructions ](https://docs.espressif.com/projects/esp-idf/en/release-v5.1/esp32s3/get-started/index.html#manual-installation ).
2023-08-12 16:50:18 +02:00
### ESP-IDF Visual Studio Code Extension
Install the "Espressif IDF" extension, it will automate the IDF installation for you.
2023-05-27 11:26:36 -04:00
2023-05-19 22:57:07 -04:00
## Hardware Required
2022-11-17 17:37:27 -05:00
2023-05-27 11:26:36 -04:00
This firmware is designed to run on a BitAxe v2+
2022-11-17 17:37:27 -05:00
2023-05-19 22:57:07 -04:00
## Configure the project
2023-01-16 17:55:16 -05:00
2023-05-19 22:57:07 -04:00
Set the target
2023-01-16 17:55:16 -05:00
2023-05-19 22:57:07 -04:00
```
idf.py set-target esp32s3
```
2023-01-16 17:55:16 -05:00
2023-05-19 22:57:07 -04:00
Use menuconfig to set the stratum server address/port and WiFi SSID/Password
2023-08-12 16:50:18 +02:00
2023-05-19 22:57:07 -04:00
```
idf.py menuconfig
```
2023-08-12 16:50:18 +02:00
2023-05-30 21:36:22 -04:00
Set following parameters under Stratum Configuration Options, these will define the stratum server you connect to:
2023-01-16 17:55:16 -05:00
2023-08-12 16:50:18 +02:00
* Set `Stratum Address` to the stratum pool domain name. example "public-pool.io"
2023-01-16 17:55:16 -05:00
2023-08-12 16:50:18 +02:00
* Set `Stratum Port` to the stratum pool port. example "21496"
2023-01-16 17:55:16 -05:00
2023-08-12 16:50:18 +02:00
* Set `Stratum username` to the stratum pool username. example "< my_BTC_address > .bitaxe"
2023-01-16 17:55:16 -05:00
2023-08-12 16:50:18 +02:00
* Set `Stratum password` to the stratum pool password. example "x"
2023-01-16 17:55:16 -05:00
2023-05-19 22:57:07 -04:00
Set following parameters under Example Connection Configuration Options:
2023-01-16 17:55:16 -05:00
2023-05-19 22:57:07 -04:00
* Set `WiFi SSID` to your target wifi network SSID.
* Set `Wifi Password` to the password for your target SSID.
2023-08-12 16:50:18 +02:00
For more information about the example_connect() method used here, check out < https: / / github . com / espressif / esp-idf / blob / master / examples / protocols / README . md > .
2023-05-19 22:57:07 -04:00
2023-08-26 12:21:41 -04:00
## Build website
To build the website for viewing and OTA updates open the Angular project found in
```
ESP-Miner\main\http_server\axe-os
```
Then install dependencies and build.
```
npm i
npm run build
```
When the esp-idf project is built it will bundle the website in www.bin
2023-05-19 22:57:07 -04:00
## Build and Flash
Build the project and flash it to the board, then run monitor tool to view serial output:
```
idf.py -p PORT flash monitor
```
2023-01-16 17:55:16 -05:00
(To exit the serial monitor, type ``Ctrl-]` `.)
2023-05-19 22:57:07 -04:00
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
## Run Unit tests
The unit tests for the project use the unity test framework and currently require actual esp32 hardware to run.
2023-08-12 16:50:18 +02:00
They are located at < https: / / github . com / johnny9 / esp-miner / tree / master / components / stratum / test >
2023-05-19 22:57:07 -04:00
```
cd ./test/
idf.py set-target esp32s3
idf.py -p PORT flash monitor
```