Firmware upgrade method and systemTechnical field
The present invention relates to firmware upgrade technical field, more particularly to a kind of firmware upgrade method and system.
Background technology
Aerial programming (Over-the-air programming, abridge OTA) is that one kind is distributed new software for equipment, matched somebody with somebodyPut, or even renewal encryption key (it is such as mobile phone, digital video boxcar or secure voice communication equipment --- encryptionTwo-way radio) method.An OTA key character, which is that a center can be sent to all users, to be updated, and it is notCan refusal, destroy or change the renewal, and this be updated to be immediately applied on channel everyone.User is possible to " refuse "OTA is updated, but channel administrator can also be kicked out of channel.
Also include in mobile content field it is aerial provide business (over-the-air service provisioning,OTASP it is), aerial that configuration (over-the-air provisioning, OTAP) or aerial parameter management (over-the- are providedAir parameter administration, OTAPA), or to mobile phone provide it is necessary setting with can access WAP orMMS etc. is serviced.
As the application on mobile phone and function are more and more, OTA configurations are more and more important.It can be updated by SMS with OTAData in SIM card, and distribute software upgrading to mobile phone and access the necessary setting of the services such as WAP, MSS.OTA message canThe service of remote control is provided for mobile phone, subscribe to activation, personalization and programming.
Each standardizing body has been created to help to develop, supervision and management OTA.One of them is Open Mobile Alliance(OMA)。
At present, there is new concept again in wireless sensor network and Internet of Things, the net constituted in hundreds of or thousands of nodesIn network, OTA has been brought into new direction:OTA uses first need not license frequency band (2.4GHz, 868MHz, 900MHz) andThe agreement that low energy is consumed with flow, such as 802.15.4 and ZigBee.
Industry 4.0 construction and the fast development of Internet of Things industry so that the application of large-scale wireless sensing network andThe access of traditional industry equipment networking is more universal.(OTA) Firmware Over upgrading is so important, is:1. reparation product defects,2. abundant product function, increase user viscosity, the product up-gradation of 3. iteration, it helps quickly cut market, reduction is overall to openSend out cost.But OTA is applied in industry 4.0 and Internet of Things and is also faced with problems simultaneously:Equipment is in the case of low batteryCarry out OTA upgradings, unexpected low-voltage power down will make the firmware of equipment can not recover to cause equipment can not normal work, in netThe OTA upgradings of shape net network ordering equipment are huge to overall load, and during individual equipment upgrading the whole network business allIt must suspend, always mix the equipment of various different performance indexs in complicated application environment, be set individually so always havingIt is standby to cooperate with upgrading simultaneously, it is accomplished by putting into certain human resources progress device context maintenance in this case.
The content of the invention
It is a primary object of the present invention to provide a kind of firmware upgrade method and system, risen offline with the OTA for realizing equipmentLevel, the need for meeting industry and Internet of Things.
To achieve the above object, a kind of firmware upgrade method that the present invention is provided, comprises the following steps:
Mobile terminal APP or transferring equipment issue firmware upgrade to updating and management chip and instructed;
The updating and management chip is when receiving firmware upgrade instruction, it would be desirable to which the firmware bag of renewal is downloaded and stored atIn flash storage chips in the updating and management chip;
After the download is complete, the updating and management chip is carried out by the firmware bag to device upgrade chip to be upgradedOffline firmware updates.
Wherein, the updating and management chip carries out offline firmware by the firmware bag to device upgrade chip to be upgradedAlso include before the step of renewal:
After the download is complete, the mobile terminal APP or transferring equipment are interacted with the updating and management chip, to downloadThe data of the firmware bag are verified, after verifying successfully, and the updating and management chip performs escalation process.
Wherein, the mobile terminal APP or transferring equipment issue the step of firmware upgrade is instructed to updating and management chip and wrappedInclude:
The mobile terminal APP or transferring equipment inquire about consolidating for the device upgrade chip by the updating and management chipPart version number;
If the firmware version number is legacy version number, the mobile terminal APP or transferring equipment issue firmware upgrade and referred toMake to the updating and management chip.
Wherein, wireless connection, its connection side between the mobile terminal APP or transferring equipment and the updating and management chipFormula is BEL4.0.
Wherein, methods described also includes:
In the data transmission procedure of firmware bag, if run into Radio Link interrupt reconnect after, carry out breakpoint data re-transmission.
Wherein, the mobile terminal APP or transferring equipment to updating and management chip issue the step of firmware upgrade is instructed itIt is preceding also to include:
Mobile terminal APP or transferring equipment is selected to issue data to updating and management chip according to user instruction.
Wherein, the updating and management chip carries out offline firmware by the firmware bag to device upgrade chip to be upgradedThe step of renewal, includes:
The updating and management chip needs what is upgraded by parsing firmware updating bag data and being output to data recombination formIn device upgrade chip.
Wherein, the updating and management chip is serial ports to the data upgrade interface of device upgrade chip;The flash storagesChip is wireless SOC chip.
The present invention also proposes that a kind of firmware upgrade system includes:Mobile terminal APP or transferring equipment, and updating and management corePiece, the mobile terminal APP or transferring equipment and the updating and management chip wireless connection, the updating and management chip rise with waitingThe device upgrade chip wired connection of level;Wherein:
Firmware upgrade procedure is configured with the mobile terminal APP or transferring equipment, the firmware upgrade procedure is processedThe step of device realizes method as described above when performing.
A kind of firmware upgrade method proposed by the present invention and system, it is proposed that wireless multi-mode upgraded in offline device chip it is generalRead, need that packet is downloaded into Flash progress storage backup in piece by BLE4.0 according to application, then exported by serial portsThe mode of upgrading data carries out offline firmware bag upgrading.Such upgrade mechanism is convenient reliable, can effectively avoid normal workCrossover network, reduce field apparatus radio communication burden, and without having to worry about escalation process happen suddenly abnormal power-down situation, fromAnd the need for greatly meeting industry and Internet of Things.
Brief description of the drawings
Fig. 1 be the present embodiments relate to firmware upgrade system configuration diagram;
Fig. 2 is the schematic flow sheet of firmware upgrade method embodiment of the present invention;
Fig. 3 is the refinement schematic flow sheet of firmware upgrade of the embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
In order that technical scheme is clearer, clear, it is described in further detail below in conjunction with accompanying drawing.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Firmware upgrade system framework of the present invention is referred to Fig. 1.
As shown in figure 1, the system includes:Mobile terminal APP (in figure by taking mobile phone A PP as an example) or transferring equipment, Yi JishengLevel managing chip, the mobile terminal APP or transferring equipment and the updating and management chip wireless connection, its connected mode isBEL4.0, such connected mode can effectively evade influence of the working frequency range reduction of prior wireless network to live traffic.
The updating and management chip and device upgrade chip wired connection to be upgraded;Wherein:The mobile terminal APP orFirmware upgrade procedure is configured with transferring equipment.
The whole scheme of the embodiment of the present invention includes 2 main policies:
1st, backup formula firmware upgrade mechanism, the mechanism can first download to the data for needing to upgrade in updating and management chip,Just to needing updating apparatus chip to carry out firmware renewal after verification data is correct again;
2nd, general-purpose type upgrading data output mechanism, the compatible various types of updating apparatus of the mechanism, pass through parsingData recombination form is output in the equipment for needing to upgrade by firmware updating bag data.
Specifically, as shown in Fig. 2 present pre-ferred embodiments propose a kind of firmware upgrade method, including:
Step S101, mobile terminal APP or transferring equipment issue firmware upgrade to updating and management chip and instructed;
When needing to upgrade to device chip, user can select to initiate by mobile terminal APP or transferring equipmentFirmware upgrade is instructed, it is possible to select mobile terminal APP or transferring equipment to issue data to updating and management chip.
Wherein, when mobile terminal APP or transferring equipment issue firmware upgrade to updating and management chip and instructed, mobile terminalAPP or transferring equipment inquire about the firmware version number of the device upgrade chip by the updating and management chip;If the firmwareVersion number is legacy version number, then the mobile terminal APP or transferring equipment issue firmware upgrade and instructed to the updating and management corePiece.
Step S102, the updating and management chip is when receiving firmware upgrade instruction, it would be desirable under the firmware bag of renewalCarry and be stored in the flash storage chips in the updating and management chip;
Updating and management chip is when receiving firmware upgrade instruction, it would be desirable to which the firmware bag of renewal is downloaded and stored at describedIn flash storage chips in updating and management chip, thus, under off-line state, the upgrading of equipment firmware can also be realized,That is, firmware upgrade now is offline, i.e., re-power rear by forced interruption in escalation process and can carry out firmwareUpgrading, the problem of mechanism compensate for OTA online upgrading data well.
Wherein, the flash storage chips are wireless SOC chip, and device upgrade chip is not with a chip.
Step S103, after the download is complete, the updating and management chip is by the firmware bag to equipment liter to be upgradedLevel chip carries out offline firmware renewal.
After the download is complete, the updating and management chip is carried out by the firmware bag to device upgrade chip to be upgradedOffline firmware updates.
Wherein, the updating and management chip is serial ports to the data upgrade interface of device upgrade chip, and such upgrading connectsMouthful mode can be with compatible more chip models and data format standard is general follows chip official definition's mode.
Further, the updating and management chip is carried out offline by the firmware bag to device upgrade chip to be upgradedIt can also include before the step of firmware updates:
After the download is complete, the mobile terminal APP or transferring equipment are interacted with the updating and management chip, to downloadThe data of the firmware bag are verified, after verifying successfully, and the updating and management chip performs escalation process.
In the present embodiment, updating and management chip is carried out offline by the firmware bag to device upgrade chip to be upgradedDuring firmware updates, the updating and management chip can be output to needs by parsing firmware updating bag data by data recombination formIn the device upgrade chip of upgrading.
Compared with prior art, the present invention proposes the concept of wireless multi-mode upgraded in offline device chip, is needed according to applicationPacket is downloaded to by Flash in piece by BLE4.0 and carries out storage backup, then by way of serial ports output upgrading dataCarry out offline firmware bag upgrading.Such upgrade mechanism is convenient reliable, and the crossover network that can effectively avoid normal work reducesThe burden of field apparatus radio communication, and without having to worry about the abnormal power-down situation that escalation process happens suddenly.
The detailed process of firmware upgrade of the present invention is referred to Fig. 3.
As shown in Figure 3, it is necessary to which when carrying out firmware upgrade, mobile phone A PP or transferring equipment can first inquire the firmware version of storageNumber, if version number is old, then carry out firmware upgrade.Now updating and management chip first will need the firmware bag updated to downloadIn flash in piece, mobile phone A PP and updating and management chip connected mode are BEL4.0, and such connected mode can be effectiveEvade the working frequency range of prior wireless network, reduce the influence to live traffic, in firmware bag data transmitting procedure, run into nothingWired link is interrupted reconnect after, can carry out breakpoint data re-transmission, and in onsite application can also unrestricted choice be will by mobile phone A PPFirmware bag, which is sent, to be gone down or sends by transferring equipment, successfully manages the various wireless issues in onsite application.
After standby AKU has been downloaded, updating and management chip will initiate firmware upgrade to device chip, nowFirmware upgrade is offline, i.e., re-power rear by forced interruption in escalation process and can carry out the upgrading of firmware, so thisThe problem of mechanism compensate for OTA online upgrading data well, updating and management chip is to the data upgrade interface of device chipSerial ports;Such upgrade interface mode can compatible more chip models and the general chip official that follows of data format standard determineRight way of conduct formula.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilizeEquivalent structure or the flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other related skillsArt field, is included within the scope of the present invention.