pvvx / THB2

Custom firmware for Tuya devices on the PHY622x2 chipset
Other
130 stars 14 forks source link

flashing BTH01 issues #44

Closed kopchik closed 5 months ago

kopchik commented 5 months ago

Hi!

JFYI I'm trying to flash BTH01 from UART, and I think I'm having some issues not described anywhere.

The first one is, I needed to connect TM (TestMode) pin to VBAT+. Otherwise PHY6222 doesn't communicate via UART.

The second issue is, my BTH01 starts serial at 115200, while rdwr_phy62x2.py script initiates connection at 9600. So, I had to change START_BAUD to 115200 in order to be able to connect to it.

My module looks exactly like on https://pvvx.github.io/BTH01/, pcb version BTH01Y_V1.2 with datecode on PCB silkscreen 2024-02-29 .

pvvx commented 5 months ago

I have never connected TM anywhere on dozens of devices and hundreds of firmwares. There were no problems. Same with UART speeds.

In order for the TEST_MODE pin to switch the chip to start the programming state, both pins P24 and P25 must be set. This is not always possible.

image

kopchik commented 5 months ago

Ah, I see, the IC can also be programmed without TM pin.

May be something changed in recent firmware? I attach the dump here, in case this is of any interest. Sadly I didn't check the behavior after flashing your BOOT firmware.

I guess we can close this issue for now.

fw_orig.bin.zip

333Violet commented 3 weeks ago

Привет! Я пытаюсь прошить BTH01 через UART , что делаю не так? Не запускается утилита для прошивки. PS C:\Users\Violet\AppData\Local\Programs\Python\Python312> cd C:\Users\Violet\AppData\Local\Programs\Python\Python312\THB2 PS C:\Users\Violet\AppData\Local\Programs\Python\Python312\THB2> pip3 install -r requirements.txt Requirement already satisfied: pyserial in c:\users\violet\appdata\local\programs\python\python312\lib\site-packages (from -r requirements.txt (line 1)) (3.5) PS C:\Users\Violet\AppData\Local\Programs\Python\Python312\THB2> python3 rdwr_phy62x2.py -p COM4 -e wh ./bin/BOOT_BTH01_v18.hex Python PS C:\Users\Violet\AppData\Local\Programs\Python\Python312\THB2>

Вопрос закрыт, получилось прошить, благодарю. Надо было набирать "python" в моем случае а не "python3"