CN115756530A - Equipment upgrading method and device, storage medium, electronic equipment and server - Google Patents

Equipment upgrading method and device, storage medium, electronic equipment and server Download PDF

Info

Publication number
CN115756530A
CN115756530A CN202211342779.6A CN202211342779A CN115756530A CN 115756530 A CN115756530 A CN 115756530A CN 202211342779 A CN202211342779 A CN 202211342779A CN 115756530 A CN115756530 A CN 115756530A
Authority
CN
China
Prior art keywords
server
data frame
ota
usb
serial port
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
CN202211342779.6A
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.)
Shenzhen Kaihong Digital Industry Development Co Ltd
Original Assignee
Shenzhen Kaihong Digital Industry Development 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 Shenzhen Kaihong Digital Industry Development Co Ltd filed Critical Shenzhen Kaihong Digital Industry Development Co Ltd
Priority to CN202211342779.6A priority Critical patent/CN115756530A/en
Publication of CN115756530A publication Critical patent/CN115756530A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a device upgrading method, which is applied to electronic devices and comprises the following steps: starting an OTA (over the air technology) task and sending a ready signal to a server, wherein the electronic equipment is communicated with the server through a USB-to-serial port module; acquiring at least one data frame corresponding to an upgrade file sent by a server after receiving a ready signal based on a USB-to-serial port module; writing each acquired data frame into an OTA partition in a storage chip, and performing overall verification on all the data frames stored in the OTA partition after receiving an end frame corresponding to an upgrade file sent by a server; and after the verification is passed, upgrading the equipment based on all the data frames stored in the OTA partition. According to the embodiment of the application, the electronic equipment without the networking function can be subjected to OTA upgrading, and the electronic equipment can still be normally upgraded and used when the network environment is not good.

Description

