CN106452928A - Firmware upgrading method and firmware upgrading apparatus of router, and router - Google Patents
Firmware upgrading method and firmware upgrading apparatus of router, and router Download PDFInfo
- Publication number
- CN106452928A CN106452928A CN201611156534.9A CN201611156534A CN106452928A CN 106452928 A CN106452928 A CN 106452928A CN 201611156534 A CN201611156534 A CN 201611156534A CN 106452928 A CN106452928 A CN 106452928A
- Authority
- CN
- China
- Prior art keywords
- router
- access information
- network access
- firmware
- sector
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/60—Router architectures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a firmware upgrading method and a firmware upgrading apparatus of a router, and the router. The firmware upgrading method of the router comprises the following steps: pre-storing network access information of the router in an initial loading module of the router, wherein the initial loading module runs when the router is power-on; when the router is detected to be power-on, calling the network access information based on the initial loading module, and establishing a connection with the server according to the network access information; receiving a new firmware data packet sent by the server; and performing upgrade according to the new firmware data packet. By adoption of the technical scheme provided by the invention, even in the case of power-off and other abnormal condition in an upgrading process, as long as the router is power-on again, the reception of the new firmware data packet can be continued for upgrading, the upgrade can be automatically restored, and thus the user experience is improved.
Description
Technical field
The present invention relates to data communication technology field, in particular to a kind of firmware upgrade method of router, one kind
The device for upgrading firmware of router and a kind of router.
Background technology
Intelligent router firmware upgrade is one of function of router indispensability.As the function of intelligent router itself is rich
Richness, causes its relatively conventional router of firmware volume big, can mark off two in the flash storage in general intelligence router
Individual sector preserving 2 parts of firmware images, a mirror image for being used for depositing existing operation, the mirror image of another storage upgrading, i.e.,
Upgrade successfully just and second mirrored partition is switched to, upgrade and be switched to first mirrored partition next time again, but so store
Certain shortcoming, such as Flash cost increase greatly and therewith because capacity requirement becomes, and the partial sector due to Flash is broken, just
Being distributed across upgrade image subregion then causes upgrading never success, directly leads if existing use subregion is just distributed in
The problems such as causing router failure, intelligent router also has the method for directly adopting a subregion, can reduce to a certain extent
Flash cost.
But existing router firmware upgrade method, cause upgrading in escalation process once situations such as there is power down
Abnormal, subsequently just cannot carry out again recovering upgrading automatically, depot repair be generally required, the experience of user is affected, to this mesh
Front also without effective solution.
Content of the invention
It is contemplated that at least solving one of technical problem present in prior art or correlation technique.
For this purpose, it is an object of the present invention to proposing a kind of firmware upgrade scheme of new router, it can be ensured that
The firmware upgrade process of router can be smoothed out, and improve the experience of user.
Further object is that proposing a kind of router.
For achieving the above object, a kind of embodiment according to the first aspect of the invention, it is proposed that the firmware liter of router
Level method, including:In the original upload module of the network access information of pre-stored router to the router, wherein, described
Initialization load-on module is run during electricity on the router;On the router is detected during electricity, initially added based on described
Module is carried, the network access information is called, and is connected with server foundation according to the network access information;Receive the clothes
The new firmware data packet of business device transmission;Upgraded according to the new firmware data packet.
The firmware upgrade method of router according to an embodiment of the invention, the original upload module Hui road in router
By on device during electricity, the software and hardware in router is initialized, the hardware environment in route system is adjusted to close
Suitable state, original upload module is even after power down occurs in router, as long as re-power startup can just continue to run with, institute
With in the original upload module by the network access information to router of pre-stored router and electric on router is detected
When, network access information is called based on original upload module, and is connected with server foundation, new solid with sent according to server
Part packet is being upgraded so that even if occurring the abnormal conditions such as power down in escalation process, as long as re-powering startup, just
New firmware data packet can be continued to upgraded, upgrading can be recovered automatically, improve the experience of user.
The firmware upgrade method of router according to the abovementioned embodiments of the present invention, can also be with following technical characteristic:
According to one embodiment of present invention, detect on the router after electricity described, and be based on described
The original upload module, the step of call the network access information before, also include:Detect that the router startup runs
Whether the number of times of failure is more than or equal to predetermined threshold;It is more than or equal in the number of times for determining the router startup operation failure
During the predetermined threshold, execute described be based on the original upload module, the step of call the network access information.
The firmware upgrade method of router, runs failure by detecting router startup according to an embodiment of the invention
Number of times, in the number of times for detecting router startup operation failure, more than or equal to predetermined threshold, (such as 5 times, predetermined threshold can basis
Actual demand is adjusted), illustrate that route system temporarily normally cannot run, it is impossible to which firmware is carried out based on conventional upgrading mode
Upgrading, calls network access information to realize the upgrading of firmware to obtain new firmware data packet now by original upload module,
Being smoothed out for firmware upgrade process is ensure that, the number of times of router startup operation failure is being detected less than predetermined threshold, is being said
Bright route system is resumed operation, now can carry out firmware upgrade by commonly using upgrading mode, it is of course also possible to based on initial
Load-on module calls network access information to realize the upgrading of firmware to obtain new firmware data packet, can be with conventional firmware upgrade
Mode compatibility, has expanded the firmware upgrade mode of router.
According to one embodiment of present invention, the step being connected according to the network access information and server foundation
Suddenly, specifically include:According to the network access information, by PPPOE dial mode accessing external network, and based on the outer net connection
To the server, wherein, the network access information includes to access account and access pin;Or believed according to the network insertion
Breath, by IP address access way accessing external network, and is connected to the server based on the outer net, and wherein, the network connects
Entering information at least includes IP address information.
The firmware upgrade method of router according to an embodiment of the invention, can be set up using various ways router with
Connection between server, such as PPPOE dial mode, IP address access way, it is ensured that router can be connected to clothes in time
Business device.
According to one embodiment of present invention, the new firmware data packet include multiple subdata bags and with described in each
The corresponding check value of packet, described the step of upgraded according to the new firmware data packet, specifically include:Take office in reception
Described in one during subdata bag, according to the corresponding check value of arbitrary subdata bag, arbitrary subdata bag is verified;
Arbitrary subdata bag, when verifying successfully to arbitrary subdata bag, is write the flash storage of the router
In, and the next described subdata bag for receiving is verified, until all described subnumber in the new firmware data packet
It is written in the flash storage according to Bao Jun.
The firmware upgrade method of router according to an embodiment of the invention, it is contemplated that router is connected to clothes based on outer net
Business device, it is possible that the problem of network speed and network stability in the large, now by a sub- packet is received, verifies and writes
Enter a sub- packet, i.e., new firmware data packet is carried out point in batches downloading and a programming, and non-disposable whole download programmings, one
Aspect ensure that being smoothed out for whole escalation process, on the other hand can reduce to flash storage performance requirement, and then reduce
Flash storage cost.
According to one embodiment of present invention, the flash storage includes at least one sector, described will be arbitrary described
Subdata bag writes the step in the flash storage of the router, specifically includes:Detecting at least one sector is
No have the sector that damages;Exist at least one sector is determined damage sector when, the flash storage is entered
Capable subregion again, to filter the sector of the damage;By the flash storage after arbitrary subdata bag write again subregion
In.
The firmware upgrade method of router according to an embodiment of the invention, during programming subdata bag, if will
The programming of subdata bag still cannot complete corresponding firmware upgrade in the sector of the damage of flash storage, so by detection
In at least one sector with the presence or absence of damage sector, exist damage sector, flash storage is carried out again subregion with
The sector that damages is filtered, so as to be effectively prevented from occurring in the sector of subdata bag programming to the damage of flash storage
Situation, further ensure that being smoothed out for whole firmware upgrade process.
According to one embodiment of present invention, the original upload module includes Bootloader module.
The firmware upgrade method of router according to an embodiment of the invention, Bootloader is route system in power-up
The first paragraph code for executing afterwards, after the initialization of the software and hardware in complete paired systems, activation system is run.
A kind of embodiment according to the second aspect of the invention, it is proposed that device for upgrading firmware of router, including:Storage
Unit, in the original upload module for the network access information to the router of pre-stored router, wherein, described initial
Change load-on module to run during electricity on the router;Connection unit, for when electricity on the router is detected, based on institute
Original upload module is stated, the network access information is called, and is connected with server foundation according to the network access information;Connect
Unit is received, for receiving the new firmware data packet of server transmission;Processing unit, for according to the new firmware data packet
Upgraded.
The device for upgrading firmware of router according to an embodiment of the invention, the original upload module Hui road in router
By on device during electricity, the software and hardware in router is initialized, the hardware environment in route system is adjusted to close
Suitable state, original upload module is even after power down occurs in router, as long as re-power startup can just continue to run with, institute
With in the original upload module by the network access information to router of pre-stored router and electric on router is detected
When, network access information is called based on original upload module, and is connected with server foundation, new solid with sent according to server
Part packet is being upgraded so that even if occurring the abnormal conditions such as power down in escalation process, as long as re-powering startup, just
New firmware data packet can be continued to upgraded, upgrading can be recovered automatically, improve the experience of user.
The device for upgrading firmware of router according to the abovementioned embodiments of the present invention, can also be with following technical characteristic:
According to one embodiment of present invention, also include:First detector unit, for detecting router startup operation
Whether the number of times of failure is more than or equal to predetermined threshold;The connection unit, specifically for determining in first detector unit
When the number of times of the router startup operation failure is more than or equal to the predetermined threshold, based on the original upload module, adjust
Use the network access information.
The device for upgrading firmware of router, runs failure by detecting router startup according to an embodiment of the invention
Number of times, in the number of times for detecting router startup operation failure, more than or equal to predetermined threshold, (such as 5 times, predetermined threshold can basis
Actual demand is adjusted), illustrate that route system temporarily normally cannot run, it is impossible to which firmware is carried out based on conventional upgrading mode
Upgrading, calls network access information to realize the upgrading of firmware to obtain new firmware data packet now by original upload module,
Being smoothed out for firmware upgrade process is ensure that, the number of times of router startup operation failure is being detected less than predetermined threshold, is being said
Bright route system is resumed operation, now can carry out firmware upgrade by commonly using upgrading mode, it is of course also possible to based on initial
Load-on module calls network access information to realize the upgrading of firmware to obtain new firmware data packet, can be with conventional firmware upgrade
Mode compatibility, has expanded the firmware upgrade mode of router.
According to one embodiment of present invention, the connection unit specifically for:According to the network access information, pass through
PPPOE dial mode accessing external network, and the server is connected to based on the outer net, wherein, the network access information bag
Include access account and access pin;Or according to the network access information, by IP address access way accessing external network, and be based on
The outer net is connected to the server, and wherein, the network access information at least includes IP address information.
The device for upgrading firmware of router according to an embodiment of the invention, can be set up using various ways router with
Connection between server, such as PPPOE dial mode, IP address access way, it is ensured that router can be connected to clothes in time
Business device.
According to one embodiment of present invention, the new firmware data packet include multiple subdata bags and with described in each
The corresponding check value of packet, the processing unit includes:Verification unit, for when arbitrary subdata bag is received,
According to the corresponding check value of arbitrary subdata bag, arbitrary subdata bag is verified;Programming unit, for right
When arbitrary subdata bag is verified successfully, arbitrary subdata bag is write in the flash storage of the router, and
The next described subdata bag for receiving is verified, until all described subdata Bao Jun in the new firmware data packet
It is written in the flash storage.
The device for upgrading firmware of router according to an embodiment of the invention, it is contemplated that router is connected to clothes based on outer net
Business device, it is possible that the problem of network speed and network stability in the large, now by a sub- packet is received, verifies and writes
Enter a sub- packet, i.e., new firmware data packet is carried out point in batches downloading and a programming, and non-disposable whole download programmings, one
Aspect ensure that being smoothed out for whole escalation process, on the other hand can reduce to flash storage performance requirement, and then reduce
Flash storage cost.
According to one embodiment of present invention, the flash storage includes at least one sector, the programming unit tool
Body is used for:Detect with the presence or absence of the sector that damages at least one sector;Exist at least one sector is determined
During the sector of damage, subregion again is carried out to the flash storage, to filter the sector of the damage;By arbitrary son
In packet write flash storage again after subregion.
The device for upgrading firmware of router according to an embodiment of the invention, during programming subdata bag, if will
The programming of subdata bag still cannot complete corresponding firmware upgrade in the sector of the damage of flash storage, so by detection
In at least one sector with the presence or absence of damage sector, exist damage sector, flash storage is carried out again subregion with
The sector that damages is filtered, so as to be effectively prevented from occurring in the sector of subdata bag programming to the damage of flash storage
Situation, further ensure that being smoothed out for whole firmware upgrade process.
According to one embodiment of present invention, the original upload module includes Bootloader module.
The device for upgrading firmware of router according to an embodiment of the invention, Bootloader is route system in power-up
The first paragraph code for executing afterwards, after the initialization of the software and hardware in complete paired systems, activation system is run.
A kind of embodiment according to the third aspect of the invention we, it is proposed that router, including:Such as arbitrary in above-mentioned embodiment
The device for upgrading firmware of the router described in.
The additional aspect and advantage of the present invention will be set forth in part in the description, and partly will become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Description of the drawings
The above-mentioned and/or additional aspect and advantage of the present invention will become from the description with reference to accompanying drawings below to embodiment
Substantially and easy to understand, wherein:
Fig. 1 shows the schematic flow diagram of the firmware upgrade method of router according to an embodiment of the invention;
Fig. 2 shows the schematic block diagram of the device for upgrading firmware of router according to an embodiment of the invention;
Fig. 3 shows the schematic block diagram of router according to an embodiment of the invention.
Specific embodiment
In order to be more clearly understood that the above objects, features and advantages of the present invention, below in conjunction with the accompanying drawings and concrete real
Apply mode to be further described in detail the present invention.It should be noted that in the case of not conflicting, the enforcement of the application
Feature in example and embodiment can be mutually combined.
A lot of details are elaborated in the following description in order to fully understand the present invention, but, the present invention may be used also
Implemented with being different from other modes described here using other, therefore, protection scope of the present invention is not by described below
Specific embodiment restriction.
Fig. 1 shows the schematic flow diagram of the firmware upgrade method of router according to an embodiment of the invention.
As shown in figure 1, the firmware upgrade method of router according to an embodiment of the invention, including:
Step 102, in the original upload module of the network access information to the router of pre-stored router, wherein,
The initialization load-on module is run during electricity on the router.
Step 104, on the router is detected during electricity, based on the original upload module, calls the network to connect
Enter information, and be connected with server foundation according to the network access information.
Step 106, receives the new firmware data packet that the server sends.
Step 108, is upgraded according to the new firmware data packet.
Original upload module in router can on the router electricity when, the software and hardware in router is initialized,
So that the hardware environment in route system is adjusted to proper states, even there is power down in router in original upload module
Afterwards, can just continue to run with as long as re-powering startup, so by the network access information of pre-stored router to router
Original upload module in, and on router is detected during electricity, network access information is called based on original upload module, and with
Server sets up connection, is upgraded with the new firmware data packet that sent according to server so that even if in escalation process
There are the abnormal conditions such as power down, as long as re-powering startup, it is possible to continue to new firmware data packet to be upgraded, can be certainly
Dynamic recovery upgrading, improves the experience of user.
The firmware upgrade method of router according to the abovementioned embodiments of the present invention, can also be with following technical characteristic:
According to one embodiment of present invention, detect on the router after electricity described, and be based on described
The original upload module, the step of call the network access information before, also include:Detect that the router startup runs
Whether the number of times of failure is more than or equal to predetermined threshold;It is more than or equal in the number of times for determining the router startup operation failure
During the predetermined threshold, execute described be based on the original upload module, the step of call the network access information.
The number of times of failure is run by detecting router startup, be more than in the number of times for detecting router startup operation failure
Or predetermined threshold (such as 5 times, predetermined threshold can be adjusted according to the actual requirements) is equal to, illustrate that route system temporarily cannot be just
Often run, it is impossible to firmware upgrade is carried out based on conventional upgrading mode, calls network access information now by original upload module
The upgrading of firmware is realized to obtain new firmware data packet, it is ensured that being smoothed out for firmware upgrade process, detecting route
The number of times of device startup optimization failure is less than predetermined threshold, illustrates that route system is resumed operation, now can be by conventional upgrading
Mode carries out firmware upgrade, it is of course also possible to call network access information to obtain new firmware data based on original upload module
The upgrading for wrapping to realize firmware, can be compatible with conventional firmware upgrade mode, has expanded the firmware upgrade mode of router.
According to one embodiment of present invention, the step being connected according to the network access information and server foundation
Suddenly, specifically include:According to the network access information, by PPPOE dial mode accessing external network, and based on the outer net connection
To the server, wherein, the network access information includes to access account and access pin;Or believed according to the network insertion
Breath, by IP address access way accessing external network, and is connected to the server based on the outer net, and wherein, the network connects
Entering information at least includes IP address information.
The connection between router and server can be set up using various ways, such as PPPOE dial mode, IP address is accessed
Mode, it is ensured that router can be connected to server in time.
According to one embodiment of present invention, the new firmware data packet include multiple subdata bags and with described in each
The corresponding check value of packet, described the step of upgraded according to the new firmware data packet, specifically include:Take office in reception
Described in one during subdata bag, according to the corresponding check value of arbitrary subdata bag, arbitrary subdata bag is verified;
Arbitrary subdata bag, when verifying successfully to arbitrary subdata bag, is write the flash storage of the router
In, and the next described subdata bag for receiving is verified, until all described subnumber in the new firmware data packet
It is written in the flash storage according to Bao Jun.
In view of router, server is connected to based on outer net, it is possible that the asking of network speed and network stability in the large
Topic, now by a sub- packet, verification and one sub- packet of write is received, i.e., is carried out to new firmware data packet point in batches
Download and programming, and non-disposable whole download programmings, being smoothed out for whole escalation process is on the one hand ensure that, on the other hand
Can reduce to flash storage performance requirement, and then reduce flash storage cost.
According to one embodiment of present invention, the flash storage includes at least one sector, described will be arbitrary described
Subdata bag writes the step in the flash storage of the router, specifically includes:Detecting at least one sector is
No have the sector that damages;Exist at least one sector is determined damage sector when, the flash storage is entered
Capable subregion again, to filter the sector of the damage;By the flash storage after arbitrary subdata bag write again subregion
In.
During programming subdata bag, if by the sector of subdata bag programming to the damage of flash storage, still
Corresponding firmware upgrade cannot be completed, so by detecting with the presence or absence of the sector that damages at least one sector, damaging existing
Bad sector, carries out again subregion to filter the sector of damage to flash storage, so as to be effectively prevented from occurring subdata
Situation of the bag programming in the sector of the damage of flash storage, further ensure that smoothly entering for whole firmware upgrade process
OK.
According to one embodiment of present invention, the original upload module includes Bootloader module.
Bootloader is the first paragraph code that route system is executed after power, the software and hardware in complete paired systems
Initialization after, activation system run.
Fig. 2 shows the schematic block diagram of the device for upgrading firmware of router according to an embodiment of the invention.
As shown in Fig. 2 the device for upgrading firmware 200 of router according to an embodiment of the invention, including:Memory element
202nd, connection unit 204, receiving unit 206 and processing unit 208.
Wherein, memory element 202 is used for the original upload of the network access information to the router of pre-stored router
In module, wherein, the initialization load-on module is run during electricity on the router;Connection unit 204 is used for detecting
On the router during electricity, based on the original upload module, the network access information is called, and according to the network insertion
Information is set up with server and is connected;Receiving unit 206 is used for receiving the new firmware data packet of server transmission;Processing unit
208 are used for being upgraded according to the new firmware data packet.
Original upload module in router can on the router electricity when, the software and hardware in router is initialized,
So that the hardware environment in route system is adjusted to proper states, even there is power down in router in original upload module
Afterwards, can just continue to run with as long as re-powering startup, so by the network access information of pre-stored router to router
Original upload module in, and on router is detected during electricity, network access information is called based on original upload module, and with
Server sets up connection, is upgraded with the new firmware data packet that sent according to server so that even if in escalation process
There are the abnormal conditions such as power down, as long as re-powering startup, it is possible to continue to new firmware data packet to be upgraded, can be certainly
Dynamic recovery upgrading, improves the experience of user.
The device for upgrading firmware 200 of router according to the abovementioned embodiments of the present invention, can also be with following technology spy
Levy:
According to one embodiment of present invention, also include:First detector unit 210, for detecting the router startup
Whether the number of times of operation failure is more than or equal to predetermined threshold;The connection unit 204, specifically for single in the described first detection
When unit 210 determines the number of times of router startup operation failure more than or equal to the predetermined threshold, initially added based on described
Module is carried, calls the network access information.
The number of times of failure is run by detecting router startup, be more than in the number of times for detecting router startup operation failure
Or predetermined threshold (such as 5 times, predetermined threshold can be adjusted according to the actual requirements) is equal to, illustrate that route system temporarily cannot be just
Often run, it is impossible to firmware upgrade is carried out based on conventional upgrading mode, calls network access information now by original upload module
The upgrading of firmware is realized to obtain new firmware data packet, it is ensured that being smoothed out for firmware upgrade process, detecting route
The number of times of device startup optimization failure is less than predetermined threshold, illustrates that route system is resumed operation, now can be by conventional upgrading
Mode carries out firmware upgrade, it is of course also possible to call network access information to obtain new firmware data based on original upload module
The upgrading for wrapping to realize firmware, can be compatible with conventional firmware upgrade mode, has expanded the firmware upgrade mode of router.
According to one embodiment of present invention, the connection unit 204 specifically for:According to the network access information,
By PPPOE dial mode accessing external network, and the server is connected to based on the outer net, wherein, the network insertion letter
Breath includes to access account and access pin;Or according to the network access information, by IP address access way accessing external network, and
The server is connected to based on the outer net, wherein, the network access information at least includes IP address information.
The connection between router and server can be set up using various ways, such as PPPOE dial mode, IP address is accessed
Mode, it is ensured that router can be connected to server in time.
According to one embodiment of present invention, the new firmware data packet include multiple subdata bags and with described in each
The corresponding check value of packet, the processing unit 208 includes:Verification unit 2082, for receiving arbitrary subnumber
During according to bag, according to the corresponding check value of arbitrary subdata bag, arbitrary subdata bag is verified;Programming unit
2084, for when verifying successfully to arbitrary subdata bag, arbitrary subdata bag being write the router
In flash storage, and the next described subdata bag for receiving is verified, until the institute in the new firmware data packet
Subdata Bao Jun is had to be written in the flash storage.
In view of router, server is connected to based on outer net, it is possible that the asking of network speed and network stability in the large
Topic, now by a sub- packet, verification and one sub- packet of write is received, i.e., is carried out to new firmware data packet point in batches
Download and programming, and non-disposable whole download programmings, being smoothed out for whole escalation process is on the one hand ensure that, on the other hand
Can reduce to flash storage performance requirement, and then reduce flash storage cost.
According to one embodiment of present invention, the flash storage includes at least one sector, the programming unit
2084 specifically for:Detect with the presence or absence of the sector that damages at least one sector;Determining at least one sector
During the sector that middle presence is damaged, subregion again is carried out to the flash storage, to filter the sector of the damage;Will be arbitrary
In subdata bag write flash storage again after subregion.
During programming subdata bag, if by the sector of subdata bag programming to the damage of flash storage, still
Corresponding firmware upgrade cannot be completed, so by detecting with the presence or absence of the sector that damages at least one sector, damaging existing
Bad sector, carries out again subregion to filter the sector of damage to flash storage, so as to be effectively prevented from occurring subdata
Situation of the bag programming in the sector of the damage of flash storage, further ensure that smoothly entering for whole firmware upgrade process
OK.
According to one embodiment of present invention, the original upload module includes Bootloader module.
Bootloader is the first paragraph code that route system is executed after power, the software and hardware in complete paired systems
Initialization after, activation system run.
Fig. 3 shows the schematic block diagram of router according to an embodiment of the invention.
As shown in figure 3, router 300 according to an embodiment of the invention, including:The firmware of router as shown in Figure 2
Update device 200.
Hereinafter technical scheme is described further.
In the present embodiment, the firmware upgrade system of router includes Cloud Server and router.
Wherein, Cloud Server is used for providing new firmware, is downloaded for router, and wherein, the feature of new firmware is every 1MB
(i.e. one sub- packet) adds a check value, in order to whether the content for verifying this 1MB is correct, for example firmware is then taken for 50MB
Firmware in business device is divided into 50 parts of per part of correspondences, one check value.
Multiple firmware partition or single firmware partition can be set in router, specifically can be configured according to the actual requirements,
For example, the subregion of router can be as shown in table 1:
Table 1
Bootloader in table 1 is dialled and LAN optimization with respect to increased PPPOE beyond traditional Bootloader
Network function (i.e. by DHCP (Dynamic Host Configuration Protocol, DHCP) or
Fixing IP is directly accessed the Internet), when router normal work, the access information of outer net is backuped to bootloader
Record in, if being currently by PPPOE dial-up access, record account and password, if by fixing IP access
, then record IP address, webmaster, DNS (Domain Name System, domain name system) etc..
Specifically, the firmware upgrade process of router includes:
When router enters upgrading accidental interruption, self- recoverage pattern of entering automatically.Enter self-healing judgement
Condition is n>Predetermined threshold (such as value is that 5, this value is variable).Wherein, the flag bit n that system is successfully started up, record last time startup
The number of times of route system failure, then clear 0, i.e., n=n+1 when Bootloader starts every time when successful, route system is just
N=0 after often starting.
1), Bootloader can carry out link outer net according to the access information of outer net in record.
2), whether detection Fash has the sector of damage, if having, according to subregion order before again subregion, to filter
The sector of damage.
3), obtain from server the firmware that will download size number Pack_Size of subpackage (this size for) and
The check value of each bag, then downloads corresponding firmware, carries out upgrading programming to inside Flash.
Because the network speed of outer net and stability are uncertain, if can be affected into using the method for programming after once downloading
Power, for example, download to a partial disconnection, and after once downloading, programming need relatively large internal memory, so to low cost
Mutual exclusion for router, so in the present embodiment, it is preferred to use method be download one section, one section of programming.For example:Gu
Part size is 50MB, often downloads 1MB and then verifies once, if verifying successfully with regard to, in programming to Flash, generating one after programming success
The record success_pack of individual bag, then proceedes to next section of programming ... .., until 50MB is by whole programmings to Flash.
In the above-described embodiments, after router enters self- recoverage pattern, outer net is docked by Bootloader, from server
Firmware is carried, using the method for segmentation programming, so as to the capacity of internal memory and Flash is saved, cost is solved the problems, such as, while
When solving the problems, such as upgrading power down cause expendable, must return to factory maintenance, improve the experience of user.
Technical scheme is described in detail above in association with accompanying drawing, the present invention proposes a kind of consolidating for new router
Part upgrading scheme, even if occurring the abnormal conditions such as power down in escalation process, as long as re-power startup, it is possible to continue to
New firmware data packet can be recovered automatically upgrading, improve the experience of user being upgraded.
The preferred embodiments of the present invention are the foregoing is only, the present invention is not limited to, for the skill of this area
For art personnel, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, made any repair
Change, equivalent, improvement etc., should be included within the scope of the present invention.
Claims (13)
1. a kind of firmware upgrade method of router, it is characterised in that include:
In the original upload module of the network access information of pre-stored router to the router, wherein, the initialization adds
Carry module to run during electricity on the router;
On the router is detected during electricity, based on the original upload module, the network access information is called, and according to
The network access information is set up with server and is connected;
Receive the new firmware data packet of server transmission;
Upgraded according to the new firmware data packet.
2. the firmware upgrade method of router according to claim 1, it is characterised in that detect the route described
On device after electricity, and described based on the original upload module, the step of call the network access information before, also wrap
Include:
Detect the number of times of router startup operation failure whether more than or equal to predetermined threshold;
When the number of times of the router startup operation failure is determined more than or equal to the predetermined threshold, execution is described to be based on institute
Original upload module is stated, the step of call the network access information.
3. the firmware upgrade method of router according to claim 1, it is characterised in that described according to the network insertion
Information sets up, with server, the step of being connected, and specifically includes:
According to the network access information, by PPPOE dial mode accessing external network, and the clothes are connected to based on the outer net
Business device, wherein, the network access information includes to access account and access pin;Or
According to the network access information, by IP address access way accessing external network, and it is connected to based on the outer net described
Server, wherein, the network access information at least includes IP address information.
4. the firmware upgrade method of router according to any one of claim 1 to 3, it is characterised in that described new solid
Part packet includes multiple subdata bags and check value corresponding with packet each described, described according to the new firmware number
The step of being upgraded according to bag, specifically includes:
When arbitrary subdata bag is received, according to the corresponding check value of arbitrary subdata bag to arbitrary subnumber
Verified according to bag;
When verifying successfully to arbitrary subdata bag, the Flash that arbitrary subdata bag is write the router is deposited
In reservoir, and the next described subdata bag for receiving is verified, until all described in the new firmware data packet
Subdata Bao Jun is written in the flash storage.
5. the firmware upgrade method of router according to claim 4, it is characterised in that the flash storage includes
At least one sector, the step for arbitrary subdata bag being write in the flash storage of the router, concrete bag
Include:
Detect with the presence or absence of the sector that damages at least one sector;
Exist at least one sector is determined damage sector when, subregion again is carried out to the flash storage, with
Filter the sector of the damage;
By in the flash storage after arbitrary subdata bag write again subregion.
6. the firmware upgrade method of router according to any one of claim 1 to 3, it is characterised in that described initial
Load-on module includes Bootloader module.
7. a kind of device for upgrading firmware of router, it is characterised in that include:
Memory element, in the original upload module for the network access information to the router of pre-stored router, wherein,
The initialization load-on module is run during electricity on the router;
Connection unit, for when electricity on the router is detected, based on the original upload module, calling the network to connect
Enter information, and be connected with server foundation according to the network access information;
Receiving unit, for receiving the new firmware data packet of server transmission;
Processing unit, for being upgraded according to the new firmware data packet.
8. the device for upgrading firmware of router according to claim 7, it is characterised in that also include:
Whether the first detector unit, for detecting the number of times of router startup operation failure more than or equal to predetermined threshold;
The connection unit, the number of times specifically for determining router startup operation failure in first detector unit is big
In or be equal to the predetermined threshold when, based on the original upload module, call the network access information.
9. the device for upgrading firmware of router according to claim 7, it is characterised in that the connection unit is specifically used
In:
According to the network access information, by PPPOE dial mode accessing external network, and the clothes are connected to based on the outer net
Business device, wherein, the network access information includes to access account and access pin;Or
According to the network access information, by IP address access way accessing external network, and it is connected to based on the outer net described
Server, wherein, the network access information at least includes IP address information.
10. the device for upgrading firmware of the router according to any one of claim 7 to 9, it is characterised in that described new solid
Part packet includes multiple subdata bags and check value corresponding with packet each described, and the processing unit includes:
Verification unit, for when arbitrary subdata bag is received, according to the corresponding check value of arbitrary subdata bag
Arbitrary subdata bag is verified;
Programming unit, for when verifying successfully to arbitrary subdata bag, arbitrary subdata bag being write the road
By in the flash storage of device, and the next described subdata bag for receiving is verified, until the new firmware data packet
In all described subdata Bao Jun be written in the flash storage.
The device for upgrading firmware of 11. routers according to claim 10, it is characterised in that the flash storage bag
Include at least one sector, the programming unit specifically for:
Detect with the presence or absence of the sector that damages at least one sector;
Exist at least one sector is determined damage sector when, subregion again is carried out to the flash storage, with
Filter the sector of the damage;
By in the flash storage after arbitrary subdata bag write again subregion.
The device for upgrading firmware of 12. routers according to any one of claim 7 to 9, it is characterised in that described initial
Load-on module includes Bootloader module.
13. a kind of routers, it is characterised in that include:
The device for upgrading firmware of router as any one of claim 7 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611156534.9A CN106452928A (en) | 2016-12-14 | 2016-12-14 | Firmware upgrading method and firmware upgrading apparatus of router, and router |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611156534.9A CN106452928A (en) | 2016-12-14 | 2016-12-14 | Firmware upgrading method and firmware upgrading apparatus of router, and router |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106452928A true CN106452928A (en) | 2017-02-22 |
Family
ID=58217246
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611156534.9A Pending CN106452928A (en) | 2016-12-14 | 2016-12-14 | Firmware upgrading method and firmware upgrading apparatus of router, and router |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106452928A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066297A (en) * | 2017-04-06 | 2017-08-18 | 大连网月科技股份有限公司 | A kind of method and device of automatic recovery firmware |
CN107634856A (en) * | 2017-09-18 | 2018-01-26 | 上海斐讯数据通信技术有限公司 | A kind of router firmware upgrade method and system |
CN108021410A (en) * | 2017-12-06 | 2018-05-11 | 九阳股份有限公司 | A kind of firmware upgrade method and system of intelligent appliance equipment |
CN108132792A (en) * | 2017-11-22 | 2018-06-08 | 奕瑞影像科技(太仓)有限公司 | Flat panel detector, electronic device, firmware loading method and firmware loads system |
CN113238789A (en) * | 2021-05-27 | 2021-08-10 | 闻泰通讯股份有限公司 | Electronic equipment, firmware upgrading method and device thereof and computer readable storage medium |
CN114448795A (en) * | 2022-01-18 | 2022-05-06 | 深圳市联洲国际技术有限公司 | Wireless module upgrading method, routing board, wireless communication system and processor |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103024773A (en) * | 2012-12-10 | 2013-04-03 | 上海斐讯数据通信技术有限公司 | Method, management device and system for upgrading software of wireless router |
US20130083651A1 (en) * | 2008-12-08 | 2013-04-04 | At&T Intellectual Property I, L.P. | Systems and methods to reroute internet protocol traffic based on network user preferences |
CN103580921A (en) * | 2013-11-08 | 2014-02-12 | 深圳市共进电子股份有限公司 | Automatic network equipment upgrading method and automatic network equipment upgrading system |
CN105743933A (en) * | 2014-12-08 | 2016-07-06 | Tcl集团股份有限公司 | Router module updating method and system |
-
2016
- 2016-12-14 CN CN201611156534.9A patent/CN106452928A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130083651A1 (en) * | 2008-12-08 | 2013-04-04 | At&T Intellectual Property I, L.P. | Systems and methods to reroute internet protocol traffic based on network user preferences |
CN103024773A (en) * | 2012-12-10 | 2013-04-03 | 上海斐讯数据通信技术有限公司 | Method, management device and system for upgrading software of wireless router |
CN103580921A (en) * | 2013-11-08 | 2014-02-12 | 深圳市共进电子股份有限公司 | Automatic network equipment upgrading method and automatic network equipment upgrading system |
CN105743933A (en) * | 2014-12-08 | 2016-07-06 | Tcl集团股份有限公司 | Router module updating method and system |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066297A (en) * | 2017-04-06 | 2017-08-18 | 大连网月科技股份有限公司 | A kind of method and device of automatic recovery firmware |
CN107634856A (en) * | 2017-09-18 | 2018-01-26 | 上海斐讯数据通信技术有限公司 | A kind of router firmware upgrade method and system |
WO2019052057A1 (en) * | 2017-09-18 | 2019-03-21 | 上海斐讯数据通信技术有限公司 | Method and system for upgrading firmware of router |
CN108132792A (en) * | 2017-11-22 | 2018-06-08 | 奕瑞影像科技(太仓)有限公司 | Flat panel detector, electronic device, firmware loading method and firmware loads system |
CN108021410A (en) * | 2017-12-06 | 2018-05-11 | 九阳股份有限公司 | A kind of firmware upgrade method and system of intelligent appliance equipment |
CN113238789A (en) * | 2021-05-27 | 2021-08-10 | 闻泰通讯股份有限公司 | Electronic equipment, firmware upgrading method and device thereof and computer readable storage medium |
CN114448795A (en) * | 2022-01-18 | 2022-05-06 | 深圳市联洲国际技术有限公司 | Wireless module upgrading method, routing board, wireless communication system and processor |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106452928A (en) | Firmware upgrading method and firmware upgrading apparatus of router, and router | |
CN111625249B (en) | Automatic upgrading and rollback method and device for Internet of things equipment | |
US7047448B2 (en) | Software self-repair toolkit for electronic devices | |
KR101153073B1 (en) | Isolating software deployment over a network from external malicious intrusion | |
US7069334B2 (en) | Image restoration and reconfiguration support for crashed devices | |
KR101235520B1 (en) | Providing software distribution and update services regardless of the state or physical location of an end point machine | |
CN104427119B (en) | Communication terminal and its processing method of Nonvolatile data | |
EP1259028B1 (en) | A method of managing a network device, a management system, and a network device | |
US20170185311A1 (en) | Data Processing Method and Smart Device | |
CN112615747B (en) | Method and device for automatically deploying and configuring network equipment | |
US7492747B2 (en) | Secure patch installation for WWAN systems | |
CN109379215A (en) | A kind of network interface card firmware update, device and equipment | |
CN110086824B (en) | Self-adaptive configuration method, device and equipment for firewall policy of virtual machine | |
CN107656765A (en) | A kind of method, system and the terminal device of equipment initialization | |
CN106775874A (en) | The method for upgrading system of terminal device | |
CN106470114A (en) | A kind of collocation method of OTA AKU and device | |
CN110413322B (en) | Server network port management method and system and substrate management controller | |
CN104754410A (en) | Safety method and system for cable modulating and demodulating device | |
US9665364B2 (en) | Dual-bank telecommunication apparatus and method of upgrading firmware in dual-bank telecommunication apparatus | |
CN111769966B (en) | Clone upgrading method, system and application | |
Cisco | Working With System Images and Configuration Files | |
CN114416396A (en) | Interface version control method and device, electronic equipment and storage medium | |
Cisco | LightStream 2020 Release Notes for Software Release 2.3(1) | |
Cisco | LightStream 2020 Release Notes for Software Release 2.3(1) | |
Cisco | LightStream 2020 Release Notes for Software Release 2.3(1) |
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: 20170222 |