Software off-line downloading method and off-line downloader

By incorporating a rechargeable power supply unit and configuring dual communication modules in the offline downloader, and performing custom handshakes and real-time verification, the power supply and operational complexity issues of remote updates in existing technologies are resolved, thereby improving the reliability of data transmission and the security of firmware updates.

CN121334133APending Publication Date: 2026-01-13SICHUAN STRONGEST LASER TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511424769.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing offline downloaders cannot be used properly in remote environments. They have complex user interfaces, are difficult to operate, have poor communication security, poor power management, and lack effective error handling and verification mechanisms during firmware updates, resulting in insufficient update reliability and security.

Method used

A system comprising an offline downloader is designed, with a built-in rechargeable power supply unit, configured Ethernet and serial communication modules, performing a custom handshake process, real-time data verification, and firmware verification and error handling modules, supporting stable updates in environments without external power.

Benefits of technology

It achieves stable power supply in environments without external power, simplifies the operation process, improves the reliability and security of data transmission, ensures successful firmware updates and device security, and is suitable for a wide range of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121334133A_ABST
    Figure CN121334133A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software communication, and discloses a software offline downloading method and an offline downloader. The method comprises the following steps: establishing an offline downloading system, wherein the offline downloading system comprises an offline downloader main body and target equipment of to-be-updated firmware; before firmware data transmission is carried out on the offline downloader main body and the target equipment, a user-defined handshake process is executed to confirm that both the offline downloader main body and the target equipment are in a data transmission ready state; and transmitting the firmware file to the target equipment through the communication module, and performing data verification in real time in the transmission process. The rechargeable power supply unit is arranged in the offline downloader main body to break through power supply limitation, the double communication sub-modules are adapted to different scenes, self-defined handshake is matched with verification before transmission to improve reliability, firmware verification and error processing guarantee safety, the whole downloader does not need to depend on a computer and an external power supply, the operation threshold is low, and the practicability is high. And a stable, convenient and safe scheme is provided for firmware updating of the target equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software communication technology, specifically to a software offline download method and an offline downloader. Background Technology

[0002] Currently, firmware updaters for embedded devices on the market mainly fall into two categories, one of which relies on a computer for operation. These firmware updaters typically connect to a computer via USB or serial port and use specific software to download and update firmware. While they offer advantages such as low cost and ease of operation, their applicability is significantly limited due to the availability of a computer and external power supply, making them unusable in remote environments or scenarios without a computer.

[0003] Another type of downloader can work independently of a computer, but often requires an external power source. These downloaders are mostly used in specific industrial or commercial fields. Although they solve the problem of dependence on a computer, their user interface design is relatively complex, and the operation process requires users to have professional technical knowledge. Ordinary non-professional users find them difficult to master, resulting in low product usability and an inability to meet a wide range of usage needs.

[0004] Even though existing offline downloaders have alleviated the challenges of remote updates to some extent, they still suffer from many common shortcomings. They generally lack communication confidentiality, making it difficult to guarantee the security of data transmission; they also perform poorly in power management, unable to operate stably for extended periods without an external power source; furthermore, they lack effective error handling and firmware verification mechanisms during firmware updates, making update failures common and potentially damaging to the target device. Overall, the reliability and security of updates urgently need improvement. Summary of the Invention

[0005] In view of this, the present invention provides a software offline download method and an offline downloader to solve the above problems.

[0006] To address the above technical problems, this invention provides a method for offline software download, comprising:

[0007] An offline download system is set up, which includes an offline downloader main body and a target device for firmware to be updated; the offline downloader main body has a built-in rechargeable power supply unit, which is used to provide stable power supply to the offline downloader main body when it is disconnected from an external power source;

[0008] The offline downloader is equipped with a communication module, which includes at least a first communication submodule for Ethernet data transmission and a second communication submodule for serial data transmission.

[0009] Before the offline downloader and the target device transmit firmware data, a custom handshake process is performed to confirm that both parties are in a data transmission ready state.

[0010] The firmware file is transmitted to the target device via the communication module, and data verification is performed in real time during the transmission process.

[0011] As an optional approach, the first communication submodule transmits firmware files based on a rewritten TFTP protocol. This rewritten TFTP protocol retains the efficiency of small file transfers and implements data transmission based on the UDP protocol, while adding a serial number identification mechanism and an acknowledgment mechanism at the application layer.

[0012] As an optional approach, the second communication submodule is an RS232 serial communication module. The second communication submodule establishes a connection with the target device through the RS232 standard interface and uses a checksum or cyclic redundancy check mechanism to verify the integrity and correctness of the transmitted firmware data.

[0013] As an optional method, during the custom handshake process, the handshake packet sent by the offline downloader body contains a specific command, which includes a 32-bit data segment and an 8-bit checksum segment;

[0014] The 8-bit checksum is generated by performing an XOR operation on four 8-bit data segments obtained from splitting a 32-bit data segment.

[0015] As an optional method, the offline downloader is physically connected to the target device via a 24V connector.

[0016] As an optional approach, after the firmware file is transferred via the communication module, the step of writing the firmware into the target device's memory is also included:

[0017] Control the target device to enter the BOOT system;

[0018] The received firmware file is transferred to a preset buffer;

[0019] Perform CRC check on the firmware data in the buffer. If the check is successful, write the data to the APP address of the target device in sequence. After each data write is completed, the APP address is automatically offset by one sector.

[0020] If the verification fails, the data packet in the current buffer is discarded, and a re-reception operation is triggered.

[0021] As an optional feature, the offline downloader also includes a user interaction module, which includes at least a handshake button for triggering a custom handshake process, an LED indicator for showing the device's working status, and a restart button for controlling the target device to restart.

[0022] As an optional approach, the offline downloader also includes a firmware verification and error handling module, which verifies the firmware validity before writing the firmware file to the target device. If the verification fails, it performs an error recovery operation or outputs a clear error message.

[0023] On the other hand, the present invention also provides an offline downloader, the main body of which includes:

[0024] A rechargeable power supply unit is used to provide a stable power supply when disconnected from an external power source;

[0025] The communication module includes at least a first communication submodule for implementing Ethernet data transmission and a second communication submodule for implementing serial data transmission.

[0026] The handshake control module is used to perform a custom handshake process with the target device before firmware transmission to confirm that both parties are ready;

[0027] The data verification module is used to verify the integrity of the transmitted firmware data.

[0028] The firmware processing module is used to verify the validity of the firmware written to the target device, and to perform error recovery or output error information when verification fails.

[0029] The user interaction module includes an operation component for triggering the handshake process and a display component for indicating the working status.

[0030] As an optional feature, the offline downloader also has a 24V adapter interface, which is electrically connected to the communication module.

[0031] The beneficial effects of this invention are as follows:

[0032] This invention effectively addresses the shortcomings of existing technologies by constructing an offline download system comprising an offline downloader and a target device. The offline downloader's built-in rechargeable power supply unit provides stable power even without an external power source, overcoming power environment limitations. The configured dual communication submodules support both Ethernet and serial data transmission, adapting to communication needs in different scenarios. A custom handshake process performed before firmware transmission ensures both parties are ready, and combined with a preset data verification mechanism during transmission, significantly improves data transmission reliability. The firmware verification and error handling module performs validity verification before firmware writing; if verification fails, error recovery or error information is output, ensuring update security. The overall solution requires no computer or external power supply, has a low operational threshold, and provides a stable, convenient, and secure solution for firmware updates of target devices. Attached Figure Description

[0033] Figure 1This is a schematic diagram of the software offline download method of the present invention;

[0034] Figure 2 This is a block diagram of the communication between the Ethernet-based offline downloader and the laser according to the present invention.

[0035] Figure 3 This is a schematic diagram of the network port update process of the present invention;

[0036] Figure 4 This is a schematic diagram of the serial port update process of the present invention;

[0037] Figure 5 This is a schematic diagram of the handshake button logic of the present invention;

[0038] Figure 6 This is a schematic diagram of the Bin file writing logic flow in this invention. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been presented in the various embodiments of the present invention to enable the reader to better understand the present invention. However, the technical solutions claimed in the present invention can be implemented even without these technical details and various changes and modifications based on the following embodiments.

[0040] like Figure 1-6 As shown, in one embodiment of the application, this embodiment addresses the firmware update scenario of embedded devices such as lasers, specifically implementing the above-described offline software download method and offline downloader. The offline download method includes:

[0041] An offline download system is set up, which includes an offline downloader main body and a target device for firmware to be updated; the offline downloader main body has a built-in rechargeable power supply unit, which is used to provide stable power supply to the offline downloader main body when it is disconnected from an external power source;

[0042] The offline downloader is equipped with a communication module, which includes at least a first communication submodule for Ethernet data transmission and a second communication submodule for serial data transmission.

