I changed it, because it dumps everything. And flash size is read just before dumping.
Read everything into memorystream and then return specified offset?
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamOpening port COM6...
Port COM6 open!
upload_ram_loader will upload ramcode_ln882h.bin!
Sync with LN882H... wait 5 seconds
send version... wait for: Mar 14 2021/00:23:32
Mar 14 2021/00:23:32
Connect to bootloader...
Will send file via YModem
YModem::send: v2 will wait for CRC...
YModem::send: v2 wait_for_next CRC ok!
YModem::send: first packet 01 00 FF 72 61 6D 63 6F 64 65 5F 6C 6E 38 38 32 68 2E 62 69 6E 00 31 35 30 30 38 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 79 7A
YModem::send: v2 will wait for ACK...
YModem::send: v2 wait_for_next ACK ok!
YModem::send: v2 will wait for second CRC...
YModem::send: v2 wait_for_next second CRC ok!
Sending at 0... Sending at 1024... Sending at 2048... Sending at 3072... Sending at 4096... Sending at 5120... Sending at 6144... Sending at 7168... Sending at 8192... Sending at 9216... Sending at 10240... Sending at 11264... Sending at 12288... Sending at 13312... Sending at 14336... Sending at 15008... Done!
YModem::send: sending loop done!
Start program. Wait 5 seconds
send version... wait for: RAMCODE
version
RAMCODE
flash uid:0x433032313333342E3030230050009AFF
Give command: version
version
RAMCODE
[Timeout waiting for device reply]
Give command: version
version
RAMCODE
[Timeout waiting for device reply]
Give command: fdump 0x0 0x1000
fdump 0x0 0x1000
pppp
[Timeout waiting for device reply]
Give command: fdump 0x0 0x100
fdump 0x0 0x100
pppp
[Timeout waiting for device reply]
Give command:insmod wrote:Surprisingly, merge with latest commit was very easy, only 2 conflicts (one of them was because of static ip change, another is translation).
insmod wrote:I remember there was a problem with long startup command? I wonder if it fixed now
p.kaczmarek2 wrote:Ok, is that Ln882H PR tested and ready?
TL;DR: Backing up 2MB from LN882H went from about 14 minutes to 12.5–24.8 seconds, and one tester confirmed, "SmartLife AP seen and pairs in Tuya app." This FAQ is for people flashing LN882H/LN882HKI modules with OpenBeken, restoring Tuya backups, and fixing UART, Wi‑Fi, GPIO, and SSDP issues. [#21609499]
Why it matters: LN882H devices often look simple to flash, but real success depends on correct boot wiring, stable 3.3V power, the right RAM loader, and avoiding reserved GPIOs.
| Tool | Best use | OS | Read/backup speed reported | Notes |
|---|---|---|---|---|
| SharpLN882HTool | Flash, erase, backup, restore | Windows | 24.77s at 921600; 47.52s at 460800 | Later builds restored full Tuya dumps successfully |
| LN882Loader | Linux flashing and backup | Linux | Earlier full 2MB dumps around 10–14 min | Reverse-engineered, YMODEM-based |
| Tuya flasher / tyutool_cli | Vendor flashing | Windows / Linux extraction | Read not supported in tyutool_cli | One user saw: "Don't support read." |
Key insight: The biggest breakthrough was not the firmware itself but the RAMCODE path: once the custom dumper switched to raw binary reads with CRC and stable UART polling, LN882H backup and restore became fast enough to be practical for everyday recovery and migration. [#21608266]
LN882H_RAM_BIN.bin, and about 9 min 50 s after changing baud and stub choices. [#21605883]setup.xml, but Alexa still could not discover it until SSDP and the related networking support were enabled on LN882H. A later post said SSDP had been enabled the previous week. [#21430384]flash_otp_read 0x0 0x100 returned text like AE BE 4F 2D 5A, meaning roughly 3 characters per stored byte. The custom RAMCODE changed the method to raw binary blocks plus CRC, which removed the ASCII overhead and made full 2MB reads practical in seconds instead of minutes. [#21607145]bootload stage, which is the secondary boot path from flash to app during standard startup. [#21605903]#define ENABLE_DRIVER_SHT3X 1 under #elif PLATFORM_LN882H in src/obk_config.h, then run make OpenLN882H locally. If you do not have the toolchain, fork the repository, enable Actions on the fork, commit the config change, and download the finished firmware artifact from the workflow summary. [#21709798]