pepesuriano wrote: if you know the offsets
look in bkcdriverflash.c for the partition table.
app starts at 0x11000, boot loader before that.
I tried SPI via ESP32 first, and was unsuccessful. RPi worked after some coaxing...
Theoretically, you should only need SPI if the bootloader is broken - in your case the serial flashing is not working, correct?
So if your serial connections are ok, you could try first putting the std bootloader in from 0x0 - 0x11000, and then retry serial flashing.
I had to SPI because I overwrote the bootloader whilst developing the OTA flashing

.
If you do get SPI working, be sure to read all 2Mbyte as a backup first!!!
And don't overwrite the RF partition... I don't think we have calibration yet.
Dodano po 9 [minuty]: sebastian48 wrote: Seems like a IoT/Smart Home disaster waiting to happen
yes, it's better to have unsecure devices that you are in control of than devices which get their firmware from China.
Tuya claims 300M devices in the field. Each of these could be updated over the air at any moment under the control of a single organisation.
If that organisation was Russian, we would be being told to turn all of our 'smart' lights off at this moment...
If I was a govmnt sponsored hacker, I'd be hacking the tuya infrastructure. Far more opportunity than MicroTik routers....
It should be noted that OpenBeken is just as secure as TAS - i.e. not.
Dodano po 10 [minuty]: absinth84 wrote: I have some trouble here, how to use memory to store the data. I have had no more time to deep into it..
we have LittleFS (at least on BK7231). It occupies the OTA flash area (not used unless flashing!!).
If you use the Webapp for OTA flashing, then there are options to backup the LittleFS, flash the device, then restore the LittleFS.
Or, you can simply drag and drop your file back into the FS after flash... this will format the LittleFS area on first file write.
Also, there is a 'bootfile' from which initialisation commands are run. (autoexec.bat?).
You can also 'host' the webapp in the LittleFS, and edit files from the webApp...
Using the FS for constant configuration seems a fairly natural thing to do.