Skip to content
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

"Gaps" in flash readout? #8

Open
hllhll opened this issue Dec 16, 2023 · 6 comments
Open

"Gaps" in flash readout? #8

hllhll opened this issue Dec 16, 2023 · 6 comments

Comments

@hllhll
Copy link

hllhll commented Dec 16, 2023

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,

  • starting 0x1a0 spans 0x5f00 bytes, everything is zero, starting from +0x5e60 I have some data
  • starting 0x400 spans 0x5c00 - Everything is zero
    All of the other dumps are around few hundreds bytes at maximum; This doesn't seem to be like a wiring issue, as the data is persistent and repeatable, also the sections in which I am and am not getting data are reproduceable.

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

@hllhll
Copy link
Author

hllhll commented Dec 16, 2023

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
Copy link
Owner

pvvx commented Dec 16, 2023

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
Copy link
Author

hllhll commented Dec 17, 2023

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):

  • TS0002, _TZ3000_zmy4lslw
  • TS0003, _TZ3000_odzoiovu
  • TS0001, _TZ3000_tqlv4ug4
  • TS0012, _TZ3000_jl7qyupf
  • TS0011, _TZ3000_ji4araar
    But the one that is on my desk connected to the programmer is:
  • TS130F, _TZ3000_j1xl73iw (double blinds controller)

@pvvx
Copy link
Owner

pvvx commented Dec 17, 2023

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

@hllhll
Copy link
Author

hllhll commented Dec 18, 2023

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
Copy link
Owner

pvvx commented Dec 18, 2023

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

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

No branches or pull requests

2 participants