CN106406941A - Method and apparatus for updating firmware - Google Patents

Method and apparatus for updating firmware Download PDF

Info

Publication number
CN106406941A
CN106406941A CN201610803200.XA CN201610803200A CN106406941A CN 106406941 A CN106406941 A CN 106406941A CN 201610803200 A CN201610803200 A CN 201610803200A CN 106406941 A CN106406941 A CN 106406941A
Authority
CN
China
Prior art keywords
firmware
accessory
target
version
target firmware
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
CN201610803200.XA
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610803200.XA priority Critical patent/CN106406941A/en
Publication of CN106406941A publication Critical patent/CN106406941A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Abstract

The invention discloses a method and an apparatus for updating a firmware, and belongs to the interfacing technical field. The method comprises the steps of reading firmware version information of a digital accessory when the digital accessory access is detected, wherein the firmware version information is used for indicating the current firmware version of the digital accessory; detecting whether a target firmware exists or not according to the firmware version information, wherein the target firmware refers to a firmware, the version of which is different from that of the current firmware; if the target firmware exists, obtaining the target firmware; and updating the digital accessory based on the target firmware. According to the method disclosed by the invention, when the digital accessory access is performed, the current firmware version of the digital accessory can be read by a terminal; then whether a new version of firmware exists or not can be detected by comparison of the detected firmware version and the current firmware version; if the new version of firmware exists, the new version of firmware can be obtained so as to update the digital accessory; therefore, the automatic firmware updating method is provided; and the performance and the use effect of the digital accessory are improved.

Description

