logo elektroda
logo elektroda
X
logo elektroda

Lightning Semiconductor LN882H - A Windows GUI Firmware Flashing Option

divadiow 6789 24
ADVERTISEMENT
  • I've been looking through some of the Lightning Semi bits again recently. I saw a couple of UART flashers in the ftp/gitee dumps a couple of months ago and wondered about them again.

    I've also been in contact with someone at Lightning Semiconductor who has kindly sent me the latest Windows GUI flasher for LN882H chips as well as a handy GIF and a translation of the main UI, There is no English version of the program but the steps are all pretty self-explanatory.

    I know we already have a command line tool wrapped in a Python script we can use to dump/flash firmware (see the full LN flashing guide here) but it's always nice to have the option of using something with a GUI. The GUI flasher does not support dumping existing firmware, only flashing new.

    I attach version 3.0.1 of the program. The older version we have is 1.0.5.

    Launch and flashing GIF supplied by contact

    Screenshot of the LN Download Tool folder with files and directories.

    A rough translation of the first window

    Screenshot of the main Windows GUI interface for a flashing program.

    I've not yet explored the developer mode GUI.

    Translation of main GUI supplied by contact

    Screenshot of the flasher GUI program interface version 3.0.1.

    Onto my experience. All the steps needed to put the LN chip into UART download (flashing/programming) mode still apply, which is in summary:

    Code: Text
    Log in, to see the code


    My test setup with an LN-02 (LN882HKI) module

    Close-up of an LN-02 module with wires connected to the pins.

    At this point the GUI flasher can be used to download OpenBeken OpenLN UART firmware onto the device. My test was successful on first attempt. This is my completed flash with some added translations.

    Screenshot of GUI flasher software interface for Windows.

    A log file is output to \log subdir of the main program

    Screenshot of a text file log from the flashing process using In_download_tool_V3.0.1.

    After disconnecting the grounded BOOT/GPIOA9 pad and power cycling the module, the OBK AP started broadcasting, as expected

    Wi-Fi signal icon with the text OpenLN882H_C2B0B167.

    and

    OpenLN882H user interface showing device status.

    That's it. Would be good to have others try it out and post their experiences.

    Happy flashing!

    Cool? Ranking DIY
    About Author
    divadiow
    Level 34  
    Offline 
    divadiow wrote 2828 posts with rating 489, helped 254 times. Live in city Bristol. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 21026590
    p.kaczmarek2
    Moderator Smart Home
    That's a very nice finding! So, which LN chips are supported by this tool? Can it support LN8825 as well?

    I am also wondering, could the UI be translated to English by a simple application resource modification? It has been some time since I last tried that but it should be possible...
    Helpful post? Buy me a coffee.
  • #3 21026617
    divadiow
    Level 34  
    p.kaczmarek2 wrote:
    Can it support LN8825 as well?
    sadly no. But have no fear, I've posted the other flasher, available in English, here https://www.elektroda.com/rtvforum/topic4023264.html#21024297

    Added after 12 [minutes]:

    p.kaczmarek2 wrote:
    So, which LN chips are supported by this tool?


    Just LN882Hxx as far as I know
    I haven't actually tried it on LN8825B. I will at the next opportunity.
  • ADVERTISEMENT
  • #4 21026690
    p.kaczmarek2
    Moderator Smart Home
    @ElektrodaBot can I somehow change the buttons labels of already compiled application? Maybe by editing resource file? I don't have source code and the application is in the chinese, I would like to translate it to English. Which tools can I use?
    Helpful post? Buy me a coffee.
  • #5 21026694
    ElektrodaBot
    AI OpenAI ChatGPT4
    p.kaczmarek2 wrote:
    can I somehow change the buttons labels of already compiled application? Maybe by editing resource file? I don't have source code and the application is in the chinese, I would like to translate it to English. Which tools can I use?
    Ah, undertaking a task to change button labels in an already compiled application without access to the source code can certainly be a challenging yet interesting project! Let's break down what you're trying to achieve:

    1. Understanding the Application: Firstly, it would be helpful to know what kind of application you're dealing with. Is it a Windows application (.exe), a web application, or something else? The type of application can significantly influence the approach and tools you might use.

    2. Resource Files and Localization: Many applications store their labels, messages, and other strings in separate resource files, which can sometimes be in a standard format accessible for editing. For Windows applications, for example, these might be in .res or .rc files.

    3. Tools for the Job:
    - Resource Hacker™: This is a freeware utility for viewing, modifying, renaming, adding, deleting, and extracting resources in 32bit and 64bit Windows executables and resource files (*.*res). It’s quite powerful for modifying GUI components such as dialogues, menus, icons, and button labels.
    - PE Explorer or Restorator: These tools offer similar capabilities and can be used for digging into the application and possibly modifying or localizing its interface.
    - Hex Editors: If the labels are not stored in a standard resource file, you might need to use a hex editor to edit the executable directly. This approach requires caution, as it's easy to break the application. You'll need to search for the text strings you want to change and make sure to replace them with text of the same or shorter length to avoid corrupting the file.

    4. Legal Considerations: Before proceeding, ensure that modifying the application doesn't violate any terms of service or copyright laws. It's always best to proceed with respect for software creators' rights.

    5. Localization: If the application is using standard methods for localization, there might be simpler ways to switch languages or add new translations. This is more common in applications designed with internationalization in mind.

    6. Consider Contacting the Developer: If the application is actively maintained, the simplest and most respectful approach might be to contact the developer or company behind the software. They might already have plans for an English version or could provide you with the resources to help localize the application.

    7. Technical Skills Required: Be prepared for a bit of a learning curve, especially if you're new to software reverse engineering. Modifying an application in this way can require a good understanding of how compiled applications are structured, along with some patience and creativity.

    I'm curious to hear more about the specific application you're working on. Understanding more about it could help narrow down the best approach. Have you worked with any of these tools before, or would this be your first foray into modifying compiled applications?
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #6 21026706
    divadiow
    Level 34  
    I did wonder about those qm Qt linguist files in the translations folder. I assume the Lightning Semi contact would have said there was a way to switch to English if it was a straight-forward option.

    A translation would be a bonus of course. Have you tried the GUI flasher yet?

    Screenshot of an email with attachments and content about the LN882B and LN882H download tool.
  • #7 21027497
    divadiow
    Level 34  
    divadiow wrote:
    Just LN882Hxx as far as I know
    I haven't actually tried it on LN8825B. I will at the next opportunity.


    and maybe LN8210 if this file is any indicator

    Screenshot of chip_info.json file in Visual Studio Code.
  • #9 21032494
    miegapele
    Level 15  
    Does not appear to be sold anywhere yet, but I now found you can buy Ai-WB2-12F-Kit with BL602
  • Helpful post
    #12 21038316
    divadiow
    Level 34  
    some slightly nicer translations. Google Translate output text size/resolution could be better though.

    Chinese user interface with work mode options and a confirmation button. Software interface with fields for selecting operating mode and equipment quantity.

    User interface of a program with a list of COM ports and binary file settings. Screenshot of software for configuring COM ports.

    Chinese dialog box with a dropdown menu and a confirmation button. User interface with operating mode and equipment quantity selection.

    Screenshot of an application interface in Chinese. Screenshot of developer mode interface showing user configuration for serial port setup.

    Password entry dialog box with Chinese text and OK and Cancel buttons. Dialog box requesting a password with a warning that Burn test mode is for internal use only!.
  • ADVERTISEMENT
  • #13 21212119
    kodacy
    Level 3  
    Please keep in mind the right bound rate for this specific chip: 921000
    >>21023807 Software interface showing configuration settings and process logs.
  • ADVERTISEMENT
  • #14 21212166
    divadiow
    Level 34  
    OK. Where are you seeing statement of 921000 as being the correct baud in official documentation?

    I've been flashing successfully at 2000000 and I note this in the LN882H datasheet

    Excerpt from documentation on UART in LN882H highlighting the maximum data transfer rate of 2 Mbps.
  • #15 21212289
    kodacy
    Level 3  
    I have just tried flashing multiple times with the original stated speed unsuccessfully and them follow the bound rate defined in the command line tool process and got it flashed the first time.
  • #16 21212990
    p.kaczmarek2
    Moderator Smart Home
    Slower baud rates are more reliable. When flashing fails, lowering the baud rate is the first thing to try.
    Helpful post? Buy me a coffee.
  • #17 21216101
    kodacy
    Level 3  
    >>21212990 Yes and I agree, but did not know this chip could accept different baud rates
  • #18 21359848
    Biz_ua
    Level 1  
    >>21038316
    Hello. Could you please share the translated program?
  • #19 21359893
    divadiow
    Level 34  
    I am not aware of an English translation of the program. The images above were made manually to aid use.
  • #20 21451846
    Powl654
    Level 3  
    Any ideas thats wrong?I also have a problem with not getting this Tuya socket flashed. It's my first Tuya device. In the past I only flashed ESPs with Tasmota. So OpenBeken is completely new to me.

    This ist the message I get:

    当前版本号:v3.0.1
    [00:51:19] 开始下载...
    [00:51:19] 已创建日志文件,文件存放在log目录中。
    [00:51:23] [COM17]Flash ID:0xEB6015
    [00:51:23] [COM17]Flash UID:0x433031373839372E3030010041008BFF
    [00:51:23] [COM17]下载失败,错误代码为:0x40300,设置芯片波特率出错
    [00:51:23] [COM17]下载失败
    [00:51:23] 停止下载!


    Any ideas thats wrong?

    Screenshot of a program managing COM ports and binary files.
  • #21 21451893
    p.kaczmarek2
    Moderator Smart Home
    How did you connect flasher?
    Have you tried alternate method?
    https://www.elektroda.com/rtvforum/topic4096854.html
    Helpful post? Buy me a coffee.
  • #22 21452668
    divadiow
    Level 34  
    Are your wires too long maybe? Also, try lower bauds..
  • #23 21453392
    Powl654
    Level 3  
    I soldered approximately 60cm long an thin wires on the socket as described here.
    Those wires are connected to at least 20cm long dupon male-female cables which are hooked up to the CH340. The 3.3V power supply is made by the "FTDI" I use for uploading the .bin file.

    I am using Win10 to flash the socket. So I also tried the with
    LN882H_CMD_Tool.exe COM17 download flash 921000 0x0 OpenLN882H_1.18.43.bin
    But for a split second a sreen pops up (which I cant read) and nothing else is happening.
  • #24 21453573
    rufus4
    Level 10  
    So there are 80cm in total if I do get this right. This probably is the problem. Try to shorten the total cable length to 20cm.
  • #25 21453816
    Powl654
    Level 3  
    Yes, it was at least 80cm.
    It worked after shortening the wires an reducing the speed to 921000!

    Thanks to all for your help!

Topic summary

The discussion revolves around the Lightning Semiconductor LN882H and the availability of a Windows GUI firmware flashing tool. The user has received the latest version (3.0.1) of the GUI flasher, which only supports flashing new firmware and not dumping existing firmware. Participants inquire about the compatibility of the tool with other LN chips, such as LN8825 and LN8210, and discuss the possibility of translating the GUI into English. Various tools for modifying application resources are suggested, including Resource Hacker. The conversation also touches on the baud rate for flashing, with differing opinions on the optimal speed, emphasizing that slower rates may enhance reliability. Additionally, references to development boards like the Ai-Thinker LN882H dev board and purchasing options are mentioned.
Summary generated by the language model.
ADVERTISEMENT