pvvx / THB2

Custom firmware for Tuya devices on the PHY622x2 chipset
Other
92 stars 13 forks source link

TH05 new version V1.6 #15

Open Notrial opened 4 months ago

Notrial commented 4 months ago

I got this one from Ali about two weeks ago. I suppose it is the latest one. Can't get it to connect through Chrome, but I am on Mac so could that be the case? Will try on PC a bit later today.

image

Photos of the board are attached.

IMG_5413 IMG_5414

spupetic commented 4 months ago

You cannot flash OTA at first time, you need to flash it via serial and the commands in the readme, after that you can use the OTA website. See this issue: https://github.com/pvvx/THB2/issues/11

Notrial commented 4 months ago

You cannot flash OTA at first time, you need to flash it via serial and the commands in the readme, after that you can use the OTA website. See this issue: #11

Can I use this one to flash it as well?

2D9B87E9-C6A0-40C9-B22E-93BD38F6DFD6_4_5005_c E0E09E01-0952-45A1-8F76-0BC73396EC98_4_5005_c

spupetic commented 4 months ago

You cannot flash OTA at first time, you need to flash it via serial and the commands in the readme, after that you can use the OTA website. See this issue: #11

Can I use this one to flash it as well?

2D9B87E9-C6A0-40C9-B22E-93BD38F6DFD6_4_5005_c E0E09E01-0952-45A1-8F76-0BC73396EC98_4_5005_c

If it has 3.3V logic level, you can. But be sure to check it first, because it might kill the board if it is for 5V devices.

Notrial commented 4 months ago

There is a switch on it for 3.3 vs 5v, so should be good :)

spupetic commented 4 months ago

There is a switch on it for 3.3 vs 5v, so should be good :)

Yes, it should be good.

Notrial commented 4 months ago

Just to confirm that the procedure works for V1.6.

Flashing boot one first and then full firmware. I did have to short reset with VBAT- for a millisecond after running the script, otherwise, it wouldn't work.

Not sure why I can't read the values in ESPHome though...I read MAC from the web tool and configured it like this:

image

IMG_5426

EDIT: I am an idiot and haven't realized this only works through BTHome. It broadcasts in there perfectly!

dicamarques14 commented 4 months ago

Just to confirm that the procedure works for V1.6.

Flashing boot one first and then full firmware. I did have to short reset with VBAT- for a millisecond after running the script, otherwise, it wouldn't work.

Not sure why I can't read the values in ESPHome though...I read MAC from the web tool and configured it like this:

image

IMG_5426

EDIT: I am an idiot and haven't realized this only works through BTHome. It broadcasts in there perfectly!

Im trying to flash my V1.5 with a bte17-06b based in CH340E and I cant get it to work... which pins did you connect to? I tried to short the rst and tm pins in the board but I still dont get a connection on the python

Notrial commented 4 months ago

I did what is says bellow...except the REST_N that i didn't connect to anything but shorted after starting python with VBAT-...you have to time it right.

image
pvvx commented 4 months ago

On adapters without "RTS" you need to manually close "RESET" to "GND" and release it when starting rdwr_phy62x2.py. It is difficult to manually open the contact at the right time. Therefore, automatic control via "RTS" is used.

https://www.wch-ic.com/downloads/CH341DS1_PDF.html

pvvx commented 4 months ago

README

Кнопка используется для быстрого подключения к старым BT-адаптерам. Нажатие кнопки переключает интервал BLE рекламы на более короткий период (1562.5 мс). Действие продолжится 60 секунд, затем интервал восстановится на установленный в настройках.

The button is used to quickly connect to old BT adapters. Pressing the button switches the BLE advertising interval to a shorter period (1562.5 ms). The action will last 60 seconds, then the interval will be restored to the one set in the settings.

NeoMatrixJR commented 4 months ago

is RESET = REST_N? I'm getting the same errors, but I can't find "RESET"

Notrial commented 4 months ago

Correct.

dicamarques14 commented 4 months ago

For those with trouble getting this right: In the python script: rdwr_phy62x2.py at line 227, i set the timeout to "0.5", and after line 233 i added "print(read)" So i just kept shorting RST with GND (like quick taps) until I saw a print with "cmd>>:"

NeoMatrixJR commented 3 months ago

Turns out I may have had a janky adapter. I switched over to windows with no luck, then changed out my adapter and it worked.

igorkietrz commented 3 months ago

For those with trouble getting this right: In the python script: rdwr_phy62x2.py at line 227, i set the timeout to "0.5", and after line 233 i added "print(read)" So i just kept shorting RST with GND (like quick taps) until I saw a print with "cmd>>:"

If you get it wrong does it say Error read Revision?

LordArrin commented 2 months ago

Bought a new revision, flash it with BOOT_TH05F_v16.hex by instruction, and device didn't show in list. Any help? Mi 11X_20240427_204248_lmc_8 4

Mi 11X_20240427_204347_lmc_8 4

Mi 11X_20240427_204356_lmc_8 4

Mi 11X_20240427_204154_lmc_8 4

pvvx commented 2 months ago

TH05_V1.6 works fine. The README describes what firmware is used for TH05_V1.6 Why did you flash the firmware from TH05F if this is another option?

LordArrin commented 2 months ago

Looks like it is my fault) Try it soon

Rudo1111 commented 3 weeks ago

Hello, I also have a problem with Error read Revision! out of 11, I flashed 9 and 2 still can't be flashed, has anyone encountered a similar situation? I tried advice like line 227 "0.5" and 233 "print(read)" and TM + VCC. It didn't help, could there be errors or try it on another computer and try again and again? :-) Thanks typ: Flash TH05Y_V1 2  Error read Revision! 20240612_094245 TH05Y_V1.2 2023-12-06 Problem solved. I updated the firmware via Smart Life to ver 2 and it worked. 🙂