Skip to content

PPTG/DieselPilotTool

Repository files navigation

DieselPilotTool

🇵🇱 Polski · 🇬🇧 English

DieselPilotTool — OTA    DieselPilotTool — USB


🇵🇱 Polski

Desktopowe narzędzie GUI do wgrywania firmware i obrazu LittleFS na sterowniki DieselPilot (ESP32) — przez OTA (WiFi) albo USB (port szeregowy).

Wskazujesz gotowe pliki firmware.bin i littlefs.bin (np. z Releases), wybierasz urządzenie i flashujesz. Bez PlatformIO.

Funkcje

  • Wspólny wybór plików .bin (firmware + filesystem) dla obu trybów.
  • 📡 OTA (WiFi) — automatyczne wykrywanie urządzeń przez mDNS, ręczne IP, hasło OTA, osobne wgrywanie firmware / filesystemu (espota).
  • 🔌 USB (Serial) — wybór portu COM (auto-lista + wpis ręczny), baud, edytowalne offsety, wgrywanie firmware / filesystemu / obu naraz (esptool).
  • ℹ️ Info — użyte narzędzia, biblioteki i licencja.
  • Pasek postępu + log na żywo.

Wymagania

  • Python 3.9+
  • Zależności w requirements.txt:
    • PySide6 — GUI
    • zeroconf — wykrywanie urządzeń OTA (mDNS)
    • esptool — wgrywanie przez USB
    • pyserial — lista portów szeregowych
  • espota.py — używany do OTA; nie jest w repo — pobiera go build.bat przy budowaniu, a sama aplikacja ściągnie go w razie braku.
  • pyinstaller jest w requirements.txt (potrzebny tylko do budowania exe).

Uruchomienie ze źródeł

pip install -r requirements.txt
python DieselPilotTool.py

Budowanie .exe (Windows)

build.bat

lub ręcznie:

pyinstaller --onefile --windowed --name "DieselPilotTool" ^
            --add-data "espota.py;." ^
            --hidden-import esptool --hidden-import serial.tools.list_ports ^
            --collect-data esptool --collect-submodules esptool ^
            --icon icon.ico ^
            DieselPilotTool.py

--collect-data esptool jest wymagane — dołącza pliki danych stub flashera. Bez tego USB w exe zwraca błąd „Flasher stub data is missing for ESP32".

Wynik: dist\DieselPilotTool.exe.

Jak używać

OTA (WiFi)

  1. Włącz OTA na urządzeniu (zakładka OTA w web GUI sterownika) i poczekaj aż będzie w sieci.
  2. W zakładce 📡 OTA kliknij Refresh Devices (lub dodaj IP ręcznie).
  3. Wskaż firmware.bin / littlefs.bin, podaj hasło OTA.
  4. FLASH FIRMWARE (OTA) lub FLASH FILESYSTEM (OTA).

