matteocrippa / leafminer

A FOSS bitcoin miner for ESP8266 and ESP32
MIT License
75 stars 13 forks source link

Option to disable autoupdate #26

Open PSLLSP opened 5 months ago

PSLLSP commented 5 months ago

LeafMiner v 0.0.13

I would like to have an option to disable firmware autoupdate. Default option of checkbox could be enable

It looks like firmware can do autoupdate:

$ miniterm /dev/ttyACM0 115200
--- Miniterm on /dev/ttyACM0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
[I] Main: LeafMiner - v.0.0.13 - (C: 2)
[I] Main: ESP32 - Disable WDT
[I] Storage: Setup: OK
[I] AutoUpdate: Connecting to LuckyAP...
[D] AutoUpdate: payload: {
  "current": "0.0.13",
  "link": "https://github.com/matteocrippa/leafminer/releases/download/v{{version}}/firmware_{{device}}.bin",
  "devices": [
    "esp8266",
    "esp32",
    "esp32-s2",
    "esp32-s3",
    "geekmagic-smalltv",
    "lilygo-t-display-s3"
  ]
}

[D] AutoUpdate: Remote Version: 0.0.13
[D] AutoUpdate: No Updates, Version: 0.0.13
[I] Network: Connecting to LuckyAP...
[D] Network: Connecting to host pool.vkbit.com...
[I] Network: >>> {"id":1,"method":"mining.subscribe","params":["LeafMiner/0.0.13", null]}

Autoupdate from 0.0.11 to 0.0.13:

$ miniterm /dev/ttyACM1 115200
--- Miniterm on /dev/ttyACM1  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Main: LeafMiner - v.0.0.11 - (C: 2)
[I] Main: ESP32 - Disable WDT
[I] Storage: Setup: OK
[I] AutoUpdate: Connecting to LuckyAP...
[D] AutoUpdate: payload: {
  "current": "0.0.13",
  "link": "https://github.com/matteocrippa/leafminer/releases/download[D] AutoUpdate: Written: 1271840
[D] AutoUpdate: Update Success: 1271840
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2b (SPI_FAST_FLASH_BOOT)
Saved PC:0x420afc66
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
[I] Main: LeafMiner - v.0.0.13 - (C: 2)
[I] Main: ESP32 - Disable WDT
[I] Storage: Setup: OK
[I] AutoUpdate: Connecting to LuckyAP...
[D] AutoUpdate: payload: {
  "current": "0.0.13",
  "link": "https://github.com/matteocrippa/leafminer/releases/download/v{{version}}/firmware_{{device}}.bin",
  "devices": [
    "esp8266",
    "esp32",
    "esp32-s2",
    "esp32-s3",
    "geekmagic-smalltv",
    "lilygo-t-display-s3"
  ]
}

[D] AutoUpdate: Remote Version: 0.0.13
[D] AutoUpdate: No Updates, Version: 0.0.13
[I] Network: Connecting to LuckyAP...

Firmware 0.0.11 shows information on the display (LILLYGO T-DISPLAY-S3) but firmware 0.0.13 shows only blank screen, like there is a bug in 0.0.13. This is an example why autoupdate of firmware should be optional...

matteocrippa commented 5 months ago

Feature added in the v/0.0.14 branch

PSLLSP commented 5 months ago

I updated to 0.0.14 and I cannot see any "autoupdate" option in the form when I connect to 192.168.4.1 (SSID: LEAFMINER). I checked what parameters are sent with "save " and "autoupdate" is not in the list. Miner reports that autoup[date is "on". I test with ESP-8266.

These parameters are sent during setup process:

wifi_ssid: LuckyAP
wifi_password: GoodLuck!
wallet_address: bc1quqr7agnx6e0k9kn8h24zfj5dueeurhzflt3qjg.ESP8266
pool_password: x
pool_url: pool.vkbit.com
pool_port: 3333
blink_enabled: on
blink_brightness: 256
lcd_on_start: on
matteocrippa commented 5 months ago

Added back in 0.0.15, I forgot to force html 2 header processing