[go: up one dir, main page]

CN119415125A - A method and system for upgrading an in-vehicle entertainment system based on Flash CAN - Google Patents

A method and system for upgrading an in-vehicle entertainment system based on Flash CAN Download PDF

Info

Publication number
CN119415125A
CN119415125A CN202510020601.7A CN202510020601A CN119415125A CN 119415125 A CN119415125 A CN 119415125A CN 202510020601 A CN202510020601 A CN 202510020601A CN 119415125 A CN119415125 A CN 119415125A
Authority
CN
China
Prior art keywords
upgrade
firmware update
data
flash
vehicle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202510020601.7A
Other languages
Chinese (zh)
Inventor
王孝文
卢凤丽
张豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Dadao Electronic Technology Co ltd
Original Assignee
Nanjing Dadao Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Dadao Electronic Technology Co ltd filed Critical Nanjing Dadao Electronic Technology Co ltd
Priority to CN202510020601.7A priority Critical patent/CN119415125A/en
Publication of CN119415125A publication Critical patent/CN119415125A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/62Uninstallation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

本发明属于车载升级控制技术领域,具体涉及一种基于Flash CAN的车载娱乐系统升级方法及系统,包括:硬件准备、固件更新文件获取和升级,升级过程包括:备份当前车载娱乐系统固件,校验下载的固件更新文件,校验成功则继续下一步,校验失败则重新下载固件更新文件,擦除指定Flash存储区域,升级管理模块请求并传输固件更新文件的数据包至嵌入式控制单元,若请求或传输失败,则回滚至原系统,数据接收与校验,重启与验证步骤:完成数据接收后重启车辆,验证车载娱乐系统功能是否正常。本发明降低了升级失败的风险,不仅提高了升级效率,还增强了系统的安全性,有效避免了因升级不当导致的系统异常。

The present invention belongs to the technical field of vehicle upgrade control, and specifically relates to a vehicle entertainment system upgrade method and system based on Flash CAN, including: hardware preparation, firmware update file acquisition and upgrade, the upgrade process includes: backing up the current vehicle entertainment system firmware, verifying the downloaded firmware update file, continuing to the next step if the verification is successful, re-downloading the firmware update file if the verification fails, erasing the specified Flash storage area, the upgrade management module requests and transmits the data packet of the firmware update file to the embedded control unit, if the request or transmission fails, rolls back to the original system, data reception and verification, restart and verification steps: restart the vehicle after completing data reception, and verify whether the vehicle entertainment system functions normally. The present invention reduces the risk of upgrade failure, not only improves the upgrade efficiency, but also enhances the security of the system, and effectively avoids system abnormalities caused by improper upgrades.

Description