Automatyczne wykrywanie urządzeń (mDNS) Działa przez wbudowaną bibliotekę zeroconf — zwykle bez dodatkowych instalacji. Jeśli na Twoim Windowsie urządzenie nie pojawia się na liście:

  • upewnij się, że PC i sterownik są w tej samej sieci, a zapora przepuszcza UDP 5353,
  • na niektórych konfiguracjach pomaga doinstalowanie Apple Bonjour (Bonjour Print Services / mDNSResponder),
  • w ostateczności zawsze zadziała ręczne podanie IP (pole „Manual IP" → Add).

USB (Serial)

  1. Podłącz ESP32 przez USB, w zakładce 🔌 USB wybierz port (🔄 odświeża listę) i baud.
  2. Wskaż pliki .bin. W razie potrzeby skoryguj offsety.
  3. FLASH FIRMWARE / FILESYSTEM / BOTH (USB).

Offsety (tablica default.csv)

Obraz Offset
firmware.bin 0x10000
littlefs.bin 0x290000

Uwaga: pierwsze wgranie na czysty układ (bootloader + tablica partycji) wykonaj PlatformIO. To narzędzie aktualizuje wyłącznie partycje firmware/filesystem (offset ≥ 0x10000), nigdy bootloadera (0x0).

Licencja

DieselPilotTool: GNU GPL v3 © 2026 PPTG (TechnologiaNaSpontanie) — pełny tekst w LICENSE, uzasadnienie w NOTICE.md, a komplet not copyright, licencji komponentów i ofertę kodu źródłowego w THIRD-PARTY-LICENSES.md. Pełne teksty licencji komponentów leżą w katalogu licenses/ (dołączanym do dystrybucji).

esptool (GPLv2+) jest wbudowany w exe, żeby USB działał od razu bez żadnej instalacji — dlatego cała binarka jest GPLv3. To dotyczy narzędzia do flashowania. Firmware DieselPilot to osobny projekt na licencji MIT.

Wbudowane komponenty: PySide6 (LGPLv3), esptool (GPLv2+), espota.py (LGPL 2.1), zeroconf (LGPL 2.1), pyserial (BSD-3). Pełna lista w THIRD-PARTY-LICENSES.md i w zakładce ℹ️ Info.


🇬🇧 English

A desktop GUI tool for flashing firmware and a LittleFS image onto DieselPilot (ESP32) controllers — over OTA (WiFi) or USB (serial port).

You point it at ready-made firmware.bin and littlefs.bin files (e.g. from Releases), pick a device and flash. No PlatformIO needed.

Features

  • Shared .bin file selection (firmware + filesystem) for both modes.
  • 📡 OTA (WiFi) — automatic device discovery via mDNS, manual IP, OTA password, separate flashing of firmware / filesystem (espota).
  • 🔌 USB (Serial) — COM port selection (auto-list + manual entry), baud, editable offsets, flashing of firmware / filesystem / both at once (esptool).
  • ℹ️ Info — tools used, libraries and license.
  • Progress bar + live log.

Requirements

  • Python 3.9+
  • Dependencies in requirements.txt:
    • PySide6 — GUI
    • zeroconf — OTA device discovery (mDNS)
    • esptool — flashing over USB
    • pyserial — serial port listing
  • espota.py — used for OTA; not in the repobuild.bat downloads it at build time, and the app fetches it too if missing.
  • pyinstaller is included in requirements.txt (only needed to build the exe).

Running from source

pip install -r requirements.txt
python DieselPilotTool.py

Building the .exe (Windows)

build.bat

or manually:

pyinstaller --onefile --windowed --name "DieselPilotTool" ^
            --add-data "espota.py;." ^
            --hidden-import esptool --hidden-import serial.tools.list_ports ^
            --collect-data esptool --collect-submodules esptool ^
            --icon icon.ico ^
            DieselPilotTool.py

--collect-data esptool is required — it bundles the flasher stub data files. Without it, USB flashing in the exe fails with "Flasher stub data is missing for ESP32".

Result: dist\DieselPilotTool.exe.

How to use

OTA (WiFi)

  1. Enable OTA on the device (OTA tab in the controller's web GUI) and wait until it is on the network.
  2. In the 📡 OTA tab click Refresh Devices (or add an IP manually).
  3. Select firmware.bin / littlefs.bin, enter the OTA password.
  4. FLASH FIRMWARE (OTA) or FLASH FILESYSTEM (OTA).

Automatic device discovery (mDNS) Works through the bundled zeroconf library — usually with no extra installs. If a device does not show up on your Windows machine:

  • make sure the PC and the controller are on the same network, and the firewall allows UDP 5353,
  • on some setups installing Apple Bonjour (Bonjour Print Services / mDNSResponder) helps,
  • as a last resort, entering the IP manually always works ("Manual IP" field → Add).

USB (Serial)

  1. Connect the ESP32 over USB, in the 🔌 USB tab pick the port (🔄 refreshes the list) and baud.
  2. Select the .bin files. Adjust the offsets if needed.
  3. FLASH FIRMWARE / FILESYSTEM / BOTH (USB).

Offsets (default.csv table)

Image Offset
firmware.bin 0x10000
littlefs.bin 0x290000

Note: the first flash onto a blank chip (bootloader + partition table) must be done with PlatformIO. This tool only updates the firmware/filesystem partitions (offset ≥ 0x10000), never the bootloader (0x0).

License

DieselPilotTool: GNU GPL v3 © 2026 PPTG (TechnologiaNaSpontanie) — full text in LICENSE, the rationale in NOTICE.md, and the complete copyright notices, component licenses and source-code offer in THIRD-PARTY-LICENSES.md. The full component license texts live in the licenses/ folder (shipped with the distribution).

esptool (GPLv2+) is bundled into the exe so that USB works out of the box with no installation — that is why the whole binary is GPLv3. This concerns the flashing tool only. The DieselPilot firmware is a separate project under the MIT license.

Bundled components: PySide6 (LGPLv3), esptool (GPLv2+), espota.py (LGPL 2.1), zeroconf (LGPL 2.1), pyserial (BSD-3). Full list in THIRD-PARTY-LICENSES.md and in the ℹ️ Info tab.

About

A tool for flashing and updating (Firmware + litefs) the DieselPilot device. As I work on it, I think this is one of the best solutions :)

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages