Communication downloading device and method
By designing a communication download device that includes a CPU, USB interface and network port, the problem of low data transmission efficiency caused by the mismatch of interfaces between mobile devices and HMI devices is solved, and the purpose of downloading mobile device data packets to HMI devices is achieved, improving data efficiency. transmission efficiency and user experience, and supports flexible IP acquisition methods.
Patent Information
- Application Number
- CN202410771866.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-15
- Publication Date
- 2024-10-01
AI Technical Summary
The interfaces between traditional mobile devices and HMI devices do not match, resulting in low data transmission efficiency. Existing technologies cannot effectively solve this problem.
Design a communication download device, including CPU, USB interface and network port. The CPU communicates with the mobile device through the USB interface, and communicates with the HMI device through the network port to forward the data packets, thereby downloading the target data packets in the mobile device to HMI equipment uses DIP switches to set the IP acquisition method, and performs protocol conversion through the protocol conversion module.
It improves the data transmission efficiency between different interface devices, facilitates users to download data or programs from mobile devices to HMI devices, improves user experience, and flexibly sets the IP acquisition method of HMI devices.
Smart Images

Figure CN118740818A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a communication downloading device and method. Background Art
[0002] As the functions of mobile devices become increasingly powerful and their intelligence levels improve, people increasingly rely on mobile devices such as tablets or smartphones to manage their work and daily lives. However, traditional mobile devices usually only support wireless communication methods such as Wi-Fi or Bluetooth, which may have limitations in stability and transmission rate in some industrial or specific application scenarios. In industrial automation and intelligent control systems, HMI (Human Machine Interface) devices play a vital role. They not only need to exchange real-time data with various sensors and actuators, but also need to be able to receive instructions and program updates from central control systems (such as mobile devices). However, there are certain technical barriers to connecting mobile devices directly to Ethernet interfaces, mainly because mobile devices are usually equipped with only USB interfaces, not Ethernet interfaces. In related technologies, mobile devices usually do not have Ethernet interfaces, while HMI devices often require Ethernet connections, which leads to interface mismatch problems. This requires a device that can convert the data transmission capability of the USB interface into Ethernet communication to achieve efficient data exchange and program download between mobile devices and HMI devices.
[0003] With regard to the technical problem in the related art that the interface between the mobile device and the HMI device does not match, resulting in low data transmission efficiency, no effective solution has been proposed yet. Summary of the invention
[0004] The present application provides a communication download device and method to at least solve the technical problem in the related art that the interface mismatch between the mobile device and the HMI device leads to low data transmission efficiency.
[0005] In a first aspect, the present application provides a communication download device, comprising: a CPU, a USB interface, and a network port, wherein the CPU is electrically connected to the USB interface and the network port, respectively, and the CPU is used to communicate with a mobile device through the USB interface, and the CPU is also used to communicate with an HMI device through the network port, wherein the mobile device adopts a USB communication method, and the HMI device adopts an Ethernet communication method; upon receiving a download request, the CPU is also used to forward a target data packet downloaded from the mobile device to the HMI device, wherein the download request is used to indicate that the mobile device requests to download data in the target data packet to the HMI device.
[0006] By adopting the above technical solution, the communication download device includes a CPU, a USB interface and a network port. The CPU communicates with the mobile device through the USB interface, and the CPU communicates with the HMI device through the network port. The mobile device adopts the USB communication mode, and the HMI device adopts the Ethernet communication mode. When receiving the download request from the mobile device, the CPU in the communication download device forwards the target data packet downloaded from the mobile device to the HMI device. That is, the target data packet in the mobile device is downloaded to the HMI device, and the purpose of downloading the target data packet in the mobile device equipped with only a USB interface to the HMI device equipped with only an Ethernet interface is achieved, and the effect of improving the data transmission efficiency between devices with different interfaces is achieved. Especially for users who are accustomed to using mobile devices, it is very convenient to download data or programs in the mobile device to the HMI device, which brings convenience to use and improves the user experience.
[0007] Optionally, the above-mentioned communication downloading device also includes: a dip switch, wherein the dip switch is electrically connected to the CPU, and the dip switch is configured to set the IP acquisition method, wherein the IP acquisition method is used to indicate the method in which the communication downloading device obtains the IP of the HMI device, and the IP acquisition method includes one of the following: automatic acquisition method, manual acquisition method.
[0008] By adopting the above technical solution, the communication download device also includes a dip switch, which is used to set the IP acquisition method, that is, to set the method of obtaining the IP of the HMI device, for example, including automatic acquisition method and manual acquisition method, thereby achieving the purpose of obtaining the IP of the HMI device in different ways.
[0009] Optionally, the DIP switch is electrically connected to a target port of the CPU, wherein the target port is a GPIO port of the CPU, and the CPU obtains the IP acquisition method through the target port.
[0010] By adopting the above technical solution, by electrically connecting the DIP switch to the target port of the CPU, the CPU can obtain the IP acquisition method through the target port, thereby obtaining the IP address of the HMI device in a corresponding manner.
[0011] Optionally, the CPU includes a protocol conversion module, wherein the protocol conversion module is used to perform protocol conversion on the target data packet and then send the converted data packet to the HMI device.
[0012] By adopting the above technical solution, the CPU includes a protocol conversion module, and the protocol conversion module is used to perform protocol conversion on the target data packet and then send it to the HMI device through the network port.
[0013] In a second aspect of the present application, a communication download method is also provided, which is applied to any of the above-mentioned communication download devices, including: receiving a download request sent by a mobile device, wherein the download request is a request by the mobile device to download data in a target data packet to an HMI device; when it is determined that the HMI device allows downloading, sending a first message to the mobile device to instruct the mobile device to send the target data packet; receiving the target data packet, and forwarding the target data packet to the HMI device.
[0014] By adopting the above technical solution, the communication download device receives a download request sent by a mobile device, which is a request from the mobile device to download the data in the target data packet to the HMI device. When it is determined that the HMI device allows downloading, the communication download device sends a first message to the mobile device to instruct the mobile device to send the target data packet, then receives the target data packet sent by the mobile device, and forwards the target data packet to the HMI device. That is, the target data packet in the mobile device is downloaded to the HMI device, achieving the purpose of downloading the target data packet in the mobile device equipped with only a USB interface to the HMI device equipped with only an Ethernet interface, and achieving the effect of improving the data transmission efficiency between devices with different interfaces.
[0015] Optionally, when it is determined that the HMI device allows downloading, sending a first message to the mobile device includes: forwarding the download request to the HMI device; when a second message sent by the HMI device is received, determining that the HMI device allows downloading, wherein the second message is a reply of the HMI device to the download request; when it is determined that the HMI device allows downloading, sending the first message to the mobile device.
[0016] By adopting the above technical solution, the communication download device first forwards the download request to the HMI device, and when receiving the second message sent by the HMI device, it is determined that the HMI device allows downloading, and the second message is the reply of the HMI device to the download request, and then the first message is sent to the mobile device. That is, after the HMI device has been normally connected in communication, the mobile device is notified that the transmission of the target data packet can be started, so as to ensure the normal transmission of data and avoid download failure.
[0017] Optionally, before forwarding the download request to the HMI device, the method further includes: establishing a communication connection with the HMI device by handshaking.
[0018] By adopting the above technical solution, the communication download device establishes a communication connection with the HMI device through a handshake before forwarding the download request to the HMI device, that is, ensuring that the communication download device and the HMI device can communicate normally after being connected via a network cable.
[0019] Optionally, before establishing a communication connection with the HMI device through a handshake, the method further includes: obtaining a target state signal of a dip switch, wherein the communication download device includes a dip switch, the dip switch is electrically connected to the CPU, and the dip switch is configured to set an IP acquisition mode, the IP acquisition mode is used to indicate a mode in which the communication download device obtains the IP of the HMI device, and the IP acquisition mode includes one of the following: an automatic acquisition mode, a manual acquisition mode; determining a target acquisition mode of the IP of the HMI device based on the target state signal.
[0020] By adopting the above technical solution, the target state signal of the dial switch is obtained, and the target state signal is used to indicate whether to obtain the IP automatically or manually, and then the target acquisition method of the IP of the HMI device can be determined based on the target state signal, so as to achieve the purpose of flexibly setting the IP acquisition method of the HMI device according to needs.
[0021] Optionally, receiving a target data packet includes: receiving a target data packet sent by a mobile device via a USB interface.
[0022] By adopting the above technical solution, the communication download device receives the target data packet sent by the mobile device through the USB interface.
[0023] Optionally, after forwarding the target data packet to the HMI device, the method further includes: receiving a third message sent by the HMI device, wherein the third message is used to indicate that the HMI device has completed downloading the target data packet; forwarding the third message to the mobile device; and receiving a download end message sent by the mobile device, wherein the download end message is used to indicate the end of downloading.
[0024] By adopting the above technical solution, after forwarding the target data packet to the HMI device, the communication download device receives the third message sent by the HMI device, and the third message indicates that the HMI device has completed the download. The communication download device then forwards the third message to the mobile device, that is, notifies the mobile device that the HMI device has completed the download operation, and then receives the download end message sent by the mobile device, that is, the entire download task is completed.
[0025] In a third aspect of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, any of the above method steps is implemented.
[0026] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the above method steps is performed.
[0027] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. The purpose of downloading the target data packet from the mobile device equipped with only USB interface to the HMI device with only Ethernet interface is achieved, thereby improving the data transmission efficiency between devices with different interfaces.
[0028] 2. For users who are accustomed to using mobile devices, they can easily download data or programs from the mobile device to the HMI device, which brings convenience and improves the user experience.
[0029] 3. The purpose of flexibly setting the IP acquisition method of the HMI device through the DIP switch. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a structural frame of a communication download device provided in an embodiment of the present application. Figure 1 ; Figure 2 This is a structural frame of a communication download device provided in an embodiment of the present application. Figure 2 ; Figure 3 It is a flow chart of a communication download method provided in an embodiment of the present application; Figure 4 It is a connection diagram of a communication downloading device provided in an embodiment of the present application; Figure 5 It is an interactive schematic diagram of a communication downloading device provided in an embodiment of the present application; Figure 6 It is a download schematic diagram of the communication download device provided in an embodiment of the present application.
[0031] Description of reference numerals: 11-CPU, 12-USB interface, 13-network port, 14-dip switch. DETAILED DESCRIPTION
[0032] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0033] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0034] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0035] This application provides a communication download device, referring to Figure 1 , Figure 1 This is a structural frame of a communication download device provided in an embodiment of the present application. Figure 1 The device includes: a CPU 11, a USB interface 12, and a network port 13, wherein: The CPU 11 is electrically connected to the USB interface 12 and the network port 13 respectively. The CPU 11 is used to communicate with the mobile device through the USB interface 12. The CPU 11 is also used to communicate with the HMI device through the network port 13, wherein the mobile device adopts a USB communication method and the HMI device adopts an Ethernet communication method. When receiving a download request, the CPU 11 is also used to forward a target data packet downloaded from the mobile device to the HMI device, wherein the download request is used to indicate that the mobile device requests to download data in the target data packet to the HMI device.
[0036] In the above embodiment, the communication download device includes a CPU 11, a USB interface 12 and a network port 13. The CPU 11 communicates with the mobile device through the USB interface 12, and the CPU 11 communicates with the HMI device through the network port 13. The mobile device adopts a USB communication mode, and the HMI device adopts an Ethernet communication mode, that is, the mobile device is only equipped with a USB interface, such as a Type-C interface, or Type-A, Type-B, or other USB interfaces. The mobile device can be a mobile phone, a tablet, or other mobile devices, and the HMI device is only equipped with a network port. When receiving a download request from the mobile device, the CPU 11 in the communication download device forwards the target data packet downloaded from the mobile device to the HMI device. For example, the mobile device wants to download a program or data packet to the HMI device. Since the mobile device is only equipped with a USB interface but no Ethernet interface, the program or data packet cannot be directly downloaded to the HMI device. The communication download device in this embodiment can achieve the purpose of downloading the program or data packet to the HMI device. That is, the purpose of downloading the target data packet in the mobile device equipped with only a USB interface to the HMI device with only an Ethernet interface is achieved, and the communication download device plays a bridging role in it, achieving the effect of improving the data transmission efficiency between devices with different interfaces. Especially for users who are accustomed to using mobile devices, they can easily download data or programs in the mobile device to the HMI device, which brings convenience to use and improves the user experience.
[0037] In an optional embodiment, the above-mentioned communication downloading device also includes: a dip switch 14, wherein the dip switch 14 is electrically connected to the CPU 11, and the dip switch 14 is configured to set the IP acquisition mode, wherein the IP acquisition mode is used to indicate the mode in which the communication downloading device acquires the IP of the HMI device, and the IP acquisition mode includes one of the following: automatic acquisition mode, manual acquisition mode.
[0038] In the above embodiment, the communication download device also includes a dial switch 14, such as Figure 2As shown, the dip switch 14 is used to set the IP acquisition mode, that is, to set the mode of acquiring the IP of the HMI device. The IP acquisition mode includes automatic acquisition mode and manual acquisition mode. For example, when the dip switch 14 is ON, it corresponds to automatic acquisition of the IP of the HMI device. When the dip switch 14 is OFF, it corresponds to manual acquisition of the IP of the HMI device, thereby achieving the purpose of acquiring the IP of the HMI device in different ways. For example, when the HMI device has been set with a fixed IP, the communication download device can be set to manual acquisition mode, and the IP of the HMI device can be acquired through a broadcast packet; and when the HMI device has not been set with a fixed IP and is not connected to a router, the automatic acquisition mode is selected, and the communication download device allocates an IP to the HMI device, that is, the communication download device can provide DHCP service to allocate an IP address to the HMI device.
[0039] In an optional embodiment, the DIP switch 14 is electrically connected to a target port of the CPU 11 , wherein the target port is a GPIO port of the CPU 11 , and the CPU 11 obtains the IP acquisition mode through the target port.
[0040] In the above embodiment, by electrically connecting the dip switch 14 to the target port of the CPU 11, the CPU 11 can obtain the IP acquisition method through the target port. For example, when the dip switch 14 is ON, the corresponding target port is 1 (or 0), and when the dip switch 14 is OFF, the corresponding target port is 0 (or 1), thereby obtaining the IP address of the HMI device in a corresponding manner.
[0041] In an optional embodiment, the CPU 11 includes a protocol conversion module, wherein the protocol conversion module is used to perform protocol conversion on the target data packet and then send the converted data packet to the HMI device.
[0042] In the above embodiment, the CPU 11 includes a protocol conversion module, which is used to convert the target data packet into a protocol and then send it to the HMI device through the network port 13. When implementing USB to Ethernet communication, it is necessary to consider the conversion between different communication protocols. For example, it is necessary to convert the data at the USB layer into a data packet in the TCP / IP protocol format for transmission on the Ethernet network.
[0043] The present application also provides a communication download method, which is applied to any of the communication download devices mentioned above, such as Figure 3 As shown, Figure 3 This is a flow chart of a communication download method provided by an embodiment of the present application, including: Step S301, receiving a download request sent by a mobile device, wherein the download request is a request from the mobile device to download data in a target data packet to an HMI device; Step S302, when it is determined that the HMI device allows downloading, sending a first message to the mobile device to instruct the mobile device to send a target data packet; Step S303: receiving a target data packet, and forwarding the target data packet to the HMI device.
[0044] In the above embodiment, the communication download device receives a download request sent by a mobile device, and the download request is a request from the mobile device to download the data in the target data packet to the HMI device. When it is determined that the HMI device allows downloading, the communication download device sends a first message to the mobile device to instruct the mobile device to send the target data packet, then receives the target data packet sent by the mobile device, and forwards the target data packet to the HMI device. That is, the target data packet in the mobile device is downloaded to the HMI device, wherein the mobile device adopts a USB communication mode, and the HMI device adopts an Ethernet communication mode, that is, the mobile device is only equipped with a USB interface, such as a Type-C interface, or a Type-A, Type-B, or other USB interfaces, the mobile device can be a mobile phone, a tablet, or other mobile devices, and the HMI device is only equipped with a network port, so as to achieve the purpose of downloading the target data packet in the mobile device equipped with only a USB interface to the HMI device with only an Ethernet interface, and to achieve the effect of improving the data transmission efficiency between devices with different interfaces.
[0045] In an optional embodiment, when it is determined that the HMI device allows downloading, sending a first message to the mobile device includes: forwarding the download request to the HMI device; when a second message sent by the HMI device is received, determining that the HMI device allows downloading, wherein the second message is a reply of the HMI device to the download request; when it is determined that the HMI device allows downloading, sending the first message to the mobile device.
[0046] In the above embodiment, the communication download device first forwards the download request to the HMI device, and when receiving the second message sent by the HMI device, it is determined that the HMI device allows downloading. The second message is the reply of the HMI device to the download request. The second message can be understood as the downloadable message replied by the HMI device to the communication download device, which indicates that the HMI device allows downloading messages at this time; the communication download device then sends the first message to the mobile device. That is, after the HMI device has been normally connected in communication, it notifies the mobile device that the target data packet can be transmitted, so as to ensure the normal transmission of data and avoid download failure.
[0047] In an optional embodiment, before forwarding the download request to the HMI device, the method further includes: establishing a communication connection with the HMI device in a handshake manner.
[0048] In the above embodiment, before forwarding the download request to the HMI device, the communication download device establishes a communication connection with the HMI device by handshaking, that is, ensuring that the communication download device and the HMI device can communicate normally after being connected via a network cable. For example, the HMI device can send a message to the communication download device to ensure that the HMI sending capability is normal, the communication download device receives the message sent by the HMI device and replies to the HMI device to ensure that the communication download device has normal sending and receiving capabilities, and then the HMI device receives the reply message from the communication download device to ensure that the HMI device has normal receiving capabilities, thereby establishing a communication connection between the two.
[0049] In an optional embodiment, before establishing a communication connection with the HMI device through a handshake, the method further includes: obtaining a target state signal of a dip switch 14, wherein the communication download device includes a dip switch 14, the dip switch 14 is electrically connected to the CPU 11, and the dip switch 14 is configured to set an IP acquisition mode, the IP acquisition mode is used to indicate a mode in which the communication download device obtains the IP of the HMI device, and the IP acquisition mode includes one of the following: an automatic acquisition mode, a manual acquisition mode; determining a target acquisition mode of the IP of the HMI device based on the target state signal.
[0050] In the above embodiment, the target state signal of the dial switch 14 is obtained, and the target state signal is used to indicate whether to obtain the IP automatically or manually, and then the target acquisition method of the IP of the HMI device can be determined based on the target state signal. For example, when the dial switch 14 is ON, it corresponds to automatically obtaining the IP of the HMI device, and when the dial switch 14 is OFF, it corresponds to manually obtaining the IP of the HMI device, thereby achieving the purpose of flexibly setting the IP acquisition method of the HMI device according to needs. For example, when the HMI device has been set with a fixed IP, the communication download device can be set to a manual acquisition mode, and the IP of the HMI device can be obtained through a broadcast packet; and when the HMI device has not been set with a fixed IP and is not connected to a router, the automatic acquisition mode is selected at this time, and the communication download device allocates an IP to the HMI device, that is, the communication download device can provide a DHCP service to allocate an IP address to the HMI device.
[0051] In an optional embodiment, receiving the target data packet includes: receiving the target data packet sent by the mobile device through a USB interface.
[0052] In the above embodiment, the communication download device receives the target data packet sent by the mobile device through the USB interface. The mobile device is also equipped with a USB interface, wherein the USB interface in the mobile device and the USB interface in the communication download device may be the same or different.
[0053] In an optional embodiment, after forwarding the target data packet to the HMI device, the method further includes: receiving a third message sent by the HMI device, wherein the third message is used to indicate that the HMI device has completed downloading the target data packet; forwarding the third message to the mobile device; and receiving a download end message sent by the mobile device, wherein the download end message is used to indicate the end of downloading.
[0054] In the above embodiment, after forwarding the target data packet (or program) to the HMI device, the communication download device receives the third message sent by the HMI device, and the third message indicates that the HMI device has completed the download. The communication download device then forwards the third message to the mobile device, that is, notifies the mobile device that the HMI device has completed the download operation, and then receives the download end message sent by the mobile device, that is, the entire download task is completed.
[0055] It should be noted that the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application will be described in detail below in conjunction with specific embodiments.
[0056] The embodiment of the present application provides a USB communication to Ethernet communication download device, which can enable the device to communicate on the USB interface and then transmit data through the Ethernet network to achieve device interconnection and remote management.
[0057] USB communication: USB communication is the data transmission between devices through the USB interface. USB communication includes data exchange between the host (such as a communication download device) and the device (such as a mobile device), and usually requires corresponding drivers to support communication.
[0058] Ethernet communication: Ethernet communication is the data transmission between devices through the Ethernet network. Ethernet communication uses standard network protocols (such as TCP / IP) to achieve cross-network communication and data transmission between devices.
[0059] Protocol conversion: When implementing USB to Ethernet communication, it is necessary to consider the conversion between different communication protocols. For example, the data at the USB layer needs to be converted into data packets in the TCP / IP protocol format for transmission on the Ethernet network.
[0060] Driver support: In order for a computer or other device to recognize and correctly use a USB to Ethernet device (corresponding to the aforementioned communication download device), it is usually necessary to install the corresponding driver. These drivers provide the necessary bridging functions required to communicate with the conversion device.
[0061] Network configuration: Configure the Ethernet network to ensure that the USB-to-Ethernet device can communicate normally with other devices and ensure the secure and stable transmission of data.
[0062] The structure of the USB communication to Ethernet communication download device (hereinafter referred to as the communication download device) in the embodiment of the present application is as follows: Figure 2 As shown, it includes a CPU 11, a USB interface 12, a network port 13 (or Ethernet interface) and a DIP switch 14 (or 1-pin switch).
[0063] Among them, the USB interface 12 is used to receive the program (corresponding to the aforementioned target data packet) sent by the host computer (corresponding to the aforementioned mobile device), the Ethernet interface is used to download the received program to the HMI device, and the 1-pin switch is used to set the USB communication to Ethernet communication download device to obtain the HMI IP mode, ON is to automatically obtain the HMI IP, and OFF is to manually obtain the HMI IP. CPU11 uses 1 GPIO as a 1-pin switch.
[0064] Figure 4 This is a connection diagram of a communication download device provided in an embodiment of the present application. The USB communication to Ethernet communication download device is connected to a host computer (such as a mobile phone / tablet) via a USB cable, and the USB communication to Ethernet communication download device is connected to the HMI device via a network cable. The interaction between the host computer, the USB communication to Ethernet communication download device and the HMI device is as follows: Figure 5 shown.
[0065] The steps to establish a communication connection are as follows: Step S11, the host computer (mobile phone / tablet) is connected to the USB communication to Ethernet communication download device; Step S12, the HMI device (only has Ethernet interface but no USB interface) is connected to the USB communication to Ethernet communication download device; Step S13, set the USB communication to Ethernet communication download device to obtain the IP address of the HMI device through a 1pin switch (ON for automatic acquisition, OFF for manual acquisition); Step S14, powering on the USB communication to Ethernet communication download device and the host computer and HMI device connected thereto; Step S15, a communication connection is established between the HMI device and the USB communication to Ethernet communication download device through handshake; Specifically, the HMI sends a message to the USB communication to Ethernet communication download device to ensure that the HMI sending capability is normal; the USB communication to Ethernet communication download device receives the message sent by the HMI and replies to the HMI to ensure that the USB communication to Ethernet communication download device sending and receiving capabilities are normal; the HMI receives the reply message from the USB communication to Ethernet communication download device to ensure that the HMI receiving capability is normal; the USB communication to Ethernet communication download device and the HMI establish a connection successfully; Step S16, the host computer establishes a connection with the USB communication to Ethernet communication download device via a USB cable.
[0066] Figure 6 This is a schematic diagram of downloading a communication download device provided in an embodiment of the present application. The specific downloading steps are as follows: Step S601, the host computer (mobile phone / tablet) sends a download request to the USB communication to Ethernet communication download device (referred to as the communication download device); Step S602, the USB communication to Ethernet communication download device forwards the download request to the HMI device (which has only an Ethernet interface but no USB interface); Step S603, the HMI (only Ethernet interface but no USB interface) device replies a downloadable message to the USB communication to Ethernet communication download device; Step S604, the USB communication to Ethernet communication download device forwards the firmware downloadable message to the upper computer (mobile phone / tablet); Step S605, the host computer (mobile phone / tablet) sends the downloadable firmware to the USB communication to Ethernet communication download device; Step S606, the USB communication is converted to Ethernet communication, and the download device forwards the downloaded firmware to the HMI device (which has only an Ethernet interface but no USB interface); Step S607, the HMI (only Ethernet interface but no USB interface) device sends a firmware download completion message to the USB communication to Ethernet communication download device to ensure that the firmware download is completed; Step S608, the USB communication is converted to Ethernet communication, and the download device forwards the received firmware to the upper computer (mobile phone / tablet); Step S609, the host computer (mobile phone / tablet) sends a download end message to the USB communication to Ethernet communication download device; Step S610: The USB communication to Ethernet communication download device forwards a download completion message to the HMI device (which has only an Ethernet interface but no USB interface).
[0067] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0068] The present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed, any one of the method steps described above is executed.
[0069] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0070] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0071] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0072] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0073] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0074] This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field not recorded in the present disclosure.
Claims
1. A communication downloading device, characterized in that: include: CPU, USB interface, network port, among which, The CPU is electrically connected to the USB interface and the network port respectively, and the CPU is used to communicate with the mobile device through the USB interface, and the CPU is also used to communicate with the HMI device through the network port, wherein the mobile device adopts a USB communication mode, and the HMI device adopts an Ethernet communication mode; In case of receiving a download request, the CPU is further used to forward the target data packet downloaded from the mobile device to the HMI device, wherein the download request is used to indicate that the mobile device requests to download the data in the target data packet to the HMI device.
2. The communication downloading device according to claim 1, characterized in that: The communication download device also includes: a dial switch, wherein: The dip switch is electrically connected to the CPU, and the dip switch is configured to set an IP acquisition mode, wherein the IP acquisition mode is used to indicate a mode in which the communication download device acquires the IP of the HMI device, and the IP acquisition mode includes one of the following: an automatic acquisition mode and a manual acquisition mode.
3. The communication downloading device according to claim 2, characterized in that: The dip switch is electrically connected to a target port of the CPU, wherein the target port is a GPIO port of the CPU, and the CPU obtains the IP acquisition method through the target port.
4. The communication downloading device according to claim 1, characterized in that: The CPU includes a protocol conversion module, wherein the protocol conversion module is used to perform protocol conversion on the target data packet and then send the target data packet to the HMI device.
5. A communication download method, characterized in that: The communication downloading device applied to any one of claims 1 to 4 comprises: Receiving a download request sent by a mobile device, wherein the download request is a request by the mobile device to download data in a target data packet to an HMI device; When it is determined that the HMI device allows downloading, sending a first message to the mobile device to instruct the mobile device to send the target data packet; The target data packet is received, and the target data packet is forwarded to the HMI device.
6. The method according to claim 5, characterized in that When it is determined that the HMI device allows downloading, sending a first message to the mobile device includes: forwarding the download request to the HMI device; In case of receiving a second message sent by the HMI device, determining that the HMI device allows downloading, wherein the second message is a reply of the HMI device to the download request; When it is determined that the HMI device allows downloading, a first message is sent to the mobile device.
7. The method according to claim 6, characterized in that Before forwarding the download request to the HMI device, the method further includes: A communication connection is established with the HMI device by handshaking.
8. The method according to claim 7, characterized in that Before establishing a communication connection with the HMI device by handshaking, the method further includes: Obtaining a target state signal of a dip switch, wherein the communication download device includes the dip switch, the dip switch is electrically connected to the CPU, and the dip switch is configured to set an IP acquisition mode, the IP acquisition mode is used to indicate a mode in which the communication download device acquires the IP of the HMI device, and the IP acquisition mode includes one of the following: an automatic acquisition mode and a manual acquisition mode; A target acquisition method of the IP of the HMI device is determined based on the target status signal.
9. The method according to claim 5, characterized in that Receiving the target data packet includes: Receive the target data packet sent by the mobile device through the USB interface.
10. The method according to claim 5, characterized in that After forwarding the target data packet to the HMI device, the method further includes: Receiving a third message sent by the HMI device, wherein the third message is used to indicate that the HMI device has completed downloading of the target data packet; forwarding the third message to the mobile device; A download end message sent by the mobile device is received, wherein the download end message is used to indicate the download end.
