logo elektroda
logo elektroda
X
logo elektroda

How to flash LN882H with open source Tasmota/Esphome style firmware - backup procedure included

p.kaczmarek2 65571 297

TL;DR

  • LN882H modules can be flashed over UART with open-source Tasmota/Esphome-style firmware to free cloud-controlled devices and integrate them with Home Assistant.
  • Wire module TX, RX, GND, 3V3, and BOOT/GPIOA9 to ground, and keep GPIOA9 low throughout the entire flashing process.
  • Backup uses `python LN882H_Flash_Dumper.py COMx flashdump`, and the firmware flash command is `LN882H_CMD_Tool.exe COMx download flash 921000 0x0 flashimage.bin`.
  • After flashing, power-cycle the module, disconnect BOOT from ground, and open 192.168.4.1 to configure it like other OpenBeken/Tasmota-style devices.
  • A reliable external 3.3V supply is recommended because powering directly from the USB-to-UART adapter’s 3.3V pin may fail.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • #91 21018952
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    note that if you update a LN device to latest commit https://github.com/openshwprojects/OpenBK7231T_App/pull/1143 (Build on Mar 25 2024 12:49:16 version LN882H_1143_merge_b068861648fb) and you have powersave 1 set, the device will not connect to wifi but will need to be put into safe mode so you can switch to powersave 0.

    That was my experience just now anyway. I don't have an LN connected to uart to see boot log at the mo

    Added after 15 [minutes]:

    behaviour confirmed on two different devices. LN-02 switch and unmarked candle bulb module
  • ADVERTISEMENT
  • #92 21021475
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    anyone else tried this PR with powersave 1?
  • #93 21021572
    rufus4
    Level 11  
    Posts: 65
    Rate: 9
    Hi everyone,
    may I ask some beginners questions?

    Yesterday I did flash a LN822H on the WL2S (blue pcb), part of the ELIVCO LSPA9. It worked so far without any problems.
    (btw at the moment you can get three of these units for €10 on ali)

    After playing arround with some settings I cant reach the userinterface anymore. Device does not show up on AP or the homenetwork.
    Reflashing is possible, but it does not clear the settings. Is there a way to clear settings over the flash-tool or any other way than wifi?
  • #94 21021637
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    rufus4 wrote:
    After playing arround with some settings I cant reach the userinterface anymore. Device does not show up on AP or the homenetwork.
    Reflashing is possible, but it does not clear the settings. Is there a way to clear settings over the flash-tool or any other way than wifi?


    Not sure I've had this with any LNs, but if the RF stuff gets messed up on Beken I've had to reflash factory firmware then re-OBK again. Might be something to try on LN?
  • #95 21021640
    miegapele
    Level 16  
    Posts: 173
    Help: 15
    Rate: 29
    You can just power on and off 5 times with short pause in between and it will come up in safe mode and create ap, the same as after initial setup. Then you can clean the settings
  • #96 21021646
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    there are also some other command line bits to try

    eg

    .\LN882H_CMD_Tool.exe COM# flash erase_all

    and to see if it still has a mac

    .\LN882H_CMD_Tool.exe COM# mac read
    Attachments:
    • LN882H_Instructions_V1.0.16 (2).xlsx (15.35 KB) You must be logged in to download this attachment.
  • #97 21021655
    rufus4
    Level 11  
    Posts: 65
    Rate: 9
    thanks a lot for your hints!
    I´ll try.

    I think this happend when I did set Channel to remember state with "-1". Is there any problem with this setting? for me it looks like it messed all up.
  • ADVERTISEMENT
  • #98 21021656
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    miegapele wrote:
    You can just power on and off 5 times with short pause in between and it will come up in safe mode and create ap, the same as after initial setup. Then you can clean the settings


    yes. it should just go into safe mode tho, which will ignore the -1 set, surely?
  • #99 21021687
    rufus4
    Level 11  
    Posts: 65
    Rate: 9
    when I checked for mac I could not acess datas "Fail. Could not go in ramcode mode."
    then I did erase flash and it was possibly again to ask for mac "mac:ff:ff:ff:ff:ff:ff"
    then reflashed, entered in ap mode and configured network settings, reboot, but still no acess from homenetwork, again not possible to ask for mac!

    I`ll try to reflash original fw

    --update---

    reflashing original fw did help at least to connect the device again on homenetwork
    thanks again!

    Added after 2 [hours] 19 [minutes]:

    One more question about understanding the hole materia.

    Why is my dump file from the HL882KHI 4MB? Docs say that this chip has got 2MB Flash. LN882H series comparison diagram showing memory and pin designation.
  • #100 21021878
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    rufus4 wrote:
    reflashing original fw did help at least to connect the device again on homenetwork
    thanks again!


    excellent

    rufus4 wrote:
    Why is my dump file from the HL882KHI 4MB? Docs say that this chip has got 2MB Flash


    https://www.elektroda.com/rtvforum/topic4008545-150.html#20935788

    tbh I thought the .py file had been updated wherever it can be downloaded from

    Added after 2 [minutes]:

    divadiow wrote:
    Not sure I've had this with any LNs, but if the RF stuff gets messed up on Beken I've had to reflash factory firmware then re-OBK again. Might be something to try on LN?


    actually I have https://www.elektroda.com/rtvforum/topic4008545-90.html#20914464
  • #101 21022078
    max4elektroda
    Level 24  
    Posts: 754
    Help: 48
    Rate: 187
    divadiow wrote:
    anyone else tried this PR with powersave 1?

    Finally I did. And with "strange" results:

    Changing "startup command" to set "PowerSave 1" and restart, device will connect to WiFi, log will dispaly " ... POWERSAVE", but current used is unchanged at ~ 90mA.

    BUT: If I set "PowerSave 1" from the "Command Tool", the current drops to ~ 55mA !!!

    So for me, setting Powersave doesn't work as startup command - but it does as a command.
  • #102 21022084
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    oh that is interesting!
  • #103 21022086
    max4elektroda
    Level 24  
    Posts: 754
    Help: 48
    Rate: 187
    But this is just tested on my bare module, not the one in a plug, which would need to "count energy interrupts".
    And: GUI is very slow now.
  • ADVERTISEMENT
  • #104 21022087
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    I think I'll try again
  • #105 21022109
    max4elektroda
    Level 24  
    Posts: 754
    Help: 48
    Rate: 187
    Since WiFi did work, I also tried on my plug:
    Seems to work quite o.k., the energy values shonw are reasonable and, best to say, after about 10 minutes the temperature is ~ 30°C, with a simple load of 25W !
    The bare module used to be around 35°C, not even inside a case, not to speak about realy, power converters ...

    Added after 7 [minutes]:

    Switched to "PowerSave 0", and one minute later temperature is well beyond 40° (over 45° just now).

    Added after 4 [minutes]:

    Switched back to PowerSave 1 at 47.8°
    After 3 minutes, temperature is 37.2°

    Added after 6 [minutes]:

    But it is really very slow (toggling switch took me 10 seconds) and readings for BL0937 are not updated as it seems :-(

    Added after some more [minutes]:
    This might have been a problem on my client.
    Now it looks o.k. I see readings for BL0937 changing again and switching is o.k.
    Temperature around 35° - that really looks good for me now (no long term test though)
  • #106 21022157
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    p.kaczmarek2 wrote:
    typedef enum
    {
        ACTIVE          = 0,
        LIGHT_SLEEP     = 1,
        DEEP_SLEEP      = 2,
        FROZEN_SLEEP    = 3,
    } sleep_mode_t;


    Which of these corresponds to new powersave commands? What states are we entering?

    Added after 11 [minutes]:

    light sleep I guess

    https://github.com/openshwprojects/OpenBK7231...mits/e58abff715e43ebdf0a9c67daea143f273f2123c
  • #107 21022179
    max4elektroda
    Level 24  
    Posts: 754
    Help: 48
    Rate: 187
    In cmd_main.c is:

    #elif defined(PLATFORM_LN882H)
    	if (bOn) {
    		sysparam_sta_powersave_update(WIFI_MAX_POWERSAVE);
    		wifi_sta_set_powersave(WIFI_MAX_POWERSAVE);
    	}
    	else {
    		sysparam_sta_powersave_update(WIFI_NO_POWERSAVE);
    		wifi_sta_set_powersave(WIFI_NO_POWERSAVE);
    	}
    #else


    Ahh, I just realized, we are talking about different things!
    Sorry, I tried with the release version, not the one from the PR.

    I hope I didn't misguide you with my posts.
  • #108 21022196
    divadiow
    Level 38  
    Posts: 5039
    Help: 438
    Rate: 891
    oh lol.

    im testing Build on Mar 25 2024 12:49:16 version LN882H_1143_merge_b068861648fb

    I have powersave 0 in startup command at the moment but have tried switching to powersave 1 in web app and ALSO see the temperature drop as well as the power consumption.

    This is the power consumption starting with powersave 0 with the 0.6-0.7w readings then powersave 1 with 0.3-0.5w readings from about 8s into the video





    but now I don't know where the PR fits into all this.

    Added after 9 [minutes]:

    i can't say im seeing a slow down with powersave 1 on the PR build though

    Added after 3 [minutes]:

    I'm just testing with this LN candle lamp. it was getting too hot with the bulb lit and it would reboot after a few minutes. temps were 80+ degrees C. see how long it lasts...

    Screenshot of the OpenLN882H_C25E1088 interface with controls for LED brightness and color temperature.

    Added after 54 [minutes]:

    bulb still on and online, which is a novelty. BP5758D_Current 1 1 set though so LEDs are LOW.

    Screenshot of a web application interface showing internal temperature and WiFi status.

    will try BP5758D_Current 5 5

    Added after 18 [minutes]:

    Too hot at 5 5, rebooted. Will try 3 3
  • #109 21022423
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14591
    Help: 654
    Rate: 12612
    That's a lot t process! Ok, here are two quick tips from my side:
    - BL0937 is known to work bad with powersave because BL0937 requires a change interrupt to work in order to count CF/CF1 pulses
    - if somehow PowerSave must be run later, you can use delay_s in script of waitFor to wait for WiFi state
    I'm eager to see more results!
    Helpful post? Buy me a coffee.
  • #110 21024816
    rufus4
    Level 11  
    Posts: 65
    Rate: 9
    I made an interesting discovery. Tried to measure the power consumption of the LSPA9 with LN822HKI and the BL0937, because I recocnised that its getting quiet hot.
    It looks like Tuya does not use any power save mode at all on this device with the WL2S board. And this is very interesting. (Or they just don`t care?)

    Measured with a DMM and a clamp meter the device's power with relays off and on.
    OpenLN882H_1.17.521 takes 8.5 and 12.5 mA
    original Tuya FW takes the same 8,5 and 12.5 mA (this is incredible 2/3Watts)

    OpenLN882H_1.17.521 with experimental "powersave 1" takes an average of 6.5 and 10.5 mA (but GUI is not stable, freezes after a while)

    For comparison, a shelly plug (16A) takes around 4/7mA which is only half of the Tuya firmware.

    (I know, my mesurement is not very accurate because of powerpeeks. But without powersave mode the consumption seems to be nearly constant.)

    p.kaczmarek2 wrote:
    - BL0937 is known to work bad with powersave because BL0937 requires a change interrupt to work in order to count CF/CF1 pulses

    maybe thats the point?
  • #111 21026099
    rufus4
    Level 11  
    Posts: 65
    Rate: 9
    Is there a chance to get a DHT22 working on the LN882H?

    While setting the pins, I found all of this DHT's to choose on the list. So I thought I'll try and did solder one more pinout to pin 4 on the WL2S board and connected a DHT22.
    It looked like it got recognized and warned me to set two channels. But there are no values. Did I choose the wrong pin for that, do I need to start a driver or is there no such implementation in the FW?

    I know, maybe it's a bit too early for these thingies, but I love to fithering around with it and it would be nice to have temperature and humidity directly on a power plug to switch a dehumidifier. :)
    Device configuration screen with connected DHT22 sensor showing no temperature and humidity values.
  • #112 21026717
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14591
    Help: 654
    Rate: 12612
    rufus4 wrote:
    I
    Measured with a DMM and a clamp meter the device's power with relays off and on.
    OpenLN882H_1.17.521 takes 8.5 and 12.5 mA
    original Tuya FW takes the same 8,5 and 12.5 mA (this is incredible 2/3Watts)

    Thank you for those measurements! At least we know we're not making the power usage higher.

    rufus4 wrote:

    OpenLN882H_1.17.521 with experimental "powersave 1" takes an average of 6.5 and 10.5 mA (but GUI is not stable, freezes after a while)

    We will need to resolve that, but how... if anyone wants to help, check out our repository and give it a try.
    https://github.com/openshwprojects/OpenBK7231T_App

    rufus4 wrote:

    p.kaczmarek2 wrote:
    - BL0937 is known to work bad with powersave because BL0937 requires a change interrupt to work in order to count CF/CF1 pulses

    maybe thats the point?

    This is most likely the reason that no PowerSave is used on BL0937 devices.


    rufus4 wrote:
    Is there a chance to get a DHT22 working on the LN882H?

    rufus4 wrote:
    While setting the pins, I found all of this DHT's to choose on the list. So I thought I'll try and did solder one more pinout to pin 4 on the WL2S board and connected a DHT22.

    DHT sensors are handled per-pin:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/driver/drv_dht.c
    The DHT pin roles are listed here:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/ioRoles.md
    The DHT update, however, seems to be disabled for LN882H currently:
    Screenshot of Visual Studio editor with the user_main.c file open.
    Let me try checking this out. I will update LN882H makefile to include DHT driver and then add enable there.

    Added after 6 [minutes]:

    DHT step 1:
    https://github.com/openshwprojects/OpenLN882H/commit/0467665d75a879d3024f538a5d31c313f844fc16
    Now I will try to enable it in app...

    Added after 1 [hours]:

    I think i enabled it, it should work on LN882H with 1.17.527 build, but I am not able to test...
    https://github.com/openshwprojects/OpenBK7231...mmit/f27907593411632f7186e0e9e6ff4e572880cf0f
    I also later moved the define to the correct place:
    https://github.com/openshwprojects/OpenBK7231...mmit/d38957aee0cbcbb745a1975447024ce6d7f54b45
    It should be more obvious now how do we enable DHT on new platform.
    Helpful post? Buy me a coffee.
  • #113 21027619
    rufus4
    Level 11  
    Posts: 65
    Rate: 9
    First, I do have to say again that I'm a poor beginner and please for passion.
    And now one more question. Does the drivers start by themselves? DHT and NTP drivers I never have seen listed as working on the main GUI page.

    I think I made a mistake. I connected pin B4, but selected it as Pin 4.
    Which Pin number is B4 then on the list from 1-25?
  • #114 21027731
    max4elektroda
    Level 24  
    Posts: 754
    Help: 48
    Rate: 187
    rufus4 wrote:
    Does the drivers start by themselves? DHT and NTP drivers I never have seen listed as working on the main GUI page.

    You will have to start the drivers on the "execute custom command" line:
    Its "startDriver <driver>" e.g.
    startDriver NTP
    to start NTP.

    Only BL0937 is an exception and starts automatically.
    Correction: DHT also has an autostart.

    Added after 9 [minutes]:

    Regarding the pins: in the gui you can select B4 directly.
    It will be mapped to pin 20 in the config file (A# pins are 0 to 15, so the pin B0 is 16 and so on).
  • ADVERTISEMENT
  • #115 21027744
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14591
    Help: 654
    Rate: 12612
    @max4elektroda I think that DHT also has an autostart, it's actually handled outside drv array. Still, NTP has to be started as you shown.
    Helpful post? Buy me a coffee.
  • #116 21027834
    rufus4
    Level 11  
    Posts: 65
    Rate: 9
    Thanks a lot, finally I selected the right pin B4 now. Somehow it would have been too easy, open my eyes a bit wider only. :)

    But still DHT does not work in my case. And if I try to start the DHT driver manually, there is none on the list. Same with the newest build .530.
    --updated--
    Screenshot of a device control panel showing data related to a DHT22 sensor and other system parameters.


    max4elektroda wrote:
    to start NTP.

    Only BL0937 is an exception and starts automatically.


    does only start manually on my LN882H, but it works fine. How can I set a different NTP server IP? Couldn't find any information about that.
  • #117 21027880
    max4elektroda
    Level 24  
    Posts: 754
    Help: 48
    Rate: 187
    rufus4 wrote:
    How can I set a different NTP server IP? Couldn't find any information about that.

    After starting the NTP driver, you can set the server with "ntp_setServer <IP>"
  • #118 21028284
    piotrret
    Level 13  
    Posts: 67
    Help: 2
    Rate: 5
    Hello.
    I have a question about the NTP server.
    In the Startup command menu I have: startDriver ntp
    The problem is that the time after today`s time change is incorrect, so I also added: startDriver ntp; ntp_timeZoneOfs +2
    After this change, when I restarted the device, the NTP server no longer starts.
    I tried to create an autoexec.bat file to include these two commands, but the file was not created. Is the LittleFS mechanism implemented in the current version of OpenLN882H_1.17.524_OTA software?
  • #119 21028427
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14591
    Help: 654
    Rate: 12612
    @piotrret to enter more than one command in the short startup command should be used backlog : :
    
    backlog first command; second command etc; third
    

    Just like in Tasmota.
    Helpful post? Buy me a coffee.
  • #120 21028556
    piotrret
    Level 13  
    Posts: 67
    Help: 2
    Rate: 5
    It works, thanks for the tip. I just wanted to ask about creating files, because, as I wrote earlier, I tried to create the autoexec.bat file, but after pressing the List Filesystem button, nothing appears, even though after using the Create File function, Screenshot of a filesystem interface showing the process of creating files and listing items in LittleFS. I have the message saving file...save complete...
📢 Listen (AI):

Topic summary

✨ The discussion focuses on flashing LN882H modules with open-source firmware similar to Tasmota/Esphome, enabling cloud-free operation and integration with Home Assistant. Flashing requires a USB to UART converter with reliable 3.3V power supply, connecting module TX to UART RX, RX to TX, GND to GND, and 3.3V to 3.3V. Users report challenges including access to the BOOT pin, interference from board components on RX/TX lines, and the necessity of short wiring to ensure stable flashing. Various USB to UART converters (CH340, FT232RL, PL2303, CP2101) have differing success rates; CH340 and CP2101 are recommended over some FTDI and PL2303 adapters. Correct baud rate (115200) and running the flashing tool from non-system drives (e.g., D:) improve success. The LN882H_CMD_Tool is used for flashing and dumping firmware; flashing requires power cycling and keeping BOOT grounded during operations. Users successfully dumped firmware but often encountered "Fail. Error downloading file" during flashing, resolved by adjusting baud rate, shortening cables, and using compatible USB-UART adapters.

Power-saving features are under active development; enabling PowerSave mode reduces power consumption and device temperature but may cause WiFi connection issues in some firmware versions. PowerSave commands can be set via startup commands or command tool, with better effect when applied directly via command tool. Temperature monitoring shows LN882H devices run hot (up to 74°C) without load, improved by PowerSave mode. Integration with energy metering (BL0937) is affected by PowerSave due to interrupt handling. Static IP assignment is currently unimplemented in firmware. DHT sensor support is partially implemented; drivers require manual start commands, and pin mapping must be correct. NTP client requires manual driver start and supports server IP configuration via commands. Safe mode can be triggered by power cycling to reset device settings. Firmware and tools are evolving with ongoing commits addressing power management, filesystem (LittleFS), and device stability.

Overall, flashing LN882H modules demands careful hardware setup, compatible USB-UART adapters, correct flashing parameters, and power cycling. Firmware features like power saving, sensor support, and network configuration are improving but still have limitations. Community contributions and testing continue to enhance LN882H open-source firmware usability and integration.
Generated by the language model.

FAQ

TL;DR: Need to flash LN882H and keep a recovery path? Use 5 wires and keep BOOT low; as one expert put it, "BOOT is like IO0". First dump the original flash, then write the regular firmware binary over UART, usually at 115200 baud if higher speeds fail. This FAQ is for OpenBeken/OpenLN882H users who need a practical flash, backup, OTA, and recovery workflow. [#20923772]

Dlaczego to ma znaczenie: LN882H can run cloud-free firmware, but success depends more on wiring discipline, baud rate, and power cycling than on the chip itself.

Opcja Typowe użycie Co działało w praktyce Główne ryzyko
LN882H_CMD_Tool.exe Flashowanie UART w Windows Często ruszało po zmianie na 115200 Błąd Fail. Error downloading file.
LN882H_Flash_Dumper.py Backup flash i OTP Tworzy dump przed zmianą firmware Długi odczyt, wymaga poprawnego BOOT
OTA z Web App Aktualizacja już działającego OBK Chrome/Chromium działały stabilniej niż Firefox Firefox mógł wywołać crash OTA
BK7231GUIFlashTool Nowsze narzędzie GUI Wspierane dla LN882H od aktualizacji 2026 Nadal wymaga tego samego okablowania

Najważniejszy wniosek: Najczęstsza przyczyna nieudanego flashowania LN882H nie była w module, tylko w procedurze: BOOT musi pozostać niski, po każdej próbie trzeba odłączyć i podłączyć zasilanie, a zejście do 115200 baud często rozwiązywało zapis. [#20958664]

Quick Facts

  • LN882H flashuje się przez UART podobnie do ESP8266: potrzebne są połączenia TX, RX, GND, 3.3V i BOOT/GPIOA9, a GPIOA9 musi pozostać w stanie niskim przez cały proces. [#20905518]
  • W praktyce zapis przy 2,000,000 baud często kończył się błędem, a kilka osób potwierdziło sukces dopiero po przejściu na 115200 baud. [#20958664]
  • PowerSave na LN882H potrafił mocno obniżyć temperaturę: w jednym teście spadek wyniósł z 64.0°C do 36.0°C po PowerSave 2, kosztem większych opóźnień sieciowych. [#21055421]
  • LittleFS jest systemem plików flash, który przechowuje pliki i skrypty, z odpornością na restart oraz małym narzutem pamięci. Na LN882H dodanie LittleFS zwiększało rozmiar binarki o około 42 KB. [#21069454]
  • OTA na LN882H bywało niestabilne w Firefox; po naprawce przetestowano poprawny update z buildu 1441_merge_6d6a6086fa18 do OpenLN882H_1.17.789_OTA.bin właśnie w Firefox 132.0.2. [#21332121]

How do I flash an LN882H module over UART and make a full backup of the original firmware first?

Flashowanie i backup robi się w dwóch etapach. 1. Podłącz TX↔RX, RX↔TX, GND, 3.3V oraz BOOT/GPIOA9 do GND. 2. Zrób kopię poleceniem python LN882H_Flash_Dumper.py COMx flashdump; narzędzie zapisze dump flash i OTP. 3. Wgraj nowy firmware poleceniem LN882H_CMD_Tool.exe COMx download flash 921000 0x0 flashimage.bin, a po zakończeniu odłącz BOOT od masy i zrestartuj zasilanie. Po starcie urządzenie wystawia AP na 192.168.4.1. [#20905518]

What is the BOOT pin on LN882H, and why does GPIOA9 have to stay low during the whole flashing process?

BOOT na LN882H to pin wejścia do bootloadera, a w praktyce jest nim GPIOA9. Musi pozostać niski przez cały proces, bo tylko wtedy układ pozostaje w trybie programowania; autor porównał go wprost: „BOOT is like IO0.” Odłączenie BOOT w trakcie potrafi przerwać procedurę lub zablokować kolejną próbę do czasu pełnego odcięcia zasilania. Dlatego BOOT zwiera się do GND przed podaniem zasilania i trzyma nisko do końca flashowania. [#20923772]

Why does LN882H_CMD_Tool show "Fail. Error downloading file." and what fixes actually worked, like using 115200 baud, shorter wires, or a different USB-to-TTL adapter?

Najczęściej ten błąd znikał po zmianie parametrów transmisji i procedury zasilania. Skuteczne poprawki to: użycie 115200 zamiast 2000000, skrócenie przewodów, pełne odłączenie zasilania i USB-TTL po każdej nieudanej próbie oraz podmiana adaptera USB-UART. Pomagało też upewnienie się, że wgrywany jest zwykły plik binarny, a nie plik OTA. Kilku użytkowników potwierdziło, że samo ustawienie 115200 natychmiast rozwiązało Fail. Error downloading file. [#20996463]

Which USB-to-UART adapters work best for LN882H flashing, and how do CH340, CP2101, FT232RL, PL2303, and NodeMCU compare in practice?

Najlepiej wypadały adaptery CH340 i CP2101, ale LN882H bywa wybredny. W wątku potwierdzono sukces na CH340, CP2101, adapterach FTDI w części konfiguracji oraz nawet na NodeMCU ESP8266 z CH340. FT232RL działał u jednych, a u innych nie; PL2303 też działał, ale częściej zgłaszano z nim problemy. Jeden użytkownik potwierdził, że LN882H można było flashować przez NodeMCU z CH340, a inny odzyskał stabilność dopiero po przejściu z FTDI na CH430/CH340. [#20958756]

What is LittleFS in OpenBeken/OpenLN882H, and what features depend on it on the LN882H platform?

LittleFS to system plików w pamięci flash, potrzebny do plików takich jak autoexec.bat, skryptów i funkcji opartych o lokalny storage. Na początku LN882H go nie miał, więc przycisk „List Filesystem” nic nie pokazywał, a tworzenie plików nie działało realnie. Po późniejszym wdrożeniu potwierdzono, że pliki przetrwały kilka aktualizacji OTA. Dodanie LittleFS zwiększało rozmiar binarki LN882H o około 42 KB, ale odblokowywało skrypty i trwałe pliki konfiguracyjne. [#21069454]

How can I flash an LN882H module without desoldering it from the PCB, and what board connections can interfere with RX, TX, or BOOT access?

Da się flashować bez wylutowania, jeśli masz fizyczny dostęp do BOOT i nic nie obciąża linii RX/TX. Problemem bywają przyciski, kondensatory debounce, ścieżki do innych układów lub trudny dostęp do samego BOOT. W takich przypadkach trzeba czasem przeciąć ścieżkę, usunąć kondensator albo bardzo precyzyjnie dolutować cienki przewód tylko na czas programowania. W wątku potwierdzono też przypadek, gdzie moduł LN-02 udało się zaprogramować in-circuit bez wylutowania i bez cięcia RX/TX. [#20924089]

What’s the difference between the regular LN882H firmware binary and the OTA file, and which one should be used for UART flashing versus Web App updates?

Do UART używa się zwykłego pliku binarnego, a do aktualizacji przez Web App używa się pliku OTA. Pomylenie ich jest częstą przyczyną błędów flashowania. Wprost zalecono: wybierz poprawny plik binarny do flashowania, nie plik OTA. Ta różnica wracała też przy Web App, gdzie użytkownicy trafiali na nie-OTA pliki i update nie przechodził. Reguła jest prosta: UART = pełny bin, Web App = OTA.bin. [#20955856]

How do I recover an LN882H device when I can no longer access the web UI, including safe mode, erase commands, and reflashing original firmware?

Najpierw spróbuj safe mode przez 5 szybkich cykli zasilania. 1. Wyłącz i włącz urządzenie 5 razy z krótką przerwą. 2. Po wejściu w safe mode połącz się z AP i popraw konfigurację. 3. Jeśli to nie pomoże, użyj LN882H_CMD_Tool.exe COM# flash erase_all albo wgraj z powrotem oryginalny firmware z backupu. W jednym przypadku dopiero reflashing oryginalnego firmware przywrócił dostęp do sieci domowej, gdy urządzenie po zmianach nie wracało do UI. [#21021640]

Why does changing the MAC address on some LN882H devices make them disappear from the network, and how can I verify the new IP afterward?

Po zmianie MAC urządzenie zwykle dostaje nowy lease DHCP, więc znika spod starego adresu IP. Samo ustawienie MAC może działać poprawnie, ale po zapisie trzeba szukać nowego IP w routerze albo skanerze sieci. Jeden użytkownik potwierdził zmianę MAC bez problemu i dodał, że trzeba upewnić się, że adres MAC jest prawidłowy, a następnie sprawdzić nowy adres w routerze. Jeśli urządzenie nadal znika, warto wrócić do dumpu i powtórzyć konfigurację od zera. [#20996463]

What is PowerSave on LN882H in OpenBeken, and how do PowerSave 0, 1, and 2 affect temperature, current draw, Wi-Fi stability, and BL0937 energy metering?

PowerSave zmniejsza pobór prądu i temperaturę LN882H, ale wpływa na sieć i pomiar energii. PowerSave 0 to tryb bez oszczędzania. PowerSave 1 obniżał temperaturę i prąd umiarkowanie. PowerSave 2 dawał największy efekt, np. spadek z 64.0°C do 36.0°C, ale podnosił ping do 56–73 ms i mógł psuć pomiary BL0937 oraz powodować reconnecty Wi‑Fi. Dla pojedynczego modułu raportowano też spadek poboru z około 90 mA do 50 mA przy trybie 1 i 35 mA przy trybie 2. [#21064064]

Why doesn’t static IP work on LN882H builds, and what is currently unimplemented in the wifi_init_sta code path?

Static IP nie działał, bo ścieżka LN882H była wtedy po prostu niezaimplementowana. Wprost wskazano funkcję wifi_init_sta(const char* oob_ssid, const char* connect_key, obkStaticIP_t *ip) jako miejsce wymagające aktualizacji w pliku hal_wifi_ln882h.c. Dlatego wpisy statycznego IP były ignorowane, a urządzenie wracało do DHCP. Dopóki ten fragment nie został uzupełniony, jedynym praktycznym obejściem było przypisanie stałego adresu po stronie routera. [#20997185]

How do I start and configure extra drivers like NTP, DHT, SSDP, or Wemo on LN882H, including backlog commands and startup command syntax?

Sterowniki uruchamiasz komendami, a kilka poleceń łączysz przez backlog. Przykład: backlog startDriver ntp; ntp_timeZoneOfs +2 albo backlog startDriver SSDP; startDriver Wemo. NTP wymaga ręcznego startu, a serwer ustawia się komendą ntp_setServer <IP>. DHT był obsługiwany per-pin, ale w części buildów LN882H nie był jeszcze aktywny. Wemo wymagał startu sterownika i sprawdzenia, czy działa endpoint /setup.xml, bo sam komunikat „OK” nie gwarantował wykrycia przez Alexę. [#21028427]

Why does OTA updating LN882H often fail in Firefox but work in Chrome or Chromium, and what was the root cause of the HTTP/OTA crash?

Problem nie leżał w samym pliku OTA, tylko w błędzie obsługi bufora HTTP/OTA po stronie LN882H. Firefox częściej wysyłał nagłówki i payload w układzie, który ujawniał błąd: kod OTA zbierał dane do bufora 4 KB, ale nie sprawdzał poprawnie sytuacji, gdy pojedynczy fragment mógł zapełnić bufor więcej niż raz. To kończyło się zapisem poza pamięcią i crashem wątku HTTP Clie. Po poprawce autorzy potwierdzili udane OTA w Firefox 132.0.2. [#21332121]

What’s the best way to remove or recover a forgotten OpenBeken web password on an LN882H device without losing control of it permanently?

Najpewniejsza metoda to wgranie przez UART builda bez wymuszania hasła albo builda recovery. Wskazano plik http_basic_auth.c i opcję kompilacji bez ALLOW_WEB_PASSWORD, co powoduje akceptację każdego połączenia. Później pojawiła się też wersja recovery: po restarcie i ponad 5 błędnych próbach logowania urządzenie mogło zaproponować pełny reset konfiguracji. To rozwiązanie było traktowane ostrożnie ze względów bezpieczeństwa, więc najbezpieczniejszy pozostaje własny build ratunkowy flashowany przez UART. [#21084206]

How can I flash LN882H from Linux or macOS instead of Windows, and which tools from the thread support that workflow?

Na Linuxie pojawiło się natywne narzędzie LN882Loader, opublikowane jako projekt do flashowania LN882H bez Windows. Wcześniej użytkownicy próbowali Wine, QEMU i VirtualBox z mieszanymi wynikami; GUI pod Windows działało w VM, ale bywało zawodne. Dla Windows później polecano też GUI flash tool, natomiast w samym wątku jedynym jasno wskazanym rozwiązaniem linuksowym był właśnie LN882Loader. Dla macOS nie podano gotowego natywnego narzędzia, więc praktyczna ścieżka z wątku to Linux tool albo Windows VM. [#21376296]
Generated by the language model.
ADVERTISEMENT