Control method for selective program update in multi-device network
By using program update tools and broadcast instructions in the CAN network of special vehicles, independent program updates for each sub-device are solved, and the update process is simplified and the need for dedicated cables is reduced.
Patent Information
- Application Number
- CN202411850146.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-18
AI Technical Summary
In the multi-device network of special vehicles, changes in the program framework require overall program updates, but due to space limitations, the controller is centrally arranged in a closed power compartment, making point-to-point updates very difficult, and a response mechanism is needed to achieve independent processing and updates of each sub-equipment.
Connect to the CAN network of special vehicles through the computer, use the program update tool to broadcast standby preparation instructions, so that all sub-devices enter the Bootloader's to-read state. Then, the device sends the local ID and software version number information, the program update tool selects the device that needs to be updated, and sends verification information and actual program messages through the CAN network to realize independent program updates of each sub-device.
The independent program update of each sub-equipment is realized through the CAN communication network, reducing the equipment of dedicated cables for program updates, simplifying the equipment update process, and improving the convenience and simplicity of updates.
Smart Images

Figure CN119847559A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of special vehicle electrical network control, and in particular relates to a control method for selective program update in a multi-device network. Background Art
[0002] With the rapid development of special vehicle intelligence and electrification, the new transmission system is more complex than the traditional transmission system, and each component requires a dedicated controller to process complex control algorithms. The controllers exchange information through communication networks such as CAN to complete complex control functions.
[0003] During the special vehicle test, parameters of each controller will be optimized. For the preset parameters, they can be updated through CCP and other methods, but for changes in the program framework, the entire program must be updated. The general solution is to deploy the Bootloader in the controller. After the controller is powered on, it first enters the Bootloader. The computer connects to the controller's startup program in a point-to-point manner, and then updates the program according to needs.
[0004] However, due to the limited space of special vehicles, various controllers are concentrated in a small and closed power compartment, and cannot be installed in a convenient location for replacement and maintenance, making it very difficult to update the controller program point by point. Therefore, a response mechanism is needed to enable each sub-device to process independently, reduce the equipment of dedicated cables for program updates, and make equipment updates convenient and simple. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] The technical problem to be solved by the present invention is: how to provide a control method for selective program update in a multi-device network.
[0007] (II) Technical solution
[0008] To solve the above technical problems, the present invention provides a control method for selective program update in a multi-device network, which comprises the following steps:
[0009] Step 1: The computer is connected to the special vehicle CAN network through a communication card, and the program update tool installed in the computer is started. The program update tool enters the CAN network message sending preparation state;
[0010] Step 2: The device network power supply is turned on. At this time, the CAN network power supply starts to work, and the program update tool starts to broadcast the standby preparation instruction Message1. The standby preparation instruction Message1 is used to make all sub-devices enter the Bootloader waiting for flashing state;
[0011] At the same time, after power-on, all sub-devices in the CAN network enter the working state of the Bootloader, and cyclically check the commands on the CAN network within 300ms. If the standby preparation instruction Message1 is detected, it enters the standby state and goes to step 3. If the standby preparation instruction Message1 is not detected, it directly jumps to the application program for normal operation;
[0012] Wherein, the sub-device is a device to be updated with a program;
[0013] Step 3: After the sub-device enters the standby state, it sends the information Message2 of the local device ID and the current software version number on the CAN network. After the program update tool receives the information Message2, the list displays the sub-device information waiting to be flashed in the current CAN network;
[0014] Step 4: After selecting the sub-device to be flashed in the program update tool and starting to flash, first send the verification message Message3 containing the device ID to be flashed on the CAN network; each sub-device on the CAN network receives Message3 and verifies that the device ID in Message3 corresponds to its own device ID; the sub-device that is verified to be matched enters the flashing state and responds to the download preparation message Message4, while the other sub-devices that are not verified to be matched do not respond to the verification message Message3;
[0015] Step 5: After receiving Message 4, the program update tool starts to send the actual program message; after receiving and verifying the message, the sub-device sends an update completion message Message 5 and then enters the standby state;
[0016] Step 6: After receiving Message5, the program update tool prompts that the sub-device update is complete and starts flashing the next sub-device. After all sub-devices are updated, a broadcast message Message6 is sent to restart all sub-devices.
[0017] (III) Beneficial effects
[0018] Compared with the prior art, the present invention aims at the problem that in the CAN communication network composed of various controllers of special vehicles, it is necessary to perform independent software updates on each controller in a targeted manner. It provides a specific response mechanism and event processing flow, which can independently process each sub-device when using the program to update the control software through the CAN communication network, reduce the laying of special cables for program updates, and make equipment updates convenient and simple. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 CAN network topology for special vehicle controllers.
[0020] Figure 2 It is a flow chart of the computer execution method in the implementation process of the present invention.
[0021] Figure 3 It is a flow chart of the controller execution method during the implementation process of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, content, and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the accompanying drawings and examples.
[0023] Example 1
[0024] This embodiment provides a method for controlling program update selection download in a multi-device network. The specific control method is as follows:
[0025] The computer is connected to the special vehicle CAN via a communication card, and the update software is opened, and the software automatically enters the CAN message sending preparation state.
[0026] The device network power supply is turned on, and the CAN network power supply starts working. The computer update software starts broadcasting CAN message Message1 to make all devices enter the Bootloader's waiting state for flashing. At the same time, after power-on, all sub-devices enter the Bootloader's working state, and cyclically check the commands on the CAN network within 300ms. If standby is detected, it enters the standby state. If no command is detected, it directly jumps to the application for normal work.
[0027] After the device enters the standby state, it sends the local ID information Message2 on the CAN network. After the computer software receives the ID information Message2, the list displays the device information waiting to be flashed in the current network.
[0028] After selecting the device to be flashed in the computer software and starting to flash, the computer software first sends the device to be flashed and verification information Message3 on the CAN network; after the sub-device receives the information verification and the device ID corresponds to its own ID, it enters the flashing state and sends out the ready to download information Message4, and the other devices do not respond to the message.
[0029] After receiving Message4, the computer software starts to send the actual program message; after receiving the message and verifying that it is complete, the sub-device sends an update completion message Message5 and then enters the standby state.
[0030] After receiving Message5, the computer software prompts that the device update is complete and starts flashing the next device. After all are completed, a broadcast message Message6 is sent to restart all devices.
[0031] Table 1 ID message list and description
[0032]
[0033] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A control method for selective program update in a multi-device network, characterized in that: It includes the following steps: Step 1: The computer is connected to the special vehicle CAN network through a communication card, and the program update tool installed in the computer is started. The program update tool enters the CAN network message sending preparation state; Step 2: The device network power supply is turned on. At this time, the CAN network power supply starts to work, and the program update tool starts to broadcast the standby preparation instruction Message1. The standby preparation instruction Message1 is used to make all sub-devices enter the Bootloader waiting for flashing state; At the same time, after power-on, all sub-devices in the CAN network enter the working state of the Bootloader, and cyclically check the commands on the CAN network within 300ms. If the standby preparation instruction Message1 is detected, it enters the standby state and goes to step 3. If the standby preparation instruction Message1 is not detected, it directly jumps to the application program for normal operation; Wherein, the sub-device is a device to be updated with a program; Step 3: After the sub-device enters the standby state, it sends the information Message2 of the local device ID and the current software version number on the CAN network. After the program update tool receives the information Message2, the list displays the sub-device information waiting to be flashed in the current CAN network; Step 4: After selecting the sub-device to be flashed in the program update tool and starting to flash, first send the verification message Message3 containing the device ID to be flashed on the CAN network; each sub-device on the CAN network receives Message3 and verifies that the device ID in Message3 corresponds to its own device ID; the sub-device that is verified to be matched enters the flashing state and responds with the download-ready message Message4, while the other sub-devices that are not verified to be matched do not respond to the verification message Message3; Step 5: After receiving Message 4, the program update tool starts to send the actual program message; after receiving and verifying the message, the sub-device sends an update completion message Message 5 and then enters the standby state; Step 6: After receiving Message5, the program update tool prompts that the sub-device update is complete and starts flashing the next sub-device. After all sub-devices are updated, a broadcast message Message6 is sent to restart all sub-devices.
2. The control method for selective program update in a multi-device network according to claim 1, characterized in that: The CAN network is a CAN communication network composed of various controllers of special vehicles.
3. The control method for selective program update in a multi-device network according to claim 1, characterized in that: The sub-devices are various controllers on special vehicles.
4. The control method for selective program update in a multi-device network according to claim 1, characterized in that: The method can perform independent software update on each controller in a targeted manner.
5. The control method for selective program update in a multi-device network according to claim 1, characterized in that: The method provides a specific response mechanism and event processing flow.
6. The control method for selective program update in a multi-device network according to claim 1, characterized in that: The method can independently process each sub-device when using a program to update control software through the CAN communication network.
7. The control method for selective program update in a multi-device network according to claim 1, characterized in that: The method can reduce the laying of dedicated cables for program updates, making device updates convenient and concise.
8. The control method for selective program update in a multi-device network according to claim 3, characterized in that: The Message 1 is used to put the controller into a standby state; the Message 2 is used to return controller information; and the Message 3 includes the model and serial number of the controller, as well as verification information.
9. The control method for selective program update in a multi-device network according to claim 3, characterized in that: The Message 4 is used to indicate that the controller is ready; the Message 5 is used to indicate that the controller has been updated; 10. The control method for selective program update in a multi-device network according to claim 3, characterized in that: The Message 6 is used to restart the controller.