Vehicle-mounted entertainment system upgrading method and system based on Flash CAN
Technical Field
The invention belongs to the technical field of vehicle-mounted upgrade control, and particularly relates to a vehicle-mounted entertainment system upgrade method and system based on a Flash CAN.
Background
With the rapid development of automotive electronics, in-vehicle entertainment systems have become an important component of modern automobiles. The system not only provides multimedia entertainment functions such as music and video, but also integrates diversified services such as navigation, vehicle information display, vehicle-mounted communication and the like. However, with the continued expansion of system functionality and the increasing demand of users, software upgrades of in-vehicle entertainment systems are becoming increasingly important.
Traditional vehicle entertainment system upgrades usually rely on physical media (such as CD, DVD or USB storage devices) for manual upgrades, which is not only cumbersome to operate, but also inefficient. With the popularization of the internet of vehicles technology, remote online upgrade (OTA) is becoming a mainstream way of upgrading an in-vehicle entertainment system. OTA technology allows vehicles to receive and install upgrade packages over a wireless network, thereby enabling remote updating and optimization of the in-vehicle entertainment system.
However, a series of technical challenges are also faced in implementing OTA upgrades. First, the storage medium (e.g., NAND FLASH) of the in-vehicle entertainment system has its special features, such as bad blocks, limited number of block erases, and inability to directly copy, which increases the difficulty and complexity of system upgrades. Second, the in-vehicle entertainment system needs to communicate and coordinate with other control units of the vehicle to ensure smooth progress of the upgrade process, which requires high reliability and stability of the upgrade method. In addition, with the increasing functions of the vehicle-mounted entertainment system, the size of the upgrade package is gradually increased, which puts higher demands on network bandwidth and transmission speed.
In view of the above problems, the industry is continually exploring more efficient, safe, and reliable vehicle entertainment system upgrade methods.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a Flash CAN-based vehicle-mounted entertainment system upgrading method and system, which aim to solve the problems of complex operation, low efficiency, technical challenges in the OTA upgrading process and the like in the traditional upgrading mode.
The invention discloses a vehicle-mounted entertainment system upgrading method based on a Flash CAN, which comprises the following steps:
S1, a hardware preparation step, namely ensuring that an embedded control unit supports a CAN bus interface and configuring a CAN controller, a Flash controller and corresponding pins;
S2, a firmware update file obtaining step, namely obtaining a firmware update file matched with the vehicle model and the current system version;
S3, upgrading the steps of the process, including:
s301, backing up the firmware of the current vehicle-mounted entertainment system;
S302, checking the downloaded firmware update file, if the check is successful, continuing the next step, and if the check is failed, re-downloading the firmware update file;
S303, erasing the designated Flash storage area;
S304, a transmission step, in which the upgrade management module requests and transmits a data packet of the firmware update file to the embedded control unit, and if the request or the transmission fails, the data packet rolls back to the original system;
S305, the data receiving and checking step, namely the embedded control unit receives the data packet of the firmware updating file and checks, writes in Flash if the check is successful, counts errors if the check is failed, stops upgrading and restores the original system when the error count exceeds a preset threshold, and if the error count does not exceed the preset threshold, the upgrading management module resends the data packet of the firmware updating file and performs rechecking;
s306, restarting the vehicle after completing data receiving and verifying whether the functions of the vehicle-mounted entertainment system are normal.
By further perfecting the technical scheme, the backup current vehicle-mounted entertainment system firmware is stored in a preset independent area, the independent area is physically or logically isolated from a target area for storing firmware update files, and the independent area selects external storage equipment, cloud storage or a backup server.
And periodically verifying the backup vehicle-mounted entertainment system firmware and performing recovery exercise so as to recover the original vehicle-mounted entertainment system firmware when the upgrading fails.
The setting ensures a reliable, accessible and safe environment for storing the backup files, and when the setting is performed, a backup strategy needs to be formulated, access authority is controlled, the backup files are periodically verified, and recovery exercise is performed, so that the original firmware can be recovered when the upgrading fails.
In the verification step, one or more methods of a checksum, a hash value and a digital signature are adopted to verify the integrity of the firmware update file, the hash value is used for verifying the uniqueness of the firmware update file and is not tampered, and the digital signature is used for verifying the authenticity of the firmware update file.
Further, the Flash memory is divided into a target storage area and other areas by physical division or logical division to obtain the target storage area and the other areas for storing the firmware update file data packet, the physical division refers to dividing the Flash memory into the target storage area and the other areas according to different partitions, the logical division refers to that in the logical management of Flash storage, the addresses of the target storage area and the other areas are different, and in the erasing step, the target storage area is only erased, so that the influence on the data stored in the other areas is avoided.
Further, in the transmission step, a transmission format, a transmission flow and a check sum error processing mechanism of a data packet are defined through a Flash CAN communication protocol, the transmission format of the data packet comprises a data packet header, a data body, a check code and a data packet tail, wherein the data packet header comprises a packet sequence number, a packet total number and a data packet type, the data body comprises firmware data, the check code is used for checking data integrity, the data packet tail marks the end of the data packet, the transmission flow comprises an initialization stage, a data transmission stage, a data receiving and checking stage, a writing stage and a finishing stage, the states of the transmission flow are controlled and managed through a state machine, and the state machine comprises idle, transmitting, receiving and error processing states, and state conversion is carried out according to the current state and event triggering conditions.
Further, the data packets are transmitted in a segmented mode, the embedded control unit executes data receiving and checking on each segmented data packet, when the embedded control unit receives the data packets, the embedded control unit performs integrity checking and sequential checking on the firmware update file data packets so as to ensure the correctness and the sequential performance of the data, after the verification is passed, the data are written into a target storage area of Flash, and an error processing mechanism is triggered when the verification is failed.
Further, the error processing mechanism comprises the steps of monitoring the transmission state of the data packet in real time, immediately stopping the upgrading process by the upgrading management module once the transmission error or abnormality of the data packet is found, counting errors of verification failure and reminding to retry, and recording error logs and state information.
The rules and the mechanisms improve the reliability, the efficiency and the stability of the upgrading process, and ensure that the data packet of the firmware update file can be accurately and completely transmitted to the embedded control unit.
Further, the upgrade management module encrypts the firmware update file by adopting an encryption technology to ensure the safety of firmware data in the processes of downloading, transmitting and storing, wherein the encryption technology comprises symmetric encryption and asymmetric encryption, and the vehicle identity verification is carried out by verifying the unique identifier of the vehicle in the process of transmitting the firmware update file, so that only the vehicle passing verification can receive and apply the firmware update package.
The backup and rollback steps in the upgrade process include automatically backing up the original firmware, and the system stores the backup file in a preset independent area, which is physically or logically isolated from the area for storing the new firmware. Through the storage address division and the access control strategy of Flash, the system can ensure that backup data cannot be wrongly written or covered in the upgrading process. At the same time, the control mechanism also includes protection of the storage area, such as setting a write protect bit, to prevent unauthorized access or modification. To avoid conflicts with new firmware data, and to restore the original system from backup if the upgrade fails.
The system for realizing the vehicle-mounted entertainment system upgrading method based on the Flash CAN comprises the following steps:
The embedded control unit is used for controlling the upgrading process of the vehicle-mounted entertainment system and supporting the CAN bus interface;
the upgrade management module is responsible for downloading, checking, transmitting, writing, backing up and rolling back firmware update files and providing data transmission state monitoring and error processing;
the Flash memory is used for storing firmware update files, backup data and new and old firmware version data;
the communication interface is connected with the vehicle built-in communication network and supports downloading of firmware update packages through Wi-Fi or mobile data networks;
The embedded control unit is communicated with other control units of the vehicle through the CAN bus interface, receives an upgrade instruction and transmits relevant data in the upgrade process.
Compared with the prior art, the vehicle-mounted entertainment system has the advantage that the vehicle-mounted entertainment system has remarkable advantages in upgrading. Firstly, the method does not need the owner to purchase external equipment and upgrade software additionally, greatly reduces upgrade cost, and enables more owners to enjoy the convenience brought by system upgrade easily. Secondly, the upgrading operation can be completed through the vehicle-mounted entertainment system interface, the whole flow is simple and clear, complicated steps are not needed, and the user experience is greatly improved. Meanwhile, by utilizing the high-speed and reliable data transmission characteristic of the Flash CAN, the invention reduces the risk of upgrade failure, improves the upgrade efficiency, enhances the safety of the system and effectively avoids the system abnormality caused by improper upgrade. Finally, the vehicle owner can receive and apply the upgrade package issued by the authorities at any time without waiting, thus greatly shortening the upgrade period and enabling the vehicle owner to enjoy the latest system functions and optimization in the first time.
The invention combines a plurality of aspects such as hardware configuration, CAN communication protocol customization, upgrade management module, program design and the like, provides a comprehensive, flexible and efficient solution for upgrading the vehicle-mounted entertainment system, and is suitable for various upgrade application scenes.
Drawings
Fig. 1 is a flow chart of the method of the present invention.
Detailed Description
The technical scheme of the invention is described in detail below through the drawings, but the protection scope of the invention is not limited to the embodiments.
Embodiment 1 an on-board entertainment system upgrade system based on Flash CAN comprises the following parts.
1. The hardware preparation comprises the steps of ensuring that an embedded control unit (MCU) supports a CAN bus interface and is provided with relevant hardware resources, wherein the hardware resources comprise a CAN controller, a Flash controller and corresponding pin connections, and the corresponding configuration is carried out according to a chip manual.
2. And acquiring a firmware update file, namely downloading the latest firmware update file of the vehicle-mounted entertainment system from an official website of an automobile manufacturer or a designated upgrading service center, and ensuring that the downloaded file is matched with the automobile model, year and current version of the vehicle-mounted entertainment system.
3. The upgrading process comprises the following steps:
① Backing up the current firmware, namely backing up the current vehicle-mounted entertainment system firmware by using Flash CAN software or other tools before upgrading. The backup file should be saved in a secure location so that the original firmware can be restored when the upgrade fails;
② The upgrade module checks the upgrade package, and in order to ensure the safety and the accuracy of the upgrade package, the verification succeeds in the next step, and the upgrade package is downloaded again if the verification fails;
③ Erasing the appointed Flash area;
④ The upgrade management module starts to request and transmit the data packet of the upgrade file, and rolls back to the recovery system if the request and the transmission fail, and the next step is successfully continued;
⑤ The MCU receives the data and performs verification, wherein the data is successfully written into the Flash, the error counting is performed when the verification fails, when the data is larger than a set threshold value, the upgrading is ended, the process is exited, the original system is recovered, and when the data is not larger than the set threshold value, the upgrading module retransmits the data for rechecking;
⑥ And (3) finishing data receiving, restarting and operating the new system, namely restarting the vehicle after upgrading is finished, and checking whether the functions of the vehicle-mounted entertainment system are normal.
As shown in fig. 1, the present invention provides a method for upgrading a vehicle-mounted entertainment system based on the above system, comprising the following steps:
S1, receiving an upgrade instruction:
When the update is needed, the number of the update packages is prompted on the vehicle-mounted entertainment system page, and then the vehicle owner can click on update now to start the update. And then receives upgrade instructions from other control units (such as an information center or a remote control module) of the vehicle through the CAN bus. These instructions may be triggered by the vehicle owner through the vehicle information center or sent by the remote control center through the remote control module. The upgrade instruction comprises key information such as a version number, a download address and the like of the upgrade package and is used for guiding the upgrade management module to carry out subsequent operation.
S2, downloading an upgrade package:
the upgrade management module is connected to the server through a communication network (such as a mobile data network or Wi-Fi) built in the vehicle according to the download address in the upgrade instruction. After verifying the identity and authority of the vehicle-mounted entertainment system, the server provides an upgrade package downloading link of a corresponding version. The upgrade management module downloads the upgrade package from the server and stores it in the temporary storage area for subsequent checksum write operations.
S3, checking an upgrade package:
And the upgrade management module performs integrity check on the downloaded upgrade package. This typically includes checking and verifying the integrity of the file, the matching of version numbers, the signature of the file, and so on. If the verification fails, the upgrade management module stops the upgrade process and prompts the owner to try to download again or contact the service center for support. If the verification is successful, the upgrade management module transmits the upgrade package to the embedded control unit.
S4, writing into a Flash memory:
And the embedded control unit writes the verified upgrade package into a target area appointed by the Flash memory. In the process, the data packets are transmitted in a blocking mode, written into the memory one by one, and the correctness and the integrity of each data packet block are ensured. In the writing process, the original vehicle-mounted entertainment system firmware is backed up so as to restore the system when the upgrade fails or rollback is needed. After the writing is completed, the upgrade management module updates the metadata of the Flash memory to reflect the new system software version and state.
S5, restarting and applying upgrade:
After the vehicle-mounted entertainment system is restarted, the processor reads new system software from the Flash memory and operates the new system software. This typically involves loading a new system file, initializing new configuration parameters, and executing the necessary startup procedure. During the restart process, the vehicle entertainment system also performs a series of self-checking and initialization operations to ensure the correctness and stability of the new system software. After the restart is completed, the vehicle-mounted entertainment system runs a new system software version and provides updated functions and performances.
Flash CAN communication defines the communication flow and state machine in the upgrading process to ensure the correct execution and sequential control of each step. The method comprises the steps of defining a transmission format of a data packet through a Flash CAN communication protocol, defining a transmission flow and a check and error processing mechanism, wherein the transmission format of the data packet comprises a data packet head, a data body, a check code and a data packet tail, the data packet head comprises a packet sequence number, a packet total number and a data packet type, the data body comprises firmware data, the check code is used for checking data integrity, the data packet tail marks the end of the data packet, the transmission flow comprises an initialization stage, a data transmission stage, a data receiving and checking stage, a writing into a Flash memory and a finishing stage, and the state machine controls and manages all stages of the transmission flow through the state machine, wherein the state machine comprises idle, transmitting, receiving and error processing states, and carries out state conversion according to the current state and event triggering conditions.
The error handling mechanism is that during the upgrade process, the upgrade management module monitors the data transmission status in real time, including the integrity, checksum, transmission rate, etc. Once the data transmission errors or anomalies are found, the upgrade management module immediately stops the upgrade process and prompts the vehicle owner to try again. This can avoid upgrade failure or system abnormality caused by data transmission errors. The upgrade management module may also record error logs and status information for use by the owner or service center in subsequent analysis and troubleshooting.
The security guarantee is that the upgrade management module adopts encryption technology to protect the data security of the upgrade package. In the downloading and writing process, the upgrade package is encrypted to prevent virus infection or data leakage. Encryption techniques include both symmetric encryption and asymmetric encryption. The symmetric encryption is used for encrypting the data content of the upgrade package, ensuring confidentiality of the data in the transmission and storage processes, and the asymmetric encryption is used for verifying the signature and the integrity of the upgrade package, and ensuring the authenticity and the reliability of the data. In addition, the upgrade management module also verifies the identity of the vehicle, so that only the vehicle passing the verification can receive and apply the upgrade package. This may be accomplished by a Vehicle Identification Number (VIN) or other unique identifier.
The backup and rollback mechanism refers to that in the upgrading process, the upgrade management module automatically backs up the original system software so as to restore the system when the upgrade fails or rollback is needed. The backup data is typically stored in another area of Flash memory, separate from the new system software, to avoid data conflicts and corruption. If the upgrade fails or the owner needs to roll back to the old version, the upgrade management module may use the backup data recovery system. This typically involves writing back the backup data to a designated area of Flash memory and restarting the in-vehicle entertainment system.
As described above, although the present invention has been shown and described with reference to certain preferred embodiments, it is not to be construed as limiting the invention itself. Various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1.一种基于Flash CAN的车载娱乐系统升级方法,其特征在于,包括如下步骤:1. A method for upgrading an in-vehicle entertainment system based on Flash CAN, characterized by comprising the following steps: S1、硬件准备步骤:确保嵌入式控制单元支持CAN总线接口,并配置CAN控制器、Flash控制器和相应引脚;S1, Hardware preparation steps: Make sure the embedded control unit supports the CAN bus interface, and configure the CAN controller, Flash controller and corresponding pins; S2、固件更新文件获取步骤:获取与车辆型号和当前系统版本匹配的固件更新文件;S2, firmware update file acquisition step: acquiring a firmware update file that matches the vehicle model and the current system version; S3、升级过程步骤,包括:S3, the upgrade process steps include: S301、备份步骤:备份当前车载娱乐系统固件;S301, backup step: backing up the current in-vehicle entertainment system firmware; S302、校验步骤:校验下载的固件更新文件,校验成功则继续下一步,校验失败则重新下载固件更新文件;S302, verification step: verifying the downloaded firmware update file, if the verification succeeds, proceeding to the next step, if the verification fails, re-downloading the firmware update file; S303、擦除步骤:擦除Flash存储器中指定的目标区域,以存储固件更新文件;S303, erasing step: erasing a designated target area in the Flash memory to store a firmware update file; S304、传输步骤:升级管理模块请求并传输固件更新文件的数据包至嵌入式控制单元,若请求或传输失败,则回滚至原系统;S304, transmission step: the upgrade management module requests and transmits the data packet of the firmware update file to the embedded control unit, and if the request or transmission fails, rolls back to the original system; S305、数据接收与校验步骤:嵌入式控制单元接收固件更新文件数据包并校验,校验成功则写入Flash存储区域,校验失败则进行错误计数,当错误计数超过预设阈值时终止升级并恢复原系统,若错误计数未超过预设阈值,则升级管理模块重新发送固件更新文件数据包并进行重新校验;S305, data receiving and verification step: the embedded control unit receives the firmware update file data packet and verifies it. If the verification succeeds, it is written into the Flash storage area. If the verification fails, an error count is performed. When the error count exceeds a preset threshold, the upgrade is terminated and the original system is restored. If the error count does not exceed the preset threshold, the upgrade management module resends the firmware update file data packet and re-verifies it. S306、重启与验证步骤:完成数据接收后重启车辆,验证车载娱乐系统功能是否正常。S306, restart and verification step: After completing data reception, restart the vehicle to verify whether the in-vehicle entertainment system functions normally. 2.根据权利要求1所述的基于Flash CAN的车载娱乐系统升级方法,其特征在于,所述备份步骤中,将备份的当前车载娱乐系统固件存储在预设的独立区域,所述独立区域在物理或逻辑上与用于存储固件更新文件的目标区域相隔离,所述独立区域选择外部存储设备、云端存储或备份服务器。2. The method for upgrading the in-vehicle entertainment system based on Flash CAN according to claim 1 is characterized in that, in the backup step, the backed-up current in-vehicle entertainment system firmware is stored in a preset independent area, and the independent area is physically or logically isolated from the target area for storing firmware update files, and the independent area selects an external storage device, a cloud storage or a backup server. 3.根据权利要求2所述的基于Flash CAN的车载娱乐系统升级方法,其特征在于,通过设置访问控制机制对预设的独立区域进行保护,以防止未经授权的访问或修改;定期验证备份的车载娱乐系统固件并进行恢复演练,以在升级失败时能够恢复原始车载娱乐系统固件。3. According to the Flash CAN-based in-vehicle entertainment system upgrade method of claim 2, it is characterized in that the preset independent area is protected by setting an access control mechanism to prevent unauthorized access or modification; the backed-up in-vehicle entertainment system firmware is regularly verified and recovery drills are performed to be able to restore the original in-vehicle entertainment system firmware when the upgrade fails. 4.根据权利要求1所述的基于Flash CAN的车载娱乐系统升级方法,其特征在于,所述校验步骤中,采用校验和、哈希值、数字签名中一种或不止一种方法对固件更新文件进行校验;所述校验和用于校验固件更新文件的完整性,所述哈希值用于校验固件更新文件的唯一性且未被篡改,所述数字签名用于验证固件更新文件的真实性。4. The method for upgrading an in-vehicle entertainment system based on Flash CAN according to claim 1 is characterized in that, in the verification step, one or more of a checksum, a hash value, and a digital signature are used to verify the firmware update file; the checksum is used to verify the integrity of the firmware update file, the hash value is used to verify the uniqueness of the firmware update file and that it has not been tampered with, and the digital signature is used to verify the authenticity of the firmware update file. 5.根据权利要求1所述的基于Flash CAN的车载娱乐系统升级方法,所述擦除步骤中,所述Flash存储器采用物理划分或逻辑划分以得到用于存储固件更新文件数据包的目标存储区域和其他区域;所述物理划分是指将Flash存储器按照不同的分区划分为目标存储区域和其他区域;所述逻辑划分是指在Flash存储的逻辑管理中,目标存储区域和其他区域的地址不同;所述擦除步骤中通过仅擦除目标存储区域,避免对其他区域存储的数据造成影响。5. According to the method for upgrading the in-vehicle entertainment system based on Flash CAN in claim 1, in the erasing step, the Flash memory adopts physical division or logical division to obtain the target storage area and other areas for storing firmware update file data packets; the physical division refers to dividing the Flash memory into the target storage area and other areas according to different partitions; the logical division means that in the logical management of the Flash storage, the addresses of the target storage area and other areas are different; in the erasing step, only the target storage area is erased to avoid affecting the data stored in other areas. 6.根据权利要求5所述的基于Flash CAN的车载娱乐系统升级方法,其特征在于,所述传输步骤中,通过Flash CAN通信协议定义了数据包的传输格式、传输流程、校验和错误处理机制;所述数据包的传输格式包括数据包头、数据体、校验码和数据包尾,其中,所述数据包头包括包序号、包总数和数据包类型,所述数据体包含固件数据,所述校验码用于校验数据完整性,所述数据包尾标记数据包的结束;所述传输流程包括初始化阶段、数据发送、数据接收与校验阶段、写入Flash存储器、完成阶段,通过状态机控制管理的传输流程的各个阶段,所述状态机包括空闲、发送、接收和错误处理状态,根据当前状态和事件触发条件进行状态转换。6. According to the method for upgrading the in-vehicle entertainment system based on Flash CAN in claim 5, it is characterized in that, in the transmission step, the transmission format, transmission process, checksum and error handling mechanism of the data packet are defined by the Flash CAN communication protocol; the transmission format of the data packet includes a data packet header, a data body, a checksum and a data packet tail, wherein the data packet header includes a packet sequence number, a total number of packets and a data packet type, the data body contains firmware data, the checksum is used to check data integrity, and the data packet tail marks the end of the data packet; the transmission process includes an initialization phase, data transmission, data reception and verification phase, writing to the Flash memory, and a completion phase, and each phase of the transmission process is controlled and managed by a state machine, and the state machine includes idle, transmission, reception and error handling states, and performs state transitions according to the current state and event trigger conditions. 7.根据权利要求6所述的基于Flash CAN的车载娱乐系统升级方法,其特征在于,所述数据包采用分段传输,每个分段后数据包由嵌入式控制单元执行数据接收与校验,嵌入式控制单元在接收数据包时,进行固件更新文件数据包完整性校验和顺序校验,以确保数据的正确性和顺序性;校验通过后,数据写入Flash的目标存储区域,校验失败则触发错误处理机制。7. According to the Flash CAN-based in-vehicle entertainment system upgrade method of claim 6, it is characterized in that the data packet is transmitted in segments, and each segmented data packet is received and verified by the embedded control unit. When receiving the data packet, the embedded control unit performs a firmware update file data packet integrity check and a sequence check to ensure the correctness and sequence of the data; after the check passes, the data is written to the target storage area of the Flash, and if the check fails, the error handling mechanism is triggered. 8.根据权利要求7所述的基于Flash CAN的车载娱乐系统升级方法,其特征在于,所述错误处理机制包括:实时监控数据包的传输状态,一旦发现数据包传输错误或异常,升级管理模块立即停止升级过程,对校验失败进行错误计数并提醒进行重新尝试,同时记录错误日志和状态信息。8. The method for upgrading the in-vehicle entertainment system based on Flash CAN according to claim 7 is characterized in that the error handling mechanism includes: real-time monitoring of the transmission status of the data packet, once a data packet transmission error or abnormality is found, the upgrade management module immediately stops the upgrade process, counts the errors of the verification failure and reminds to retry, and records the error log and status information. 9.根据权利要求1所述的基于Flash CAN的车载娱乐系统升级方法,其特征在于,所述升级管理模块采用加密技术对固件更新文件进行加密,所述加密技术包括对称加密和非对称加密;所述固件更新文件的传输过程中,通过验证车辆的唯一标识符进行车辆身份验证,确保只有验证通过的车辆能够接收和应用固件更新文件数据包。9. According to the Flash CAN-based in-vehicle entertainment system upgrade method of claim 1, it is characterized in that the upgrade management module uses encryption technology to encrypt the firmware update file, and the encryption technology includes symmetric encryption and asymmetric encryption; during the transmission of the firmware update file, the vehicle identity authentication is performed by verifying the unique identifier of the vehicle to ensure that only vehicles that have passed the verification can receive and apply the firmware update file data packet. 10.用于实现权利要求1所述的基于Flash CAN的车载娱乐系统升级方法的系统,其特征在于,包括:10. A system for implementing the method for upgrading the in-vehicle entertainment system based on Flash CAN according to claim 1, characterized in that it comprises: 嵌入式控制单元,用于控制车载娱乐系统的升级过程,支持CAN总线接口;Embedded control unit, used to control the upgrade process of the in-vehicle entertainment system, supporting CAN bus interface; 升级管理模块,负责固件更新文件的下载、校验、传输、写入、备份和回滚,并提供数据传输状态监控和错误处理;The upgrade management module is responsible for downloading, verifying, transmitting, writing, backing up, and rolling back firmware update files, and provides data transmission status monitoring and error handling; Flash存储器,用于存储固件更新文件、备份数据以及新旧固件版本数据;Flash memory, used to store firmware update files, backup data, and new and old firmware version data; 通信接口,用于连接车辆内置通信网络,支持通过Wi-Fi或移动数据网络下载固件更新包;Communication interface, used to connect to the vehicle's built-in communication network and support downloading firmware update packages via Wi-Fi or mobile data network; CAN总线接口,嵌入式控制单元通过CAN总线接口与车辆其他控制单元进行通信,接收升级指令,并传输升级过程中的相关数据。CAN bus interface, the embedded control unit communicates with other control units of the vehicle through the CAN bus interface, receives upgrade instructions, and transmits relevant data during the upgrade process.
CN202510020601.7A 2025-01-07 2025-01-07 A method and system for upgrading an in-vehicle entertainment system based on Flash CAN Pending CN119415125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202510020601.7A CN119415125A (en) 2025-01-07 2025-01-07 A method and system for upgrading an in-vehicle entertainment system based on Flash CAN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202510020601.7A CN119415125A (en) 2025-01-07 2025-01-07 A method and system for upgrading an in-vehicle entertainment system based on Flash CAN

