Summary of the invention
In view of this, main purpose of the present invention is to propose a kind of renewal firmware method of digital subscriber device, the method of this renewal firmware is utilized DHCP (Dynamic Host ConfigurationProtocol, DHCP) characteristic and can upgrade the firmware of digital subscriber device automatically is to increase the convenience that digital subscriber device is used.
The invention provides a kind of renewal firmware method of digital subscriber device, it comprises the following steps.At first, digital subscriber device is to DHCP (Dynamic Host Configuration Protocol, DHCP) the server request of sending (request).Then, respond this request, this Dynamic Host Configuration Protocol server transmission comprises that the information of file server address and firmware identification code is to this digital subscriber device.Follow, this digital subscriber device judges whether to need to upgrade the firmware of this digital subscriber device according to this firmware identification code again.When this digital subscriber device judgement needs to upgrade firmware,, download the lastest imformation of the firmware of this digital subscriber device to the pairing file server of this document server address.At last, upgrade the firmware of this digital subscriber device according to this lastest imformation.Wherein this firmware identification code comprises firmware version identification code and hardware identification code, whether this firmware version identification code needs this lastest imformation in order to the firmware of distinguishing this digital subscriber device, and this hardware identification code is in order to distinguish whether this digital subscriber device meets the hsrdware requirements of this lastest imformation.
In addition, the present invention also proposes the method for the renewal firmware of another kind of digital subscriber device, and it comprises the following steps.At first, digital subscriber device is to the Dynamic Host Configuration Protocol server request of sending (request).Then, respond this request, this Dynamic Host Configuration Protocol server transmission comprises that the information of file server address is to this digital subscriber device.Follow again,, transmit the information that comprises the firmware identification code to file server requests according to this document server address.This digital subscriber device judges whether to need to upgrade the firmware of this digital subscriber device according to this firmware identification code.When this digital subscriber device judgement needs to upgrade firmware, download the lastest imformation of the firmware of this digital subscriber device to this document server.At last, upgrade the firmware of this digital subscriber device according to this lastest imformation.
For above and other objects of the present invention, feature and advantage can be become apparent, embodiment cited below particularly, and cooperate appended diagram, be described in detail below:
Embodiment
The present invention at first discloses a kind of method of upgrading firmware, the method of this renewal firmware is utilized the characteristic of DHCP and can be upgraded the firmware of digital subscriber device automatically, to increase the convenience that digital subscriber device is used, the method of this renewal firmware can be used for as asymmetrical digital subscriber (Asymmetric DigitalSubscriber Line, ADSL) modulator-demodulator and very high speed digital subscriber lines (Very-high Bit RateDigital Subscriber Line, VDSL) in different types of digital subscriber device such as modulator-demodulator, to be example hereinafter with the firmware that upgrades the asymmetrical digital subscriber modulator-demodulator, cooperate diagram, describe embodiments of the invention in detail.
Fig. 1 represents the flow chart of the renewal firmware method of asymmetrical digital subscriber modulator-demodulator in the first embodiment of the invention.At first, the asymmetrical digital subscriber modulator-demodulator is to DHCP (DynamicHost Configuration Protocol, DHCP) the server request of sending (request) (step S101), this action may betide the modulator-demodulator end first to server requests one IP address, or betides the modulator-demodulator end each time when server requests continuity (renew) IP lease.Then, Dynamic Host Configuration Protocol server can respond this request, its transmission comprises that the information of file server address and firmware identification code is to asymmetrical digital subscriber modulator-demodulator (step S102), the firmware identification code comprises firmware version identification code and hardware identification code, whether the firmware version identification code needs lastest imformation in order to the firmware of distinguishing the asymmetrical digital subscriber modulator-demodulator, and hardware identification code is in order to distinguish whether the asymmetrical digital subscriber modulator-demodulator meets the hsrdware requirements of lastest imformation.After receiving the firmware identification code, the asymmetrical digital subscriber modulator-demodulator can judge whether to need to upgrade the firmware (step S103) of asymmetrical digital subscriber modulator-demodulator according to the firmware identification code.When the judgement of asymmetrical digital subscriber modulator-demodulator need not upgraded firmware, finish this flow process.When the judgement of asymmetrical digital subscriber modulator-demodulator needs to upgrade firmware, to the pairing file transfer protocol (FTP) of file server address (File Transfer Protocol, FTP) server, the lastest imformation (step S104) of the firmware of download asymmetrical digital subscriber modulator-demodulator.At last, upgrade the firmware (step S105) of this asymmetrical digital subscriber modulator-demodulator according to lastest imformation.
Be noted that, in this embodiment, the lastest imformation of firmware is stored at file transfer protocol (FTP) (FileTransfer Protocol, FTP) in the server, but the lastest imformation of firmware also can be stored in other file server as: TFTP (Trivial File Transfer Protocol, TFTP) server.
Fig. 2 represents the flow chart of the renewal firmware method of asymmetrical digital subscriber modulator-demodulator in the second embodiment of the invention.At first, the asymmetrical digital subscriber modulator-demodulator is to the Dynamic Host Configuration Protocol server request of sending (step S201).Then, Dynamic Host Configuration Protocol server can respond this request, and its transmission comprises that the information of file server address is to this asymmetrical digital subscriber modulator-demodulator (step S202).According to file server address, the asymmetrical digital subscriber modulator-demodulator transmits the information (step S203) that comprises the firmware identification code to the TFTP server requests, the firmware identification code comprises firmware version identification code and hardware identification code, whether the firmware version identification code needs lastest imformation in order to the firmware of distinguishing the asymmetrical digital subscriber modulator-demodulator, and hardware identification code is in order to distinguish whether the asymmetrical digital subscriber modulator-demodulator meets the hsrdware requirements of lastest imformation.After receiving the firmware identification code, the asymmetrical digital subscriber modulator-demodulator can judge whether to need to upgrade the firmware (step S204) of asymmetrical digital subscriber modulator-demodulator according to the firmware identification code.When the judgement of asymmetrical digital subscriber modulator-demodulator need not upgraded firmware, finish this flow process.When the judgement of asymmetrical digital subscriber modulator-demodulator needs to upgrade firmware, download the lastest imformation (step S205) of the firmware of this asymmetrical digital subscriber modulator-demodulator to the TFTP server.At last, upgrade the firmware (step S206) of asymmetrical digital subscriber modulator-demodulator according to lastest imformation.
Be noted that in this embodiment the lastest imformation of firmware is stored in the TFTP server, but the lastest imformation of firmware also can be stored in other file server as: the file transfer protocol (FTP) server.
Fig. 3 represents the flow chart of the renewal firmware method of digital subscriber device in the third embodiment of the invention.Because in the process of the firmware of downloading and upgrading, may interrupt or other factors because of power interruptions, network, cause the firmware update message file to download not exclusively or upgrade and write not exclusively, can't normal boot-strap when this will cause the asymmetrical digital subscriber modulator-demodulator to restart next time.Therefore, for avoiding the generation of this problem, in third embodiment of the invention, the flash memory that is used to store firmware in the asymmetrical digital subscriber modulator-demodulator is divided into two blocks, wherein a block is used to back up original firmware for upgrading, the firmware of this backup can't be override by the new firmware that the present invention downloads automatically, that is new firmware is written in another block.Therefore, when the firmware of asymmetrical digital subscriber modulator-demodulator was carried out refresh routine, the firmware of this backup can guarantee that the asymmetrical digital subscriber modulator-demodulator can normal running.As shown in Figure 3, before carry out upgrading the program of firmware, must the advanced person be about to the action (step S301) that former firmware backs up.
Then, the asymmetrical digital subscriber modulator-demodulator is to the Dynamic Host Configuration Protocol server request of sending (step S302).Then, Dynamic Host Configuration Protocol server can respond this request, its transmission comprises that the information of file server address and firmware identification code is to asymmetrical digital subscriber modulator-demodulator (step S303), the firmware identification code comprises firmware version identification code and hardware identification code, whether the firmware version identification code needs lastest imformation in order to the firmware of distinguishing the asymmetrical digital subscriber modulator-demodulator, and hardware identification code is in order to distinguish whether the asymmetrical digital subscriber modulator-demodulator meets the hsrdware requirements of lastest imformation.After receiving the firmware identification code, the asymmetrical digital subscriber modulator-demodulator can judge earlier hardware identification code in the firmware identification code whether with the asymmetrical digital subscriber modulator-demodulator in the hardware identification code identical (step S304) of script.If the hardware identification code in the firmware identification code is different with the hardware identification code of script in the asymmetrical digital subscriber modulator-demodulator, promptly represent the lastest imformation of firmware and be not suitable for this asymmetrical digital subscriber modulator-demodulator that then flow process finishes.If hardware identification code in the hardware identification code in the firmware identification code and the asymmetrical digital subscriber modulator-demodulator originally is identical, judge again in the firmware identification code the firmware version identification code whether with the asymmetrical digital subscriber modulator-demodulator in originally firmware version identification code identical (step S305).If the firmware version identification code in the firmware identification code is identical with the firmware version identification code of script in the asymmetrical digital subscriber modulator-demodulator, represent that promptly the asymmetrical digital subscriber modulator-demodulator need not upgrade firmware, then flow process finishes.If the firmware version identification code in the firmware identification code is different with the firmware version identification code of script in the asymmetrical digital subscriber modulator-demodulator, then (FileTransfer Protocol, FTP) server is downloaded the lastest imformation (step S306) of the firmware of asymmetrical digital subscriber modulator-demodulator to the pairing file transfer protocol (FTP) of file server address.Then, judge that whether the lastest imformation of firmware downloads (step S307) fully, if the lastest imformation of firmware is not downloaded fully, then represents the file failed download, still can start shooting when in the case, the asymmetrical digital subscriber modulator-demodulator restarts next time with former firmware.If the lastest imformation of firmware is downloaded fully, then upgrade the firmware (step S308) that is stored in the flash memory according to lastest imformation.Whether success (step S309) of the last renewal of judging firmware in the flash memory again will be if success will use the firmware after the renewal to start shooting when then finishing this flow process and next time and restarting the asymmetrical digital subscriber modulator-demodulator.If there is not firmware in the renewal flash memory of success, the expression file write failure, can start shooting with the aforementioned former firmware of backup in advance when then the asymmetrical digital subscriber modulator-demodulator restarts next time.
According to the above, utilize the method for renewal firmware of the present invention, can upgrade the firmware of digital subscriber device automatically, therefore can reach the purpose that the present invention increases the ease of use of digital subscriber device.Particularly for the device that is sold to the user, the invention provides a kind of function of upgrading firmware reliably by remote auto, and in digital subscriber device each time during to server requests continuity (renew) IP lease, firmwares of renewable latest edition all.
Though the present invention discloses as above with preferred embodiment; right its is not in order to limit the present invention; any those skilled in the art; do not breaking away from the spirit and scope of the invention; should make a little change and retouching, so protection scope of the present invention is as the criterion when looking the accompanying Claim book person of defining.