[0043] Before the offline downloader and the target device transmit firmware data, a custom handshake process is performed to confirm that both parties are in a data transmission ready state.

[0044] The firmware file is transmitted to the target device via the communication module, and data verification is performed in real time during the transmission process.

[0045] In this embodiment, the offline download system comprises an offline downloader main body and a laser for updating firmware as the target device. The offline downloader main body has a built-in rechargeable power supply unit. As an optional feature, this unit adopts a power bank structure, which can provide a stable power supply to the offline downloader main body in the field or industrial site where no external power source is available, avoiding update interruptions due to power problems.

[0046] The offline downloader's main communication module comprises two sub-modules: a first communication sub-module for Ethernet data transmission and a second communication sub-module for serial data transmission. The appropriate communication method can be selected based on the laser's interface type. Before firmware data transmission, a custom handshake process must be performed to confirm that both the offline downloader and the laser are in a data transmission-ready state, preventing transmission errors caused by either party's lack of readiness. Subsequently, the firmware file is transmitted to the laser via the communication module. During transmission, data verification is performed in real time to ensure data integrity. Please refer to [link to relevant documentation]. Figure 2 , Figure 2 This is used to demonstrate the connection relationship between the 24V power supply module, the laser, the offline downloader, and the Ethernet port. The 24V power supply module provides basic power support for the system, while the Ethernet port is the physical link for data transmission in the first communication submodule, which forms the hardware connection basis for the offline download system in this embodiment.

[0047] For the first communication submodule, this submodule transmits firmware files based on the rewritten TFTP protocol. The rewritten TFTP protocol retains the high efficiency of the original protocol for transmitting small files, while implementing data transmission based on the UDP protocol. In order to compensate for the lack of transmission acknowledgment in the standard TFTP protocol, a sequence number identification mechanism and an acknowledgment response mechanism have been added at the application layer.

[0048] In one optional scenario, each data packet carries a unique sequence number during actual transmission. After receiving the packet, the laser receiver returns an acknowledgment. If the offline downloader does not receive an acknowledgment within a preset time, it retransmits the data packet, thus ensuring file transfer integrity. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 This is a schematic diagram of the network interface update process, which includes the following steps:

[0049] After the operation begins, the user clicks the handshake button. The offline downloader's timer then continuously sends a specific command, containing 32 bits of data and an 8-bit checksum, until the laser successfully receives the command. Upon successful confirmation, the laser enters the BOOT system, and the offline downloader writes the specified bin file to the laser's memory address. Finally, it waits for the laser to restart to complete the update. Throughout this process, the rewritten TFTP protocol, using sequence numbers and acknowledgment mechanisms, ensures the stability of the bin file during Ethernet transmission.

[0050] The specific command consists of 32 bits of data and an 8-bit checksum. In one optional configuration, the checksum is calculated as (8-bit data) x OR (8-bit data) x OR (8-bit data) x OR (8-bit data). For example, the checksum is calculated as (0x23) x OR (0x24) x OR (0x24) x OR (0x23).

[0051] The second communication submodule uses an RS232 serial communication module. This module establishes a physical connection with the laser through the RS232 standard interface and is suitable for laser models that do not have an Ethernet interface. During data transmission, a checksum or cyclic redundancy check (CRC) mechanism is used to ensure the integrity and correctness of the firmware data. Specifically, if a CRC mechanism is used, the offline downloader calculates a CRC value for each transmitted data packet and sends this CRC value along with the data packet. After receiving the packet, the laser recalculates the CRC value. If it matches the received CRC value, the data is confirmed to be correct; otherwise, a retransmission is requested.

[0052] Please see Figure 4 , Figure 4 The specific process for updating the serial port includes:

[0053] After the operation begins, the laser is restarted. The user clicks the handshake button, and the offline downloader detects whether the laser has successfully entered the BOOT system. If the detection is successful, the firmware file is transmitted via RS232 serial port. Subsequent steps include writing to the memory address and waiting for a restart. In this process, a checksum or CRC check mechanism ensures a high update success rate in serial communication scenarios.

[0054] Please see Figure 5 For the custom handshake process, this embodiment is set as follows:

[0055] First, add a local IP address in the 0 network segment to the offline downloader main body, open the VDP socket and configure its read / write properties, then bind the server and client sockets; check if the UDP socket is successfully opened. If successful, receive the data returned by the laser and check if the packet item number of the returned data contains a specific project number, which is a string named according to the company project name; if it contains the number, the client stops sending the BOOT command in a loop; if it does not contain the number, it continues to send in a loop.