Update the method and device of firmware
Technical field
The disclosure is directed to interfacing field, specifically with regard to a kind of method and device updating firmware.
Background technology
With the development of USB (Universal Serial Bus, USB (universal serial bus)) interfacing, standard usb interface It has been upgraded to 3.1 versions, that is, there is more efficient data encoding system, and higher data throughput is provided.
For example, Type-C (c-type) interface is the exemplary interface supporting USB 3.1 version.Because Type-C interface supports USB The repertoire of 3.1 versions, therefore, the application of Type-C interface is more and more extensive, occurs in that the numeral with Type-C interface Accessory.Certainly, the digital accessory of Type-C interface has firmware, that is, realize the program of the basic function of digital accessory.For example, right In the digital earphone with Type-C interface, its firmware is used for realizing the function of the broadcasting audio frequency of this digital earphone.
During realizing the disclosure, inventor finds that correlation technique at least has problems with:
At present, the digital accessory with Type-C interface, in access terminal, will not point out the firmware version of this digital accessory This, more will not automatically update its firmware, leads to the digital accessory with legacy version firmware can not obtain timely updates so that digital The performance of accessory is relatively low, and using effect is poor.Therefore, digital accessory needs a kind of method automatically updating its firmware badly, to improve certainly The using effect of body.
Content of the invention
In order to solve problem present in correlation technique, present disclose provides a kind of method and device updating firmware.Institute State technical scheme as follows:
A kind of first aspect according to the embodiment of the present disclosure, there is provided method of renewal firmware, methods described includes:
When digital accessory access is detected, read the firmware version information of described numeral accessory, described firmware version letter Cease the current version of firmware for indicating described numeral accessory;
According to described firmware version information, detect whether there is target firmware, described target firmware refers to that version is different from The firmware of described current version of firmware;
If there is described target firmware, then obtain described target firmware;
Based on described target firmware, described numeral accessory is updated.
In a kind of possible implementation, described according to described firmware version information, detect whether there is target firmware bag Include:
According to described firmware version information, detect in designated storage area and whether there is target firmware version information, if Exist it is determined that there is described target firmware, if it does not exist, then determining there is not described target firmware;Or,
According to described firmware version information, detect and whether there is target firmware version information on given server, if deposited It is determined that there is described target firmware, if it does not exist, then determining there is not described target firmware.
In a kind of possible implementation, described if there is described target firmware, then obtain described target firmware and include:
If there is described target firmware, then show that firmware updates information, described firmware updates information and is used for Prompting user updates the firmware of described numeral accessory, when the confirmation operation that described firmware is updated with information is detected, then obtains Take described target firmware;Or,
If there is described target firmware, then inquire about accessory configuration information, if the instruction of described accessory configuration information is to solid Part is automatically updated, then obtain described target firmware;Or,
If there is described target firmware, then automatically obtain described target firmware.
In a kind of possible implementation, described based on described target firmware, described numeral accessory is updated including:
Send described target firmware to described numeral accessory, firmware renewal is carried out by described numeral accessory.
In a kind of possible implementation, described numeral accessory has Type-C interface.
A kind of second aspect according to the embodiment of the present disclosure, there is provided device of renewal firmware, described device includes:
Read module, for when digital accessory access is detected, reading the firmware version information of described numeral accessory, institute State firmware version information for indicating the current version of firmware of described numeral accessory;
Detection module, for according to described firmware version information, detecting whether there is target firmware, described target firmware is Refer to the firmware that version is different from described current version of firmware;
Acquisition module, for if there is described target firmware, then obtaining described target firmware;
Update module, for based on described target firmware, being updated to described numeral accessory.
In a kind of possible implementation, described detection module, for according to described firmware version information, detection is specified and is deposited Whether there is target firmware version information in storage area domain, if it is present determining there is described target firmware, if it does not, Then determine there is not described target firmware;Or,
Described detection module, solid with the presence or absence of target on given server for according to described firmware version information, detecting , if it is present determining there is described target firmware, there is not described target admittedly if it does not exist, then determining in part version information Part.
In a kind of possible implementation, described acquisition module, for if there is described target firmware, then showing firmware Update information, described firmware updates the firmware that information is used for pointing out user to update described numeral accessory, when detecting Described firmware is updated with the confirmation operation of information, then obtains described target firmware;Or,
Described acquisition module, for if there is described target firmware, then inquiring about accessory configuration information, if described accessory Configuration information instruction automatically updates to firmware, then obtain described target firmware;Or,
Described acquisition module, for if there is described target firmware, then automatically obtaining described target firmware.
In a kind of possible implementation, described update module is used for sending described target firmware to described numeral accessory, Firmware renewal is carried out by described numeral accessory.
In a kind of possible implementation, described numeral accessory has Type-C interface.
A kind of third aspect according to the embodiment of the present disclosure, there is provided device of renewal firmware, described device includes:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:When digital accessory access is detected, read the firmware of described numeral accessory Version information, described firmware version information is used for indicating the current version of firmware of described numeral accessory;According to described firmware version Information, detects whether there is target firmware, and described target firmware refers to that version is different from the firmware of described current version of firmware;As There is described target firmware in fruit, then obtain described target firmware;Based on described target firmware, described numeral accessory is carried out more Newly.
The technical scheme that embodiment of the disclosure provides can include following beneficial effect:
The method and apparatus that the present embodiment provides, when digital accessory accesses, terminal can actively read digital accessory Current version of firmware, and then the firmware version that arrived by comparison and detection and current version of firmware, are able to confirm that with the presence or absence of new edition This firmware, if existing, can obtain the firmware of redaction, to be updated to digital accessory, thus providing automatically The method updating firmware, improves performance and the using effect of digital accessory.
It should be appreciated that above general description and detailed description hereinafter are only exemplary, can not be limited this Open.
Brief description
Accompanying drawing herein is merged in description and constitutes the part of this specification, shows the enforcement meeting the disclosure Example, and be used for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart of a kind of method of renewal firmware according to an exemplary embodiment;
Fig. 2 is the flow chart of a kind of method of renewal firmware according to an exemplary embodiment;
Fig. 3 A is a kind of structural representation of the digital earphone with Type-C interface according to an exemplary embodiment Figure;
Fig. 3 B is a kind of schematic diagram of the renewal information according to an exemplary embodiment;
Fig. 4 is a kind of block diagram of the device of renewal firmware according to an exemplary embodiment;
Fig. 5 is a kind of block diagram of the device 500 of renewal firmware according to an exemplary embodiment.
Specific embodiment
Purpose, technical scheme and advantage for making the disclosure become more apparent, with reference to embodiment and accompanying drawing, right The disclosure is described in further details.Here, the exemplary embodiment of the disclosure and its illustrate for explaining the disclosure, but simultaneously Not as restriction of this disclosure.
Fig. 1 is the flow chart of a kind of method of renewal firmware according to an exemplary embodiment, as shown in figure 1, more The method of new firmware is used in terminal, comprises the following steps:
In a step 101, the firmware version information of digital accessory, firmware version when digital accessory access is detected, are read This information is used for the current version of firmware of designation number accessory.
In a step 102, according to firmware version information, detect whether there is target firmware, target firmware refers to version not It is same as the firmware of current version of firmware.
In step 103, if there is target firmware, then obtain target firmware.
At step 104, based on target firmware, digital accessory is updated.
In correlation technique, the digital accessory with Type-C interface, in access terminal, will not point out this digital accessory Firmware version, more will not automatically update its firmware, lead to the digital accessory with legacy version firmware can not obtain timely updates, make The performance obtaining digital accessory is relatively low, and using effect is poor.
In the embodiment of the present disclosure, when digital accessory accesses, terminal can actively read the current firmware version of digital accessory Originally, the firmware version and then being arrived by comparison and detection and current version of firmware, are able to confirm that the firmware with the presence or absence of redaction, if Exist, then can obtain the firmware of redaction, to be updated to digital accessory, thus providing the side automatically updating firmware Method, improves performance and the using effect of digital accessory.
In a kind of possible implementation, according to firmware version information, detect whether that there is target firmware includes:
According to firmware version information, detect in designated storage area and whether there is target firmware version information, if it does, Then determine there is target firmware, if it does not exist, then determining there is not target firmware;Or,
According to firmware version information, detect and whether there is target firmware version information on given server, if it is present Determine there is target firmware, if it does not exist, then determining there is not target firmware.
In a kind of possible implementation, if there is target firmware, then obtain target firmware and include:
If there is target firmware, then show that firmware updates information, firmware updates information and is used for pointing out user Update the firmware of digital accessory, when the confirmation operation that firmware is updated with information is detected, then obtain target firmware;Or,
If there is target firmware, then inquire about accessory configuration information, if the instruction of accessory configuration information is carried out to firmware certainly Dynamic renewal, then obtain target firmware;Or,
If there is target firmware, then automatically obtain target firmware.
In a kind of possible implementation, based on target firmware, digital accessory is updated including:
Send target firmware to digital accessory, firmware renewal is carried out by digital accessory.
In a kind of possible implementation, digital accessory has Type-C interface.
Above-mentioned all optional technical schemes, can be using the alternative embodiment arbitrarily combining to form the disclosure, and here is no longer Repeat one by one.
Fig. 2 is the flow chart of a kind of method of renewal firmware according to an exemplary embodiment, as shown in Fig. 2 more The method of new firmware is used for terminal and the interaction of digital accessory, comprises the following steps:
In step 201, when terminal detects digital accessory and accesses, read the firmware version information of digital accessory.
Digital accessory refers to have firmware and digit chip and can be by USB (the Universal Serial of itself Bus, USB (universal serial bus)) interface access terminal equipment.Wherein, firmware refers to realize the journey of the basic function of digital accessory Sequence, can be installed on digit chip.Digit chip refers to the chip that digital accessory and terminal can be controlled to interact.USB connects Mouth refers to the interface of equipment carrying out data transmission based on standard usb interface and terminal.The embodiment of the present disclosure is to digital accessory not It is specifically limited.
For example, the USB interface of above-mentioned numeral accessory can be Type-C (c-type) interface, and further, digital accessory is permissible It is the digital earphone with Type-C interface.For example, Fig. 3 A is that one kind according to an exemplary embodiment has Type-C The structural representation of the digital earphone of interface.As shown in Figure 3A, Type-C interface can transmit digital accessory and end with access terminal Data between end;In structure, digit chip is connected with Type-C interface and receiver by data wire, functionally, number Word chip can carry out the process of digital-to-analogue conversion it is also possible to pass through data line transfer data, e.g., control signal or voice data; Receiver is used for the voice data of played data line transmission.
In this step, when digital accessory passes through USB interface access terminal, the signal of telecommunication at USB interface can become Change, when terminal detects this change, can confirm that digital accessory has accessed.And then, this reading process can include:Eventually Hold and send read requests to digital accessory so that digital accessory is when receiving read requests, by digit chip to read requests Responded, send to terminal and allow to read message, now, terminal can read the firmware version information of digital accessory.This Open embodiment is not specifically limited to firmware version information, and for example, firmware version information can be the firmware version of manufacturer's specification This label or the issuing time of firmware version.
Certainly, the interaction of above-mentioned terminal and digital accessory is all carried out by USB interface, following steps be related to this two Interaction between person in the same manner, repeats no more.
Certainly, in practice, because the model of digital accessory may be mismatched with the model of terminal, digital accessory can also Optionally the read requests of terminal are responded.The embodiment of the present disclosure does not limit to this.For example, deposit in digital accessory Store up the model of matching terminal, then above-mentioned read requests need the model of carried terminal so that digital accessory is receiving reading During request, extract the model of terminal, thus judging whether the model of terminal is mated with itself.If it does, then digital accessory is sent out Permission is sent to read message;Otherwise, digital accessory refusal terminal is read.
In step 202., according to firmware version information, terminal detects whether there is target firmware, and target firmware refers to version This is different from the firmware of current version of firmware.
Terminal passes through the firmware version information of digital accessory it may be determined that the current version of firmware of this digital accessory.In order to Know whether further to be necessary firmware is updated, that is, whether there is the firmware of other versions, terminal needs to detect whether There is target firmware.The embodiment of the present disclosure does not limit to the approach of detection, and for example, terminal locally being detected or can be led to Cross networking and detected in given server, concrete example is as follows:
The first approach, according to firmware version information, whether there is target firmware version in terminal detection designated storage area This information, if it is present determining there is target firmware, if it does not exist, then determine there is not target firmware.
In view of before terminal is dispatched from the factory, the manufacturer of terminal may store the firmware of digital accessory in the terminal. In addition, terminal is in more new system, the system installation kit that its manufacturer provides is likely to addition of the firmware of digital accessory.Therefore, Terminal can detect whether there is target firmware version information in local designated storage area.
Designated storage area refers to one piece of memory area of terminal local.The embodiment of the present disclosure is not done to this and is limited further Fixed.For example it is intended that region refers to the program storage area on mobile phone EMS memory card.
In addition, in this designated storage area, the form of storage firmware version information is likely to difference, the embodiment of the present disclosure This does not limit.For example, list storage form can be taken in designated storage area to store the related letter of at least one firmware Breath is it is also possible to directly at least one firmware of designated storage area memory storage, be specifically described as follows:
The first form, in designated storage area store firmware list.Each data item in this firmware list is at least Firmware version information including firmware and firmware storage address.
(1) firmware version information can serve to indicate that firmware type, and for example, this firmware is A, and this firmware version information is permissible Stored in the form of A1.0 or A2.0.Based on this firmware version information, in actual contrast, can there is following step Suddenly:Terminal extracts one or more of this firmware list firmware version information, by extract firmware version information x each Numerical value is contrasted with the numerical value of current version of firmware information y, if at least one numerical value is different from the numerical value of y in x, obtains The maximum firmware storage address corresponding to firmware version information of numerical value in x, and determine that what this firmware storage address stored consolidates Part is target firmware;If the numerical value of x is identical with the numerical value of y, and it is determined that there is not target firmware, explanation need not update, keep Current version of firmware.
(2) firmware version information can be only used for indicating firmware version.For example, this firmware is B, and this firmware version information can To be stored in the form of 1.0 or 2.0.Based on this firmware version information, each data item in firmware list is also wrapped Include the firmware identifiers of firmware, this firmware identifiers is used for the such firmware of unique mark.In actual contrast, can have following Step:
Terminal reads the firmware identifiers c of firmware by USB interface, and then, inquiry in firmware list whether there is c, if There is c, then extract the corresponding one or more firmware version information d of c place data item, by each numerical value of d and current firmware The numerical value e of version information is contrasted, if at least one numerical value is different from the numerical value of e in d, obtains numerical value maximum in d Firmware storage address corresponding to firmware version information, and determine that the firmware that this firmware storage address is stored is target firmware; If the numerical value of d is identical with the numerical value of e, and it is determined that there is not target firmware, explanation need not update, holding current version of firmware is Can.
It should be noted that with digital accessory, the citing in (2) has a case that a firmware illustrates.Certainly, such as The digital accessory of fruit has multiple firmware C1 and C2 etc., then terminal can read the firmware identifiers c1 of multiple firmwares by USB interface With c2 etc., and then, carry out query script and comparison process respectively, corresponding target is solid respectively to judge whether C1 and C2 etc. Part.The process being contrasted due to each firmware and the process of above-mentioned contrast in the same manner, are no longer described separately.
Second form, in the one or more firmware of designated storage area memory storage.
With the firmware of designated storage area memory storage as J, illustrate as a example H and G.Terminal is read solid by USB interface The firmware identifiers of part, and then, if inquiring this firmware identifiers in designated storage area, extract this firmware identifiers corresponds to more The firmware version information of firmware;If not inquiring this firmware identifiers in designated storage area it is determined that there is not target admittedly Part, explanation need not update, and keeps current version of firmware.
Assume that the firmware having this firmware identifiers in designated storage area is H, then terminal extracts the firmware version information h of H, The numerical value of the numerical value of h and current version of firmware information i is contrasted.If the numerical value of h is different from the numerical value of i it is determined that H is Target firmware;If the numerical value of h is identical with the numerical value of i, and explanation need not update it is determined that there is not target firmware, keep current Firmware version.
It should be noted that with digital accessory, the citing of second form has a case that a firmware illustrates.When So, if digital accessory has multiple firmware T1 and T2 etc., terminal can read the firmware mark of multiple firmwares by USB interface Know t1 and t2 etc., and then, carry out query script and comparison process respectively, to judge whether the corresponding mesh respectively such as T1 and T2 Mark firmware.The process being contrasted due to each firmware and the process of above-mentioned contrast in the same manner, are no longer described separately.
It should be noted that during for there is not target firmware, terminal can show and need not update prompting, to inform User's current version of firmware need not update.The embodiment of the present disclosure does not limit to this.For example, terminal is in the form of pop-up window, Prompting user need not update.
The first approach terminal above locally completes detection process, and the requirement to detection is relatively low, therefore realizes easily, and Take full advantage of the existing resource of terminal.It is true that for detection range more comprehensively, can be carried out by following second approach Detection.
Second approach, according to firmware version information, terminal detection given server whether there is target firmware version Information, if it is present determining there is target firmware, if it does not exist, then determine there is not target firmware.
Firmware due to digital accessory may be issued in multiple network platforms, and terminal cannot ensure these network platforms The firmware issued is provided with higher reliability and safety, therefore, dangerous in order to avoid the target firmware that obtains, the In two kinds of approach, using the approach that there is target firmware is detected whether on given server.Wherein it is intended that server refers to this Official's server of the manufacturer of digital accessory.
Certainly, in order to realize this approach, in this step 202, terminal can send to digital accessory and obtain request, then count Word accessory, when receiving this acquisition request, responds to terminal, sends to terminal and allows to obtain message so that terminal reads The device identification of this digital accessory.Based on this device identification, terminal access given server, thus detecting on given server With the presence or absence of target firmware.The embodiment of the present disclosure does not limit to device identification.For example, device identification refers to this digital accessory Title or numbering.
Second approach is also to complete detection process by contrasting firmware version information, second with the first approach above-mentioned In the same manner, here is omitted for the form of kind.
According to the citing of firmware version information in above-mentioned steps 201, in this step 202, the firmware version being contrasted is believed Breath is probably the issuing time of firmware version label or firmware version.
Under normal conditions, target firmware refers to that version is higher than the firmware of current version of firmware, therefore, in a kind of possible reality In existing mode, for when firmware version information is firmware version label, during above-mentioned contrast firmware version information, reality contrasts Be which firmware version label is larger;When the issuing time that firmware version information is firmware version, above-mentioned right Than firmware version information when, actual contrast is which firmware version issuing time is later.
In step 203, if there is target firmware, then terminal display firmware updates information, and firmware updates prompting Information is used for the firmware pointing out user to update digital accessory, when the confirmation operation that firmware is updated with information is detected, then obtains Take target firmware.
Based on above-mentioned steps 202, in this step, if there is target firmware, then terminal is to show renewal information Mode remind user to be updated.The embodiment of the present disclosure does not limit to the content and display mode that update information.Example As in order that the details of the more clear numeral accessory of user, in this step 203, terminal can send to digital accessory and read Ask, then digital accessory, when receiving this read requests, responds to terminal, send to terminal and allow reading message, make Obtain terminal and read title, firmware version and model of this digital accessory etc., and renewal prompt window is generated based on these contents.Example If Fig. 3 B is a kind of schematic diagram of the renewal information according to an exemplary embodiment.As shown in Figure 3 B, terminal is with bullet The form display going out to update prompt window updates information, and content includes the name of the digital accessory that above-mentioned interaction reads Title, firmware version, model, prompt text, confirmation option and cancellation option.If user's triggering is detected to confirm option, obtain Take target firmware, if user's triggering is detected to cancel option, not obtaining target firmware, also no longer following the steps below 204.
In addition, the first approach providing for above-mentioned steps 202, terminal is directly from local acquisition target firmware.Specifically Ground, when firmware registration table is stored for this first approach citing, due in firmware registration table target firmware local Storage address storage corresponding with its firmware version information, therefore terminal, after determining target firmware version information, is closed according to corresponding System, obtains the locally stored address of target firmware, thus by accessing this locally stored address, obtaining target firmware.For this The situation storing firmware in designated storage area of the first approach citing, after terminal determines target firmware version information, directly Obtaining this corresponding firmware of target firmware version information is target firmware.
The second approach providing for above-mentioned steps 202, terminal detects target firmware version on given server After information, download the corresponding target firmware of target firmware version information from given server.
It should be noted that this step 203 is the optional step of the embodiment of the present disclosure.Voluntarily choose whether to obtain by user Target firmware, makes implementation method more hommization.It is true that the embodiment of the present disclosure can also otherwise substitute this step. It is exemplified below:
First kind of way, if there is target firmware, then terminal inquiry accessory configuration information, if accessory configuration information refers to Show and firmware is automatically updated, then obtain target firmware.
In order that renewal process continuity is high, which is operated based on accessory configuration information, need not bother user, The process obtaining is carried out on backstage.For example, in the system setting of terminal, if the switch that automatically updates of accessory configuration information is to open Open state, then obtain target firmware, otherwise, do not obtain target firmware, also no longer follow the steps below 204.
The second way, if there is target firmware, then terminal obtains target firmware automatically.
In this approach, in order that updating in hgher efficiency, in the case that terminal has target firmware in determination, automatically obtain Target firmware.
In step 204, terminal sends target firmware to digital accessory.
In this step, terminal passes through USB interface, sends the target firmware for updating to digital accessory.
In step 205, digital fitment receiver target firmware, carries out firmware renewal.
In this step, digital accessory passes through USB interface, the target firmware that receiving terminal sends, and passes through digit chip Control function, delete the firmware of legacy version, thus installation targets firmware on digit chip, complete to update.
In correlation technique, the digital accessory with Type-C interface, in access terminal, will not point out this digital accessory Firmware version, more will not automatically update its firmware, lead to the digital accessory with legacy version firmware can not obtain timely updates, make The performance obtaining digital accessory is relatively low, and using effect is poor.
In the embodiment of the present disclosure, when digital accessory accesses, terminal can actively read the current firmware version of digital accessory Originally, the firmware version and then being arrived by comparison and detection and current version of firmware, are able to confirm that the firmware with the presence or absence of redaction, if Exist, then can obtain the firmware of redaction, to be updated to digital accessory, thus providing the side automatically updating firmware Method, improves performance and the using effect of digital accessory.
Fig. 4 is a kind of block diagram of the device of renewal firmware according to an exemplary embodiment.Referring to Fig. 4, this device Including read module 401, detection module 402, acquisition module 403 and update module 404.
When this read module 401 is configured as detecting digital accessory access, read the firmware version letter of digital accessory Breath, firmware version information is used for the current version of firmware of designation number accessory;
This detection module 402 is configured to the firmware version information being read according to read module 401, detects whether exist Target firmware, target firmware refers to that version is different from the firmware of current version of firmware;
If this acquisition module 403 is configured to detection module 402 and detects the presence of target firmware, obtain target solid Part;
This update module 404 is configured to, based on the target firmware acquired in acquisition module 403, digital accessory be carried out more Newly.
In correlation technique, the digital accessory with Type-C interface, in access terminal, will not point out this digital accessory Firmware version, more will not automatically update its firmware, lead to the digital accessory with legacy version firmware can not obtain timely updates, make The performance obtaining digital accessory is relatively low, and using effect is poor.
In the embodiment of the present disclosure, when digital accessory accesses, terminal can actively read the current firmware version of digital accessory Originally, the firmware version and then being arrived by comparison and detection and current version of firmware, are able to confirm that the firmware with the presence or absence of redaction, if Exist, then can obtain the firmware of redaction, to be updated to digital accessory, thus providing the side automatically updating firmware Method, improves performance and the using effect of digital accessory.
In a kind of possible implementation, this detection module 402 is configured to according to firmware version information, and detection is specified and deposited Whether there is target firmware version information in storage area domain, if it is present determining there is target firmware, if it does not exist, then really Fixed do not have target firmware;Or,
This detection module 402 is configured to according to firmware version information, detects solid with the presence or absence of target on given server Part version information, if it is present determining there is target firmware, if it does not exist, then determine there is not target firmware.
In a kind of possible implementation, this acquisition module 403 is configured to if there is target firmware, then show firmware Update information, firmware updates the firmware that information is used for pointing out user to update digital accessory, when detecting to firmware more The confirmation operation of new information, then obtain target firmware;Or,
This acquisition module 403 is configured to if there is target firmware, then inquire about accessory configuration information, if accessory setting Information instruction automatically updates to firmware, then obtain target firmware;Or,
This acquisition module 403 is configured to if there is target firmware, then automatically obtain target firmware.
In a kind of possible implementation, this update module 404 is configured to send target firmware to digital accessory, by counting Word accessory carries out firmware renewal.
In a kind of possible implementation, this digital accessory has Type-C interface.
Above-mentioned all optional technical schemes, can be using the alternative embodiment arbitrarily combining to form the disclosure, and here is no longer Repeat one by one.
With regard to the device in above-described embodiment, wherein the concrete mode of modules execution operation is in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
It should be noted that:What above-described embodiment provided updates the device of firmware when updating firmware, only with above-mentioned each work( The division of energy module is illustrated, and in practical application, can distribute above-mentioned functions by different functions as desired Module completes, and the internal structure of device will be divided into different functional modules, described above all or part of to complete Function.In addition, above-described embodiment device of renewal firmware providing and the embodiment of the method updating firmware belong to same design, its The process of implementing refers to embodiment of the method, repeats no more here.
Fig. 5 is a kind of block diagram of the device 500 of renewal firmware according to an exemplary embodiment.For example, device 500 Can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, armarium, Body-building equipment, personal digital assistant etc..
With reference to Fig. 5, device 500 can include following one or more assemblies:Process assembly 502, memorizer 504, power supply Assembly 506, multimedia groupware 508, audio-frequency assembly 510, the interface 512 of input/output (I/O), sensor cluster 514, and Communication component 516.
The integrated operation of the usual control device 500 of process assembly 502, such as with display, call, data communication, phase Machine operation and record operate associated operation.Process assembly 502 can include one or more processors 520 and refer to execute Order, to complete all or part of step of above-mentioned method.Additionally, process assembly 502 can include one or more modules, just Interaction between process assembly 502 and other assemblies.For example, process assembly 502 can include multi-media module, many to facilitate Interaction between media component 508 and process assembly 502.
Memorizer 504 is configured to store various types of data to support the operation in device 500.The showing of these data Example includes the instruction of any application program for operating on device 500 or method, contact data, telephone book data, disappears Breath, picture, video etc..Memorizer 504 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable compile Journey read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 506 provides electric power for the various assemblies of device 500.Power supply module 506 can include power management system System, one or more power supplys, and other generate, manage and distribute, with for device 500, the assembly that electric power is associated.
Multimedia groupware 508 includes the screen of one output interface of offer between described device 500 and user.One In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive the input signal from user.Touch panel includes one or more touch sensings Device is with the gesture on sensing touch, slip and touch panel.Described touch sensor can not only sensing touch or sliding action Border, but also detection and described touch or slide related persistent period and pressure.In certain embodiments, many matchmakers Body assembly 508 includes a front-facing camera and/or post-positioned pick-up head.When device 500 is in operator scheme, such as screening-mode or During video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and Post-positioned pick-up head can be the optical lens system of a fixation or have focusing and optical zoom capabilities.
Audio-frequency assembly 510 is configured to output and/or input audio signal.For example, audio-frequency assembly 510 includes a Mike Wind (MIC), when device 500 is in operator scheme, during as call model, logging mode and speech recognition mode, mike is joined It is set to reception external audio signal.The audio signal being received can be further stored in memorizer 504 or via communication set Part 516 sends.In certain embodiments, audio-frequency assembly 510 also includes a speaker, for exports audio signal.
, for providing interface between process assembly 502 and peripheral interface module, above-mentioned peripheral interface module can for I/O interface 512 To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor cluster 514 includes one or more sensors, for providing the state of various aspects to comment for device 500 Estimate.For example, sensor cluster 514 can detect/the closed mode of opening of device 500, and the relative localization of assembly is for example described Assembly is display and the keypad of device 500, and sensor cluster 514 can be with detection means 500 or 500 1 assemblies of device Position change, user is presence or absence of with what device 500 contacted, device 500 orientation or acceleration/deceleration and device 500 Temperature change.Sensor cluster 514 can include proximity transducer, is configured to the detection when not having any physical contact The presence of object nearby.Sensor cluster 514 can also include optical sensor, such as CMOS or ccd image sensor, for becoming Use as in application.In certain embodiments, this sensor cluster 514 can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure transducer or temperature sensor.
Communication component 516 is configured to facilitate the communication of wired or wireless way between device 500 and other equipment.Device 500 can access the wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.In an exemplary enforcement In example, communication component 516 receives broadcast singal or the broadcast related information from external broadcasting management system via broadcast channel. In one exemplary embodiment, described communication component 516 also includes near-field communication (NFC) module, to promote junction service.Example As, RF identification (RFID) technology can be based in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, Bluetooth (BT) technology and other technologies are realizing.
In the exemplary embodiment, device 500 can be by one or more application specific integrated circuits (ASIC), numeral letter Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, the method for executing above-mentioned renewal firmware:
When digital accessory access is detected, read the firmware version information of digital accessory, firmware version information is used for referring to The current version of firmware of registration word accessory;According to firmware version information, detect whether there is target firmware, target firmware refers to version This is different from the firmware of current version of firmware;If there is target firmware, then obtain target firmware;Based on target firmware, logarithm Word accessory is updated.
In a kind of possible implementation, detect whether that there is target firmware includes:
According to firmware version information, detect in designated storage area and whether there is target firmware version information, if it does, Then determine there is target firmware, if it does not exist, then determining there is not target firmware;Or,
According to firmware version information, detect and whether there is target firmware version information on given server, if it is present Determine there is target firmware, if it does not exist, then determining there is not target firmware.
In a kind of possible implementation, if there is target firmware, then obtain target firmware and include:
If there is target firmware, then show that firmware updates information, firmware updates information and is used for pointing out user Update the firmware of digital accessory, when the confirmation operation that firmware is updated with information is detected, then obtain target firmware;Or,
If there is target firmware, then inquire about accessory configuration information, if the instruction of accessory configuration information is carried out to firmware certainly Dynamic renewal, then obtain target firmware;Or,
If there is target firmware, then automatically obtain target firmware.
In a kind of possible implementation, based on target firmware, digital accessory is updated including:
Send target firmware to digital accessory, firmware renewal is carried out by digital accessory.
In a kind of possible implementation, digital accessory has Type-C interface.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided As included the memorizer 504 instructing, above-mentioned instruction can be executed by the processor 520 of device 500 to complete above-mentioned renewal firmware Method.For example, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic Band, floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the disclosure Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations are followed the general principle of the disclosure and are included the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments be considered only as exemplary, the true scope of the disclosure and spirit by following Claim is pointed out.
It should be appreciated that the disclosure is not limited to be described above and precision architecture illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure only to be limited by appended claim.

Claims (11)

1. a kind of method updating firmware is it is characterised in that methods described includes:
When digital accessory access is detected, read the firmware version information of described numeral accessory, described firmware version information is used In the current version of firmware indicating described numeral accessory;
According to described firmware version information, detect whether there is target firmware, it is described that described target firmware refers to that version is different from The firmware of current version of firmware;
If there is described target firmware, then obtain described target firmware;
Based on described target firmware, described numeral accessory is updated.
2. method according to claim 1 it is characterised in that described according to described firmware version information, detect whether to deposit Include in target firmware:
According to described firmware version information, detect in designated storage area and whether there is target firmware version information, if it does, Then determine there is described target firmware, if it does not exist, then determining there is not described target firmware;Or,
According to described firmware version information, detect and whether there is target firmware version information on given server, if it is present Determine there is described target firmware, if it does not exist, then determining there is not described target firmware.
3. method according to claim 1 it is characterised in that described if there is described target firmware, then obtain described Target firmware includes:
If there is described target firmware, then show that firmware updates information, described firmware updates information and is used for pointing out User updates the firmware of described numeral accessory, when the confirmation operation that described firmware is updated with information is detected, then obtains institute State target firmware;Or,
If there is described target firmware, then inquire about accessory configuration information, if the instruction of described accessory configuration information is entered to firmware Row automatically updates, then obtain described target firmware;Or,
If there is described target firmware, then automatically obtain described target firmware.
4. method according to claim 1 it is characterised in that described based on described target firmware, to described numeral accessory Be updated including:
Send described target firmware to described numeral accessory, firmware renewal is carried out by described numeral accessory.
5. method according to claim 1 is it is characterised in that described numeral accessory has Type-C interface.
6. a kind of device updating firmware is it is characterised in that described device includes:
Read module, for when digital accessory access is detected, reading the firmware version information of described numeral accessory, described solid Part version information is used for indicating the current version of firmware of described numeral accessory;
Detection module, for according to described firmware version information, detecting whether there is target firmware, described target firmware refers to version This is different from the firmware of described current version of firmware;
Acquisition module, for if there is described target firmware, then obtaining described target firmware;
Update module, for based on described target firmware, being updated to described numeral accessory.
7. device according to claim 6 is it is characterised in that described detection module, for being believed according to described firmware version Ceasing, in detection designated storage area, whether there is target firmware version information, there is described target admittedly if it is present determining Part, if it does not exist, then determine there is not described target firmware;Or,
Described detection module, whether there is target firmware version for according to described firmware version information, detecting on given server This information, if it is present determining there is described target firmware, if it does not exist, then determine there is not described target firmware.
8. device according to claim 6 is it is characterised in that described acquisition module, for solid if there is described target Part, then show that firmware updates information, and described firmware updates information and is used for pointing out user to update described numeral accessory Firmware, when the confirmation operation that described firmware is updated with information is detected, then obtains described target firmware;Or,
Described acquisition module, for if there is described target firmware, then inquiring about accessory configuration information, if the setting of described accessory Information instruction automatically updates to firmware, then obtain described target firmware;Or,
Described acquisition module, for if there is described target firmware, then automatically obtaining described target firmware.
9. device according to claim 6 is it is characterised in that described update module is used for sending institute to described numeral accessory State target firmware, firmware renewal is carried out by described numeral accessory.
10. device according to claim 6 is it is characterised in that described numeral accessory has Type-C interface.
A kind of 11. devices updating firmware are it is characterised in that include:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:When digital accessory access is detected, read the firmware version of described numeral accessory Information, described firmware version information is used for indicating the current version of firmware of described numeral accessory;According to described firmware version information, Detect whether there is target firmware, described target firmware refers to that version is different from the firmware of described current version of firmware;If deposited In described target firmware, then obtain described target firmware;Based on described target firmware, described numeral accessory is updated.
CN201610803200.XA 2016-09-05 2016-09-05 Method and apparatus for updating firmware Pending CN106406941A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610803200.XA CN106406941A (en) 2016-09-05 2016-09-05 Method and apparatus for updating firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610803200.XA CN106406941A (en) 2016-09-05 2016-09-05 Method and apparatus for updating firmware

Publications (1)

Publication Number Publication Date
CN106406941A true CN106406941A (en) 2017-02-15

Family

ID=57998539

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610803200.XA Pending CN106406941A (en) 2016-09-05 2016-09-05 Method and apparatus for updating firmware

Country Status (1)

Country Link
CN (1) CN106406941A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101270A (en) * 2018-08-31 2018-12-28 郑州云海信息技术有限公司 Firmware version inspection method and device, storage medium and electronic equipment
CN109379215A (en) * 2018-09-26 2019-02-22 郑州云海信息技术有限公司 A kind of network interface card firmware update, device and equipment
CN113971146A (en) * 2020-07-22 2022-01-25 旺玖科技股份有限公司 USB hub device with automatic firmware updating function and host system with same
WO2024060166A1 (en) * 2022-09-23 2024-03-28 华为技术有限公司 Sensor software change method and apparatus, and intelligent driving device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014191797A (en) * 2013-03-28 2014-10-06 Oki Data Corp Information processing apparatus, firmware updating method and computer program
CN104572217A (en) * 2015-01-27 2015-04-29 广东欧珀移动通信有限公司 Updating method and system of wearable intelligent device
CN105915401A (en) * 2016-06-29 2016-08-31 北京小米移动软件有限公司 Firmware upgrading method and device of smart hardware, and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014191797A (en) * 2013-03-28 2014-10-06 Oki Data Corp Information processing apparatus, firmware updating method and computer program
CN104572217A (en) * 2015-01-27 2015-04-29 广东欧珀移动通信有限公司 Updating method and system of wearable intelligent device
CN105915401A (en) * 2016-06-29 2016-08-31 北京小米移动软件有限公司 Firmware upgrading method and device of smart hardware, and equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101270A (en) * 2018-08-31 2018-12-28 郑州云海信息技术有限公司 Firmware version inspection method and device, storage medium and electronic equipment
CN109379215A (en) * 2018-09-26 2019-02-22 郑州云海信息技术有限公司 A kind of network interface card firmware update, device and equipment
CN113971146A (en) * 2020-07-22 2022-01-25 旺玖科技股份有限公司 USB hub device with automatic firmware updating function and host system with same
WO2024060166A1 (en) * 2022-09-23 2024-03-28 华为技术有限公司 Sensor software change method and apparatus, and intelligent driving device

Similar Documents

Publication Publication Date Title
CN104219092B (en) The compatibility method of a kind of router administration application and router firmware and device
CN105450655A (en) Device binding methods and apparatuses
CN104780155A (en) Method and device for binding equipment
CN106406941A (en) Method and apparatus for updating firmware
CN105915401A (en) Firmware upgrading method and device of smart hardware, and equipment
CN104580637A (en) Telephone number marking method, terminal and cloud server
CN104853336A (en) Method for discovering intelligent equipment, method for accessing to internet and devices thereof
CN109450949B (en) Method for unbinding numbers of multiple applications, mobile terminal and readable storage medium
CN105511907A (en) Application program upgrade method, device and system
CN104320774A (en) Updating method, device and facility
CN106385351A (en) Control method and device of intelligent household equipment
CN106790043A (en) The method and device of message is sent in live application
CN104991947A (en) Map display method and apparatus
CN105099841A (en) Information sending methods and devices, terminal and router
CN106371329A (en) Smart home appliance association method and smart home appliance association device
CN105245675A (en) Method and device for managing contact account
CN107404723A (en) A kind of method and apparatus of access base station
CN106533913A (en) Method and apparatus for sharing position information
CN108712736A (en) Find the methods, devices and systems of equipment
CN107493366A (en) Address list information update method, device and storage medium
CN106535166A (en) Data service processing method and device
CN106534495A (en) Method of information processing, device and equipment
CN105472085A (en) Communication method and device
CN105245681A (en) Method and device for adding labels
CN105099758A (en) Methods and devices for transmitting update data package

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170215