Publications (1)

Publication Number Publication Date
CN119415125A true CN119415125A (en) 2025-02-11

Family

ID=94473166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202510020601.7A Pending CN119415125A (en) 2025-01-07 2025-01-07 A method and system for upgrading an in-vehicle entertainment system based on Flash CAN

Country Status (1)

Country Link
CN (1) CN119415125A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119739408A (en) * 2025-03-03 2025-04-01 深圳远虑科技有限公司 A method and system for transmitting MCU firmware upgrade

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6668374B1 (en) * 1999-07-08 2003-12-23 Axis Ab Method and apparatus for upgrading firmware in an embedded system
CN103761112A (en) * 2011-12-30 2014-04-30 深圳市大富科技股份有限公司 Vehicle-mounted multimedia device and control method thereof
CN110851157A (en) * 2019-10-28 2020-02-28 上海旗旌科技有限公司 Method and equipment for updating vehicle-mounted terminal equipment system
CN117707855A (en) * 2023-12-26 2024-03-15 江苏经纬轨道交通设备有限公司 Firmware upgrading method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6668374B1 (en) * 1999-07-08 2003-12-23 Axis Ab Method and apparatus for upgrading firmware in an embedded system
CN103761112A (en) * 2011-12-30 2014-04-30 深圳市大富科技股份有限公司 Vehicle-mounted multimedia device and control method thereof
CN110851157A (en) * 2019-10-28 2020-02-28 上海旗旌科技有限公司 Method and equipment for updating vehicle-mounted terminal equipment system
CN117707855A (en) * 2023-12-26 2024-03-15 江苏经纬轨道交通设备有限公司 Firmware upgrading method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119739408A (en) * 2025-03-03 2025-04-01 深圳远虑科技有限公司 A method and system for transmitting MCU firmware upgrade

