FAQ
TL;DR: Dumping the 2 MB LN882H flash over UART takes ~30 minutes, yet “one of the world’s first LN882H flashing tutorials” now exists [Elektroda, p.kaczmarek2, post #20935396] Why it matters: DIYers can reclaim BSD34 smart plugs for open-source firmware and precise power metering.
Quick Facts
• Rated current: 20 A relay, BL0937 metering IC [Elektroda, divadiow, post #20935260]
• MCU/Module: Lightning LN882HKI on Tuya WL2S or CB2S boards [Elektroda, divadiow, post #20935260]
• Flash size: 2 MB cap confirmed by dump script [Elektroda, divadiow, post #20935260]
• Latest tested OpenBeken builds: 1.17.454 → 1.17.521 [Elektroda, divadiow, #20953393; beloborodom, #21021494]
• Home-Assistant: MQTT discovery publishes 8 entities in <2 s [Elektroda, divadiow, post #20954030]
Which GPIOs do I need for a working BSD34 template?
Use A0=LED, A3=Btn, A10=LED_n (blue), A11=Rel, plus BL0937 pins A7, A12, A19 for CF1, CF, SEL respectively [Elektroda, divadiow, post #20935260]
Why is the red LED always on after flashing?
Your unit likely wires the red LED to GPIO 23 as WiFi status. Map it as WifiLED and map the blue LED (GPIO 8) as LED_n; the red LED will turn off when WiFi connects [Elektroda, andraskszabo, post #21433856]
Can I flash WL2S/CB2S without desoldering?
Yes. Solder three wires (TX, RX, GND) and ground A9/BOOT while powering with 3.3 V. Many users reported reliable in-situ flashing [Elektroda, andraskszabo, post #21431813]
What is the quickest safe way to open the BSD34 housing?
- Clamp just below the rim, tighten until glue cracks. 2. Rotate clamps, repeat. 3. Unscrew the single PCB screw and lift the board; only the earth wire remains attached [Elektroda, divadiow, post #20935260]
BL0937 reading shows zeros—how do I enable the driver?
Compile OpenLN882H with drv_bl0937.c, drv_bl_shared.c, and add them plus drv_ntp.c to CMakeLists.txt. After merging PR #5 and #1054, binaries ≥1.17.454 read power correctly [Elektroda, max4elektroda, post #20946708]
How long should flash dumping take?
Typical duration is 15–40 minutes at the fixed UART speed. One user saw several hours until a Windows reboot cut the time to 15 minutes [Elektroda, p.kaczmarek2, post #20935396]
Does the plug reconnect after a long WiFi outage?
Yes. Tests with a 20-minute AP blackout showed both LN882H devices reconnect within seconds and keep uptime counters intact [Elektroda, divadiow, post #21021470]
Edge-case: Ping-watchdog disables WiFi and never recovers—fix?
Upgrade to ≥1.17.517. LWIP threading and MQTT buffer patches stop the ERR_MEM loop and watchdog now restarts WiFi correctly [Elektroda, beloborodom, #21021494; p.kaczmarek2, #21021691].
How do I calibrate voltage and current quickly?
Run startDriver BL0937
, attach a known 60 W load, then issue: 1.PowerSet 60
, 2.VoltageSet 230
, 3.CurrentSet 0.26
. Save settings; readings align within ±2 % [Elektroda, max4elektroda, post #20946777]
Is the plug fully discoverable in Home-Assistant?
Yes. mqttDiscovery 2
advertises 1 switch, 5 sensors, and RSSI. Publishing eight JSON configs finishes in under two seconds with no memory errors [Elektroda, divadiow, post #20954030]
What statistic shows OpenBeken stability on LN882H?
Continuous run tests exceed 36 000 s (10 h) with free RAM ~96 kB and zero socket drops [Elektroda, divadiow, post #20954030]
Can the 2 MB flash limit be raised?
Not yet. The LN882H boot ROM rejects writes above 0x00200000; flashing larger images returns an error [Elektroda, divadiow, post #20935260]
Do I need F-clamps like in the video?
No. Two small G-clamps or even adjustable pliers suffice; EU plugs open cleaner than UK types [Elektroda, divadiow, post #20935260]
Quote for motivation?
“It was easier than I expected,” reports the maintainer after merging BL0937 support [Elektroda, p.kaczmarek2, post #20946728]
Where do I download ready-made binaries?
Grab OpenLN882H_<version>.bin
from the nightly GitHub actions artifacts in OpenLN882H; build 1.17.521 is current [Elektroda, beloborodom, post #21021494]