pvvx / TlsrComSwireWriter

TLSR826x/825x COM port Swire Writer
The Unlicense
62 stars 9 forks source link

"Gaps" in flash readout? #8

Open hllhll opened 10 months ago

hllhll commented 10 months ago

Hi! The tool seem to work for me - Thanks I picked this one as it requires the least amount of wires relatively to the other solutions (other also requires tx rx) I'm currently trying to read / backup Tuya "TZU" chip from this common-chinses in-wall zigbee module (for making dumb switches, smart). According to some resource online, Tuya TZU module has TLSR8258 Inside.

I can grab some readouts, but there seem to be A LOT OF "gaps" when I try to read, by gap I mean the read command failed and no data returned. I have bits and pieces of data, no consecutive read I have 2 relatively big readouts,

What kind of issue or configuration might cause such data interruption on read?

hllhll commented 10 months ago

Edit: please ignore, this didn't help at all

Still checking, but this might be due to bad "block" size, or read size, it defaults in the code to 0x100; I've read somewhere that flash block size is 4kb, It's still downloading but maybe I have better results (or maybe because I'm reading out-of bound or wrapped-around, as The current read offset is over 1M :P ) will update If I have further information

pvvx commented 10 months ago

According to some resource online, Tuya TZU module has TLSR8258 Inside.

Flash dumps (FullFlash bin) of some ZTU modules can be found in these descriptions: TS0001_TZ3000

TS0201_TZ3000

TS0202_TZ3000

TS0601_TZE200

TS0601_TZE204

And also for other devices - https://github.com/pvvx/pvvx.github.io

hllhll commented 10 months ago

Wow! thanks, wasn't aware you have other readouts. Do you have any idea are all of these modules the same? (N, No N, 1/2/3/4 gang, 1/2 blinds) and just differ in configuration Or... what may cause my issues with reading them? I would like to possibly go back once I flash something else (possibly wrong)

This is a list of what I have in my possession (installed):

pvvx commented 10 months ago

Use hardware versions of programmers with a SWM<->SWS connection.

hllhll commented 10 months ago

I need to buy these modules or I can Implement them on arduino / Texas instruments etc? I saw this repository, which I assume is a code written for the STM to communicate with the chip in SWM-SWS, However can't seem to find where I should start porting from :)

pvvx commented 10 months ago

STM, like UART, emulates the Telink SWire protocol. But on an SPI controller. The only hardware implementation of the Telink SWire protocol is found only in chips from Telink that have a SWM output.

All other emulators will work unreliably, since the Telink protocol requires specific processing of timings for each bit in a stream greater than 1 megabit per second. And the protocol is self-synchronizing.

DOCs/SWM_S.pdf