Equipment upgrading method and device, storage medium, electronic equipment and server
Technical Field
The present application relates to the field of internet technologies, and in particular, to a device upgrading method and apparatus, a storage medium, an electronic device, and a server.
Background
Existing OTA (Over-the-Air Technology) schemes typically download new firmware or software programs from a remote OTA server via a mobile communication network (2G/3G/4G/wifi). This solution requires the device to have networking capability and a good network communication environment. For the equipment without networking function or when the network environment is not good, the prior art scheme is difficult to ensure the normal upgrade and use of the equipment.
Therefore, the prior art has defects and needs to be improved and developed.
Disclosure of Invention
The embodiment of the application provides an equipment upgrading method, an equipment upgrading device, electronic equipment and an equipment upgrading system, OTA upgrading can be carried out on electronic equipment without a networking function, and the electronic equipment can still be upgraded and used normally when a network environment is poor.
The embodiment of the application provides a device upgrading method, which is applied to electronic devices and comprises the following steps:
starting an OTA (over the air technology) task and sending a ready signal to a server, wherein the electronic equipment is communicated with the server through a USB-to-serial port module;
acquiring at least one data frame corresponding to an upgrade file sent by the server after the server receives the ready signal based on the USB-to-serial port module;
writing each acquired data frame into an OTA partition in a storage chip, and performing overall verification on all the data frames stored in the OTA partition after receiving an end frame corresponding to the upgrade file sent by the server;
and after the verification is passed, upgrading the equipment based on all the data frames stored in the OTA subarea.
In the device upgrading method according to this embodiment, when acquiring, based on the USB to serial port module, at least one data frame corresponding to an upgrade file sent by the server after receiving the ready signal, the method further includes:
and checking each obtained current data frame according to a file transfer protocol corresponding to the USB-to-serial port module, and sending a successful response signal to the server after the data frame is successfully checked so that the server continues to send the next data frame according to the successful response signal.
In the device upgrading method according to this embodiment, the verifying each obtained current data frame according to a file transfer protocol corresponding to the USB to serial port module, and sending a successful response signal to the server after the verification is successful, so that the server continues to send the next data frame according to the successful response signal, includes:
carrying out frame format check and check code check on each current data frame according to a file transmission protocol corresponding to the USB-to-serial port module;
and if the frame format check and the check code check both result in the check success, sending a successful response signal to the server, so that the server continues to send the next data frame according to the successful response signal.
In the device upgrade method according to this embodiment, the performing overall verification on all the data frames stored in the OTA partition includes:
acquiring a first CRC (cyclic redundancy check) code corresponding to the data frame in the OTA partition and acquiring a second CRC code contained in the ending frame;
comparing the first CRC check code with the second CRC check code;
if the first CRC check code is the same as the second CRC check code, the check is passed;
if the first CRC check code is different from the second CRC check code, the check is not passed.
The embodiment of the application further provides an equipment upgrading method, which is applied to a server and comprises the following steps:
the method comprises the steps that a ready signal sent by electronic equipment after an OTA (over the air technology) task is started is obtained, wherein the electronic equipment is communicated with a server through a USB-to-serial port module;
based on the ready signal, at least one data frame corresponding to the upgrade file is sequentially sent to the electronic equipment through the USB-to-serial port module;
and after all the data frames are sent, sending an end frame corresponding to the upgrade file to the electronic equipment.
In the device upgrade method according to this embodiment, before the sequentially sending at least one data frame corresponding to an upgrade file to the electronic device through the USB to serial port module based on the ready signal, the method further includes:
and dividing the upgrade file into at least one data packet, and assembling each data packet into data frames according to the file transmission protocol corresponding to the USB-to-serial port module to obtain at least one data frame corresponding to the upgrade file.
In the device upgrading method according to this embodiment, the sequentially sending, based on the ready signal, at least one data frame corresponding to an upgrade file to the electronic device through the USB to serial port module includes:
acquiring a ready signal sent by the electronic equipment when the OTA upgrading signal is received;
based on the ready signal, sending one data frame corresponding to the upgrade file to the electronic device through the USB-to-serial port module;
acquiring a successful response signal sent by the electronic equipment after the electronic equipment receives the data frame and successfully verifies the data frame;
and sending the next data frame to the electronic equipment based on the successful response signal.
The embodiment of the application further provides a device upgrading apparatus, which includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used for executing the device upgrading method applied to any embodiment of the electronic device by calling the computer program stored in the memory.
The embodiment of the present application further provides an apparatus upgrading device, which includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the apparatus upgrading method applied to any embodiment of the server by calling the computer program stored in the memory.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the device upgrading method according to any one of the above items.
An embodiment of the present application further provides an electronic device, where the electronic device includes the OTA upgrading apparatus for executing the device upgrading method applied to any embodiment of the electronic device.
An embodiment of the present application further provides a server, and the electronic device includes the OTA upgrading apparatus for executing the device upgrading method applied to any embodiment of the server.
This application embodiment lets electronic equipment come to communicate with the server that has saved the upgrading file through the mode that adopts serial communication, can let the electronic equipment who does not possess networking function carry out OTA upgrading to and can still let electronic equipment normally upgrade and use when network environment is not good.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic flowchart of a device upgrading method applied to an electronic device according to an embodiment of the present disclosure.
Fig. 2 is a schematic flowchart of an apparatus upgrading method applied to a server according to an embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of an apparatus upgrading device provided in an embodiment of the present application.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.
The embodiment of the application provides an equipment upgrading method which can be applied to electronic equipment. The electronic equipment can be mobile phones, computers, vehicles and other equipment.
Referring to fig. 1, fig. 1 is a schematic flow chart of an apparatus upgrading method according to an embodiment of the present disclosure. The equipment upgrading method is applied to electronic equipment, and can comprise the following steps:
step 101, starting an OTA (over the air) task and sending a ready signal to a server, wherein the electronic device and the server communicate through a USB to serial port module.
The user can directly start the OTA task on the electronic equipment and can also start the OTA task on the server. When a user starts an OTA task on the server, the server sends an OTA upgrading signal to the electronic equipment, and after the electronic equipment receives the OTA upgrading signal, the OTA task is started and a ready signal is sent to the server.
Wherein, adopt serial communication's mode (USB to serial module) to communicate between electronic equipment and the server, rather than adopting mobile communication network (2G 3G 4G wifi) to communicate to can let the electronic equipment who does not possess networking function carry out OTA upgrading, and can still can let electronic equipment normally upgrade and use when network environment is not good.
And 102, acquiring at least one data frame corresponding to the upgrade file sent by the server after receiving the ready signal based on the USB-to-serial port module.
When the electronic device acquires the data frame, the electronic device may initially acquire the data frame in a failure mode, and when the electronic device fails to acquire the data frame, the electronic device may repeatedly acquire the data frame. When the times of repeatedly acquiring the data frames exceed the preset repeated acquisition times, the electronic equipment prints error information of failure of acquiring the data frames to prompt a user that the serial port is connected incorrectly, whether the serial port is connected correctly needs to be checked, and the user can select to restart the OTA task or select to quit. The preset repeated acquiring times can be set by a person skilled in the art according to actual needs, and is not specifically limited herein.
In some embodiments, when the obtaining, based on the USB to serial port module, at least one data frame corresponding to an upgrade file sent by the server after receiving the ready signal, the method further includes:
and checking each obtained current data frame according to a file transfer protocol corresponding to the USB-to-serial port module, and sending a successful response signal to the server after the data frame is successfully checked so that the server continues to send the next data frame according to the successful response signal.
And when the electronic equipment acquires a data frame, the data frame is verified according to a file transfer protocol corresponding to the USB-to-serial port module, and a successful response signal is sent to the server only after the verification is passed, so that the server continues to send the next data frame. In addition, if the data frame is failed to be verified, a failure response signal is sent to the server so that the server can resend the data frame until the data frame is successfully verified.
The file transfer protocol corresponding to the USB to serial port module may be Xmodem or Ymodem.
In some embodiments, the verifying each obtained current data frame according to a file transfer protocol corresponding to the USB to serial port module, and sending a successful response signal to the server after the verification is successful, so that the server continues to send the next data frame according to the successful response signal, includes:
carrying out frame format check and check code check on each current data frame according to a file transmission protocol corresponding to the USB-to-serial port module;
and if the frame format check and the check code check both result in the check success, sending a successful response signal to the server, so that the server continues to send the next data frame according to the successful response signal.
And the frame format check is to check whether the format of the data frame meets the format required by the file transfer protocol corresponding to the USB-to-serial port module.
And 103, writing each acquired data frame into an OTA partition in a storage chip, and performing overall verification on all the data frames stored in the OTA partition after receiving an end frame corresponding to the upgrade file sent by the server.
And after the data frame is successfully verified, writing the data frame into the OTA partition in the memory chip. And when receiving an end frame corresponding to the upgrade file sent by the server, the upgrade file is completely transmitted.
In some embodiments, the checking all the data frames stored in the OTA partition in its entirety comprises:
acquiring a first CRC (cyclic redundancy check) code corresponding to the data frame in the OTA partition and acquiring a second CRC code contained in the ending frame;
comparing the first CRC check code with the second CRC check code;
if the first CRC check code is the same as the second CRC check code, the check is passed;
if the first CRC check code is different from the second CRC check code, the check is not passed.
And if the verification fails, printing error information and quitting upgrading. Wherein, the error information is used for prompting the user that the upgrade file CRC fails to check and the upgrade should be tried again.
And 104, after the verification is passed, upgrading the equipment based on all the data frames stored in the OTA subarea.
All the data frames stored in the OTA partition are verified to be passed, which indicates that the data frames have no problem and form a complete upgrade file, so that the device can be upgraded directly based on the data frames.
The embodiment of the application also provides an equipment upgrading method which can be applied to the server.
Referring to fig. 2, fig. 2 is a schematic flowchart of a device upgrading method according to an embodiment of the present disclosure. The equipment upgrading method is applied to a server, and the method can comprise the following steps:
step 201, a ready signal sent by an electronic device after an OTA (over the air) task is started is obtained, wherein the electronic device and the server communicate through a USB to serial port module.
Step 202, based on the ready signal, at least one data frame corresponding to the upgrade file is sequentially sent to the electronic device through the USB to serial port module.
Wherein, adopt serial communication's mode (USB to serial module) to communicate between server and the electronic equipment, rather than adopting mobile communication network (2G 3G 4G wifi) to communicate to can let the electronic equipment who does not possess networking function carry out OTA upgrading, and can still can let electronic equipment normally upgrade and use when network environment is not good.
In some embodiments, before the sequentially sending at least one data frame corresponding to an upgrade file to the electronic device through the USB to serial port module based on the ready signal, the method further includes:
and dividing the upgrade file into at least one data packet, and assembling each data packet into data frames according to the file transmission protocol corresponding to the USB-to-serial port module to obtain at least one data frame corresponding to the upgrade file.
The file transfer protocol corresponding to the USB to serial port module may be Xmodem or Ymodem.
In some embodiments, the sequentially sending, based on the ready signal, at least one data frame corresponding to an upgrade file to the electronic device through the USB to serial port module includes:
acquiring a ready signal sent by the electronic equipment when the OTA upgrading signal is received;
based on the ready signal, sending one data frame corresponding to the upgrade file to the electronic device through the USB-to-serial port module;
acquiring a successful response signal sent by the electronic equipment after the electronic equipment receives the data frame and successfully verifies the data frame;
and sending the next data frame to the electronic equipment based on the successful response signal.
In some embodiments, after sending the data frame corresponding to the upgrade file to the electronic device through the USB to serial port module based on the ready signal, the method further includes:
acquiring a failure response signal sent by the electronic equipment after the electronic equipment receives the data frame and fails to check the data frame;
and based on the failure response signal, retransmitting the previous data frame to the electronic equipment until a success response signal sent by the electronic equipment is obtained.
When a failure response signal sent by the electronic device is received, it indicates that the previous data frame has a problem, and therefore, the previous data frame needs to be retransmitted until a success response signal sent by the electronic device is acquired.
Step 203, after all the data frames are sent, sending the end frame corresponding to the upgrade file to the electronic device.
Wherein, the end frame contains CRC check code of the upgrade file. And sending the end frame to the electronic equipment to inform the electronic equipment that the transmission of the upgrade file is finished.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
Therefore, the device upgrading method provided by the embodiment of the application enables the electronic device to communicate with the server storing the upgrading file in a serial port communication mode, enables the electronic device without a networking function to be subjected to OTA upgrading, and enables the electronic device to be normally upgraded and used when a network environment is poor.
The embodiment of the application further provides an equipment upgrading device, and the equipment upgrading device can be integrated in the electronic equipment or a server. The electronic equipment can be mobile phones, computers, vehicles and other electronic equipment. When the device upgrading apparatus is integrated in an electronic device, the device upgrading apparatus is configured to execute the device upgrading method applied to the electronic device according to any of the above embodiments. When the device upgrading device is integrated in a server, the device upgrading device is used for executing the device upgrading method applied to the server in any of the above embodiments.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an apparatus upgrading device according to an embodiment of the present disclosure. Device upgrade apparatus 30 includes a memory 120, one or more processors 180, and one or more applications, wherein the one or more applications are stored in the memory 120 and configured to be executed by the processors 180; the memory 120 may be used to store applications and data. The memory 120 stores applications containing executable code. The application programs may constitute various functional modules. The processor 180 executes various functional applications and data processing by running the application programs stored in the memory 120. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.
The processor 180 is a control center of the device, connects various parts of the entire terminal using various interfaces and lines, performs various functions of the device and processes data by running or executing an application program stored in the memory 120 and calling data stored in the memory 120, thereby monitoring the entire device. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like.
Specifically, in this embodiment, the memory 120 stores a computer program, and the processor 180 executes the device upgrade method applied to the electronic device according to any one of the above embodiments or the device upgrade method applied to the server according to any one of the above embodiments by calling the computer program stored in the memory 120.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application, where the electronic device may be used to implement the device upgrading method applied to the electronic device provided in the foregoing embodiment. The electronic device 1200 may be a mobile phone, a computer, a vehicle, or other electronic device.
As shown in fig. 4, the electronic device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer-readable storage media (only one shown), an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more processing cores (only one shown), and a power supply 190. Those skilled in the art will appreciate that the configuration of the electronic device 1200 shown in FIG. 4 is not intended to be limiting of the electronic device 1200 and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 is used for receiving and transmitting electromagnetic waves, and performs interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF circuitry 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF circuitry 110 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network.
The memory 120 may be configured to store software programs and modules, such as program instructions/modules corresponding to the device upgrading method in the foregoing embodiment, and the processor 180 may execute various functional applications and data processing by running the software programs and modules stored in the memory 120, so as to improve the efficiency of recognizing human body motion gestures. Memory 120 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 120 may further include memory remotely located from the processor 180, which may be connected to the electronic device 1200 through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may include a touch-sensitive surface 131 as well as other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device 1200, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, touch sensitive surface 131 may overlay display panel 141, and when touch operation is detected on or near touch sensitive surface 131, the touch operation is transmitted to processor 180 to determine the type of touch event, and then processor 180 provides a corresponding visual output on display panel 141 according to the type of touch event. Although in FIG. 4, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The electronic device 1200 may also include at least one sensor 150, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or the backlight when the electronic device 1200 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when the motion sensor is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of electronic equipment, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured in the electronic device 1200, detailed descriptions thereof are omitted.
The audio circuitry 160, speaker 161, microphone 162 may provide an audio interface between a user and the electronic device 1200. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuitry 160 may also include an earbud jack to provide communication of peripheral headphones with the electronic device 1200.
The electronic device 1200, via the transport module 170 (e.g., wi-Fi module), may assist the user in emailing, browsing web pages, accessing streaming media, etc., which provides the user with wireless broadband internet access. Although fig. 4 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the electronic device 1200, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the electronic device 1200, connects various parts of the whole electronic device 1200 using various interfaces and lines, and performs various functions and processes of the electronic device 1200 by running or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the human body. Optionally, processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The electronic device 1200 also includes a power supply 190 (e.g., a battery) that powers the various components, and in some embodiments, may be logically coupled to the processor 180 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device 1200 may further include a camera (e.g., a front camera, a rear camera), a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the display unit 140 of the electronic device 1200 is a touch screen display, and the electronic device 1200 further includes a memory 120 and one or more programs, wherein the one or more programs are stored in the memory 120 and configured to be executed by the one or more processors 180, and the one or more programs include instructions for:
starting an OTA (over the air technology) task and sending a ready signal to a server, wherein the electronic equipment is communicated with the server through a USB-to-serial port module;
acquiring at least one data frame corresponding to an upgrade file sent by the server after the server receives the ready signal based on the USB-to-serial port module;
writing each acquired data frame into an OTA partition in a storage chip, and performing overall verification on all the data frames stored in the OTA partition after receiving an end frame corresponding to the upgrade file sent by the server;
and after the verification is passed, upgrading the equipment based on all the data frames stored in the OTA subarea.
In some embodiments, the processor 180 is configured to check each obtained current data frame according to a file transfer protocol corresponding to the USB to serial port module, and send a successful response signal to the server after the check is successful, so that the server continues to send the next data frame according to the successful response signal.
In some embodiments, the processor 180 is configured to perform frame format check and check code check on each current data frame according to a file transfer protocol corresponding to the USB to serial port module; and if the frame format check and the check code check both result in the check success, sending a successful response signal to the server, so that the server continues to send the next data frame according to the successful response signal.
In some embodiments, the processor 180 is configured to obtain a first CRC check code corresponding to the data frame in the OTA partition, and obtain a second CRC check code included in the end frame; comparing the first CRC check code with the second CRC check code; if the first CRC check code is the same as the second CRC check code, the check is passed; and if the first CRC check code is different from the second CRC check code, the check is not passed.
As can be seen from the above, an embodiment of the present application provides an electronic device 1200, where the electronic device 1200 performs the following steps: starting an OTA (over-the-air technology) task and sending a ready signal to a server, wherein the electronic equipment is communicated with the server through a USB-to-serial port module; acquiring at least one data frame corresponding to an upgrade file sent by the server after the server receives the ready signal based on the USB-to-serial port module; writing each acquired data frame into an OTA partition in a storage chip, and performing overall verification on all the data frames stored in the OTA partition after receiving an end frame corresponding to the upgrade file sent by the server; and after the verification is passed, upgrading the equipment based on all the data frames stored in the OTA subarea.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer executes the device upgrade method according to any embodiment applied to the electronic device, or executes the device upgrade method according to any embodiment applied to the server.
It should be noted that, for the device upgrading method described in this application, it can be understood by those skilled in the art that all or part of the process of implementing the device upgrading method described in this application may be implemented by controlling the relevant hardware through a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and during the execution, the process of implementing the device upgrading method may include the process of the embodiment of the device upgrading method described above. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
The device upgrading method, device, storage medium, electronic device and server provided by the embodiments of the present application are described in detail above. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. A device upgrading method is applied to an electronic device, and comprises the following steps:
starting an OTA (over the air technology) task and sending a ready signal to a server, wherein the electronic equipment is communicated with the server through a USB-to-serial port module;
acquiring at least one data frame corresponding to an upgrade file sent by the server after the server receives the ready signal based on the USB-to-serial port module;
writing each acquired data frame into an OTA partition in a storage chip, and performing overall verification on all the data frames stored in the OTA partition after receiving an end frame corresponding to the upgrade file sent by the server;
and after the verification is passed, upgrading the equipment based on all the data frames stored in the OTA subarea.
2. The device upgrading method according to claim 1, wherein when acquiring, based on the USB to serial port module, at least one data frame corresponding to an upgrade file sent by the server after receiving the ready signal, the method further includes:
and checking each obtained current data frame according to a file transfer protocol corresponding to the USB-to-serial port module, and sending a successful response signal to the server after the data frame is successfully checked so that the server continues to send the next data frame according to the successful response signal.
3. The device upgrading method according to claim 2, wherein the verifying each obtained current data frame according to a file transfer protocol corresponding to the USB to serial port module, and sending a successful response signal to the server after the verification is successful, so that the server continues to send the next data frame according to the successful response signal, includes:
carrying out frame format check and check code check on each current data frame according to a file transmission protocol corresponding to the USB-to-serial port module;
and if the frame format check and the check code check both result in the check success, sending a successful response signal to the server, so that the server continues to send the next data frame according to the successful response signal.
4. The device upgrade method of claim 1, wherein the checking the entirety of all the data frames stored in the OTA partition comprises:
acquiring a first CRC (cyclic redundancy check) code corresponding to the data frame in the OTA partition and acquiring a second CRC code contained in the ending frame;
comparing the first CRC check code with the second CRC check code;
if the first CRC check code is the same as the second CRC check code, the check is passed;
and if the first CRC check code is different from the second CRC check code, the check is not passed.
5. A device upgrading method is applied to a server and comprises the following steps:
the method comprises the steps that a ready signal sent by electronic equipment after an OTA (over-the-air technology) task is started is obtained, wherein the electronic equipment is communicated with a server through a USB-to-serial port module;
based on the ready signal, at least one data frame corresponding to the upgrade file is sequentially sent to the electronic equipment through the USB-to-serial port module;
and after all the data frames are sent, sending an end frame corresponding to the upgrade file to the electronic equipment.
6. The device upgrading method according to claim 5, wherein before the at least one data frame corresponding to the upgrade file is sequentially sent to the electronic device through the USB to serial port module based on the ready signal, the method further comprises:
and dividing the upgrade file into at least one data packet, and assembling each data packet into data frames according to the file transmission protocol corresponding to the USB-to-serial port module to obtain at least one data frame corresponding to the upgrade file.
7. The device upgrading method according to claim 5, wherein the sequentially sending at least one data frame corresponding to an upgrade file to the electronic device through the USB to serial port module based on the ready signal comprises:
acquiring a ready signal sent by the electronic equipment when the OTA upgrading signal is received;
based on the ready signal, sending one data frame corresponding to the upgrade file to the electronic device through the USB-to-serial port module;
acquiring a successful response signal sent by the electronic equipment after the electronic equipment receives the data frame and successfully verifies the data frame;
and sending the next data frame to the electronic equipment based on the successful response signal.
8. An apparatus upgrade device, comprising a processor and a memory, the memory having stored therein a computer program, the processor being configured to perform the OTA upgrade method of any one of claims 1 to 4 by calling the computer program stored in the memory.
9. An apparatus upgrade device, comprising a processor and a memory, the memory having stored therein a computer program, the processor being configured to perform the OTA upgrade method of any one of claims 5 to 7 by calling the computer program stored in the memory.
10. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to perform the device upgrade method according to any one of claims 1 to 4; or to perform a device upgrade method according to any one of claims 5 to 7.
11. An electronic device, characterized in that it comprises an OTA upgrading arrangement according to claim 8.
12. A server, characterized in that it comprises the OTA upgrading device of claim 9.
CN202211342779.6A 2022-10-28 2022-10-28 Equipment upgrading method and device, storage medium, electronic equipment and server Pending CN115756530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211342779.6A CN115756530A (en) 2022-10-28 2022-10-28 Equipment upgrading method and device, storage medium, electronic equipment and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211342779.6A CN115756530A (en) 2022-10-28 2022-10-28 Equipment upgrading method and device, storage medium, electronic equipment and server