[0056] In an optional implementation, the handshake packet sent by the offline downloader body contains a specific command, which consists of a 32-bit data segment and an 8-bit checksum segment. The 8-bit checksum is generated by splitting the 32-bit data segment into four independent 8-bit data segments, performing an XOR operation on each of the four 8-bit data segments sequentially, and the result is the 8-bit checksum.

[0057] The steps for writing firmware into the target device's memory are specifically performed as follows in this embodiment:

[0058] First, the laser is put into the BOOT system by the control command of the offline downloader. This system is a dedicated firmware update mode, which can avoid conflicts with the program when the laser is working normally.

[0059] The firmware file received via the communication module is then transferred to a preset buffer inside the laser. The capacity of the buffer is set according to the size of the firmware file to ensure that the file data can be stored completely.

[0060] Next, a CRC check is performed on the firmware data in the buffer. If a data error is found during the check, the data packet in the current buffer is discarded, and the offline downloader is triggered to resend the data.

[0061] If the verification is successful, the data in the buffer will be written to the laser's APP address in sequence. After each data write operation is completed, the APP address will be automatically offset by one sector. The size of this sector matches the specifications of the laser's storage unit to ensure that the data is written in the correct position.

[0062] like Figure 6 As shown, the process first determines whether the handshake is successful and the data transmission is complete. After confirmation, the data is transferred to the buffer, then a CRC check is performed. Based on the check result, it is decided whether to discard or write the data. Finally, the flag is reset and the resources are released, and the process jumps to the APP system to start the laser normally.

[0063] The offline downloader in this embodiment also includes a user interaction module. Based on the above process, it comprises three components: a handshake button for triggering a custom handshake process, an LED indicator for showing the device's working status, and a restart button for controlling the target device's restart. Based on this design, in actual operation, users do not need professional technical knowledge; they only need to press the handshake button to start the handshake process without manually configuring complex parameters. The LED indicator uses different colors and flashing frequencies to reflect the status; for example, a solid green light indicates a successful handshake, a flashing green light indicates transmission is in progress, and a solid red light indicates a verification failure. Users can intuitively judge the current update progress and whether there are any anomalies through the lights. When the laser needs to restart to enter the BOOT system, the user can complete the operation by pressing the restart button without disassembling the device or using additional tools.

[0064] In this embodiment, the firmware verification and error handling module is integrated into the control unit of the offline downloader. Its main function is to verify the validity of the firmware and handle exceptions before writing it to the target device. After the firmware file is transferred to the laser buffer and before CRC verification is performed, this module verifies the validity of the firmware file. Verification includes whether the firmware matches the laser model, whether the firmware version is compatible with the current system, and whether the firmware file is corrupted or tampered with. If the verification passes, the subsequent CRC verification and writing steps continue. If the verification fails, the module performs two processing methods: one is to automatically perform error recovery operations, such as restoring the laser to the firmware version before the update to prevent the laser from failing to start due to invalid firmware; the other is to output clear error information through LED indicators and text prompts, such as using the number of red light flashes to distinguish different error types like firmware incompatibility and firmware corruption, making it easier for users to troubleshoot problems. This module effectively avoids update failures or device damage caused by invalid firmware, improving the security and reliability of the entire offline download process.

[0065] On the other hand, this embodiment also provides an offline downloader, the main body of which includes:

[0066] The rechargeable power supply unit provides stable power when disconnected from an external power source. It adopts a lithium battery power bank structure, equipped with a charging port and a power indicator, supporting long-term battery life and meeting the needs of scenarios where an external power source is unavailable.

[0067] The communication module consists of an Ethernet chip and an RS232 serial port chip, which respectively correspond to the first communication submodule that realizes Ethernet data transmission and the second communication submodule that realizes serial data transmission. The two submodules can work independently, and the user can select to enable them according to the target device interface.

[0068] The handshake control module, implemented through a microcontroller program within the offline downloader, is responsible for generating handshake packets, sending commands, receiving confirmation responses from the target device, and executing a custom handshake process.

[0069] The data verification module, also implemented through program logic, can select to enable serial number verification, checksum, or CRC verification depending on the communication method to ensure the integrity of transmitted data.

[0070] The firmware processing module is used to verify the validity of the firmware written to the target device, and to perform error recovery or output error information when verification fails.

