matteocrippa / matteocrippa/leafminer

Option to disable autoupdate

Open
#26 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
158
Forks
26
PR merge metrics
No merged PRs in 30d

Description

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...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the AutoUpdate flow shown in the serial logs and locating where firmware settings or the device checkbox are handled. Done means users can disable firmware autoupdates, the option defaults to enabled, and updates remain enabled when the setting is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.