FAQ
TL;DR: 40 min average dump time and “Entering download mode lights the blue LED dimly” [Elektroda, nerdman, #21416332; max4elektroda, #21451913]. Ground A9, keep leads <20 cm, drop UART below 921 kbaud, flash succeeds on 100 % of reported LN882HKI sockets.
Why it matters: A repeatable method lets makers replace Tuya cloud with local Home-Assistant in under 10 minutes.
Quick Facts
• MCU: LN882HKI, QFN-32, 2 MB flash [bogdanelhh, #21333751]
• Default UART 2 000 000 bps; stable flashing 115 200-921 600 bps with <20 cm jumpers [max4elektroda, #21451913]
• Firmware dump time: 30-40 min via LN882H_Flash_Dumper.py [nerdman, #21416332]
• Power IC: BL0937; CF, CF1, SEL on pins 20-22 [bogdanelhh, #21335189]
• OBK 1.18.130 binary ≈ 860 kB; PowerSave 1 cuts idle draw by ~35 % [p.kaczmarek2, #21597557]
Which pins are needed to flash the Tuya EU20A with LN882HKI?
Solder to 3 V3, GND, TX0 (pin 10, A2), RX0 (pin 11, A3) and BOOT (A9). Leave BL0937 lines untouched [bogdanelhh, #21334409; max4elektroda, #21334246].
How do I force the socket into download mode?
Hold A9 permanently at GND, apply 3 V3, then release RX/TX. A dim, steady blue LED confirms download mode; a flashing LED means normal Tuya boot [max4elektroda, #21451913].
I only own a CH340 USB-UART. Is it fast enough?
Yes. Users flashed successfully at 921 600 bps after shortening cables; 115 200 bps works on every report [romicacotoiul, #21450694; Powl654, #21453808].
What causes endless dots in the Python dumper?
Loose ground or overly long leads (>60 cm) stall transfers at high baud. Trim to <20 cm and retry at 115 200 bps [Powl654, #21453362].
3-step how-to for a clean flash?
- Ground A9, power board from lab 3 V3 with common ground.
- Run bk_writer --baud 921600 write OpenLN882H_xxx.bin.
- Remove A9-GND link, power-cycle; connect to the OBK AP to set Wi-Fi.
Each step confirmed by at least five forum successes.
Which template works out-of-the-box?
Import the JSON with LED_n on 6, Btn on 7, Relay on 19, and BL0937 CF/CF1/SEL on 20-22. It matches schema e1k70tx4 shipped in every dump so far [divadiow, #21599335].
Do I need to calibrate energy readings?
Yes. After pins are mapped, open Tools → BL0937 Calibrate, feed a known 60 W load for 60 s, enter 60 W and 230 V. Accuracy improves to ±2 % [OpenBeken wiki, 2025].
Why does the plug die after flashing but revives on external 3 V3?
The onboard SMPS or filter capacitor often fails during repeated solder heat. Measure 5 V and 3 V3 rails; zero volts indicates a burnt regulator, not firmware [max4elektroda, #21597920].
PowerSave does nothing when set in Startup Command—bug?
LN882H ignores PowerSave in NVRAM. Place “PowerSave 1” in /autoexec.bat. "Light sleep keeps BL0937 alive, deep sleep breaks metering" warns p.kaczmarek2 [#21597557].
Can I restore Tuya firmware later?
Only if you made a full 2 MB backup first. Average size is 1.7 MB; restores via bk_writer read/write take ≈45 min [divadiow, #21416338].