Similar Documents

Publication Publication Date Title
CN111061499B (en) ECU updating method and system based on file system
CN112579130B (en) Interactive IAP upgrading method
CN119415125A (en) A method and system for upgrading an in-vehicle entertainment system based on Flash CAN
US9582262B2 (en) Systems and methods for installing upgraded software on electronic devices
CN107783777A (en) A kind of upgrade method, equipment and the system of vehicle-mounted integral machine
CN103154889A (en) Parallel programming and updating of lighting bus subscribers
WO2010081323A1 (en) Method for realizing single board application version and system thereof
CN114844874B (en) OTA manager, update control method, non-transitory storage medium, and vehicle
JP7484791B2 (en) OTA master, update control method, and update control program
CN101763318B (en) Data dumping method and data dumping device
CN115982710A (en) OTA (over the air) security upgrading method based on Ethernet
CN117648109A (en) Differential upgrading method, system and medium based on Flash page alignment mode
CN118916056A (en) Vehicle-mounted controller, vehicle-mounted controller software upgrading method, device and equipment
CN117407020A (en) OTA upgrade refreshing method and device, electronic equipment and storage medium
CN113656056A (en) Charging socket and charging socket upgrading method, device, equipment and storage medium
CN115102855B (en) Online upgrading method and system for intelligent water meter embedded software
CN119938106A (en) A method for firmware upgrade with rollback capability
CN114610355A (en) Upgrading method and device suitable for power chip control software
CN114144759A (en) Method and device for updating software of a vehicle computer comprising an execution memory, a backup memory and a check memory
US12229546B2 (en) Method and device for updating software of an onboard computer in a vehicle, comprising a runtime memory, a backup memory and a control memory
CN117055929B (en) A method, equipment and medium for realizing secure upgrade of dual-core system
CN115712445B (en) A method for upgrading instrument software
CN117972712B (en) Firmware updating method, device, computer equipment and computer storage medium
CN118012450A (en) Flashing method, device, electronic device, readable storage medium and program product
CN118626105A (en) A flashing method and device for vehicle-mounted system, vehicle processor and vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination