Skip to content

Add --change-mode to device-install/update scripts #6752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ThatKalle
Copy link
Contributor

This PR adds a --change-mode option to the device-install/update scripts.

--change-mode performs esptool --baud 1200 --after no_reset read_flash_status while accouting for user provided -p and discovered esptool.

This would allow users to attempt to set their device to update mode without hardware interaction prior to running the scripts. Akin to pressing the 1200bps Reset button on the web-flasher.

This change should not effect normal opreations.


This operation is working on a LILYGO T-Deck Plus device running 2.6.4.b89355f with MUI from the web-flasher during local testing on a Windows 11 host with esptool v4.8.1.

Running the command once sets the T-Deck to a different COM mode (new device in device manager) but still not in update mode.
Running the command again reboots into proper update mode. (black screen)

>device-install.bat -p COM17 --change-mode
INFO  | 22:36:03 5 Using esptool port: COM17.
INFO  | 22:36:03 6 Using esptool baud: 1200.
esptool.py v4.8.1
Serial port COM17

A fatal error occurred: Failed to set baud rate 1200. The driver may not support this rate.

>device-install.bat -p COM18 --change-mode
INFO  | 22:36:24 5 Using esptool port: COM18.
INFO  | 22:36:24 6 Using esptool baud: 1200.
esptool.py v4.8.1
Serial port COM18
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.2)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: 3c:84:27:ed:a3:e8
Uploading stub...
Running stub...
Stub running...
Status value: 0x0200
Staying in bootloader.

fix #6529

@jedahan
Copy link

jedahan commented May 7, 2025

Small suggestion - change-mode feels 'generic' to me, how about --reset or --request-reset or --1200bps-reset or --reset-1200bps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: fixes for device-install.sh and device-update.sh
3 participants