Update.zip not working on V2 watch (and possibly also V3)

Some tips to resolve problems with the T-WATCH-2020
User avatar
QuickFix
Posts: 9
Joined: Sun May 23, 2021 11:47 pm

Update.zip not working on V2 watch (and possibly also V3)

Post by QuickFix »

Hi,

I was trying to use the Updater batch-file on my V2 watch and while it actually did everything it should do, the image doesn't work on a version 2 watch and its screen stays black after reset.

Code: Select all

C:\XXXXXXXX\TWatch>set com=COM9

C:\XXXXXXXX\TWatch>esptool.exe --chip esp32 --port COM9 --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_80m.bin 0x10000 MyWatch.ino.bin 0x8000 MyWatch.ino.partitions.bin
esptool.py v2.6
Serial port COM9
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: b8:f0:09:c0:c1:bc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 2000000
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 1638.4 kbit/s)...
Hash of data verified.
Flash params set to 0x024f
Compressed 15856 bytes to 10276...
Wrote 15856 bytes (10276 compressed) at 0x00001000 in 0.1 seconds (effective 1153.2 kbit/s)...
Hash of data verified.
Compressed 1302992 bytes to 623128...
Wrote 1302992 bytes (623128 compressed) at 0x00010000 in 12.5 seconds (effective 835.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 129...
Wrote 3072 bytes (129 compressed) at 0x00008000 in 0.1 seconds (effective 409.6 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

C:\XXXXXXXX\TWatch>pause
Press any key to continue . . .
My guess is that the different GPIO for the backlight of the TFT the V2 (GPIO25) is using, compared to V1 (GPIO12) is the cause of this problem and I think V3 (GPIO15) also will not work.

When I monitor the serial at 115200 Bd I'm getting the following output:

Code: Select all

opened config file

parsed json
{"last_clock":-1}
saved!!!
When using the Uploader batch file on a V1, everything works as expected.

Greetz,

Peter
mchavez
Site Admin
Posts: 79
Joined: Tue Nov 10, 2020 12:12 am

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by mchavez »

Hello,

You are right, our "Uploader.zip" was compiled for version V1. We need to generate additional loaders for version V2 and V3.

We will work on this.

Thanks for the advice
mchavez
Site Admin
Posts: 79
Joined: Tue Nov 10, 2020 12:12 am

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by mchavez »

Hi,

We generate three new uploaders for the V1, V2 and V3 models. Each was compiled with the specific model settings.

You can download them from here:

https://twatchbuilder.com/downloads/uploader_v1.zip
https://twatchbuilder.com/downloads/uploader_v2.zip
https://twatchbuilder.com/downloads/uploader_v3.zip

Please give a try and tell us if this works well, before its official release

Thanks
User avatar
QuickFix
Posts: 9
Joined: Sun May 23, 2021 11:47 pm

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by QuickFix »

Thanks for the service @mchavez. :D

I will try and report back soon (probably this afternoon). :idea:
User avatar
QuickFix
Posts: 9
Joined: Sun May 23, 2021 11:47 pm

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by QuickFix »

Unfortunately I'm not getting v2 to work with the v2 updater.
I also tried to revert my watch back to a simple Arduino sketch (TTGO's GPSDisplay.ino) and then tried again, but to no avail.

On serial @115200 I afterwards got:

Code: Select all

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x32 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
▒1.0.12
4356020
4354380
4354424
4354380
Event Charge Done
4354424
4354380
Also tried with the new V1 and V3 images (in case the ZIP's got mixed up while compiling), but also no luck. :cry:

Greetz,

Peter
mchavez
Site Admin
Posts: 79
Joined: Tue Nov 10, 2020 12:12 am

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by mchavez »

We released a "debug" option to see more details of what is happening on the watch.

Could you compile a new version by enabling the "Debug" check option in portal "Settings" and then share the serial output to see the debug info?
User avatar
QuickFix
Posts: 9
Joined: Sun May 23, 2021 11:47 pm

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by QuickFix »

Unfortunately no: I can only change settings to a watch the system knows (= a watch that was able to contact the server once).
I'm not able to scan and connect to my WiFi, since I cannot see the screen of the watch. :(

Setting the WiFi credentials in advance using a simple sketch, before using the uploader, also didn't offer a solution.

Code: Select all

#include "WiFi.h"

const char* ssid = "MYSSID";
const char* password = "MYPASSWORD;

void setup() {
  Serial.begin(115200);
  Serial.println("Starting code");
  Serial.println("Setting WiFi to WIFI_STA");  
  WiFi.mode(WIFI_STA);
  Serial.println("Setting SSID and password");
  WiFi.begin(ssid, password);
  Serial.print("Connecting to WiFi ..");
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print('.');
    delay(1000);
  }
  Serial.println(WiFi.localIP());
  Serial.println("Code finished");
}

void loop() {}
mchavez
Site Admin
Posts: 79
Joined: Tue Nov 10, 2020 12:12 am

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by mchavez »

If you can't see the screen, you can still program the watch using serial. In the "uploader_vX.zip" there is a file called "downloader.bat" to download your latest firmware to your PC. After the download is complete, you can upload it using "uploader.bat".

Here is a complete example for a "deploy.bat" file (download firmware and install it on watch at the same time):

Code: Select all

set device=FXXXXXXXXXXXXXXXX
set com=COMX
curl "https://twatchbuilder.com/download.php?device=%device%&file=MyWatch.ino.partitions.bin" --output MyWatch.ino.partitions.bin
curl "https://twatchbuilder.com/download.php?device=%device%&file=MyWatch.ino.bin" --output MyWatch.ino.bin
esptool.exe --chip esp32 --port %com% --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 boot_app0.bin 0x1000 bootloader_dio_80m.bin 0x10000 MyWatch.ino.bin 0x8000 MyWatch.ino.partitions.bin 
Note: "curl" should exist on your Windows 10 version. If not, please install it from https://curl.se/windows/
User avatar
QuickFix
Posts: 9
Joined: Sun May 23, 2021 11:47 pm

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by QuickFix »

Thanks, will try it when I've got time (now playing with my V1 watch). 8-)
dBuggzTW
Posts: 4
Joined: Fri Dec 25, 2020 12:47 am

Re: Update.zip not working on V2 watch (and possibly also V3)

Post by dBuggzTW »

I'm seeing the same problem.
Built an image with Builder, used downloader and uploader, but screen remains blank. using the Serial Monitor in Platformio I get the boot message and then nothing.

Code: Select all

--- Miniterm on COM3  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---  
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x36 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
�1.0.12
Post Reply