[0071] The user interaction module uses physical buttons and LEDs to simplify user operation. Through the coordinated operation of its modules, this offline downloader can fully implement the offline software download method described in this embodiment, providing hardware support for firmware updates of the target device.

[0072] Optionally, the offline downloader body is equipped with a 24V adapter interface, which in this embodiment is a physical interface structure. This interface is electrically connected to the communication module through internal circuitry. In practical applications, the 24V adapter interface is connected to the target device, such as a laser, via a 24V connector. This provides the target device with a compatible 24V power supply, ensuring that the target device will not shut down due to insufficient power during the update process. Furthermore, the electrical connection to the communication module enables stable data signal transmission between the offline downloader body and the target device, avoiding the impact of electrical interference on data transmission.

[0073] The embodiments of the present invention have been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A method for offline software download, characterized in that, include: An offline download system is established, which includes an offline downloader main body and a target device for firmware to be updated; The offline downloader body has a built-in rechargeable power supply unit, which is used to provide a stable power supply to the offline downloader body when it is disconnected from an external power source. The offline downloader is equipped with a communication module, which includes at least a first communication submodule for Ethernet data transmission and a second communication submodule for serial data transmission. Before the offline downloader body and the target device transmit firmware data, a custom handshake process is performed to confirm that both parties are in a data transmission ready state. The firmware file is transmitted to the target device via the communication module, and data verification is performed in real time during the transmission process.

2. The software offline download method according to claim 1, characterized in that, The first communication submodule transmits firmware files based on a rewritten TFTP protocol. This rewritten TFTP protocol retains the efficiency of small file transfers and implements data transmission based on the UDP protocol. It also adds a serial number identification mechanism and an acknowledgment mechanism at the application layer.

3. The software offline download method according to claim 1, characterized in that, The second communication submodule is an RS232 serial communication module. The second communication submodule establishes a connection with the target device through the RS232 standard interface, and uses a checksum or cyclic redundancy check mechanism to verify the integrity and correctness of the transmitted firmware data.

4. The software offline download method according to claim 1, characterized in that, During the custom handshake process, the handshake packet sent by the offline downloader body contains a specific command, which includes a 32-bit data segment and an 8-bit checksum segment. The 8-bit check code is generated by performing an XOR operation on four 8-bit data segments obtained from splitting the 32-bit data segment.

5. The software offline download method according to claim 1, characterized in that, The offline downloader is physically connected to the target device via a 24V connector.

6. The software offline download method according to claim 1, characterized in that, After the firmware file is transferred via the communication module, the process also includes writing the firmware into the target device's memory. Control the target device to enter the BOOT system; The received firmware file is transferred to a preset buffer; Perform CRC check on the firmware data in the buffer. If the check is successful, write the data to the APP address of the target device in sequence. After each data write is completed, the APP address is automatically offset by one sector. If the verification fails, the data packet in the current buffer is discarded, and a re-reception operation is triggered.

7. The software offline download method according to claim 1, characterized in that, The offline downloader also includes a user interaction module, which includes at least a handshake button for triggering a custom handshake process, an LED indicator for indicating the device's working status, and a restart button for controlling the target device to restart.

8. The software offline download method according to claim 1, characterized in that, The offline downloader is also equipped with a firmware verification and error handling module, which is used to verify the validity of the firmware before writing the firmware file to the target device. If the verification fails, an error recovery operation is performed or a clear error message is output.

9. An offline downloader, characterized in that, The offline downloader main body includes: A rechargeable power supply unit is used to provide a stable power supply when disconnected from an external power source; The communication module includes at least a first communication submodule for implementing Ethernet data transmission and a second communication submodule for implementing serial data transmission. The handshake control module is used to perform a custom handshake process with the target device before firmware transmission to confirm that both parties are ready; The data verification module is used to verify the integrity of the transmitted firmware data. The firmware processing module is used to verify the validity of the firmware written to the target device, and to perform error recovery or output error information when verification fails. The user interaction module includes an operation component for triggering the handshake process and a display component for indicating the working status.

10. The software offline downloader according to claim 9, characterized in that, The offline downloader also has a 24V adapter interface, which is electrically connected to the communication module.

Citation Information

Cited By

  • Vehicle-mounted bus program updating method and system based on local offline updating

    CN121541909A

  • A vehicle-mounted bus program updating method and system based on local offline updating

    CN121541909B