Publications (1)

Publication Number Publication Date
CN115756530A true CN115756530A (en) 2023-03-07

Family

ID=85354313

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211342779.6A Pending CN115756530A (en) 2022-10-28 2022-10-28 Equipment upgrading method and device, storage medium, electronic equipment and server

Country Status (1)

Country Link
CN (1) CN115756530A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116980290A (en) * 2023-09-22 2023-10-31 北京智芯微电子科技有限公司 Infrared communication upgrading method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116980290A (en) * 2023-09-22 2023-10-31 北京智芯微电子科技有限公司 Infrared communication upgrading method and device and electronic equipment
CN116980290B (en) * 2023-09-22 2024-01-26 北京智芯微电子科技有限公司 Infrared communication upgrading method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111142711B (en) Firmware configuration method and device, storage medium and mobile terminal
US11227042B2 (en) Screen unlocking method and apparatus, and storage medium
US20160314219A1 (en) Method and apparatus for invoking application programming interface
CN108039963B (en) Container configuration method and device and storage medium
CN107682359B (en) Application registration method and mobile terminal
CN107967153B (en) Application program management method and mobile terminal
WO2018006841A1 (en) Qr code information transmission method, device and apparatus
CN110308834B (en) Setting method of application icon display mode and terminal
CN106571892A (en) Data processing method and device
CN110830127B (en) Radio frequency parameter processing method and device, mobile terminal and storage medium
CN115589361A (en) Management equipment firmware updating method and device, electronic equipment and storage medium
CN115756530A (en) Equipment upgrading method and device, storage medium, electronic equipment and server
US20200004578A1 (en) Method for fingerprint recognition and related products
CN105808043A (en) Setting method of terminal application and mobile terminal
CN108228357B (en) Memory cleaning method and mobile terminal
CN107844318B (en) Upgrading method of operating system, mobile terminal and server
CN108196663B (en) Face recognition method and mobile terminal
WO2021143669A1 (en) Method for acquiring configuration information and electronic device
CN111078312A (en) MBN loading method and electronic equipment
CN107122204B (en) Application unloading state detection method and device
CN109783379B (en) Script execution exception determining method and device
CN111651299A (en) Wireless chip reset control method and device, storage medium and mobile terminal
CN106033358B (en) Batch installation method and device of application programs
CN105278967B (en) System updating method, device and system of mobile terminal
CN105988801B (en) Method and device for displaying annotation information

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