Description
Extension version
0.6.9
OS & version
Ubuntu 24.10
Describe the bug
It's not possible to program a board using Arduinos OTA update functionality.
It seems, that the default "Uploader" instead of the network programming tool is called.
(In my case, im using an ESP32)
To Reproduce
Steps to reproduce the behavior:
- On
Maker Workshop Home
select the Board - Ensure programmed device (e.g. ESP32) has an valid OTA-Sketch loaded
- Refresh
Upload Port
list - Select found OTA device
- In VSCode press
Upload
Expected behavior
Update should be done via OTA/Network
In my case of ESP32, the esp_ota
tool (part of ESP32 Board Manager Lib) should be called, instead of the default esptool
This could be found in the boards definition file .upload.tool.network=esp_ota
instead of .upload.tool=esptool_py
Screenshots
If applicable, add screenshots to help explain your problem.
TTGO T-Watch
is an ESP32 based watch.
Outputs
Include outputs from the "Arduino CLI" output window and the "Arduino Extension" output window.
Output Log:
Upload starting...
python3 "/home/sven/.arduino15/packages/esp32/tools/esptool_py/4.6/esptool.py" --chip esp32 --port "svWatch at 192.168.1.127" --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x1000 "/home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/build/ttgo-twatch-test.ino.bootloader.bin" 0x8000 "/home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/build/ttgo-twatch-test.ino.partitions.bin" 0xe000 "/home/sven/.arduino15/packages/esp32/hardware/esp32/3.0.7/tools/partitions/boot_app0.bin" 0x10000 "/home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/build/ttgo-twatch-test.ino.bin"
esptool.py v4.6
Serial port svWatch at 192.168.1.127
A fatal error occurred: Could not open svWatch at 192.168.1.127, the port doesn't exist
Fehlgeschlagenes Hochladen: Hochladefehler: exit status 2
Command failed with code 1.
As we can see, the upload is trying to use the esptool.py
, which loads sketches via Serial Port.
Output Log, when uploading a sketch via Serial Port (in my case /dev/ttyACM0
):
Upload starting...
python3 "/home/sven/.arduino15/packages/esp32/tools/esptool_py/4.6/esptool.py" --chip esp32 --port "/dev/ttyACM0" --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode keep --flash_freq keep --flash_size keep 0x1000 "/home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/build/ttgo-twatch-test.ino.bootloader.bin" 0x8000 "/home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/build/ttgo-twatch-test.ino.partitions.bin" 0xe000 "/home/sven/.arduino15/packages/esp32/hardware/esp32/3.0.7/tools/partitions/boot_app0.bin" 0x10000 "/home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/build/ttgo-twatch-test.ino.bin"
esptool.py v4.6
Serial port /dev/ttyACM0
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:f9:e0:f5:53:ac
Uploading stub...
(...)
For me, it looks like the "normal" upload command is (wrongly) executed, when trying to Upload via OTA update.
Instead of specifying the Serial Port, the text from the Upload Port dropdown is used there.
So the Serial-Loader-Tool could not find the serial port "svWatch at 192.168.1.127".
Log of Arduino Extension output window:
Arduino Extension started on linux
Workspace is /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test
arduino-cli cache created: /home/sven/.config/Code/User/globalStorage/thelastoutpostworkshop.arduino-maker-workshop/arduino-cli-cache
Arduino CLI is ready, path: /home/sven/.vscode/extensions/thelastoutpostworkshop.arduino-maker-workshop-0.6.9-linux-x64/arduino_cli/linux/x64/arduino-cli
Arduino Config file is good
User directory is: /home/sven/Documents/Arduino
Wrote configuration to /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/.vscode/arduino.json
Arduino Web view ready
Wrote configuration to /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/.vscode/arduino.json
New monitor port settings applied: ${"port":"/dev/ttyACM0","baudRate":115200,"lineEnding":"\r\n","dataBits":8,"parity":"none","stopBits":"one"}
Wrote configuration to /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/.vscode/arduino.json
New Configration=:UploadSpeed=2000000,PartitionScheme=default,DebugLevel=none,PSRAM=enabled,EraseFlash=none,Revision=TWATCH_2020_V3
Wrote configuration to /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/.vscode/arduino.json
New Port=:svWatch at 192.168.1.127
Wrote configuration to /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/.vscode/arduino.json
Wrote configuration to /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/.vscode/arduino.json
New Port=:svWatch at 192.168.1.127
Wrote configuration to /home/sven/projects/ttgo-t-watch-test/ttgo-twatch-test/.vscode/arduino.json
/dev/ttyACM0
is the Serial Port to the ESP32 watch, when connected.
Uploading a sketch via this Serial Port is working fine.
Additional context
How it works in Aarduino IDE:
https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html#arduino-ide